I replaced the four toggle switches with an ESP8266 processor which drives an array of relays that switch each light on or off as needed.
An app on my phone allows me to pick any aspects for the main signal and the distance signal.
Any aspect selected is immediately displayed on the signal and on the phone.
The "Dunkelschaltung" rule is of course also observed, when the main signal is red (Hp0) all lights on the distant signal are off.
In addition, I now also have an 'Auto' mode that will alternate between Hp0 and non-Hp0 random aspects, and display these random aspects for random periods of time.
Here a random aspect of Hp1Vr1 has been selected and it has about 11 minutes to go before it goes to Hp0.
A test button allows all the lights to be tested in a pattern to confirm all are working.
Hardware
The 120V AC powers an old phone charger which supplies 5V DC to the ESP8266 using a USB cable. The 5 Volts supply also powers the relays which switch the 120V AC to the LED light bulbs (3W each).
Here is the rack of relays
Here is how the relays are wired to the ESP8266
The relays are driven by the logic level pin outputs from the ESP8266
This is now what it looks like in the control box:
Technical details
- Processor NodeMCU ESP8266
- Relays JBtek 8 Channel DC 5V Relay Module
- Firmware can be updated over the air (OTA)
- The phone app UI was created using Blynk