A Low-Cost WiFi-Equipped DCC Base Station for the ProMini Air Transmitter

Many model railroaders enjoy using a hand-held throttle or smartphone app that connects to a centralized DCC command station that sends DCC over the tracks to decoder-equipped locomotives, and some “dead-railers” enjoy a similar experience using specialized hand-held transmitters such as the CVP Airwire or Stanton Cab throttles. These dead-rail throttles are expensive and sometimes hard to find due to supply chain problems. Other hand-held dead-rail throttles only support their proprietary receivers and “vendor-lock” users because they have no interoperability with other dead-rail vendors 🙁

In a previous post, I showed how easy it was to use a smartphone equipped with a “wiThrottle-compliant” app in conjunction with the ProMini Air transmitter to control your dead-rail locomotive(s) fitted with a variety of receivers such as ProMini Air, Tam Valley Depot DRS1, CVP Airwire, Stanton Cab, QSI Gwire, and NCE. The downside was that you must invest in a WiFi device made for the DCC base station connected to the ProMini Air transmitter. Many folks pushed back on the additional cost and infrastructure to use their smartphone app for dead-rail control using the ProMini Air transmitter.

I searched for a way to provide a low-cost way to use your smartphone in conjunction with the ProMini Air transmitter, and this post shows the low-cost solution that I offer for sale.

The solution: I came across a low-cost way to create a small DCC base station equipped with WiFi at a very active group, DCC-EX, and I will describe how I configured this base station to use a smartphone to control dead-rail locomotives equipped with ProMini Air, Tam Valley Depot, CVP Airwire, QSI Gwire, NCE, or Stanton Cab receivers. The cost for the PMA Transmitter/WiFi-equipped EX-CommandStation for smartphone dead-rail control is $70.

The wiThrottle-protocol smartphone apps that will work with this solution include (this list is from DCC-EX):

The important point is that the ProMini Air transmitter, coupled with the WiFi-equipped EX-CommandStation, is a completely self-contained solution for $70. All you need to do is apply power and then connect with a smartphone throttle app for mobile control of dead-rail.

If you don’t want to go through the details of the solution, you can jump to the Instructions below.

The Solution

The DCC-EX team has developed an open-source, low-cost DCC controller EX-CommandStation. Here is the DCC-EX team’s description (reprinted from here):


An EX-CommandStation is a simple, but powerful, DCC Command Station that you can assemble yourself and which is made using widely available Arduino boards. It supports much of the NMRA Digital Command Control (DCC) standards, including:

  • Simultaneous control of multiple locomotives and their functions
  • Control of accessory/function decoders
  • Programming Track
  • Programming on Main Track

It includes advanced features such as:

  • wiThrottle Server implementation,
  • General purpose inputs and outputs (I/O) for extensibility, and
  • JMRI integration

The primary intention of the EX-CommandStation is to receive commands from multiple throttles and send out DCC on tracks. These throttles can be “wired” or “wireless:”

  • USB
  • WiFi
  • Ethernet
  • Bluetooth
  • JMRI

With the WiFi-equipped EX-CommandStation, you can use a wiThrottle-protocol smartphone app that connects to the EX-CommandStation via WiFi. Then the EX-CommandStation’s +5V logic DCC output is not sent to a “motor shield” to power tracks but instead serves as a direct input to the ProMini Air transmitter for dead-rail control. It’s that simple; the technique was easy to implement and is low-cost (about $25, instead of paying for a WiFi device that connects to a commercial DCC throttle, a total of over $200).

Instructions for Using the ProMini Air Transmitter/WiFi-Equipped EX-CommandStation with a Smartphone

What you need:

  1. A smartphone loaded with the wiThrottle-compliant app. See the list above.
  2. A properly configured ProMini Air Transmitter/WiFi-equipped EX-CommandStation. We provide this.
  3. A locomotive(s) equipped with receivers compatible with the ProMini Air transmitter, such as:
    • ProMini Air receiver
    • Tam Valley Depot DRS1 receiver
    • CVP Airwire receiver: CONVRTR 15/25/60, G-3/4
    • Gwire receiver
    • Stanton Cab receiver
    • NCE D13DRJ wireless decoder

