Under Development: DCC-EX TrackManager
This feature is not available in the current 'Production' version
Welcome to DCC-EX TrackManager
A first for the DCC & DC model railroading world.
A Dual Digital Command & Control Station for both (DCC) and analogue (DC) layouts.
With just a single EX‑CommandStation and a DCC-EX compatible throttle you can simultaneously run both your DCC Locos and analogue DC Locos or ‘Cabs’ with road number IDs as throttle addresses from 1 to 10239 to control and drive them on multiple separate insulated tracks/districts.
Throttle Compatibility
WiFi Throttles
The DCC-EX browser based EX-WebThrottle
Other wired throttles to operate your DCC layout and your DC layout, either separately or a simultaneous combination of the two modes
EX‑CommandStation with TrackManager includes the following features:
DCC track modes of MAIN, PROG, and OFF
DC track modes of DC, DCX (DC Reversed Polarity), and OFF
EX‑CommandStation development version v.4.2.50+ supports both DCC (PWM) and DC (PWM) Pulse Width Modulation modes as an embedded standard feature. TrackManager allows you to set up and operate up to eight separate dual insulated sections of track/districts in either DCC (PWM) and or DC (PWM) as tracks A - H.
An Arduino Mega (with or without WiFi) and Standard L298P Motor Shield EX‑CommandStation has two ready to run Tracks A & B which can be configured as:
DCC (PWM) modes MAIN for mainline tracks and PROG for a programming track
DC (PWM) modes for DC or DCX (opposite polarity)
Each track/district can also be OFF
No additional external DCC decoders are required for DC (PWM) track assignments, and a single EX‑CommandStation is the only hardware needed for full functionality.
One key difference to note in comparing DCC vs. DC is that in DCC mode, forward/reverse is determined by the DCC decoder, not the track, whereas in DC mode the direction is dependent upon the track polarity.
Warning
This feature is under active development, meaning commands, features, and behavior may change without notice. While we endeavor to keep these features functional, our development releases are updated regularly and we cannot guarantee there are no bugs that will have unexpected results.
If using our development release and, especially, the TrackManager feature, we highly recommend keeping in touch with conversations and developments via our Discord server.
You can also use our new GitHub issue templates to report a bug:
Before you begin
This is not your father’s DC railway which used DC transformers for Cab control.
Turn off, unplug the AC power cord, and disconnect your current DC transformer(s) / power supply(s) from the DC layout track to place in a box for safe keeping.
You will instead be using a regulated DC (Laptop) 12-18 Vdc 3-5Amp power supply to your Motor Shield and or Motor Board (booster) to run all your DCC Locos and analogue DC Cabs on all your individual tracks/districts/blocks.
You will be using DC (Pulse Width Modulation PWM) to drive the DC engines, Not DC Direct Current (-0 +16v).

Note
These modes, (PWM) vs analogue DC are totally incompatible with one another and if crossed will result in magic smoke and a burned out motor shield and or USB connector.
DCC(PWM) is detected on a multimeter as an AC signal but in a square wave form, not as a sine wave
DC(PWM) is detected on a multimeter as a DC signal in a square wave form, not as a direct current wave
The DC(PWM) track is Power supply dependent and needs a varying amount of 0 zero to maximum Vdc passed to the track of 12 or 16 or 18vdc, depending on whether they’re N, HO or G scale engines.
Note; The signal is detected as DC on this track, from 0Vdc to max +xxVdc depending on the Motor Shield DC power supply output. The DCC-EX 122.55Hz PWM DC motor signal allows for better functioning and better running than most competing systems.
TrackManager DCC(PWM) vs. DC(PWM) wave forms
A simplified representation of what the dual (PWM) signals might look like through the track:

