WiFi Railroad Signal Controller

My searchlight signalOne of my summer projects for 2020, while spending all day, every day at home, was to finally get my railroad signal restored and up in my back yard.  It’s a hodge-podge that’s the end result of 18 months of collecting the necessary parts.  The head is a Union Switch & Signal H-2 style searchlight (acquired from a guy in Las Animas, whose dad had acquired it in Texas many years ago), the relay inside of it came from a signal collector in California and is also ex-SP, the pole is from a retired crossing signal in Colorado (and purchased from a scrapper in Denver), the milemarker is pieced together from several ex-MoPac number plates (from a friend who moved back to Kansas and didn’t take it with him), and the other assorted hardware is a collection of stainless steel bits mostly from McMaster-Carr.   

The only thing missing was a way to control it.   Sure, I could do something old school, like toggle switches, but that’s just boring.  Besides, if I could expose the signal controls on my local network, I could control it using my phone or maybe eventually scripts reading data from ATCS Monitor so that it could react to actual rail traffic.  Thus, it was settled – the controller had to be WiFi-enabled and expose a web interface.

The Controller

Given this controller links an 11-foot aluminum lightning rod to my house electrical system, safety is of paramount concern.  The mast and the controller are both bonded via a #6 copper wire to not only a grounding rod at the signal, but also to the house grounding rod and thus the house grounding system.  That assures no large potentials develop between the signal and house wiring.  The controller then integrates TVS (transient voltage suppression) diodes and gas discharge tubes on the wires out to the signal to protect the electronics and dissipate moderate spikes and surges.  It also has fuses in both power inputs to protect the controller and power supply in the event of a short or other fault condition.

The control system itself is based off a NodeMCU ESP8266 module.  These are inexpensive (<$5) WiFi-enabled microcontroller development boards that have become incredibly popular and are well supported through the Arduino environment.  Developing for them basically amounts to telling the Arduino IDE to download the ESP8266 toolchain, setting up a few parameters, writing a very small amount of code, and downloading it to the module via USB.  The configuration for the WiFi network (both the SSID and passphrase) are just done in code for simplicity.  Once it’s powered up, you just connect to its IP address with any web browser and it’ll give you a webpage allowing you to change the signal.  (Obviously, this thing is designed to operate on your private network only – it has no security at all beyond just the secured WiFi.)

To actually operate the signal, we need two outputs – lamp power and coil power. Lamp power does exactly what you’d think – powers the bulb that makes the light.  The bulb is a standard 20W 10V railroad signal bulb, so steady state we’re going to need about 2A @ 12V there (there’s a ballast resistor in the signal head to drop it to 10V, so it expects 12V in).    Obviously being an incandescent bulb, there’s going to be much higher currents when it heats up.  Since I wanted to implement flashing aspects and that would really wear on a small relay, I went solid state for switching the lamp current.   The lamp voltage is switched via a self-protecting low side driver – the ON Semi NCV8405 rated for 42V at 6A. These are essentially N-channel MOSFETs with a bunch of protection built in against excessive gate-source voltage, excessive current, and thermal failure.  They’re designed to be rugged even when driving rather ugly loads.

The second control output we need is for a set of coils that pull colored discs (called roundels) into the light path to change the signal aspect color.  Apply no current, and the center roundel (red) stays in place.  Apply current in one polarity and the coils pull the arm to the right, placing the amber roundel in the light path.  Reverse the current and it pulls the other way, displaying green.  My coils start to operate at about 5.5V and draw approximately 25mA at that voltage, so I decided I’d drive them at about 7V so I’d get a reliable throw but not a lot of excess heat.  I put a good old LM317 on the board to lower the voltage, and then the polarity is switched by a pair of relays. 

The WiFi-Enabled Searchlight Controller

Installation

The controller is actually installed in a weather-tight plastic box on a pole by my back fence.  (It also holds up my satellite dish and has one of the the security cameras that watches the back of the house.)  The box was already there, and is connected to the house via underground conduit.  The signal control lines are just 5-conductor direct-bury sprinkler cable in a shallow (<1ft) trench running from the signal back to the box.  It’s got a clear line of sight to my office on the second floor, and thus gets a good connection to the WiFi access point.

For power, I’m just using a Mean Well LPV-60-12 power supply.  This is a small 12V 5A switching power supply intended for LED lighting use.  However, it’s IP67-sealed (so highly sealed against dust and moisture), efficient, UL listed (yes really it is – Mean Well is a reputable power supply manufacturer), and less than $25.  It’s perfect for this application.

control-box

The Controller In Action

More Details

This is firmly in the “It’s a Project, not a Product” range of things Iowa Scaled has built over the years.  I built it because I wanted it, not because I think there’s any great market for these.  That said, our board house has a minimum of 5 PCBs, and this only used one.  So we have four extras and if anybody was interested, we’d probably be willing to sell you one.  Drop us an email if you’re interested.

For those who want more details, I have more in-depth posts about both the signal restoration and the signal controller on my personal website.  In addition, all the design files and source code for the controller are available as the esp-searchlight project on Iowa Scaled Engineering’s Github account.

Leave a Reply

Your email address will not be published. Required fields are marked *