Steps:

  1. Plug power into the PMA Tx/WiFi-equipped EX-CommandStation, which turns on the ESP8266 WiFi transceiver to broadcast information for your smartphone to pick up, boots up the EX-CommandStation itself, and powers up the ProMini Air receiver and LCD. You can connect a 9V power to the ProMini Air transmitter/WiFi-equipped EX-Command station for “take it anywhere” capability. The battery adapter can be found here. A 1200 mAh battery, such as the Energizer Lithium, will last about 4 hours. Rechargeable Lithium-ion 600mAh batteries will last about two hours, but a four-pack with a charger will only set you back about $24.
  2. Go to the smartphone’s WiFi settings:
    1. If you have a home router, turn off auto-join, which prevents your smartphone from jumping to your home router rather than the DCC-EX WiFi router.
    2. Select the EX-CommandStation’s WiFi router. The router’s name is “DCCEX_123456,” where “123456” is a unique series of numbers and letters (the “MAC address” of the WiFi transceiver).
    3. When asked for a password, enter “PASS_123456”, where “123456” is the exact string of numbers and letters in the router’s name. You will probably need to enter the password only once since your smartphone will probably remember the password.
    4. The “fiddle factor:” Sometimes, the smartphone will complain it cannot connect to the DCCEX router or that the password is incorrect. Ignore this complaint (assuming you entered the password correctly) and try connecting again. The smartphone will often successfully connect once you select the DCCEX router again.
    5. You might want to turn on the auto-join option for this router so that your smartphone will automatically try to connect once the WiFi-equipped EX-CommandStation is powered up.
  3. Once connected, go to your throttle app:
    1. When asked for WiFI router configuration, set the IP address to “192.168.4.1” and the port to “2560“.
    2. Once your throttle app connects to the EX-CommandStation, you can select your loco(s), etc.
  4. Turn on your dead-rail locomotives, and control them with your smartphone app!
  5. Once finished with the throttle app, you can go back to settings and re-select the auto-join option for your home router.

So here is the “proof of principle” demo. The photo below shows the prototype solution: a low-cost EX-CommandStation with integrated WiFi connected to a ProMini Air transmitter. The video shows the iOS “Locontrol” app connected to the PMA Tx/EX-CommandStation with WiFi to control a dead-rail locomotive equipped with a ProMini Air receiver and a DCC decoder that controls loco speed and direction, lighting, sound, and smoke. The Locontrol app is excellent because you can record video while controlling the locomotive.

The prototype solution is a low-cost EX-CommandStation with integrated WiFi connected to a ProMini Air transmitter. Up to five smartphones with WiFi throttle apps send commands to the WiFi receiver connected to the centralized command station, generating DCC output that the ProMini Air transmitter sends to onboard locomotive receivers.
Video of using the iOS Locontrol app with the PMA Tx/EX-CommandStation with WiFi to control a dead-rail locomotive equipped with a PMA receiver and DCC decoder

Programming on the Main (PoM)

OK, these smartphone throttle apps are great, but they have a limitation: they can’t currently send commands in PoM (OPS) mode to change the value of configuration variables “CV” in a decoder. This capability is necessary when you need to change the configuration of the ProMini Air transmitter (whose default DCC address is 9900), such as the wireless channel (CV255 = 0-18) or power level (CV254=1-10). Of course, you might also need to make some CV changes to your dead-rail locomotive’s DCC decoder using PoM (OPS) mode, too!

You may NEVER change the ProMini Air’s configuration, but then again, you might. How to do this?

Solution #1

Both iOS and Android have apps that come to the rescue: TCP/IP to Serial Terminal and Serial WiFi Terminal. The apps provide a wireless connection to the EX-CommandStation to reconfigure the ProMini Air transmitter (or receiver, for that matter!) or your dead-rail locomotive’s DCC decoder in PoM mode.

Since I own an iPhone, I’ll show you what to do using TCP/IP to Serial Terminal.

What you need:

Steps:

  1. Select the app and enter the IP address and port number, and then connect:
  2. Test using the status command, entering <s> (case sensitive):
  3. See the response:
  4. Enter the command to change the value of CV 255 at address 9900 to a value of 5 by entering <w 9900 255 5> (case sensitive):
  5. Verify that the ProMini Air transmitter, which is at DCC address 9900, the channel has changed to 5:

The steps for using the Android app Serial WiFi Terminal should be similar.

So, there you have it, a wireless way to control a WiFi-equipped EX-CommandStation in Programming on the Main (PoM) mode, also known as OPS mode. While we need these apps to send PoM commands to reconfigure the ProMini Air transmitter, you can enter any DCC-EX Command! Have fun!

Solution #2

If you have a Windows, macOS, or Linux computer or laptop, you can interact with the WiFi-equipped EX-Command station, including reconfiguring the ProMin Air transmitter. The technique is based on the “curl” program.

What you need:

  • A Windows, macOS, or Linux computer or laptop.
  • A WiFI-equipped EX-CommandStation

