Introduction to DCC-sandbox
[If you're looking for content from the old retired version of the Introduction to DCC page, look here].
This article provides a starting point for understanding DCC. The goal of the content within is to provide a sufficient working knowledge of DCC to advance to other DCCWiki articles, and to begin evaluating DCC systems suitable for your particular situation.
- 1 The Beginner’s Guide to Digital Command Control
- 2 DCC System
- 2.1 DCC System Components
- 2.2 Adapting DCC to Your Layout
- 3 How Does Digital Command Control Work?
- 4 Where to Go From Here
The Beginner’s Guide to Digital Command Control
First Question, “What is DCC?”
DCC is an acronym, identifying the Digital Command Control Standard created by the National Model Railroad Association.
Quite simply, DCC 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-8 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 to both above and below the track. Above the track, each DDC-operated locomotive must have a DCC #Decoder installed, which reads DCC electrical signals from the track. Below the track, a #DCC System must be installed to apply 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 specification, 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.
“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.
A complete Digital Command Control System consists of a number of functions, generally: one or more #throttles connected 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 to 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.
DCC 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 he 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 few. The maximum number of throttles may be a limitation of your command station.
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 like display size. Wireless throttles are generally battery powered.
All throttle are connected to the command station thru 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 it 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 thru 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, as some are very limited in terms of the number of trains is can control.
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 sound decoders you will probably need a programming track booster.
The booster bus is the interconnect between the command station and all booster in your system.
As with the throttle network, 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) it 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 source of power 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, setting the locomotive's speed, direction, lights, sound effects, etc.
Stationary decoders are used for controlling fixed items. Such as turnouts, crossing gates, or signals. 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 the throttle network. 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 DCC to Your Layout
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 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 a throttle for each operator, though they can be added as needed, and any number of those can be wireless with the addition of a wireless gateway.
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 power than the same Geep in 'HO', which draws less power 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 an 'HO' locomotive will consume about 500 milliamps, and an 'N' scale loco will consume about 250 milliamps. 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?|
|A frequently asked question about DCC is, "Is the DCC waveform applied to my track AC or DC?" The short answer is, "Neither." Since its polarity switches thousands of time a second, the DCC signal is clearly not DC. So typical DC measurements will fail. But since the DCC signal is not the classic sinusoidal AC waveform, it's not AC either, and so typical AC measurements will also fail. Most properly, the DCC signal is a "Digitally Encoded Differential DC Signal", which can only be properly measured using high-end electronic instruments or specialty DCC equipment.|
DCC operating commands are encoded on to the voltage applied to the track -- the supply voltage [10 to 18 volts, nominally 12Vdc]. With DCC, the voltage applied to the track is not simply a fixed DC voltage; it is a voltage modulated to convey DCC commands. Track voltage is encoded with a series of digits, "0"s and "1"s, thus the term "Digital". The encoding is by switching of the track voltage on at very high speed -- the left rail is positive with respect to the right rail, then the right rail is positive with respect to the left rail -- all thousands of times a second. A "0" is slightly longer in duration than a "1". Bits are strung together into bytes, and a few bytes into 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.