Integrating an Small EX-CommandStation with the ProMiniAir Receiver

Hundreds of Model Railroaders have used the ProMiniAir Receiver (PMA Rx), which is highly compatible with Airwire, Stanton Cab, Tam Valley Depot, and Gwire Transmitters. This is a rare “Island of Compatibility” for model railroad battery power and radio control and allows one “Compatible Transmitter” (ProMiniAir, Airwire, Stanton Cab, Tam Valley Depot, and Gwire) to control multiple locomotives and accessories with a “Compatible Receiver” (ProMiniAir, Airwire, Stanton Cab, Tam Valley Depot, and Gwire).

PMA Receivers are sold on eBay (search for “ProMiniAir”) with small (3.6A) and large (13A) amplifiers. The PMA Rx’s small size and selection of amplifiers allows installations in N-scale through G-scale. PMA Transmitters are also available on eBay. These Transmitters wirelessly transmit DCC to “Compatible Receivers” with DCC commands from a) “standard” DCC throttles and controllers or b) a “stand-alone Transmitter” solution that is a full-blown, inexpensive DCC command station that accepts throttle commands from smartphone throttle apps via WiFI or computer app via USB and converts them to DCC output.

However, a Model Railroader sometimes wants to obtain information from the onboard DCC decoder. A drawback of “Compatible Receivers,” such as the ProMiniAir Receiver, is that they are great “listeners” but cannot transmit information about the onboard DCC decoder back to the user. Some recent proprietary Dead Rail Transmitter/Receiver systems, such as Blunami, can send information from the decoder back to the user. However, these systems are NOT interoperable with any other Dead Rail system; they are NOT members of the Island of Compatibility. And they are not well-suited to central control of multiple locomotives.

This post will present a solution based on open-source code and common techniques and tools that thousands of “track-powered” Model Railroaders use that allow “Compatible Receivers” to send decoder information back to the user while maintaining “backward compatibility” with “Compatible Transmitters.” This solution brings techniques our “track-powered” brethren use to Dead Rail.

The Solution

Think about what we are doing in Dead Rail: we are replacing the DCC that is picked up by the locomotive’s DCC decoder through electrical contact with the rails with a “virtual track” (direct wiring to the decoder) that sends DCC from a wireless Receiver and Amplifier. When a “normal” DCC throttle wants to interrogate the decoder, the locomotive is situated on a special “Programming Track” that is electrically isolated from the rest of the track DCC wiring. Then, the DCC controller sends specialized “Service Mode” DCC commands that require the DCC decoder to send back simple “acknowledgment” (ACK) current pulses that the DCC controller senses. Hmm… How can we do this in Dead Rail?

The solution is to add a tiny EX-CommanStation (EX-CS for short) onboard the locomotive that will “weave” the logic-level DCC from the ProMiniAir Receiver with any DCC that the EX-CS might generate from other wireless sources and then send the combined logic-level DCC to the amplifier to produce “track-level” DCC! In other words, all we need to do is interpose a tiny DCC command station between the ProMiniAir Receiver and its Amplifier.

Since the EX-CS is a sophisticated, fully functional DCC command station, in addition to “normal” DCC commands it sends to regular tracks, it can also send Service Mode commands on a “Programming Track.” The EX-CS software has the crucial capability of “Joining” DCC from the Regular Track with the Programming Track so that you can “drive on/off” a locomotive to/from the Programming Track for specialized Service Mode queries that the decoder responds to with an “acknowledgment” (ACK) current pulse that is sensed by the DCC command station as a “yes” to its query. A “no” from the decoder in response to a query is the lack of an ACK pulse. The “JOIN” capability of the EX-CS means that once we are finished sending specialized Service Mode DCC over the wires to the decoder, we can then send “normal” DCC to the decoder over the same wires. No specialized circuitry or extra wiring from the amplfier to the decoder is required!

Comparison between a “standard” DCC throttle (top) and the EX-CommandStation (bottom), which can ‘join” standard and programming DCC

The EX-CS was originally designed to accept WiThrottle or DCC-EX commands over a WiFi or USB link and internally generates logic-level DCC that controls an external amplifier or “motor board” to produce high-power, “track level” DCC that the decoder can pick up off the track. We use that capability to control a compact “motor driver” amplifier to do the same thing, only the output from the amplifier is sent directly to the decoder over wires rather than to conducting track.