Steps:

  1. Connect power to the EX-CommandStation. This powers up the WiFi-equipped EX-CommandStation and the ProMini Air transmitter with its LCD.
  2. On your computer, select the DCCEX_123456 wireless router and, if asked, enter the password PASS_123456, where “123456” is a unique string representing the MAC address of the ESP8266 WiFi transceiver integrated with the EX-CommandStation.
  3. On your computer, start up a “terminal” session. A terminal session allows you to type in commands.
  4. Enter the following command curl telnet://192.168.4.1:2560. This opens a simple telnet-protocol connection between the computer and the WiFi-equipped EX-CommandStation at address 192.168.4.1 port 2560, which is the default EX-CommandStation address and port.
  5. Your command line will now be waiting for you to enter the text that will be transmitted to the EX-CommandStation! As a test, type in <s> and press RETURN, and you should see a response such as
    <p0>
    <iDCC-EX V-4.0.0 / MEGA / PMA_Tx G-a26d988>

    If using curl on Windows, you may need to press RETURN then ^Z (CONTROL+z) and then RETURN again to “flush” out the response from the EX-CommandStation.
  6. OK! Now let’s change the ProMini Air transmitter’s channel to “5” by using a PoM (OPS) command (DCC Address: 9900, CV#: 255, CV value: 5): type in <w 9900 255 5> and press ENTER. You will not see a response (sigh), but if you look at the ProMini Air transmitter’s LCD, you will see the following:
  7. You exit the session by hitting <Control>+C.

Pretty simple!

Solution #3

This solution is NOT all wireless but demonstrates how to use the Web-based WebThrottle-EX to control the EX-CommandStation.

What you need:

  • A computer or laptop
  • A WiFi-equipped EX-CommandStation
  • The USB cable that came with your EX-CommandStation

Steps:

  1. Connect power to the EX-CommandStation. This powers up the EX-CommandStation and the ProMini Air transmitter with its LCD.
  2. Connect the USB cable to the EX-CommandStation and your computer/laptop.
  3. On your computer or laptop’s Chrome web browser, navigate this link: https://dcc-ex.github.io/WebThrottle-EX. An excellent throttle application will start, and the DCC-EX team has excellent instructions for using this application. We will concentrate on our narrow goal: getting OPS mode instructions to the ProMini Air transmitter.
  4. Select the “Connect DCC++ EX” button to activate the USB serial connection to the EX-CommandStation.
  5. You will see a pull-down menu of USB ports. Select the serial port you think is correct, and if it is, the log window at the bottom will cheer your success. If not, try another USB port from the pull-down list.
  6. Now look at the Debug Console and ensure Debug in “ON.”
  7. In the “Direct Command” entry, type in a “direct” command. In our example, we want to send an OPS mode command (“w” for write) to DCC address 9900 (the PMA transmitter) to change CV 255 (channel selection) to the value of 3 (the channel we want to transmit on): w 9900 255 3.
  8. Press “Send,” and you should see the log window indicating the send. You should also see the PMA Tx’s LCD show a changed value, now with a new channel!
  9. Disconnect the USB cable.
  10. Use your smartphone to connect the ProMini Air Tx/WiFi-equipped EX-CommandStation as described above.
  11. Have fun controlling the locomotive(s)!

Of course, if you maintain the USB cable connection, you can play with the WebThrottle-EX to control the dead-rail locomotive! The DCC+EX website has excellent instructions for using WebThrottle-EX. The traditional locomotive control capability and the powerful direct control capability are valuable and fun.

An important point: These instructions are ONLY for reconfiguring the ProMini Air transmitter or changing the CVs in your DCC decoder. Under regular smartphone throttle app use, you do NOT need to connect anything other than the power to the WiFi-equipped EX-CommandStation to activate the ProMini Air transmitter!

Final Thoughts

While I called this approach for using a smartphone app with the ProMini Air transmitter a “compromise solution,” if you think about it, with a more centrally-located ProMini Air transmitter coupled to a small, inexpensive WiFi-equipped DCC base station, you achieve good layout coverage because the base station is acting as an optimally-located “repeater,” potentially reaching more of the layout than your smartphone app. This approach is a valuable “division of labor:” the smartphone gives you the mobility to enjoy different vantages, and the central transmitter covers the layout optimally. So, maybe this approach is better than a “compromise solution,” after all.

Advantage of an optimally-located central transmitter versus a local transmitter.

Appendix: Implementation (How I Did It for Do-It-Yourselfers)

The EX-CommandStation consists of several components (with emphasis on our application):

  • An Arduino microprocessor (for us, the Arduino Mega or clone): the “brain” that takes throttle inputs and converts them to +5V DCC signals, usually for a motor shield.
  • A motor shield or motor driver: converts the microprocessor’s +5V DCC signals (and other controls) to higher-voltage DCC Track Right/Track Left to power and control locomotives equipped with DCC decoders. Because the track may short-circuit or require too much power, the motor shield or motor driver may provide signals, such as current sense, back to the microprocessor that generates commands to protect the motor shield or motor driver from damage.
  • Optionally:
    • WiFi (integrated on the microprocessor PCB, an Arduino shield, or discrete receiver jumpered to the microprocessor PCB): receives wiThrottle-protocol commands from smartphones or tablets via WiFi and sends these commands to the microprocessor.
    • Ethernet
    • Bluetooth
    • Direct connection to a PC
  • Free, open-source EX-CommandStation software

So, we need a WiFi-equipped Arduino MEGA and the EX-CommandStation software for our dead-rail application using a smartphone, but what about that motor shield?

A “motor shield” that amplifies the EX-CommandStation’s +5V digital DCC output for controlling and powering locomotives via the tracks is unnecessary since the ProMini Air transmitter only requires +5V DCC input (along with +5V power, which is available from the EX-CommandStation as well). An added advantage is the “DCC Converter,” which is necessary to convert track DCC from a “traditional” DCC throttle to +5V power, and +5V DCC the PMA transmitter requires is unnecessary. (If you like, we will include the DCC Converter because you may want to use your ProMini Air transmitter with a “traditional” DCC throttle later.) The modular design of the ProMini Air transmitters and receivers makes this solution easy and reduces cost.

Based on the information provided by DCC+EX, I selected a Songhe Mega2560 + WiFi R3 because the motherboard has integrated WiFi. The DCC-EX website superbly provides the detailed step-by-step set-up of an EX-CommandStation with integrated WiFi. You also need a 7-9V 1 A power supply, and a battery option is undoubtedly feasible but more expensive.

Since I needed to modify the source code to accommodate the ProMini Air transmitter integration with the EX-CommandStation, I used this download link. I followed the DCC-EX project installation instructions for the Arduino IDE and only modified the config.h file of the EX-CommandStation software for integration with the ProMini Air transmitter:

// (more before...)
/////////////////////////////////////////////////////////////////////////////////////
//  NOTE: Before connecting these boards and selecting one in this software
//        check the quick install guides!!! Some of these boards require a voltage
//        generating resitor on the current sense pin of the device. Failure to select
//        the correct resistor could damage the sense pin on your Arduino or destroy
//        the device.
//
// DEFINE MOTOR_SHIELD_TYPE BELOW ACCORDING TO THE FOLLOWING TABLE:
//
//  STANDARD_MOTOR_SHIELD : Arduino Motor shield Rev3 based on the L298 with 18V 2A per channel
//  POLOLU_MOTOR_SHIELD   : Pololu MC33926 Motor Driver (not recommended for prog track)
//  FUNDUMOTO_SHIELD      : Fundumoto Shield, no current sensing (not recommended, no short protection)
//  FIREBOX_MK1           : The Firebox MK1                    
//  FIREBOX_MK1S          : The Firebox MK1S
//  IBT_2_WITH_ARDUINO    : Arduino Motor Shield for PROG and IBT-2 for MAIN
//   |
//   +-----------------------v
//
// #define MOTOR_SHIELD_TYPE STANDARD_MOTOR_SHIELD
// This motor shield is for the PMA Tx
#define PMA_TX F("PMA_Tx"),		      \
     new MotorDriver(6, 7, UNUSED_PIN, UNUSED_PIN, UNUSED_PIN, 1.0, 1100, UNUSED_PIN), \
     new MotorDriver(5, 4, UNUSED_PIN, UNUSED_PIN, UNUSED_PIN, 1.0, 1100, UNUSED_PIN)
#define MOTOR_SHIELD_TYPE PMA_TX 
// (more after...)

The critical part for us is the “7” in the “new MotorDriver” line, which states that the “+” DCC output (+5V logic output between 0 and +5V) is on Pin 7. That’s all we need (along with power) to “feed” the ProMini Air transmitter! I then recompiled the EX-CommandStation software according to the DCC+EX instructions with absolutely no problem.

The connections to the WiFi-equipped EX-CommandStation to the ProMini Air transmitter are straightforward: connect GND and +5V to the power connections on the EX-CommandStation motherboard, and the +5V DCC input to Pin 7 on the motherboard.

The connections between the WiFI-equipped EX-CommandStation and the ProMini Air transmitter

You could purchase the components and set up the WiFI-equipped EX-CommandStation yourself. However, since we can do the set-up legwork for you, you can order the WiFi-equipped EX-CommandStation option for the ProMini Air for $40 ($5 is donated to DCC+EX). We include the AC to DC power converter (wall 120V AC to 9V DC) for the EX-CommandStation.

Dead-Rail with Smartphone Apps for CVP Airwire, Tam Valley Depot, Gwire, and ProMini Air Receivers

Typical configuration using smartphone/tablet throttle app with dead-rail

Introduction

Numerous excellent posts (here and here) describe how to use a smartphone to control model railroad locomotives, frequently using a “standard” DCC throttle or “station” as an “intermediary” that interlaces DCC commands from multiple sources and applies the resultant DCC power/signals to tracks that are picked up by one or more locomotives’ wheels electrically connected to a DCC decoder.

After reviewing these posts and understanding how this technique works, it’s a nearly effortless step to replace “DCC on the tracks” with wireless DCC transmissions to multiple locomotives. This “dead-rail” (battery-powered, radio-controlled) technique allows multiple locomotives to be simultaneously controlled from multiple throttles, be they smartphone apps or “standard” DCC throttles.

To be more specific, with minimal effort, it’s possible to use smartphone apps, such as WiThrottle, in conjunction with standard DCC throttles to control multiple dead-rail locomotives equipped with RF receivers from CVP (Airwire), Tam Valley Depot (DRS1 MkIII and MkIV), QSI (GWire), and OscaleDeadRail (ProMini Air). Using other apps is also feasible, but I will confine this post to my personal experience and give you a specific example of how I accomplished this goal.

What’s Required

Of course, you will need to load a smartphone throttle app such as WiThrottle. Other apps are also for Android and iOS. For communication from the smartphone app to a standard DCC throttle, I selected the Digitrax LNWI WiFi Interface that connects via LocoNet to my Digitrax DCS52. Similar solutions are available for NCE DCC throttles using WiFiTrax and numerous other DCC throttle purveyors.

Finally, a ProMini Air transmitter (abbreviated PMA Tx), interfaced to the DCS52 Track Right/Left output by a DCC Converter, is used as the dead-rail transmitter. This transmitter is compatible with multiple dead-rail receivers such as CVP Airwire, Tam Valley Depot (Mk III and Mk IV), Gwire, and the ProMini Air.

The ProMini Air transmitter is not merely a passive component in converting track-DCC to wireless DCC transmissions. It attempts to add a sufficient number of DCC “Idle” messages to the transmissions to keep CVP Airwire receivers “happy.” Otherwise, CVP Airwire receivers are not likely to respond correctly to wirelessly-transmitted DCC. This feature makes the ProMini Air transmitter unique among similar products that convert track-DCC to wireless DCC transmissions.

Putting it Together

The photo below shows the connections. If you think about it, the only aspect that is different from using track-based DCC and dead-rail is that the Track Right/Left output from the DCS52 throttle is connected to the ProMini Air wireless transmitter (via the DCC converter that provides the ProMini Air with 5V power and logic-level DCC) rather than to actual tracks – that’s all!

The connections for simultaneous dead-rail control by a smartphone app and a standard DCC throttle

I will now walk you through the steps I used to create the demonstration below.

Connect the ends of the LocoNet cable to the LNWI and the LocoNet port on the back of the DCS52. Plug the power into the LNWI, and connect the smartphone to the network provided by the LNWI. Then select the WiThrottle app, which has excellent instructions for choosing a locomotive’s address and configuration. In our case, we use the app to select DCC address #5000, which is a Z-5 with a ProMini Air receiver connected to a Zimo MX696KS DCC decoder.

Then we use the DCS52 throttle to select our Cab Forward with a ProMini Air receiver connected to a LokSound 4 L decoder at DCC address #4292. Once you turn on track power (which sends DCC to the ProMini Air transmitter instead of the tracks), the DCS52 throttle will start interlacing DCC commands for locomotives #5000 and #4292, sent out wirelessly by the ProMini Air transmitter. See the photos below that demonstrate this interlacing.

The PMA’s LCD shows the wireless transmission of a DCC packet to locomotive #4292 originally from the DCS52 throttle
The PMA’s LCD shows the reception of a DCC packet from the smartphone app for subsequent wireless transmission to locomotive #5000

Demonstration

Once you power on the locomotives, they listen and respond to DCC commands that match their DCC address, as shown in the video below.

Demonstration of the Z-5 (#5000, left) controlled by the WiThrottle app and the Cab Forward (#4292, right) directed by the DCS52

Conclusion

I hope you will agree that allowing one (or more!) smartphones/tablets and “standard” DCC throttles or control units to control multiple locomotives by wireless is not complex at all, and that’s part of the power and appeal of dead-rail.