Run your trains with an inexpensive TV-remote

by Chuck Heller




Infrared DCC Control of a Model Railroad


This page describes how I control my DCC model railroad with an inexpensive infrared remote control. This builds on the work of Mike Brandt. Mike describes how to control a DCC layout with an old PC XT. Here, I will describe the infrared remote control that I use to control the PC, and hence the DCC layout.


Why would I want to control a model railroad with a TV remote control?


This solution is very inexpensive, and it allows me to walk around with the trains, and it allows me to use a very well usability engineered handheld remote, and I don’t have to remember DCC addresses, and I don’t have to plug and unplug handheld throttles.
Some disadvantages are: the throttle does not have a knob, the buttons do not match exactly (rewind instead of reverse?), you have to build some electronics yourself, and you can have only one operator. The software to date only allows one locomotive to be selected at a time, so two operators using two remotes would be controlling the same train. This, along with the limitation that my software does not support consists, could be overcome with more design work, but I really need to finish my layout and run some trains! I’m not likely to fix these problems soon.


Overview


I use an RCA SystemLink 3 Universal Remote Control that I bought at Wal-Mart for $10. I built a simple infrared receiver with $10 in parts from Radio Shack, and I fed that into the PC’s serial port. I wrote software that reads the infrared codes through the serial port, makes calls to Mike’s driver to control the trains, and updates the PC’s display. Here is a sample of the screen display:

Loco Number DescriptionDirectionSpeed
1905 NYC MogulForward 2
2375 UP GP-9Reverse 4
2378 UP GP-9Forward 5


This shows three locomotives (please don’t ask why I run Union Pacific diesels with New York Central steam), each identified by the locomotive number painted on the side of the loco. I change the speed and direction of each loco by pressing buttons on the remote. At any given time, exactly one locomotive is selected, and that row is painted inverse video. I change the selected locomotive by changing the “channel”, and I control the speed by changing the “volume”.
Here is how I map the buttons on the remote and the keyboard:

Button Keyboard Key Meaning
Channel Up Up arrow Select the previous locomotive in the display
Channel Down Down arrow Select the next lower locomotive in the display
Previous Channel P Select the previously selected locomotive
Digits 0-9 0-9 Select the locomotive with that number*
Volume Up Right arrow Increase the DCC speed by one
Volume Down Left arrow Decrease the DCC speed by one
Stop or Pause S Stop this engine
On/Off Esc Stop all engines
Fast Forward F Set direction to Forward
Rewind R or B Set direction to Reverse
Play F5 Toggle Function 0 on or off (usually headlight)
Enter F1 Toggle Function 1 on or off (usually taillight)
Mute F2 Toggle Function 2 on or off (sound?)
TV/VCR F3 Toggle Function 3 on or off
Record F4 Toggle Function 4 on or off

* - You can select a locomotive by keying in the minimal unique locomotive number. For example, in the above display, if you pressed “1” then you would select the Mogul. If you pressed “2”, the “2”s on the GP-9s would both highlight, then when you pressed “3”, the “23”s would highlight, then when you pressed “7”, the “237”s would highlight, then when you pressed “5” or “8”, that locomotive would be selected. This way you get instant feedback on the buttons being received, and you can select locomotives by the number painted on the side of them, and you don’t need to remember DCC addresses.
Notice that the buttons map pretty well until you get to Functions. My software can handle 25 locomotives. The locomotive description, direction, and speed all fit into 40 chars, so the display can be put in 40 column mode, which makes the font twice as big, which means that I can read it from about 10 feet away. I get more than 20 feet range on the remote. I could get more by adding more receivers.
To exit the program, press any key on the keyboard.

Chuck Heller

CHeller.zip. (74K) The software to run your trains with a TV-remote, including readme files and schematics.
IR receiver schematics.
Logic and booster schematics. Compatible with DCC-MB and TMWDCC hardware.
Back to main page


© 1997 - 2006 Lars Lundgren
1