The ability to define the channels available on a RemoteSign ESP devices enables one to decide what capabilities it has in order to make the best use of the available output pins. The ability to record scripts that are also triggered by internal sensor channels means that it is possible to set up sensor pins that trigger almost any action even without a remote connection.
The types of channels that are available are:
- Network Connection Status
- OLED screen
- Sensors
- Monochrome Light controller (with numerous effects)
- Color light (RGB) controller (with effects and color transitions)
- Train signal controller
- Traffic light controller (with pedestrian lights)
- Animated LED patterns
- Stepper motors
- Servo motors
- RemoteSign Server connection
Overview
- Channels are numbered and are loaded in increasing order.
- Defining a channel for a channel number will replace any existing channel, and free up the pins used by the previous channel.
- Once a channel is defined, it is stored for future use. i.e. you do not have to define the channels every time you use the device.
- If a channel definition includes a pin that is already in use, the conflict will be reported by the {ERROR} command and will appear in the log screen of RemoteSign Sequencer. Duplicate pins will not be used. Pay attention to the error reports, you may have to delete an existing channel if you want to use any of its pins in a different channel.
- Whenever RemoteSign Sequencer connects to a RemoteSign it requests a list of current channels (using the {CH?} command). The results of that can be seen in the list of channels in Sequencer.
- If you wish to have certain channels automatically activated when a RemoteSign ESP starts up, you can place the activation commands into a script and record that to a script called AUTORUN on the ESP. For example, if you have defined an animated lighting effect on channel 3 and you want it to run automatically record a {SIG}3 ␑ 1 command and it will start at step 1 automatically. See the Scripting page for more details.
- RemoteSign Sequencer provides a user friendly method of generating the {DCH} commands for defining the channels and configuring a RemoteSign ESP. These commands need to be sent to the RemoteSign ESP only once. In order to send {DCH} commands to a RemoteSign ESP, the RemoteSign Sequencer must be registered.
Channel types
Network Connection Status
- ch - channel - must be zero
- CS - Indicates this is setting the Connection Status
- name - an optional name for the channel
- hilo - 1 or 0 to indicate if the pin should be set HIGH (on) or LOW (off) respectively when there is a connection
- pin - the pin designation, any of the following: D0, D1, D2, D3, D4, D5, D6, D7, D8, RX, TX. To disable the status light use -1 as the pin. This will free the pin for other channels to use.
- The network connection status is a virtual channel and exclusively and always uses channel 0 (zero)
OLED screen
- ch - channel - must be one
- OLED - Indicates this is setting an OLED channel
- name - a name for the channel
- flip - indicates if the screen should be 1 normal side up or 0 flipped vertically
- dim - minutes before screen dimmer activates. Zero means never. OLED screens have a limited lifetime so dimming after some period is recommended.
- soundpin - pin to use for making clicking sounds for split flap displays. The pin must be connected to a buzzer module along with its ground and power supply.
- Only one screen per RemoteSign
- The OLED screen must always be channel 1
- The type of screen cannot be changed without switching the firmware (via the {OTA} command)
Sensors
- Signal aspects
- Pedestrian crossing sequences for traffic lights
- Local scripts
- ch - channel
- S - Indicates this is defining a Sensor channel
- name - an optional name for the channel
- nsensors - the number of sensors being defined
- pinlist - a list of pairs of pins and the type of sensor separated by spaces. Allowable pins are: D1, D2, D3, D4, D5, D6, D7, RX, TX & A0. Sensor types are:
- 0 = Sensing ground (connection to GND pin)
- 1 = Sensing 3.3 Volts (connection to 3V3 pin)
- 2 = Touch capacitance (potential future type, not available on ESP8266)
- 3 = Temperature sensor in Celsius using a TMP36 sensor
- 4 = Temperature sensor in Fahrenheit using a TMP36 sensor
- 5 = Voltage
- 9 = Temperature sensor in Celsius using a DS18B20 sensor
- 10= Temperature sensor in Fahrenheit using a DS18B20 sensor
One can also use a virtual pin to obtain a second or third value of a temperature or voltage sensor using different units. For example pin A0 can define a voltage reading, V1 can get the temperature that it represents for a TMP36 sensor, in Fahrenheit, and V2 can get the temperature that it represents for a TMP36 sensor, in Celsius. - directives - a text list of directives for each sensor separated by ␒. Each directive is in the format of:
thresholdvalue:script / thresholdvalue:script / ...
Each time the temperature or Voltage moves into a new range, the corresponding script is run. Value thresholds must be defined in ascending order and are inclusive.
Directives only apply to voltage and temperature sensors. (Other on/off type sensors already have a mechanism for running local scripts.)
-50:Freezing/32:Cold/39:/41:Ok/90:Hot
If the temperature changes from below 90 to 90 or above, it will run a script called "Hot"
If the temperature changes from above 32 to below 32, it will run the script "Freezing"
Note that the range from 39 to 40 will not run any script. This is useful to prevent hysteresis in a control system. If the value increases from 38, it will run the "Ok" script when it gets to 41.
Connecting sensors to RemoteSign ESP
For connection diagrams, see the page describing sensor connectioms
- Only one sensor channel per RemoteSign
- Pins that can be used by connecting to GND: D1, D2, D3, D4, D5, D6, D7, RX, TX
- Pins that can be used by connecting to 3V3: A0
- Pins D0 and D8 cannot be used
Signals
- ch - channel number, use a negative number for inverted pin logic
- SIG - Indicates this is defining a Signal channel
- name - an optional name for the signal
- nul - not used for signals
- fade - indicator that lights should fade out to simulate incandescent lights. 0 means no fade 1 means fade
- naspects - the number of aspects being defined. Eg 3 aspects defines aspects 0, 1 and 2
- nlights - the number of independent lights the signal has
- pinlist - A series of parameters separated by spaces as follows:
- for each aspect: s pin0 state0 pin1 state1 ... pinn staten
- s = a sensor number to trigger the aspect, 0 for no sensor. If the same sensor is set for more than aspect then that sensor will act to cycle through the signal aspects.
- pin0, pin1 .. pinn the pin designation to use. Allowable pins are: D0, D1, D2, D3, D4, D5, D6, D7, D8, RX, TX
- state0, state1 ...staten the desired state for that pin for that aspect. State code are:
- - = off (dash)
- + = incandescent off
- X = on
- F = Flashing starting On
- f = Flashing starting Off
- R = Rapid Flashing starting On
- r = Rapid Flashing starting Off
- A combination of up to 5 signals and LED animation channels can be defined
- A combination of up to 10 lights and aspects can be defined in any signal.
- Austrian distant
- Austrian main
- French
- German Hp01
- German Hp012
- German Vr01 (using 3 wires)
- German Vr01 (using 5 wires)
- German Vr012
- German Vr012 (with Dunkelschaltung)
- German Sh01
- German Bü (level crossing) old style
- German Bü (level crossing) old style with traffic light
- Level crossing alternate flashers
- Swiss distant signal (type L)
- Swiss Main (type L)
- US 3-color head (Use two or three for 2- or 3-head lights)
- - = Light will be off
- + = Incandescent off
- X = Light will be on
- F = Light will flash (starting on)
- f = Light will flash (starting off)
- R = Light will flash rapidly (starting on)
- r = Light will flash rapidly (starting off)
- Define the sensors on a lower numbered channel so that they are in place when the signal channel is defined.
- The device does not need to connect to a Wi-Fi network.
Animations
- ch - channel number, use a negative number for inverted pin logic
- ANI - Indicates this is defining an Animation
- name - an optional name for the signal
- loop - 0 indicates no looping. 1 indicates that the animation should automatically loop every time it is complete. If the duration of step 0 is zero, it will loop to step 1. If the duration of step 0 is greater than zero, it will loop back to step 1 instead.
- fade - indicator that lights should fade out to simulate incandescent lights. 0 means no fade, 1 means fade
- nsteps - the number of steps being defined. Eg 3 steps defines steps 0, 1 and 2
- nwires - the number of independent wires (lights) the animation uses
- pinlist - A series of parameters separated by spaces as follows:
- for each step: dur pin0 state0 pin1 state1 ... pinn staten
- dur = a duration of the step in milliseconds. A value of zero will prevent the animation going to the next step. (Maximum is 2²³ -1 or about 49 days.)
- pin0, pin1 .. pinn the pin designation to use. Allowable pins are: D0, D1, D2, D3, D4, D5, D6, D7, D8, RX, TX
- state0, state1 ...staten the desired state for that pin for that aspect. State code are:
- - = off (dash)
- X = on
- F = Flashing starting On
- f = Flashing starting Off
- R = Rapid Flashing starting On
- r = Rapid Flashing starting Off
- Set all the lights for step 0 to OFF
- Set the duration of step 0 to zero.
- A combination of up to 5 signals and LED animation channels can be defined
- A combination of up to 10 lights and aspects can be defined in any animation.
- Alternating flashers
- Ambulance
- Chase pattern
- Fire Engine
- German level crossing (Bü) with new style traffic pattern
- Police
- UK pattern level crossing
- Vehicle Indicators and hazard lights
- Wig-wag (alternating headlights)
Monochrome Light
- On
- Off
- Off (with simulated incandescent fade)¹
- Transition (fade) from current brightness to a new brightness over n seconds¹
- Lightning
- Fluorescent light flickering on and then staying on
- TV screen flicker¹
- Arc welder²
- Flames¹
- Glowing coals¹
- Fixed on & off periods (in minutes or seconds)
- Random on & off periods (in minutes or seconds) with settable limits
- Cooling slag¹
- Camera flash gun
- Cell phone camera flash
- Sunrise¹
- Sunset¹
- ch - channel number, use a negative number for inverted pin logic
- LM - Indicates this is defining a Monochrome Light
- name - An optional name for the channel
- pin - the pin to use for the light. The following pins can be used: D0, D1, D2, D3, D4, D5, D6, D7, D8, RX, TX (Remember to disable connection status to use D4)
- maxbrightness - optional, the maximum brightness value that should be used for any effects. A value between 1 and 1023. If higher brightness values of the connected light do not look any brighter, then you can set the maximum pulse width value for the light to a lower value. This will result in transitions with a visible brightness difference from 0% to 100% If you set a maximum brightness value below 1023, do not use the pin to drive a relay.
- A total of 11 Monochrome Light channels can be defined
Color Light
- ch - channel number
- RGB - Indicates this is defining a Color Light
- name - An optional name for the channel
- rpin, gpin, bpin - the pin to use for the light. The following pins can be used: D0, D1, D2, D3, D4, D5, D6, D7, D8, RX, TX (Remember to disable connection status to use D4)
- rmaxbrightness, gmaxbrightness, bmaxbrightness - Red, green and blue values between 1 and 1023, the maximum brightness value that will map to a color channel value of 255. If one of the colors is too intense (Eg too blue, then you can set the maximum pulse width value for (blue) to a lower value.
- A total of 3 Color Light channels can be defined per module (3 lights will use 9 pins).
- This channel should not be used with relays as it uses pulse width modulation (PWM), use a MOSFET module on the output pins.
Traffic light controller
- Two street traffic intersection with pedestrian crossings in both directions!
- Two street traffic intersection without pedestrian crossings
- Single street traffic with pedestrian crossing
- ch - channel number, use a negative number for inverted pin logic
- TL - Indicates this is defining a traffic light channel
- name - an optional name for the traffic light
- green - duration (in seconds) of green traffic light
- amberB4green - duration (in seconds) of the amber light that comes on with the red traffic light before it changes to green (German style). If you do not want the amber to come on before the green, set the value to zero.
- amberB4red- duration (in seconds) of the amber light that comes on between the green and red traffic lights
- pedgreen - delay (in seconds) between the traffic getting a green light and the pedestrian crossing in the same direction going green
- pedsafety - duration (in seconds) of the safety period after the pedestrian crossing goes red and the traffic light starts changing to green
- redred - duration (in seconds) of overlap of red traffic lights in both directions
- EWsensor - sensor number to request East-West pedestrian crossing sequence. Set to zero if no sensor input is desired.
- NSsensor - sensor number to request North-South pedestrian crossing sequence. Set to zero if no sensor input is desired.
- Pins - a list of pins to be used for the lights, separated by spaces, and in the following order
- North-South traffic green
- North-South traffic amber
- North-South traffic red
- East-West pedestrian green
- East-West pedestrian red
- East-West traffic green
- East-West traffic amber
- East-West traffic red
- North-South pedestrian green
- North-South pedestrian red
If a pin is not needed, specify it as XX
- One traffic light controller can be defined per RemoteSign ESP
RemoteSign Server connection
This defines a RemoteSign Server that the device should attempt to connect to
Syntax
{DCH} ch ␑ SERVER ␑ name ␑ port ␑ URL ␑ retry- ch - channel number
- SERVER - Indicates the RemoteSign should attempt to connect to a server
- name - an optional name for the channel
- port - the TCPIP port to use. Default is 50603
- URL - the IP address or network address to connect to
- retry - initial number of seconds between connection attempts.
This allows a RemoteSign to initiate a connection to another RemoteSign computer as a client. Once a connection is made, the RemoteSign will send and {AUTH} commands that includes its unique ID and server token if it has received one with a {TOKEN} command. The connection will be held open until either side disconnects. The RemoteSign will then attempt to connect again. After each failed attempt to connect, the delay between attempts is increased by one second.
Here is the RemoteSign Sequencer UI for defining a RemoteSign server channel:
- ch - channel number
- SERVER - Indicates the RemoteSign should attempt to connect to a server
- name - an optional name for the channel
- port - the TCPIP port to use. Default is 50603
- URL - the IP address or network address to connect to
- retry - initial number of seconds between connection attempts.
Stepper motor controller
{DCH} ch ␑ STEPPER ␑ name ␑ steps ␑ mindelay ␑ drivetype ␑ pins- ch - channel number
- STEPPER - Indicates the channel is a stepper motor controller
- name - an optional name for the channel
- steps - the number of steps needed to turn a full revolution
- mindelay - the minimum delay between pulses in microseconds (μs)
- drivetype - the mode of driving.
- 0 = Full step
- 1 = Half step (not yet supported)
- 2 = Wave (not yet supported)
- pins - a lists of pins separated by spaces - one for each control wire
The screen for composing a stepper channel in RemoteSign Sequencer includes the ability to select a stepper motor to set all the fields for you, other than your choice of which pins to use.
- ch - channel number
- STEPPER - Indicates the channel is a stepper motor controller
- name - an optional name for the channel
- steps - the number of steps needed to turn a full revolution
- mindelay - the minimum delay between pulses in microseconds (μs)
- drivetype - the mode of driving.
- 0 = Full step
- 1 = Half step (not yet supported)
- 2 = Wave (not yet supported)
- pins - a lists of pins separated by spaces - one for each control wire
Servo motor controller
{DCH} ch ␑ SERVO ␑ name ␑ pin ␑ minpulse ␑ maxpulse ␑ maxspeed- ch - channel number
- STEPPER - Indicates the channel is a stepper motor controller
- name - an optional name for the channel
- pin - the output pin to be used to drive the servo
- minpulse - short pulse duration in ms
- maxpulse - long pulse duration in ms
- maxspeed - maximum speed of the servo, the number of milliseconds taken to turn 60°
RemoteSign Sequencer has two presets for the three time values of common servo motors:
- ch - channel number
- STEPPER - Indicates the channel is a stepper motor controller
- name - an optional name for the channel
- pin - the output pin to be used to drive the servo
- minpulse - short pulse duration in ms
- maxpulse - long pulse duration in ms
- maxspeed - maximum speed of the servo, the number of milliseconds taken to turn 60°
- SG90 motor: 500, 2500, 120
- Faller 180726 motor: 532, 2425, 120
Delete a channel
{DCH} ch ␑ DELETE- ch - The channel number to be deleted
- DELETE - Indicates this command should remove the specified channel
This command will take effect when sent to the RemoteSign ESP
- ch - The channel number to be deleted
- DELETE - Indicates this command should remove the specified channel
Reset to factory configuration
Use RESETALL to remove all channel configuration changes and go back to the factory settings. The factory defined channels will reappear after restarting.
Syntax
{DCH} nul ␑ RESETALL ␑ reset - nul - not used. The command applies to all channels.
- RESETALL - Indicates this command should remove all previous channel definitions
- reset - optional, indicates if the RemoteSign ESP should reset itself immediately. 1 means reset and anything else means no reboot.
This command will take effect when sent to the RemoteSign ESP.It will not delete scripts from the RemoteSign ESP, only channel definition data.
- nul - not used. The command applies to all channels.
- RESETALL - Indicates this command should remove all previous channel definitions
- reset - optional, indicates if the RemoteSign ESP should reset itself immediately. 1 means reset and anything else means no reboot.
Overview and list of all RemoteSign commands: API reference
Supported by:RemoteSign WindowsRemoteSign Sequencer (send)RemoteSign ESP
Standard configuration
From version 3.1 onwards, the standard configuration of channels is as follows:
- 0 Connection status using pin D4
- 1 OLED screen using pins D1 & D2
- 2 Sensors S1 to S4 using pins D5, D6, D7 and RX
Connecting things up electrically
Supply the RemoteSign ESP with 5V DC either to the VCC (+) and GND (-) pins or from a USB cable, but not both. All other wires must only come to the RemoteSign ESP. For example, if connecting a signal, use the GND for the common return for all the aspect LEDs. Do not connect the live or ground of the signal LEDs to some other ground (such as that of a train layout).
The load that can be applied to each pin must be less than 12mA. The voltage is 3.3V which is sufficient for a single LED circuit per pin. Typically any LED circuit should include at least a 120 Ohm resistor. Note that the long strips of LEDs contain multiple LED circuits and present a huge load, and for that, there are two options:
- Use a relay. This is an option only if the output will be on or off. It should not be used if there are intermediate brightness outputs possible, E.g. lighting effects such as dimming, incandescent fade outs, flames, signals using fades, etc. The relay must be able to be triggered with 3.3V.
- Pass the LED signal into a MOSFET driver with a MOSFET circuit. This can handle rapid changes as well as variations in brightness. The MOSFET circuit must be able to be triggered with 3.3V.
Here are example wiring diagrams for connecting various items:
- Sensors
- MOSFETs
- Relays
- LEDs, Signals, Traffic lights, etc.
- OLED screens (in prep)
- Stepper motors (in prep)