Railroad Automation

One of my hobbies is model railroading. I’m currently building a small, N-scale (1/160th actual size) layout.

In the past, to power the track and be able to run two trains at the same time, you would electrically isolate sections of the track, and then attach power feed wires to each section, with power being selected through a DPDT toggle switch. By changing the switch position, you could feed power to each track segment from a separate power source. Each power source could provide a different voltage. The greater the voltage, the faster the train would run. This approach allows two trains to be controlled at different speeds and/or directions, however, it has a number of disadvantages:

  • Lots of electrical wiring is needed
  • Control is only as granular as the size of the electrically isolated blocks
  • It is difficult to control more than two trains simultaneously, due to the wiring issues

With the growth of computers and the miniaturization of electronic circuits, a new approach has become viable: Digital Command Control or DCC.

Instead of applying a variable voltage to control speed, a constant 12 volts is applied to the rails. A digitally encoded signal is superimposed over the 12 volt waveform that can be decoded by a decoder in the locomotive. The decoded signal is separated into messages that contain a locomotive ID, speed and other control information. In this way, the decoder can determine if the message is for a given locomotive, and change speed, direction, etc., as requested. There are many advantages to this new system:

  • As few as 2 wires need to be connected to the track.
  • DCC can also control other locomotive features, such a lights, and sound effects.
  • DCC can control other accessories such as turnouts.
  • The railroad can be operated by a handheld throttle, or through a computer using API’s
  • Nearly unlimited number of trains can be run simultaneously

I had started building my layout for traditional control but have decided to convert over to DCC control. My ultimate plan is to add a web cam, and build a web interface to allow visitors to operate the railroad from a web browser.

After my current, small layout is somewhat complete, I plan to expand the size further.