2019-03-26

Outdoor signal with wi-fi control

A few years back I created a replica of a German signal which stands outside our house. It was manually controlled by four switches in the base. Some folks were surprised that I had not made it fully automated and controllable from my phone, so to appease the underwhelmed, I have now done so!

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
Thanks also to Paul__B and Outsider on the Arduino Forum for their help!

Update 2019-10-01

I added a button that causes all the green lights to go on, and then go into a loop of switching each of the three green ones off and back on again in a cycle. This produces an all-green flashing display. I have also created a Google Assistant voice command to trigger this button (via IFTTT) so I can say "OK Google, green flash", and it will put the signal into this mode. If ever we have to call an ambulance, or I need to direct someone to the house, I can do this and tell them to come to the house with the green flashing lights!

Update 2022-12-08

The application I used for controlling the signal, Blynk, will no longer be available from January 2023 without migrating to their new architecture, so I have replaced the software with a generic RemoteSign ESP which has the capability to drive multiple signals. I was able to update the software over the air, without having to touch the signal at all. It is fully self contained, no internet service needed to run, and will cycle through various signal aspects by itself when it gets power. I have also written a new phone app using AppGameKit that connects directly to the signal over Wi-Fi and lets me change the aspects on demand.