Following on from the station lights blog I published awhile ago I have now have the lights coming on automatic when a train comes into any of the four tracks using a Arduino Nano As I have some spare Ezybus boards I used one of these to do all my connections to the Nano, it also has a 12 Volt input to power the Nano As my layout is DCC I am using a MERG PMP7 for train detecting, which uses a opto-isolator, to control the LED on the control panel. One side has a voltage on, in my case 5 Volts with a dropper resistor which brings it down to about 3.5 Volts, the other side is connected to ground 0 Volts. One of the Nano pins reads this voltage, if it is 3.5 volts it does nothing but if it at 0 volts it switches on another pin on the Nano. I have used 4 PMP7's for the 4 tracks and used 4 pins on the Nano ( one for each track ) if any of the pins goes to 0 Volts it will switch on the output pin, this in turn switches on a replay to power the LED's ( I have not used the output pin ...
Members of the Model Electronics Railway Group