Digital Command Control Tutorial - Power
Summary: DCC Power Tutorial
|This article is part |
of the DCC Tutorial
- 1 Introduction to DCC Power
- 1.1 All you Need to Know
- 1.2 Some DCC Details
- 1.3 Myths about the DCC Power
- 1.4 Digital Command Control Signals
- 1.5 A Digital Command Control Packet
- 1.6 Bandwidth
- 1.7 DCC Power
- 1.8 Digital Command Control Wiring
- 1.9 Conversion from Analog/Direct Current to Digital Command Control
- 2 What Is Next?
Introduction to DCC Power
Power Concepts for Digital Command Control.
Let's start off by saying:
- You don't need to fully understand the technical details of how DCC works to make DCC work.
If you don't understand anything in the sections on Some DCC Details and "DCC Power", don't worry. Come back in a few months and see if you understand it then. If not, don't worry.
Do you know the technical details behind high definition satellite TV broadcasting? Does that keep you from enjoying your favourite show? Does it create a barrier to changing channels or turning your home theatre on?
All you Need to Know
- There is a binary signal on the power bus, which is sent from the booster to the train.
- There is full power on the rails at all times while the booster output is turned on. Voltage is not varied to control loco speed.
- There is the signal phase present on the rails, where one rail is energized (ON) while the other is held to 0 or OFF.
- The rails are identified as A and B, whose phase can be handled by auto reversers when A meets B so you don't need to flip toggle switches.
- The phase of the rails does NOT control the direction of the locomotive.
Some DCC Details
The power on the track is not simple analog (Direct Current), but a Digital Signal. The DCC signal contains both power and data. The data is represented by the time the signal is ON or OFF. DCC does not have polarity, it has a phase relationship. Being digital, there is no concept other than ON or OFF. As shown in the oscilloscope trace toward the right, it consists of a series of pulses which represent the digital data
- The DCC signal is not an Alternating Current sine wave, nor is it a special form of AC. The DCC signal switches quickly between states, and varies the time period (the modulation) it is High or Low to convey information to trains on the track. Contrary to popular belief, there is no negative voltage present on the rails. The average Direct Current Voltage is Zero Volts.
The rails have two defined states: High or Low. Rail A must always be the inverse of Rail B. The booster takes the digital data from the command station and amplifies it, which is then applied to the rails. This process results in Rail A being energized (High) while Rail B is held to 0V (Low). During the next half of the cycle, the signal is inverted, Rail A is 0V while Rail B is energized. The rails alternate from High to Low around 9,000 times per second. This method puts a very robust signal on the rails, allowing the locomotive's decoder to pick data off either rail eliminating the need to place the locomotive on the rails in a specific alignment. Another advantage is that one rail is not held to a constant voltage, eliminating contaminants attracted via the space charge forming around the rails.
The reason the oscilloscope trace appears to have a positive and negative component is the reference point changes with respect to the signal. What the scope displays is a signal that is either more positive or more negative than the 0V reference. With the ground clip is attached to Rail B, and the probe to Rail A, when Rail A is ON or HIGH it shows a positive going trace. When Rail A becomes the zero reference, the ground clip's potential appears to be less positive and a negative going trace is drawn. Despite what the scope displays, the signal on either rail is of the same potential, just reversed when the phase changes. If a load were present, current would be seen flowing from A to B, then B to A.
Mathematically, the signal would be expressed as X +jY + X − jY, where X is time and Y is amplitude.
- There are many who claim there are both positive and negative voltages, citing the Peak to Peak amplitudes as seen in the 'scope trace. To achieve the signal amplitudes they claim exist requires one of two conditions
- The booster needs a power supply of at least twice the peak-to-peak voltage, for example 30VDC at 5A
- The booster would require a 3 wire connection to its power supply, with connections to three terminals: Plus, Minus and Common (15VDC / 0 / –15VDC)
- Sure, the booster could have a voltage doubler incorporated into its design. That adds cost and complexity for no real advantage.
The digital data is represented by the time (period) the rail energized. There are no positive and negative voltages on the rails, the rail is either on or off. The multifunction decoder only sees its input signal go high and low. A period of 58µS High + 58µs Low represents a binary value of 1, a period of 200µs represents a 0 value.
It is not an analog waveform, where frequency, phase or amplitude have meaning.
- The DCC track power can be seen to be:
- Power for motors/lights/sound/animation.
- A digital timing/control signal to tell decoders what to do.
- Simple On/Off binary signal, with one rail always the inverse of the other.
|Some Notes on Digital Command Control|
|The encoding method for digital data onto the track power employed by command control systems based upon the NMRA Digital Command Control Standard provides a much greater signal-to-noise ratio than methods utilized by many other command control systems. If there is sufficient power to operate a locomotive, there is adequate signal amplitude.|
|The designers for the DCC Standard were very aware of the difficulties that users of some command control systems experienced with inadequate wiring. Therefore a number of tests with intentionally bad wiring practices were conducted. If the locomotive could receive sufficient power to operate, the DCC signal was strong enough for reliable operation.|
|At ≈10KHz, the DCC signal is essentially immune from problems such as reflections and standing-waves, which the higher frequency tone systems can experience. The DCC specification requires that decoders reject signals greater than 100 KHz. All the useful DCC signal information is below 100 KHz, and the behaviour of wiring at frequencies greater than 100 KHz is irrelevant to DCC operation..|
|Telephone companies and LANs provide data communications at frequencies in excess of 10 MHz over an ordinary unshielded copper twisted-pair wiring.|
|At frequencies greater than 100 KHz, the controlled impedance and proper termination of transmission lines is far more important than the skin-effect. The impact on conductivity by the skin-effect is insignificant below 100 MHz.|
|Model railroaders should always provide adequate wiring to minimize voltage loss between power sources and operating locomotives, whether they are using command control or not. Many model railroads do not have adequate wiring. Digital Command Control systems do not require special wiring to work. As with ordinary analog operation, inadequate wiring will cause poor locomotive performance. Since multiple locomotives share the same wiring with DCC, the effect of inadequate wiring includes the slowing of one locomotive when another nearby loco draws current.|
Myths about the DCC Power
There are a number of myths circulating about Digital Command Control that refuse to fade away. Most are the result of applying analog concepts to a digital technology..
- DCC is Alternating Current.
- DCC is a form of Alternating Current
- DCC has Polarity.
Correct Answer: None of the Above.
Digital Command Control is based around Digital Technology. Unlike Analog electronics, digital electronics have no concept of polarity. They have two states: On and Off. This is called Binary, as there are only two defined values.
The binary nature of DCC means no negative voltages present on the rails. The signal on one rail is always the inverse of the signal on the other rail. Thus, when Rail A is ON, Rail B is in the inverse state, or OFF.
DCC is a digital technology, which relies on the presence of a positive voltage, or no voltage. It has no concept of negative voltages, as the Low or OFF state is defined as 0V.
On the track, each pulse is repeated, once on Rail A, then on Rail B. The multifunction decoder samples one rail to extract the data. This works regardless of the orientation of the locomotive. If one rail carried pulses of a negative amplitude, the decoder would only see 0V, and would not be able to extract any data if the decoder was sampling that rail.
DCC does not rely on the analog concept of polarity to control direction of travel. The DCC equivalent is Phase. All boosters on a layout must operate in phase, and all track segments must be in phase. Should a metal wheel bridge a gap between two out of phase segments, a short will occur.
When the rails across a gap are in phase, there is no potential (voltage) present, as they are both in the same state. When there is a difference in phase, a potential will be present across the gap. By measuring across the gap with a voltmeter or a lamp, phase mismatches can be quickly identified. This often is an issue with reverse loops and turnouts.
It is not possible to create situations where the voltage is doubled.
Turnouts and Phase Issue
There are two places where the phase is important: The frog and the switch rails. See the pages on turnouts for more details.
When the track loops back onto itself, Rail A will meet Rail B through the turnout's stock rail. For those applications, a method of inverting the phase of the loop is needed. This can be done automatically, or manually using a toggle switch. The multifunction decoder onboard the locomotive will continue as if nothing has happened.
Digital Command Control Signals
The digital waveform is created by your DCC system's (command station). It is sent to a booster (or multiple boosters for large layouts) where the DCC Commands are amplified to track power levels. The resulting higher voltage digital waveform from the booster is applied to the rails.
The multifunction decoder in the locomotive picks up the signal from the rails. The multifunction decoder has circuitry to process the DCC signal. The microcontroller the multifunction decoder is built around examines the data, and if it is addressed to it, acts on the instructions contained in the waveform. Additional circuits supply power to the motor(s), under control of the microcontroller which is responding to the information encoded in the waveform. Each decoder has an address, and will only respond to commands addressed to it.
Wireless DCC controllers have an RF transmitter in the hand (throttle), and an RF receiver that controls the DCC controller (command station). But the DCC Signal and power still goes through the booster and the rails.
A Digital Command Control Packet
A DCC Packet is a defined group of signals. The technical term is a broadcast protocol. In the case of a broadcast protocol, the data is sent to all devices. Every packet consists of a minimum of 38 bits.
The packet always begins with a preamble of at least twelve bits representing a value of one are transmitted. No other DCC command can consist of twelve sequential bits set to equal 1. The preamble is considered to be floating, and provides sync information to the devices, making the entire system self-synchronising without additional clock signals.
When a decoder sees the preamble it immediately takes note. After the preamble the data bytes begin. The first segment is the address byte, the next is the instruction byte. The NMRA DCC standard only defines a few basic instructions. The final segment is the error correction byte. A typical packet consists of three or four data bytes, or 24 to 32 bits. The final segment is the packet end bit, equal to 1. Each byte is separated with a zero bit.
A DCC packet. This one also illustrates Zero Stretching (Analog) operation.
The command station will either transmit idle packets, or retransmit previous packets. No data, no track voltage. The command station will have logic in it that will determine the sequence and repetition of packets to insure that the bandwidth available is used efficiently.
Error correction is provided using an XOR function (Exclusive OR) by the decoder, and should it be found to be correct, the decoder can act on the data bytes.
When a decoder sees the preamble, followed by a zero, it immediately takes note. If the address byte matches the decoder's address it then processes the address and instruction bytes and compares the result to the error correction byte. If the result matches the Error Correction byte it then processes the commands it has received. By checking for errors the decoder can reject a corrupt packet caused by electrical noise or dirty trackage. Should a packet be rejected, the decoder will wait for another packet addressed to it.
The error correction scheme cannot correct an error, it can only detect that the data is corrupt. Should the XOR operation fail, the packet is discarded and the decoder awaits a new one.
Bandwidth is an issue taken into consideration during the design stages of the command station. The NMRA standard sets the timing, only so many bits per second can be sent. A command station will send about 180 three byte packets per second. Larger packets, such as those for 128 speed steps or sound commands, demand more time to send, reducing the number of packets that can be transmitted every second.
- Operating a direct current locomotive in analog mode (without a decoder) further reduces the number of packets sent in a given period. On a large layout with a large number of locomotives in operation, this can become a problem.
Command stations can address this issue by using techniques such as queueing. New packets are sent first, older packets are sent later. Properly done, several hundred trains can operate simultaneously with no noticeable problems. Multifunction decoders will continue to do what they are doing until told otherwise.
Higher end command stations use even more logic to determine the order packets will be sent. Several innovations reduce the number of packets that must be sent, such as advanced consisting, which one packet addresses several decoders, decoder feedback, where a decoder acknowledges it has received a good packet, negating the need to send it again, and dual command packets, where several instructions can be combined into one packet. These techniques reduce the bandwidth demanded to operate large numbers of trains effectively.
The DCC booster puts a digital signal on the track. This signal is there at all times, in the form of a square wave such as the DCC packet shown above. While some may claim that DCC uses a DC voltage with a signal riding on top, or a carrier signal mixed with a DC voltage, this is not true. The rails have a series of pulses on them at all times. Power and the DCC commands are one in the same.
All locomotives have power to their wheels, all the time. Instead of the voltage (and current) controlling the trains, a receiver (decoder) inside each locomotive listens for the commands sent out over the rails from the command station. These commands tell the decoder to make the train for go forward, reverse, fast, slow, or turn on/off lights or sounds.
- Many systems today combine the command station and booster into the same package, so do not be concerned if you don't have a booster. The concept is the same.
With this setup, you control the trains and not (like with analog) the track. Because of this, and the whole point of DCC as a whole, it is possible to control multiple trains on the same track without having to deal with complex wiring and control panels to isolate and control each section of track for each train.
Digital Command Control Wiring
See the page on Wiring for Digital Command Control for further details.
You need to be aware that since all locomotive power comes from the track and more than one locomotive may be running at once, boosters (and their power supplies) are designed to have current ratings of two to ten amps. Because DCC locos and their current demand may be located anywhere on the layout, wiring to the track for DCC needs to handle a higher amperage.
For all locomotives to run properly, you need to ensure that there is no excessive voltage drop. That means all sections of track have sufficient power to handle the locomotives. The best way to do this is to scatter feeder wire connections around the layout. A second reason for a robust wiring system is to ensure that the over-current protective devices built into the booster will operate correctly. This is necessary to protect your railroad equipment from damage caused by an accidental electrical problem, such as derailments.
With DCC, a booster can supply two, five or even as much as 10 amps into a track short-circuit without becoming overloaded, if the wiring is adequate. The wattage dissipated at a short circuit is determined by the I2R rule. Where 1A flowing through a 5Ω resistance dissipates 5W of energy, 5A results in 125W. This energy, in the form of heat, can quickly melt trucks, engines, etc.
To prevent this many DCC systems have short-circuit protection built into the booster. When a short-circuit is detected, the booster will shut down. Once the short-circuit has been removed from the track, the booster will automatically turn the power back on. While this is mainly to protect the booster's components from damage, it also protects your investment in rolling stock.
- The booster will cycle power on and off until the short is cleared. It is important to turn the track power off if it will take more than a few seconds to clear the short.
The track must be wired so that the booster's protection can function properly. To test this, place a metal coin, or some other metal object, across the rails. The booster should cut off power automatically, and turn the power back on once the object has been removed. This arguably means that heavier, larger wire, better track connections, and more track feeders are needed as compared to a traditional analog (DC) powered electrical circuit. The booster does not monitor the current flow, but the rate of change, so excess resistance will interfere with the correct operation of the protection circuits.
Note: The booster's circuit protectors do not act like a traditional fuse. They do not react to current flow, but to the rate of change in current flow. The reason for the heavy wire used to distribute power is to reduce the impedance in the circuit. Too much impedance, and it doesn't take much, will not only limit the current, but also impacts the rate at which the current can increase. Your booster may cut track power at three, not five amps, when a short occurs, because the current shot up at a dramatic rate and the protection circuits interpreted that as a short. The track and its wiring appear as a load to the booster, and you want to minimize it, so shorts will be detected quickly and effectively. It takes seconds to melt a side frame or weld a wheel to the track. The damage will be done before you realize what is happening.
- See the article on Wiring for more info. The heavy wire recommended for the power or track bus is based on best practices, not on the ampacity tables published in the Electrical Code. (Remember, a 15A circuit rating means a maximum of 12A of current draw (80%) is allowed).
- Keep in mind the Electrical Code ampacity tables are based on a 60Hz or lower frequency sine wave (or Direct Current), not the 8 to 10 kilohertz DCC signal.
Always read the manual that comes with any DCC equipment. Some boosters may require an external circuit breaker.
Conversion from Analog/Direct Current to Digital Command Control
Conversion of a layout from Analog direct current (DC) operation to Digital Command Control usually means rewiring. The reason is a fundamental difference between wiring methodology: Direct current layouts rely on multiple low current power supplies located around the layout, with each powering a single block/train at a time. Since one power supply is routed to a block in the immediate vicinity, they do not require heavy wire to carry large currents, as they do not supply power to multiple trains a great distance from the power source.
DCC gives you the ability to run multiple trains simultaneously from one booster, and most modellers will soon begin doing that because is it easy and possible. Which means more current draw, requiring wiring that can handle that.
- For more comparisons, read the DCC Advantages Over DC page.
- See the track wiring page for more details.
What Is Next?
Continue to "Getting started with a Starter Set."