![A train decorated in Christmas lights rolls along a riverbank at night, reflecting in the water](https://www.trains.com/wp-content/uploads/2021/05/MRR_Ask_MR_Christmas_train_0615.jpg)
Q: Next Christmas I’d like to build a small automatic direct-current layout to put in my wife’s shop window. How is it possible to make sure that when a train arrives at the station and stops, a switch is triggered, the polarity is reversed, and another train departs in the opposite direction? – Ferruccio Felletti, Italy
A: First, I would need to clarify how your tracks would be arranged and how you want your trains to run, because the answer of how to wire and control those trains depends on those factors.
If you want trains to run in both directions, the simplest arrangement would be to have two separate loops of track with a train on each. When a train reaches the station on the inner loop, it would trip an occupancy detector (either optical or electrical) that would trigger a relay that would turn off the voltage to that track and turn it on for the outer loop. The polarity of the rails on the outer loop would be reversed from the inner loop, so a train on the outer loop would travel in the other direction. When that train gets to the station, another detector would trigger the relay to switch power back to the inner loop.
It would be not much more complicated to have both trains running back and forth on a pair of stub-ended tracks. Both trains should be double-ended, such as a trolley or a commuter train, so they would not look odd running backward. There are commercial DC auto-reversing modules that could handle switching polarity to keep the trains bouncing back and forth. Just make sure you don’t accidentally purchase a Digital Command Control auto-reverser circuit, which is an entirely different thing.
The most complicated arrangement would be to have two trains going back and forth on a stub-ended single track. You would need at least two tracks at your two stations, and you would have to set up detectors and relays to cut power to one station track when the train arrives, line a turnout to the track where the second train sits, turn on power to that track, then do the reverse when it arrives at the second station. Power routing turnouts could simplify wiring for this option; all your occupancy detector would have to do is line the turnouts and reverse the track polarity. A switch motor with internal accessory contacts, like a Tortoise by Circuitron, could handle both tasks.
Good luck with your project.
Send us your questions
Do you have a question about model railroading you’d like to see answered in Ask MR? Send it to associate editor Steven Otte at AskMR@MRmag.com.