You might wonder how the EX-CS can “weave in” logic-level DCC from the ProMiniAir Receiver. I modified the EX-CS software some time ago to allow the additional input of an external, logic-level DCC source for the ProMiniAir Transmitter that combined the EX-CS’s internally generated DCC from interpreting high-level WiThrottle or DCC-EX commands with the DCC from an external source such as a standard DCC throttle (passed through a simple “DCC Converter” that converts “track-level” DCC to “logic level” DCC @ 5V and also provides 5V power). This PMA Tx/WCS (Wifi-equipped EX-CommandStation) has been available on eBay for some time. See the figure below for the original PMA Tx design and its modification to use the EX-CS, the PMA Tx/WCS.

Original and New Transmitter connections for PMA Tx/WCS. This technique was reused for the PMA Rx. Power connections are NOT shown.
The actual PMA Tx/WCS is available on eBay.

I reused this capability for the Receiver! In essence, I have moved the EX-CommandStation from a stationary position to a mobile location, traveling with the locomotive. Only the source of the external DCC has changed: from a traditional DCC command station to the output of the ProMiniAir Receiver. The only new Receiver-specific modification was to use the EX-CS’s original capability to sense a current pulse produced by the decoder during Service Mode queries rather than “fake” it as in the PMA Tx/WCS since the PMA Transmitter cannot generate output current pulses.

The original (top) and new (bottom) Dead Rail connections. Power connections are NOT shown.

If you study the Receiver and Transmitter figures above, you can see the modular design of the ProMiniAir Transmitter and Receiver allows easy interchange of components. If we had not separated the ProMiniAir Receiver from the Amplifier (technically, its not an amplifier, but rather an H-bridge driver that accepts logic-level PWM and converts them to higher-voltage and higher-current PWM), which enables us to insert the EX-CS between them, the “PMA Rx/WCS” solution would not have been possible!


So much for design; let’s see how the PMA Rx/WCS is realized in hardware for two different amplifiers: a DRV8874 (2.1A continuous) and a Cytron MD13S (13A continous).

Small Amplifier PMA Rx/WCS

The figures and videos below show one implementation of the ProMiniAir Rx with a mini ESP32 that hosts the modified EX-CS’s software and sends combined DCC from the ProMiniAir Receiver and DCC generated from WiFi-connected WiThrottle or DCC-EX clients to a Pololu DRV8874 amplifier that in turn sends track level DCC to a decoder.

The Pololu DRV8874 amplifier is easy to integrate because it provides a current sense voltage output of 1V/1A in response to the total current provided to the decoder, eliminating the need for an additional current sense device. The mini ESP32 requires +5V power supplied by a small voltage converter from here on Amazon. It’s mounted beside the DRV8874 amp on the bottom side of the mini ESP32 PCB.

A ProMiniAir Receiver integrated with a mini ESP32 hosting a modified version of the EX-CommandStation’s software. The EX-CS’s DCC is amplified by a Pololu DRV8874 amplifier, whose DCC is, in turn, sent to a DCC decoder. The current sense output of the DRV8874 generates DCC Service Mode ACK pulses from the DCC decoder that are used to “read” the decoder’s data.
The PMA Rx/WCS underside shows the Pololu DRV8874 amplifier and +5V power converter.
ProMiniAir Rx/WCS’s ESP32 mini backside shows external connections to the EX-CommandStation. “PWR” denotes +5 V power converter connections, “AMP” denotes connections to the Pololu DRV8874 amplifier, and “PMA” denotes connections to the PMA Receiver. “CS” denotes the current sense output from the Pololu DRV8884 amplifier that is used to sense the decoder’s ACK pulse.

The mini ESP32’s dimensions are 1.2″ x 1.6″, permitting installations in an HO-scale boxcar. See the figures below for an example installation.

The PMA Rx/WCS easily fits in an HO scale box car, including an 11.1V Li-Ion battery.
With the battery installed, we can now demonstrate that two wireless sources can provide the DCC output: either a standard ProMiniAir-compatible transmitter, such as the Airwire T5000 transmitter, or a smartphone app that connects to the EX-CommandStation.
Since I didn’t have an HO engine, I mounted all receiver components inside the HO boxcar and then connected the DCC output to a power-hungry MTH Diesel with a PS-3.0 operating in DCC mode. First, control is demonstrated with an Airwire T5000 throttle connecting to the onboard ProMiniAir Receiver and then using the onboard EX-CommandStation connected to an Android smartphone running the EngineDriver app to read the decoder’s DCC address.
Now, the T5000 is turned off, and then the locomotive is controlled by the EngineDriver app “talking” to the onboard EX-CommandStation.

Large Amplifier PMA Rx/WCS

The PMA Tx/WCS can also be integrated with a powerful Cytron MD13S (13A continuous) amplifier for O and G scale. Since the Cytron does not have a current sense output, we integrated an INA169 from Amazon to provide this missing input.

