Model Railroad Turnout Control – Arduino MOSFET

Share on facebook
Share on google
Share on twitter
Share on linkedin
A VPN is an essential component of IT security, whether you’re just starting a business or are already up and running. Most business interactions and transactions happen online and VPN

One of the projects we are working on is Turnout Control. Most home layouts are using Atlas or Bachmann track with solenoid type turnouts like the one shown here. More professional layouts use slow moving motors like the Tortoise. Our goal is to make these turnouts controllable with an arduino, so that future projects using train detectors and DCC can allow more automation. So here is the beginning of our project. This one uses the above Bachmann turnout (arduino servo control article coming soon), a arduino nano, two IRL520 MOSFETS, two resistors, and two diodes. The schematic is as follows:

The diodes protect the MOSFET from inductive spikes when the solenoid coils fire. The two MOSFETS engage the solenoid coils to move the turnout. the two resistors keep the MOSFET from randomly conducting when there’s no input signal, by pulling the gate to ground (off). This uses two digital outputs on the arduino called straight and turn. The next article will show the board layout and wiring of the arduino, turnout and power supply. For more projects based on MOSFETS, see


Steve Spence

Steve Spence

Leave a Reply

4 thoughts on “Model Railroad Turnout Control – Arduino MOSFET”

  1. Technically, the two diodes are not there to protect the MOSFET when the coil fires. They are there to protect the MOSFET when the power to the coil is removed. When that happens, the coil (being a coil) will attempt to keep the current flowing – resulting in a huge reverse voltage spike. The diodes short that out.

Leave a Comment

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