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 🙁
On another page, 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):
- Engine Driver (Android)
- DCCpp CAB (Android)
- Cab Engineer: DCC Throttle (Android)
- DigiTrainsPro (Android)
- WiThrottle (iOS)
- Locontrol (iOS)
- SRCP Client (iOS)
- RtDtive DCC++ (Android)
- Train Driver (iOS)
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.
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:
- A 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:”
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:
- A smartphone loaded with the wiThrottle-compliant app. See the list above.
- A properly configured ProMini Air Transmitter/WiFi-equipped EX-CommandStation. We provide this.
- 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
- 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.
- Go to the smartphone’s WiFi settings:
- 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.
- 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).
- 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.
- 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.
- 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.
- Once connected, go to your throttle app:
- When asked for WiFI router configuration, set the IP address to “192.168.4.1” and the port to “2560“.
- Once your throttle app connects to the EX-CommandStation, you can select your loco(s), etc.
- Turn on your dead-rail locomotives, and control them with your smartphone app!
- 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.
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 you might. How to do this?
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:
- An iPhone or iPad with TCP/IP to Serial Terminal
- A Wifi-equipped EX-CommandStation
- Select the app and enter the IP address and port number, and then connect:
- Test using the status command, entering
- See the response:
- 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):
- 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!
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
- Connect power to the EX-CommandStation. This powers up the WiFi-equipped EX-CommandStation and the ProMini Air transmitter with its LCD.
- 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.
- On your computer, start up a “terminal” session. A terminal session allows you to type in commands.
- 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, the default EX-CommandStation address and port.
- Your command line will now be waiting for you to enter the text transmitted to the EX-CommandStation! As a test, type in
RETURN, and you should see a response such as
<iDCC-EX V-4.0.0 / MEGA / PMA_Tx G-a26d988>
If using curl on Windows, you may need to press
CONTROL+z) and then
RETURNagain to “flush” out the response from the EX-CommandStation.
- 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:
- You exit the session by hitting <Control>+C.
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
- Connect power to the EX-CommandStation. This powers up the EX-CommandStation and the ProMini Air transmitter with its LCD.
- Connect the USB cable to the EX-CommandStation and your computer/laptop.
- 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.
- Select the “Connect DCC++ EX” button to activate the USB serial connection to the EX-CommandStation.
- 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.
- Now look at the Debug Console and ensure Debug in “ON.”
- 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.
- 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!
- Disconnect the USB cable.
- Use your smartphone to connect the ProMini Air Tx/WiFi-equipped EX-CommandStation as described above.
- 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!
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.
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.
- 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.
- Direct connection to a PC
- Free, open-source EX-CommandStation software
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 resistor 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.
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.