Introduction to DCC
This article provides a starting point for understanding NMRA Digital Command Control. The goal of the content within is to provide a sufficient working knowledge of Digital Command Control to allow you to advance to other DCCWiki articles, and to begin evaluating Digital Command Control systems suitable for your particular situation.
- 1 The Beginner’s Guide to Digital Command Control
- 2 The Digital Command Control System
- 2.1 Digital Command Control System Components
- 2.2 Adapting Your Layout For DCC
- 3 How Does Digital Command Control Work?
- 4 Where to Go From Here
The Beginner’s Guide to Digital Command Control
Digital Command Control is to Model Railroading what Radio Control is to Model Aircraft.
First Question, “What is DCC?”
DCC is an acronym, identifying the Digital Command Control Standard created by the National Model Railroad Association.
Quite simply, Digital Command Control is a mechanism for controlling locomotives, and therefore trains, in a more realistic fashion than your old rheostat-based power pack.
- DCC allows a multiple locomotives to operate independently on a layout.
- DCC allows a locomotive's headlight, ditch lights, and optionally, other functions to be operated interactively.
- DCC allows multiple locomotives to operate cooperatively -- as in an MU'ed pair of Geeps hauling a local freight, or the 2-8-4 pusher on that killer 4% grade.
- A locomotive equipped with a DCC sound decoder supports interactive, as well as automatic sounds.
- Operator activated sounds might include: the horn, whistle, bell, brakes, coupler, sanding valve, etc.
- Automatic sounds might include: steam chuff, prime mover, dynamic brakes, radiator fan, compressor, etc.
On a layout, DCC is deployed both above and below the track. Above the track, each DDC-operated locomotive must have a DCC Decoder installed, which reads DCC signals from the track. Below the track, a DCC System must be installed to supply DCC signals to the track.
It's important to recognize the scope of the NMRA's DCC specification. The spec only covers the electrical signal and data applied to tracks by the DCC System; which is also the signal and data read from the track by the decoder. No other portion of the a DCC system is specified by the NMRA - as long as the signal on the tracks meets the NMRA specifications, manufacturers are free to deploy any system they choose. As a result, a DCC system can be as simple as an entire-system-in-one-device, to complex DCC systems built from dozens of components. It also means that the throttle can be a simple device with a knob to control speed, or a complex device with a graphical interface. The NMRA DCC Standard only describes the signals on the rails.
The NMRA Digital Command Control Standard is just that: A Standard. Any locomotive with a DCC Compatible decoder will work with any DCC System. Much like other NMRA Standards which make it possible for freight cars to roll on the track and through switches, regardless of who made them.
“Why Do I Need DCC?”
If you're happy with your current layout and your current ability to control trains, then you don't need DCC.
But if you'd like to operate multiple trains simultaneously... or you'd like to support multiple operators... or you'd like to offer pusher service to trains climbing that grade... or you'd like to MU your three new Tier-4 locomotives... or you'd like to add sound to your locomotives... or you'd like to have wireless control of your layout... then DCC may be just what you need.
“Will DCC Work on My Layout?”
DCC will operate on any model railroad, from 'O' scale and above, down to 'Z' scale... on 2-rail or 3-rail... indoors or out. DCC is highly recommended for new layouts, and can be retrofitted to any layout.
The Digital Command Control System
A complete Digital Command Control System consists of a number of components, generally: one or more #throttles connecting to a single #command station, which is connected to one or more #boosters, which drive one or more #decoders. The block diagram below illustrates an abstract, generic DCC system.
The throttles for a DCC system are generally hand-held by the operators. The command station and boosters are "under the layout" elements of the DCC system. Decoders can be either "above the layout" elements (#mobile decoders), which control locomotives and are hidden within them, or "under the layout" elements (#stationary decoders), which generally operate turnouts and layout accessories.
Mobile decoders are installed onboard locomotives. The diagram shows locomotives 9901 thru 9908, each with a decoder installed. Each decoder is assigned a unique numeric address. A common convention is to assign the locomotive number as the decoder address. So each of the onboard decoders in the diagram is assumed to have been previously programmed with the address of its locomotive, 9901 thru 9908.
Digital Command Control System Components
In a real DCC system, many of the abstract functions in the diagram are deployed as-is, as real physical components in the DCC system. However, some of the diagram's abstract functions may be combined together into a single real physical component. For example, in many DCC starter sets, the first booster is physically integrated into the command station. And at least one DCC manufacturer combines a throttle, command station, and booster into a single handheld cab. But regardless of how the system is packaged, the basic functions of the diagram are present in every DCC system (with the exception of the #stationary decoder and #wireless throttles, which are popular enhancements to DCC systems, rather than functional requirements of them).
The throttle (also known as the cab) is the controller, often handheld, used by the operator to control a single locomotive, or a group of locomotives in a single train. Additionally, modern throttles allow the operator to manipulate features beyond the scope of a locomotive, like turnouts, or any other layout feature connected to a stationary decoder. Throttles connect to the throttle bus or throttle network, which is usually brand-specific, so generally throttles from different manufacturers cannot be interchanged.
Modern throttles include a significant amount of processing power. Most contain one or more microcontrollers, executing code embedded in firmware. This firmware-based architecture allows many throttles to be updated by simple loading new firmware.
At least one throttle is required in your system; most layouts have a several. For throughput reasons, DCC manufacturers must limit the number of throttles allowed, so there is a "Maximum Throttle Capacity" for each manufacturer's DCC system [see the DCC_Systems_comparison page].
By adding a suitable wireless gateway, a DCC system can be built which will support the use of wireless throttles, in addition to wired throttles. A wireless gateway is an optional enhancement available to many DCC systems. Unlike normal wired throttles, which are tethered to the layout by a cable, wireless throttles require no physical connection to the layout. Operators have a greater degree of freedom than with normal throttles, though they may or may not have the same degree of control as a wired throttle -- some wireless throttles compromise on button count, or other features such as display size. Wireless throttles are generally battery powered.
All throttle are connected to the command station through the throttle bus or throttle network. So all throttles in a DCC system must be compatible with the network. The throttle network determines a lot regarding the performance and expandability of the system. Most major DCC suppliers have developed their own proprietary throttle bus. This can limit the availability of components and accessories for a system. Technical issues can also place limits on the capacities of the throttle network; this is not usually an issue for small DCC systems, but with future expansion it could be.
Though some throttle networks support bi-directional communication, where the command station can also send information to the throttle, conceptually the throttle network can be thought of as a unidirectional throttle-to-command-station bus.
In addition to its role connecting throttles, the throttle bus can also serve as a network for communicating layout-related information. For example, an array of occupancy detectors might share their occupancy states on the throttle bus.
Your DCC system will restrict the network topology of the throttle network you are allow to deploy on your layout. For example, the overall length of the throttle bus will be limited, or the system's throttle network might require a linear bus topology without any branches. Or it might require special terminations at the ends of its branches.
The command station is the "Grand Central Station" of the DCC system - everything is routed through the command station. The command station accumulates all operator requests from every throttle in the system. It encodes each request into a DCC command packet, and broadcasts each packet to every booster in the system via the #booster bus
Though your layout may have many throttles, and a few boosters, as a rule, your layout only needs one command station.
When evaluating potential DCC systems for your layout, consider not only the number of trains you need to run today, but how many you and your operators might be running in the future. If you see yourself running a lot of trains, chose a system with a command station that has the capacity you need.
Command stations are substantial information processors. Modern command stations contain one or more microcontrollers, executing code embedded in firmware. Many command stations provide a mechanism to update themselves by simply loading new firmware.
Many DCC systems support a dedicated programming track output. These outputs are designed to allow easier programming of installed decoders, while limiting the power available to prevent damage if a mistake was made during installation. The programming track can be part of the layout, or a special track on your workbench. For some sound decoders you may need a programming track booster.
The booster bus is the interconnect between the command station and all boosters in your system.
Though some booster buses support bi-directional communication, where the command station can also receive information from a booster, conceptually the booster bus can be thought of as a unidirectional command-station-to-booster bus.
And again, your DCC system will restrict the network topology of the booster bus you are allow to deploy on your layout. Your booster bus, for example, might have a maximum overall length, or the booster bus might require a linear bus topology (no branches), or there may be special terminations required at the ends of its branches.
The booster is a digital signal amplifier. Each booster accepts packets from the booster bus and boosts (amplifies) them to the track voltage required. For a small layout with a few locomotives, one booster may be sufficient. But for a large layout with dozens of locomotives, several boosters may be required. It's not the size of a layout the determines the number of boosters required, it's the number of locomotives [and other DCC loads] that determine the number of boosters.
The input to each booster is shared -- the command station broadcasts packets on the booster bus -- but the output of each booster is connected to a unique portion of track called a power district. Power districts are created by introducing rail gaps at district boundaries. Districts are a mechanism for electrical "load management" -- they are introduced to limit the number of locomotives any single booster must drive.
Generally, boosters are dumb devices (little or no onboard intelligence) which simply amplify whatever signal is presented on the booster bus. As a result, in some cases it is possible to add boosters from another manufacturer, subject to some limitations. It is best to verify compatibility before investing in a booster.
For simplicity, stand-alone power supplies are not shown on the functional block diagram above, however they are required by most DCC components.
Most throttles draw their required power from the throttle bus, which is generally powered by the command station.
Components like the command station and wireless gateway are often powered by "wall wart" power supplies -- those small, inexpensive power supplies designed to plug directly into wall outlets and suspend themselves from those outlets.
Boosters usually require a more substantial power source than a wall wart. Depending on your booster's requirements, its power supply requirement might be 2 to 10 amp regulated DC supply, a 2 to 10 amp unregulated DC supply, or if the booster provides internal rectification and regulation, only a simple 2 to 10 amp AC transformer.
A decoder is the device which receives DCC commands and acts on them. A decoder is pre-programmed to a specific address. The decoder monitors all DCC commands, but it only acts on those commands addressed to it. Usually the term ‘’DCC Decoder’’ refers to a #mobile decoder. Generally mobile decoders are mounted in, and used for controlling, locomotives, while #stationary decoders are mounted under a layout, and used for controlling accessories.
DCC decoders can be customized using defined Configuration Variables (CVs), the most basic configuration being the pre-programmed address. The decoder only responds to commands sent to that address, and special addresses such as the Emergency Stop address.
Mobile decoder means just that: it is mobile because it is installed in a locomotive, its tender, or another car such as a boxcar if it can’t fit in the locomotive. The mobile decoder monitors all DCC commands on the track, but it only acts on those addressed to it, controlling the locomotive's speed, direction, lights, sound effects, etc.
Stationary decoders are used for controlling fixed items, such as turnouts, crossing gates, signals, etc. A very typical application is the remote control of turnouts. Stationary decoders can be powered from the track, or from their own power supply. Commands can be received via the track or via an alternative stationary decoder bus. Stationary decoders can be simple on-off controllers, or allow a degree of automation themselves, or be controlled by a computer running the appropriate software.
The DCC standard defines a specific addressing scheme for stationary decoders so they will only react to commands sent to them, while ignoring commands meant for mobile decoders.
Many DCC systems offer a specific device [not shown in the block diagram above] providing a computer interface into the DCC system. This gateway or portal device usually connects thru the #throttle bus providing a USB or serial interface to a laptop, desktop, or tablet computer. By running suitable software on the computer, various degrees of DCC configuration and automation are supported.
Adapting Your Layout For DCC
The DCC system for your layout will consist of one or more throttles, one command station, and one or more boosters. The Functional Block Diagram [repeated below] shows multiple throttles attached to the #throttle bus, and multiple boosters attached to the #booster bus. How many you need depends on your goals. You'll select as many throttles as you want, and as many boosters as you need.
Throttles and Throttle Jacks
Manufacturers generally design their DCC systems to support multiple throttles, with an upper limit to the maximum number supported, typically 10 to 100. Not shown on the diagram are the unlimited number of throttle jacks allowed on the throttle bus. Though your system will limit the number of throttles that may be active, there is no limit to the number of jacks into which those throttles may be plugged. You are free to place as many throttle jacks around your layout as you please. As a minimum, you'll want at least a throttle jack for each operator, though jacks can be added as needed.
As an alternative to an array of throttle jacks decorating a layout's façade, with the addition of a wireless gateway any number of throttles [up to your system's maximum throttle capacity] may be wireless.
Boosters and Power Districts
Note on the Functional Block Diagram that all track on the layout is divided into districts; each district with its own #booster. If on your layout, only a few locomotives will be active at any time, then you may only need one booster, and the entire layout might be powered as one district. However, by dividing your layout into districts, and powering each district with its own booster, dozens or even hundreds of locomotives can be powered. Since all districts receive the identical signal at the identical time [that is, every booster simply amplifies the common signal present on the #booster bus], multiple districts and boosters not needed for control, they are needed for load management. A booster can typically power a few locomotives. Though it might be possible to design a booster to power hundreds of locomotives, such a booster would resemble an arc welder, and would function as such... if anything ever went wrong, it could turn your fine brass import into a pile of molten metal and smoldering slag.
Districts are sized for the maximum number of locomotives to be powered in that district. As shown, Districts 1 and 2 are powering locos 9901 & 9902, and 9903 & 9904, respectively. On your layout, both districts might be long sections of mainline, on which only a few locomotives are active at any time. So the boosters for Districts 1 and 2 could be sized to power, for example five locomotives, allowing a 3-loco head and 2 pushers. However, if on your mainlines, you expect to run 100-car unit trains with 4-loco heads, 3 mid-assist locos, and 2 pushers, the boosters for Districts 1 and 2 must be able to power at least nine locomotives.
As shown, Booster N is wired to power three parallel tracks. On your layout District N might be a teardown yard for incoming trains, in which case, the Nth Booster might need to power only a few locomotives -- the local yard switchers. However, if District N is a locomotive service and staging yard, its booster might need to power a dozen or more locos.
The electrical load that a locomotive presents to the DCC system is a function of physical size of its motor. For example, a Geep in 'N' scale draws less current than the same Geep in 'HO', which draws less current than the 'O' scale version. So your layout's scale will significantly impact the design of your DCC system, at least when sizing boosters. Current consumption of locomotives can vary widely, but the common rule of thumb is that a modern 'HO' locomotive will consume about 500 milliamps, and an 'N' scale loco will consume about 250 milliamps. At larger scales, locomotive current consumption varies widely; individual investigation is warranted. The addition of sound can add as much as 75 milliamps to a loco's consumption.
How Does Digital Command Control Work?
Though it can sometimes be useful to understand how an underlying technology works, it is usually not necessary to understand a technology for one to simply use it. Most of us use the Internet without understanding the underlying TCP/IP protocol suite. Likewise, there is no need to understand the technology behind DCC in order to use it. The information below is provided for those who want to understand DCC's underlying technology.
Conceptually, How Does DCC Work?
DCC works by conveying operating commands, such as speed and direction, to locomotives. Each locomotive has a pre-assigned address. Commands are broadcast to all locomotives, but only the locomotive to which a specific command is addressed acts on it. All other locomotives ignore the command. To insure positive control, commands are repeated periodically. DCC commands are broadcast at more than a hundred commands per second, so each locomotive receives its command updates in a timely manner. Sufficient electrical power is supplied to the rails so that multiple locomotives can be active simultaneously.
Electrically, How Does DCC Work?
|Is It AC or DC?|
|Frequently asked questions about Digital Command Control are "Is the Digital Command Control waveform applied to my track AC or DC?" "Is it a special form of AC?" The answer: "None of the Above."
Since the amplitude switches between states thousands of times a second, the DCC signal is clearly not Direct Current. So typical DC measurements will fail. However, the DCC signal is not the classic sinusoidal AC waveform which alternates between positive and negative, it's not Alternating Current either, so typical AC measurements will also fail.
Technically speaking, the DCC signal is a "Digitally Encoded Differential Signal", which can only be properly measured using high-end electronic instruments or specialty DCC equipment.
Digital Command Control signals are encoded onto the fixed voltage applied to the track (10 to 18 volts, nominally 12Vdc). With DCC, the voltage applied is modulated to convey Digital commands. Commands are encoded as a series of binary values, "0"s and "1"s, thus the term "Digital". The modulation process switches track voltage on or off in the time domain at a very high frequency - the left rail is made positive with respect to the right rail, then the right rail is positive with respect to the left rail. A "0" results in the track voltage applied for a longer duration than a "1". It is important to note that the signal on the track is not a BiPolar signal: It does not switch between negative and positive voltages. This method creates a very robust method of delivering information and power to the locomotive.
This method encodes bits onto the track power. These bits are strung together into bytes, and a few bytes form a packet. Generally a packet is a complete DCC command. Packet sizes can vary slightly, so 100 to 200 packets are broadcast per second.
Operationally, How Does DCC Work?
For the operational examples below, consider again the Abstract Functional Block Diagram. In the diagram, note the locomotive headlights, indicating their forward directions.
Operational Example: Moving a Locomotive
In the diagram above, imagine an Operator who wants to move Locomotive 9901 ahead...
|DCC - How It Works Operationally: An Operator Wants to Move #9901 Ahead|
|From the Operator's Perspective||What's Going On Under the Covers||Result on Layout|
|The Operator arbitrarily selects the 3rd Throttle and enters the address of the locomotive to be controlled - 9901.||3rd Throttle saves address 9901. All subsequent commands from 3rd Throttle will be sent to Decoder 9901.||None.|
|The Operator selects Forward direction.||3rd Throttle saves direction as Forward. All subsequent commands from 3rd Throttle will specify Locomotive 9901 is to move in the forward direction.||None.|
|The Operator increases throttle speed.||3rd Throttle interprets the Operator's throttle action as, "Set speed to Speed Step 4" [presumed to be previously set to "Speed Step 0"], and sends a Speed Step 4 / Forward command, addressed to 9901. The Command Station constructs, and then broadcasts on the Booster Bus, to all Boosters, a DCC packet addressed to 9901, specifying Speed Step 4 / Forward. All Boosters simultaneously place the packet on their respective tracks. All Decoders receive the packet. All Decoders except Decoder 9901 ignore the packet, as it is not addressed to them. Decoder 9901 executes the command and applies a low-level [speed step 4], forward voltage [forward direction] to the locomotive's motor.||Locomotive 9901 moves forward, approaching Locomotive 9902 .|
|The Operator decreases throttle speed.||3rd Throttle interprets the Operator's throttle action as, "Set speed to Speed Step 0 / Forward", and sends a Speed Step 0 command addressed to 9901. The Command Station, Boosters and Decoders all respond as above, but now for the Speed Step 0 / Forward command addressed to Decoder 9901.||Locomotive 9901 comes to a stop, adjacent to Locomotive 9902 .|
Operational Example: Moving a Locomotive Onto a Siding
In the diagram above, imagine an Operator who wants to move Locomotive 9905 from its current location, to the siding ahead...
|DCC - How It Works Operationally: An Operator Wants to Move #9905 Onto the Siding|
|From the Operator's Perspective||What's Going On Under the Covers||Result on Layout|
|The Operator arbitrarily selects the 2nd Throttle and enters the address of the locomotive to be controlled - 9905.||2nd Throttle saves address 9905. All subsequent commands from 2nd Throttle will be sent to Decoder 9905.||None.|
|Wanting Locomotive 9905 to clear the points of the turnout, the Operator selects Reverse direction.||2nd Throttle saves direction as Reverse. All subsequent commands from 2nd Throttle will specify Locomotive 9905 is to move in the reverse direction.||None.|
|The Operator increases throttle speed.||2nd Throttle interprets the Operator's throttle action as, "Set speed to Speed Step 2" [presumed to be previously set to "Speed Step 0"], and sends a Speed Step 2 / Reverse command, addressed to 9905. The Command Station constructs, and then broadcasts on the Booster Bus, to all Boosters, a DCC packet addressed to 9905, specifying Speed Step 2 / Reverse. All Boosters simultaneously place the packet on their respective tracks. All Decoders receive the packet. All Decoders except Decoder 9905 ignore the packet, as it is not addressed to them. Decoder 9905 executes the command and applies a low-level [speed step 2], reverse voltage [reverse direction] to the locomotive's motor.||Locomotive 9905 eases back from the turnout.|
|The Operator decreases throttle speed.||2nd Throttle interprets the Operator's throttle action as, "Set speed to Speed Step 0", and sends a Speed Step 0 / Reverse command, addressed to 9905. The Command Station, Boosters and Decoders all respond as above, but now for the Speed Step 0 / Reverse Command.||Locomotive 9905 comes to a stop, clear of the turnout's points.|
|The Operator selects "1001" ,the address of the turnout motor's Stationary Decoder.||2nd Throttle saves address 1001. All subsequent commands from 2nd Throttle will be sent to Decoder 1001.||None.|
|The Operator selects "Throw", to switch the turnout to the siding.||2nd Throttle sends a Throw command to addressed to 1001. The Command Station, Boosters and Decoders all respond as above, but now for the Throw Command addressed to Decoder 1001. Decoder 1001 activates the turnout motor, in the correct direction to throw the turnout to the siding.||The turnout motor moves the turnout points to the thrown position.|
|The Operator enters the address 9905.||2nd Throttle saves address 9905. All subsequent commands from 2nd Throttle will be sent to Decoder 9905.||None.|
|The Operator selects Forward direction.||2nd Throttle saves direction as Forward. All subsequent commands from 2nd Throttle will specify Locomotive 9905 is to move in the forward direction.||None.|
|The Operator increases throttle speed.||2nd Throttle interprets the Operator's throttle action as, "Set speed to Speed Step 4 / Forward", and sends a Speed Step 4 command addressed to 9905. The Command Station, Boosters and Decoders all respond as above, but now for the Speed Step 4 / Forward command addressed to Decoder 9905.||Locomotive 9905 moves forward thru the turnout, onto the siding.|
|The Operator decreases throttle speed.||2nd Throttle interprets the Operator's throttle action as, "Set speed to Speed Step 0 / Forward", and sends a Speed Step 0 command addressed to 9905. The Command Station, Boosters and Decoders all respond as above, but now for the Speed Step 0 / Forward command addressed to Decoder 9905.||Locomotive 9905 comes to a stop on the siding.|
Where to Go From Here
- Continue on to the Introduction to DCC-2, part 2 of this introduction.
- Don't miss the DCC Systems comparison.
- As you prepare to select your first DCC components, check out the DCC Tutorial (Starter Sets) and the Starter Set article.
- Consult the list of DCC Resources.
- And when you're ready for it, study the article Wiring for Digital Command Control, and it sub-articles.