The bottom view of Cytron integration with the PMA Rx/WCS and the current sensor is as follows: Pin 23 is input from the PMA Rx. Pins 18 and 25 are outputs from the EX-CS that control the output of the Cytron amplifier.
Bottom view of the INA169 current sensor. Note that the current sense output (white wire) of the INA169 is input to Pin 34 of the EX-CS to detect decoder ACK pulses.
Bottom view of the INA169 current sensor with a 5V power converter used to power the INA169 and the ESP32 PCB
The Airwire T5000 transmitter communicates with the ProMiniAir Receiver, which sends its DCC to the EX-CS and is “woven” with the EX-CS’s own DCC. The Android running Engine Driver directly communicates with the EX-CS.
The video demonstrates control by the T5000 transmitter communicating with the ProMiniAir Receiver integrated with the EX-CS. Then, the Engine Driver app is used to query the decoder’s DCC address (and any Configuration Variable) in Service Mode. Finally, the T5000 transmitter is turned off, and the Engine Driver app now controls the decoder.

Demonstration of Reading Decoder Information

One of the main reasons for using a PMA Rx/WCS is to extract information from the decoder wirelessly. There are two main avenues for doing so: wireless throttle or smartphone apps or by using a wireless connection from JMRI to the onboard EX-CommandStation and the decoder. We first demonstrate how the Android EngineDriver app can read the decoder, and then we’ll see how to do it with JMRI.

Components used in the demo videos. The battery supplies power to the ProMiniAir Receiver, WiFi-equipped EX-CommandStation, and Pololu DRV8874 motor driver. The Zimo MS950 decoder uses the DCC output of the DRV8874 and then controls the motor and speaker. The PC running JMRI, the Android running EngineDriver, and the T5000 throttle are all wirelessly connected to the ProMiniAir/WiFi-equipped EX-CommandStation (PMA Rx/WCS) for short.
A video of using an Airwire throttle that transmits to the ProMiniAir Receiver that, in turn, sends DCC through the EX-CommandStation to the decoder, all with battery power in a small form factor. Then, the EngineDriver Android app, which is WiFi-connected to the EX-CommandStation, is used to read the decoder’s address and then directly control the decoder’s engine speed and sound.  The computer to the left is connected to the EX-CommandStation via Wifi, where we will demo reading CVs on the decoder wirelessly. 

It’s simple to use JMRI with the PMA Rx/WCS. First, set your computer’s wireless connection to the EX-CS’s wireless network, DCCEX_123456, where “123456” is a unique string. The password is PASS_123456. Now, you can activate JMRI’s Decoder Pro application. You must configure the server connection for the DCC-EX protocol, IP address, and port number.

Once connected, JMRI’s Decoder Pro allows you to read and write to the decoder in Service Mode as shown in the two examples below. It can even extract enough decoder information to identify the decoder’s type, which in this case is a Zimo MS950 that we used in the Cytron amplifier demonstrations above.

The WiFi-equipped EX-CommandStation reads the decoder CVs in Service Mode and then transmits them via Wifi to the JMRI application. You can also send CVs to the decoder via this same link. This example is a severe test by reading numerous CV without error.
Another example of reading the CVs wirelessly is, in this case, the Function Map.

It’s actually kind of amazing and addicting to see Decoder Pro extract so much information wirelessly! Of course, the purpose of extracting this information is to subsequently modify the decoder’s settings, which can also be done in Decoder Pro.

Final Thoughts

The primary advantage of the PMA Rx/WCS over the “garden variety” PMA Rx is that you can obtain decoder information using the same tools and techniques employed by thousands of our “track-powered” compatriots. No expensive proprietary receivers or apps are required: just the low-cost PMA Rx/WCS (about $59.99 with the DRV8874 or Cytron MD13S on eBay) and free or inexpensive smartphone apps or free JMRI.

The added advantage of the PMA Rx/WCS is that you can also directly use a smartphone throttle app that is either WiThrottle (all of them) or DCC-EX (some of them) compatible to connect with the onboard EX-CS. This control approach bypasses the PMA Receiver, so you will only have one-on-one control, losing the multiple locomotive control ability afforded by a PMA Tx/CNV (using a standard DCC’s throttle’s track DCC output) or a PMA Tx/WCS, which adds an EX-CommandStation to the PMA Transmitter for smartphone or computer control via WiFi.

The modified EX-CommandStation software is available on this GitHub site—our thanks to the team for developing the EX-CS software. I donate 10% of my sales of PMA Tx/WCS and PMA Rx/WCS to the project.

The ProMiniAir Rx/WCS will be available on eBay with the DRV8874 and Cytron MD13S amplifier. Customized versions are available by special request at this website or by contacting me on eBay. These devices are “ready-to-run,” and no further assembly is required.