An Inexpensive Servo Controller with Dead-Rail Control

OK, you converted your locomotives to dead-rail (battery power, radio control) in part to eliminate the hassle of wiring the tracks and its attendant complications (polarity reversal on loops, etc.). But what about controlling other elements of your layout, including servos that have many uses, such as track switches and semaphores?

This post shows you how to make a low-cost (about $30-$40) servo controller (for up to 10 servos) that can be controlled with the same throttles you use for dead-rail control of your locomotives. The servo controller is based on this excellent Instructable: DCC Accessory Decoder Using Arduino Nano. Please read through this link to familiarize yourself. The significant difference between this post and the Intructable is we will obtain our power through a power plug or USB cable and receive our DCC from a ProMiniAir Receiver. I’ll give you those details below.


What you need:
Arduino Nano… (<$7.00ea).
Arduino Nano Servo Breakout Board… (<$2.50ea). You can connect up to 10 servos, each with a different DCC address, if you want.
Servos… (<$2.00ea).
Power: A wall-wart 9V DC power supply (~$7.50). You can use a “Type C” USB cable for power (and data/programming connection), which costs about $5.00 for the cable and power converter.
Receiver: A bare ProMiniAir Receiver – no amp is needed. Please contact me for this low-cost item ($14). The PMA Receiver gets +5V/GND power from the breakout board and sends +3.3V Logic DCC received wirelessly to the Arduino Nano (via the breakout board’s Pin 2), which contains the DCC accessory decoder firmware.


Physical Configuration: Mate the Arduino Nano into the Arduino Nano Breakout Board. Power is provided by either a 9V power converter that uses wall power or a USB connector that also provides a data link for downloading the firmware and establishing a serial connection for configuration.

The detailed connections from the Breakout Board to the ProMiniAir Receiver and the servos are shown below. The ProMiniAir Receiver connections 1) provide power to the ProMiniAir Receiver and 2) receive +3.3V logic DCC produced by the ProMiniAir Receiver. Up to 10 servos may be connected to the breakout board.

Closeup of connections to the ProMniAir Receiver and the servos.

Firmware and Configuration: Obtain the open-source software from the instructable URL (free). After loading the firmware into the Arduino Nano via the USB connection with the IDE of your choice (I use the Arduino IDE), you use the USB serial connection to configure the servo’s DCC address and motion parameters. This step is described in the Instructable.

As described in the Instructable, configuration is performed using the USB serial link. For the demo, I used the Arduino IDE serial monitor to enter the following commands to configure servos 3 and 4 (the number refer to the pin groups labeled on the breakout board, so the 10th servo is on pin group 12):

s 3 37 40 0 0 \n
s 4 37 40 0 0 \n

These commands are broken down as follows:
s pin-assignment dcc-address swing-degrees invert(0=no) continuous(0=no)


The photo below shows the components of the demo. The WiThrottle smartphone app communicates with the WiFi-equipped EX-CommandStation (see the inset in the image below) that is integrated with a ProMiniAir Transmitter that wirelessly transmits DCC commands to the ProMiniAir Receiver connected to the Breakout Board. This Transmitter is available on eBay by searching for “ProMiniAir”. Power is provided by a 9VDC power converter using wall power. A USB cable connected to your computer or a USB power conversion plug can be used.

Overview of Servo Controller.

A ProMiniAir Transmitter connected to a standard DCC Throttle, also available on eBay, will, of course, also work. Because the ProMiniAir Receiver is compatible with Airwire throttles, they can also be used to wirelessly control the servos using the “ACCY” (ACCessorY) button.

All DCC throttles and throttle apps can control both locomotives and DCC accessory decoders. The details vary from throttle to throttle, but they ALL can control accessory decoders. Below is the demonstration. Note the “Turnout” has been selected with accessory DCC address 37.

Wrap Up

I hope this post shows you that dead-rail control extends to other components of your model railroad: dead-rail is not just for your locomotives!