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:
Become the Maker you were born to be. Try Arduino Academy for FREE!
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 https://circuitcrush.com/arduino/?s=mosfet
Nice idea, but I can’t find the ‘next’ article mentioned. Can you link it?
Thanks for the head’s up! It should be working now.
What is the sketch?
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.
Nice work!