users:dagnall53:node_setup
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
users:dagnall53:node_setup [2018/11/12 08:56] – external edit 127.0.0.1 | users:dagnall53:node_setup [2019/03/17 19:24] – ["FIXED" Functionality] dagnall53 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | | + | |
- | **ESP8266 Rocnet Nodes** | + | **WiRocS Node Information** |
- | * [[: | + | * [[: |
- | * [[https:// | + | * [[https:// |
* [[: | * [[: | ||
* [[: | * [[: | ||
* [[: | * [[: | ||
- | \\ | ||
- | ** RocClient Experiments ** \\ | ||
- | Rocrail Client experiments using the Wemos Oled Battery board. | ||
- | * [[: | ||
- | * [[: | ||
- | |||
- | ---- | ||
- | |||
- | |||
- | ====== | + | ====== |
- | ===== Setting up the Node Software | + | ===== Setting up the Node Software |
- | Full documentation with illustrations is in {{: | + | Full printable |
This includes full details on: | This includes full details on: | ||
Line 30: | Line 21: | ||
* Updating the code | * Updating the code | ||
* Updating the sounds: | * Updating the sounds: | ||
- | - | + | |
+ | Also see [[users: | ||
Line 38: | Line 30: | ||
====== Selecting Pins as Inputs or Outputs | ====== Selecting Pins as Inputs or Outputs | ||
- | The code use settings from BOTH Pi02 and Pi03 settings tables to determine the functionality of each pin. | + | The code uses settings from BOTH Pi02 and Pi03 settings tables to determine the functionality of each pin. |
* If Pi02 Is set as " | * If Pi02 Is set as " | ||
Line 55: | Line 47: | ||
Set Delay = 0 and steps to 0 for the fastest movement. | Set Delay = 0 and steps to 0 for the fastest movement. | ||
+ | See [[users: | ||
---- | ---- | ||
Line 73: | Line 66: | ||
* Port :8 is Servo NodePortType :0 Pi03_Setting_options32 | * Port :8 is Servo NodePortType :0 Pi03_Setting_options32 | ||
+ | I would recommend keeping D8 as an output as most boards have a relatively strong pull down resistor on this pin to assist with startup. This makes it harder to use as an input. | ||
+ | (As a very simplistic overview, NodePortType Determines if the port is Input or Output, Pi03_Setting_options determines if the output will be digital, PWM or a servo drive.) See also [[: | ||
- | (As a very simplistic overview, NodePortType Determines if the port is Input or Output, Pi03_Setting_options determine the Pi03 settings.) | ||
- | Use the Rocrail Rocnet Programming tabs to get a much clearer picture of exactly how the ports are set) | ||
- | When set as a Loco, the code expects LEDS connected to 3v3 and the Back or Frontlight pins (D2 and D5). Currently the " | + | ---- |
- | \\ | + | |
- | {{: | + | |
- | |||
- | |||
+ | ====== | ||
+ | ==== LOCO HEADLIGHTS ==== | ||
+ | When set as a Loco, the code expects LEDS connected to 3v3 and the Back or Frontlight pins (D2 and D5). Currently the " | ||
+ | ==== CV settings ==== | ||
- | |||
- | ---- | ||
- | |||
- | ====== CV settings for Mobile Decoder ====== | ||
Clicking on “Programming” will open the Rocrail CV Programming interface. | Clicking on “Programming” will open the Rocrail CV Programming interface. | ||
Line 103: | Line 92: | ||
Changing the Loco address **can** be done with this interface, but care needs to be taken to ensure the programming interface loco address and the loco address stay in synch. | Changing the Loco address **can** be done with this interface, but care needs to be taken to ensure the programming interface loco address and the loco address stay in synch. | ||
- | To change from a Short Loco address to a Long loco address, First set the Loco " | + | To change from a Short Loco address to a Long loco address, First set the Loco " |
- | === Sound CV settings | + | ==== |
+ | Click here for more details on the [[: | ||
- | The volume of each " | + | ==== Speed settings: ==== |
+ | WiRocS tries to be NMRA compliant. | ||
| | ||
- | * CV[100]=127; | ||
- | * CV[101]=127; | ||
- | * CV[102]=127; | ||
- | * CV[103]=127; | ||
- | * CV[104]=127; | ||
- | * CV[105]=127; | ||
- | * CV[106]=127; | ||
- | * CV[107]=127; | ||
- | * CV[108]=127; | ||
- | * CV[110]=127; | ||
- | * CV[111]=127; | ||
- | |||
- | === Speed settings: === | ||
- | |||
| | ||
* CV[2]; Minimum speed setting (not MPH!..) Will have CV 66 or 95 added to set power at minimum speed demand | * CV[2]; Minimum speed setting (not MPH!..) Will have CV 66 or 95 added to set power at minimum speed demand | ||
- | * CV[5]; Multiplier for speed setting, is multiplied by required speed to set power to motor | + | * CV[5]; |
- | * CV[66]; Forward speed trim Added to CV 2 when in " | + | * CV[6]; Mid Speed multiplier (used for first half of the throttle) |
- | * CV[95]; Reverse speed trim Added to CV 2 when in " | + | * CV[3]; Acceleration rate (typ 2) |
+ | * CV[4]; Decelleration (typ 2) | ||
+ | * CV[29]; Standard Config usage | ||
+ | * CV[67-94] ; Speed table | ||
+ | * CV[66]; Forward speed trim multiplier (multiplies by | ||
+ | * CV[95]; Reverse speed trim multiplier (multiplies by | ||
* CV[65]; Kick start sets duration of high speed motor setting when starting. | * CV[65]; Kick start sets duration of high speed motor setting when starting. | ||
Line 136: | Line 118: | ||
Set the kick start CV65 to a value so that the motor reliably starts without a visible kick. If it kicks noticeably then lower the value. If it does not start, increase the value. | Set the kick start CV65 to a value so that the motor reliably starts without a visible kick. If it kicks noticeably then lower the value. If it does not start, increase the value. | ||
- | Set the loco to 10 mph and adjust CV5 so the loco travels at 10 mph. | + | Set the loco to desired speed and adjust CV5 and CV6 |
+ | Or use the speed table to select the speed. | ||
---- | ---- | ||
- | |||
- | ====== Some examples using Rocrail Rocnet programming | ||
- | Go to Rocrail and select " | ||
- | This will bring up a page that shows all the nodes connected to the MQTT broker. (Note this does not update actively so may show nodes that are currently off or not powered up). | ||
- | |||
- | If you press " | ||
- | |||
- | {{: | ||
- | |||
- | |||
- | The decoder we were looking at via the Arduino Serial monitor is ID 28, and has the nickname “NoDAC”. | ||
- | The Roc Node address was set initially to the last byte of the IP address because of the _ForceRocnetNodeID_to_subIPL directive. This prevents nodes being on the same “node” address. Once the unit is reprogrammed with the directive disabled, you can set the Node Address via the Rocrail “Rocnet” ID interface, and also the node “nickname or “UID-Name” as Rocrail calls it. | ||
- | I would recommend leaving the Node ID as the IP address as it may help debugging later, but the " | ||
- | |||
- | If we now highlight node ID 28, and Click “Pi02 Port Setup”, it will show us how the various ports are set up: | ||
- | |||
- | {{: | ||
- | |||
- | Port 6 is an input, but all others are outputs. | ||
- | If any of the Pi02 ports were set with “Blink”, | ||
- | “Invert” would invert the port phase. | ||
- | Note Rocrail does not know that some ports are “FIXED”, | ||
- | |||
- | Pressing “Pi03 Channel Setup” shows further information about our 8 io pins: | ||
- | |||
- | {{: | ||
- | |||
- | Here we see that Pin 1 and 8 are defined as a servos.. Pin 1 is actually the “FIXED” Motor drive servo, and is a special case where Left Right, Left steps Right steps etc are defined by CV values so these values cannot be changed here. | ||
- | Pin 5 has Blink set, so will be a PWM output, switching between the Left and Right PWM settings of 160 and 600. | ||
- | Pin 8 is a “normal” Servo output and will switch between positions 236 and 457. Note that in Rocrail, Min and Max positions for a servo are 150 and 600. | ||
- | |||
- | |||
- | |||
- | Because this example is a “loco” at address 7 we can look at the throttle: | ||
- | I have set this one in the Rocrail “Locomotives table” with some default sound effect names. | ||
- | |||
- | {{: | ||
- | |||
- | Clicking on “programming” will open the CV programming interface. | ||
- | To make this work, you need to select “POM” and the loco to be programmed in the top left box, and Rocrail will interrogate the set loco address and get the main CV settings: | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||