Skip to main content

Reply to "Using an optocoupler to connect insulated rail to input pin of shift register"

I actually kicked around the Mega idea as well, and it may be the way to go.  I was leaning in that direction when I got sidetracked with other projects.  I don't have a schematic for this right now, but here's a PCB layout I did for a controller for 8 switches.  

Mega-SMC-v03-02_pcb

The Mega plugs in on the bottom of the board and other connections are on the top side to save space.  It has 16 inputs for the anti-derail function on 8 switches, and outputs for 24 relays.  8 for the red/green signals and 16 for the relay coils.  While I plan to use the 12VDC of a power supply, the inputs are good for upwards of 22VAC track voltage.  There is also a header to connect a driver so that the brightness of the LEDs can be adjusted.  I added a set of headers as well to connect a RS485 module to allow this board to communicate with other boards or a master control unit. The plan here is that you could locate the relay boards and this 'motherboard' with a Mega2560 near your switches, then run just 3 wires over distances of hundreds of feet, if needed, to a control panel or master control unit.  Another unit would be at the control panel and light up panel lights and allow push-button control of the switches, as well as control from TMCC. One could also use DCS to control their switches with this set-up, but I'm not going to get into how to accomplish that at the moment.  The header labeled 'watchdog' however has nothing to do with DCS. Instead this is to attach a watchdog timer that will reset the Arduino if it hangs up for some reason, preventing a glitch from causing a derailment if the Arduino were to lock up and stop functioning.  

I need to actually assemble a prototype before I'll be sure everything works as planned, but I don't see any reason it wouldn't.  I'm thinking of adding an on-board 5v power supply, but my preferred method is to use an ATX computer power supply to power the Arduino's, relay boards, and other associated things.  

JGL

Attachments

Images (1)
  • Mega-SMC-v03-02_pcb

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×