Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Arduino project: automatically changing turnouts

1501 views
1 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    December 2016
  • 168 posts
Arduino project: automatically changing turnouts
Posted by speedybee on Wednesday, February 16, 2022 8:06 PM

I finished a small project the other day. It's an Arduino circuit that uses phototransistors to detect a train coming into turnouts and uses geared motors to align the turnout with the train. I'm sharing it here in case anyone needs an excuse to play with an Arduino.

https://i.imgur.com/MTmETuk.mp4

A single Pro Mini with a circuit like this can move up to four turnouts and monitor eight sensors. All the parts (including the four motors) add up to less than the cost of a single Tortoise.

The version in the next pictures can operate two turnouts. The remaining five pins will be used for signals. It's not as complicated as it may appear at a glance. The four transistors in the bottom left make a pair of motor drivers, two transistors per motor. The IC in the bottom right is a RS485 interface, because my homemade controller uses a RS485 bus to send data to/from layouts. The IC in the top right is a trusty old L7805 because the onboard regulator can't supply enough power for motors. The remaining blocks of pin headers are for attaching sensors, signals, etc.

https://i.imgur.com/BxQN9Vc.jpeg

https://i.imgur.com/S5POHit.jpeg

And here's an up close of the phototransistor (the little guy between the rails). It's so tiny it'll be basically invisible once surrounded by ballast.

https://i.imgur.com/ShMSFbB.jpegWell that's basically it... I can post a detailed circuit schematic and the Arduino code to run it if anyone is interested in replicating this project or something like it

  • Member since
    February 2018
  • From: Flyover Country
  • 5,557 posts
Posted by York1 on Monday, March 21, 2022 7:57 PM

Very neat.  I used photoresistors, which are bigger.  I may have to try some of these sometime.

Thanks for posting this.

York1 John       

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!