DCC Tutorial (Power)
|This article is part |
of the DCC Tutorial
Intro to 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 is:
- 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.
- The nature of the DCC signal does not polarize the rail, reducing the tendency to attract dirt and grime, an issue when polarity is imposed on the rails by analog control systems, as well as some earlier implementations of command control. A polarized rail has a space charge around it that attracts any nearby pollutants.
Some DCC Details
|An AC waveform||A digital waveform:|
Note it is two mirror image waves
The power on the track is not simple analog (Direct Current), but a digital signal.
- The DCC signal does not look like the AC sine wave you would normally think of, such as found in your AC wall outlet or on a transformer secondary. The DCC signal on each rail switches very quickly from Max Voltage to 0V, and varies the time period at which it switches (the modulation) to convey information to trains on the track. See the illustrations for the difference between an AC sine wave and the more complex DCC signal. Contrary to popular belief, there is no negative voltage present on the rails. The average DC value is Zero Volts.
You can think of the rails as being a Source and a Sink. The source is the digital voltage applied to the rail, the sink is the return path to the booster. For signal integrity, the booster alternates which rail is the source, making the other rail the sink, at a very high rate. This also means the locomotive's decoder can pick data off either rail, eliminating the need to place the locomotive on the rails in a specific alignment.
The reason the oscilloscope trace appears to have a positive and negative component is because the reference, or ground connection, sees a changing potential. What the scope displays is a signal that is either more positive than the reference, or more negative. When the ground clip is attached to Rail B, and the probe to Rail A, 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.
It is not an analog waveform, where frequency, phase or amplitude have meaning.
- The DCC track power can be seen to be:
- DCC power for motors/lights/sound/animation.
- A digital timing/control signal to tell decoders what to do.
|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 input 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 operate data communications networks 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 not a significant factor below 100 MHz.|
|Model railroaders should always provide adequate wiring to minimize voltage loss between power systems and operating locomotives, whether they are using command control or not. Many railroads do not have adequate wiring. Digital Command Control systems do not require special wiring to work. As with ordinary analog DC operation, inadequate wiring will cause bad 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.|
Intro to 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 modulated onto the track power. That resulting higher voltage digital waveform is sent from the booster to the rails.
The DCC decoder in the locomotive picks up the signal from the rails. The decoder has circuitry designed to process the DCC signal. The microcontroller the decoder is built around examines the data, and if it is addressed to it, acts on the instructions contained in the waveform. The decoder also rectifies the DCC signal into Direct Current to power the decoder, and applies 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 Contol 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, in this case twelve bits representing a value of one are transmitted. No other DCC command can consist of twelve sequential bits set to equal 1.
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 segment 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.
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.
The preamble is considered to be floating, and provides sync information to the devices, making the entire system self-synchronising without additional clock signals. 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 a string of 12 bits set to 1, followed by a zero, it immediately takes note. If the address byte matches the decoder's address, it then processes the error correction byte, and if that is correct, it processes the commands it has recieved. 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, thus they reduce the number of packets that can be sent 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. (The decoder will continue to do what it is 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, and is in the form of a square wave, such as the DCC packet shown above. This means that 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 each section of track to control each train.
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 number of amps.
For all locomotives to run properly, you need to be sure that there is no voltage drop. That is, you need to be sure that 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. With the I-Squared-R rule, a tremendous amount of energy will be dissipated at the short. This energy, in the form of heat, could quickly melt trucks, engines, etc. To help prevent this, 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.
For this to work, any point on the track needs to be wired so that the booster's protection can function properly. To test this, simply place a metal coin, or some other metal object, across the rails. The booster should cut off the 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.
Conversion from Analog/Direct Current to Digital Command Control
Conversion of a layout from 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 which are used to power a single block at a time. Since one power supply is routed to one block in the immediate vicinity, they do not require heavy wire to carry large currents, as they do not supply power to multiple trains over 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 advantage over DC page.
- See the track wiring page for more details.
Getting started with a Starter Set.