Note
Note on PWM frequency
Different microcontrollers utilise different PWM frequencies, and at present, these default frequencies are in use rather than using software to define them.
The side effect of these differing frequencies is that you may notice humming or sometimes squealing noises from older DC motors.
The known PWM frequencies are:
Mega2560 - 122.55Hz
ESP32 - variable
STM32 Nucleo - typically 1000Hz
Replacing or Integrating Into Your Current Layout
Existing analogue DC layouts which have standard DC transformers on two or more separate DC tracks/districts/blocks and/or also have a second separate proprietary DCC command station would have in place a section of dead rail, an electric relay, or a DPDT centre-off switch between the two types of controller powered stations. These should not be using a common ground rail, and only use dual insulated tracks.
You will be replacing this kind of legacy analogue DC and proprietary DCC installation described above with a single EX‑CommandStation which will have a software switching implementation, allowing you to easily and quickly swap between the two DCC (PWM) and DC (PWM) modes on any of the A thru H dual insulated tracks/districts in real time.
This also allows replacing the physical hardware DPDT switch.
This is all done through a single EX‑CommandStation. And no we’re not using another Expensive DCC decoder under the table on each Track/District/Block to address that section of track.
Note
When specifying a DC or DCX cab ID, do not use one of your existing locomotive DCC addresses or road number IDs, otherwise a command sent to control a Cab on that DC or DCX track will also operate your DCC Loco with the same address, unless you intentinally do so.
Hardware Requirements and Technical Notes
Note
These requirements are only for operating DC locomotives. There is nothing to do in a pure DCC environment where no DC or analogue locomotives are run.
In order for TrackManager to operate in DC mode, the motor shield must have a brake pin, and defined in your “config.h” motor shield definition.
Non-standard motor shields must be validated for compatibility and require a fourth brake pin to be configured to run in DC (PWM) mode. A list of current supported motor drivers can be found in Supported Motor Drivers.
Do not attempt to connect two insulated tracks together and drive a DCC engine back and forth until someone bolder than you tries it first (or you’ve tested it).
Warning
Never drive a loco from an EX‑CommandStation controlled track or district to any other DCC or DC System.
Some suggested precautions are to add 4 fuses on wires (-b +b, -a +a) to the EX‑CommandStation connections. Use 2A fuses for the standard L298P motor shield or 5A fuses for the larger motor boards.
How do you run a EX-CommandStation in DC (PWM) mode?
Using TrackManager with simple easy commands from a throttle or from a serial monitor we can change any insulated track A-H from DCC (PWM) to DC (PWM) and back in real time.
Valid DCC modes are MAIN, PROG, and OFF
Valid DC modes are DC, DCX, and OFF
DCX is DC with an opposite polarity like NMRA modular layout track B which is wired left rail positive (+) and right rail negative (-)
This allows a throttle on track B set to DCX to operate in forward and reverse correctly for west bound engines
So, you can take a standard DC motor only engines Cab road number on the side of the engine and assign it to one or more of up to 8 tracks/districts/blocks labeled A thru H then enter that same number into a throttle and control that Loco Cab # on each and every one of the assigned tracks.
Valid Cab addresses are 1 to 10239.
Invalid Cab address is 0 zero.
Warning
We do not support 0 zero stretch address function, found on Digitrax and Lenz command Stations on purpose. The constant dual DCC electrical signal may damage certain types of older DC motors if left on for a long time.
Unlike Digitrax and Lenz 0 Zero stretch DCC (PWM) signal which leaves the engine lit up and humming loudly with the throttle and engine at 0 speed, because it is receiving a Dual DCC(PWM) aka AC signal, while the EX‑CommandStation TrackManager is dead quiet and at rest at 0 speed.
Place any analogue DC engine on our EX-CommandStation with a TrackManager DC assigned track and it sits there dead quiet with lights off Until the throttle speed is increased in either direction and then lights up and begins to move.
DCC Loco with DC enabled CV decoder also sits quietly and when the throttle increases the Sound will turn on first then as you throttle up more it will begin moving. You can throttle back until it stops but leave a little throttle speed on say 5% and the Sound will continue to play while it is stopped.
Throttle speed response for DC Cabs vary because the DCdistrict track is operating from 0Vdc to 16+Vdc ~PWM waveform signal. CAB’s operating on a DCdistrict with either WiFi Throttles and EXRAIL Automation scripts with Engine Driver Handoff run different DC motors at different speeds.
So a script for FWD(50) speed will run at completely different speeds for two different DC motors depending on their resistance and efficiency. One crawls at 50 while the other one runs like a bat out of hell.
You can also run a DCC Locos with DC Conversion CV enabled On and run on the DCdistrict, without having to change the decoder DCC address. They will all run on that section of track.
DCC Sound Decoder locos with DC conversion enabled may be silent until the track reaches between 2v to 6Vdc then the Sound will start up, and between 3v to 8Vdc the motor will begin to respond and move depending on the manufacturer’s decoder.
Controlling & Managing DCC-EX TrackManager modes
You can Assign Tracks/Districts to DCC and DC mode in four ways
Command Line via PC with Arduino IDE Serial Monitor or JMRI serial Traffic Monitor and it is sent through your USB connected cable.
Create an EXRAIL myAutomation.h file Scripts for Track Manager assigned commands and they automatically appear in Engine Driver as GUI Automation [Handoff] and Route [Set] buttons, and in WiThrottle WiFi Throttle iOS as [Route] buttons, and on TCS Universal UWT-50 & 100 WiFi Throttle [Select Accry] lines.
Enhanced Engine Driver WiFi Throttle Android app v2.35.169+ features;
Track/District Manager set mode screen by touching a track mode entering an address
Command Cmd Line Serial Monitor and enter them like in example (1) above but via WiFi Native mode
New EX‑Toolbox WiFi Android app features;
Track/District Manager set mode screen by touching a track mode, entering an address
Command Cmd Line Serial Monitor and enter them like in example (1) above but via WiFi Native mode
New Engine Driver DCC-EX Native mode features now available today via Google Play Store:
TrackManager Commands
Sending commands from the Arduino IDE Serial Monitor or JMRI Send Command Line or a Engine Driver WiFi Throttle.
To display the current TrackManager configuration, use the command <=>
an equal sign looks like a track.
The Serial Monitor will show current status, example; Track A as Main and Track B as PROG
<= A MAIN>
<= B PROG>
To change or configure the current track modes use the new command <= trackletter mode [address]>
which has been added for Track Manager, where:
trackletter
is A through H
mode
is one of MAIN, PROG, DC, DCX, or OFF (DCX is DC with opposite polarity)
address
is the Cab ID and is only required when specifying DC or DCX modes
<= A MAIN> // Set track A to MAIN DCC mode
<= B PROG> // Set track B to PROG DCC mode
or
<= A DC 1234> // Set track A to DC mode with address 1234
<= B DCX 4321> // Set track B to DC mode Opposite Polarity address 4321
// or any number you assign from 1 to 10239
<= B OFF> // Set track B OFF, like a staging yard when it gets too noisy.
Note
You would then enter your Engine address on the throttle of 1234 and 4321 and drive them on the layout.
Create EX-RAIL Scripts to Change Track modes
Using EX‑RAIL functions inside myAutomation.h file to run Automation scripts to change track modes from DCC to DC and back. my.Automation.h file
//SET_TRACK(id,mode)
SET_TRACK(A, MAIN)
SET_TRACK(B, PROG)
SET_TRACK(C, DC)
SET_TRACK(D, DCX)
DCC-EX Command Station with EX-RAIL & TrackManager
Cool thing is the new EXRAIL Automation(n) & Routes(n) work the same with DCC engines on MAIN tracks and the DC engines on DC or DCX tracks, along with the Sensors, Servos /Turnouts, Signals & MP3 Sound DFPlayer triggers with little or no script changes other than maybe the FWD(n) & REV (n) Speeds.
With the new DCC-EX direct WiFi Discovered Server you can connect Engine Driver & other WiThrottle app based throttles directly and have EXRAIL [Handoff] & [Set] buttons to run EXRAIL scripts from the throttles.
These are DCC-EX Major feature/benefits because with other systems you’ll have to use a PC computer or Pi processor & JMRI for WiThrottle Server throttle access and you have to write two different JMRI Jython.py scripts and then Setup Tools> Tables> Routes for for both DCC and DC automation & routes runs.
Modular Layouts
DCC-EX TrackManager 4.2.50+ is perfect for NMRA DCC Standards Modular Layouts which have two MAIN tracks/districts, Track A and Track B with sidings;
Track A (east bound) wired rails L- R+
Track B (westbound) which also have all the siding and spurs, wired rails L+ R-
You can set each district separately as mode
DCC for MAIN, PROG or OFF
analogue for DC, DCX or OFF
DCX is Opposite Polarity and is what you set Block B to when you want it in DC mode because it is wired to NMRA Modular DCC Standards L+, R-.
Using the New TrackManager Function commands you can run the any layout as
Track A & Track B
MAIN & PROG (Use JOIN function for a Programming track to make a MagicTrack)
MAIN & MAIN
PROG & MAIN
MAIN & DC
PROG & DC
DC & MAIN
DC & PROG
DC & DC
DC & DCX
or any combination with up to 8 separate dual insulated tracks/districts from A - H.
All done through the free DCC-EX TrackManager commands.
How Do I Get On Board with DCC-EX TrackManager ?
To use TrackManger, you will need the current development version of EX‑CommandStation which you can obtain by following the directions in our Latest EX-CommandStation Unreleased Development Version section.
We highly encourage you to join our Discord server to keep up to date on developments. Refer to Contact Us for details on how to join.
Example of User defined EXRAIL Scripts running on Engine Driver Throttle App (Android):
Engine Driver Throttle Controlling Two Locos:
DCC PE 1225 on District A DCC address 1225 Sound Decoder
DC NH 667 on District B DC address 667 with IPLS Virtual Sound Decoder

DCC-EX Commands, scroll-able

DCC-EX TrackManager “Handoff” & “Set” buttons
Scroll through & select track modes
Takes the current selected Active Throttle Engine and assigns that Address to the DC or DCX track

Engine Driver DCC-EX Native mode
TrackManager MAIN & PROG
With DCC-EX Cmd Line & Serial monitor

Engine Driver DCC-EX Native mode
TrackManager District A DCC MAIN
TrackManager District B DC 667

Engine Driver EXRAIL Automation [Handoff] and FX special effects buttons

FX Special Effects [Set] continued and Route [Set] buttons

EXRAIL Functions Displaying on Smartphone Apps & Universal WiFi Throttles
The Engine Driver EXRAIL screens shown above are all created through user defined EXRAIL Automation(n) and Route(n) scripts which are automatically passed to both Engine Driver & WiThrottle App screens as well as the Train Control Systems TCS Universal WiFi UWT-50 and UWT-100 tactile throttles all via direct connect DCC-EX WiThrottle Protocol interface.
Please see the specific Smartphone App & Universal WiFi Throttle instructions on how to enable their Preferences and Route screens. https://dcc-ex.com/throttles/index.html#withrottle-protocol-based-throttles