DCC Tutorial (Power)

DCCWiki, a community DCC encyclopedia.
Jump to: navigation, search
This article is part
of the DCC Tutorial
Tutorial pages...

DCC compared to computers
Basic System
Power
Starter Sets

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:

  1. There is polarity, the rails are identified as A and B which can be handled by auto reversers when A meets B so you don't need to flip toggle switches.
  2. There is a binary signal on the power bus, which is sent from the booster to the train.
  3. There is full power on the rails at all times while the system is turned on. Voltage is not varied to control loco speed.
  4. The polarity of the power on the rails does NOT control the direction of the locomotive.

Some DCC Details

AC wave.jpeg DCC wave.jpeg
An AC waveform Complex AC waveform:
Note it is two mirror image waves

The power on the track is not simple analog (Direct Current), but a AC 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 switches very quickly from (for example) +12 to -12V, and also 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.

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.

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 microprocessor 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 microprocessor 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.

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

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

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.

DCC Power

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.

For further details, you can read more about decoders, boosters, and command stations.

DCC Wiring

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 resistance in the circuit. Too much resistance, 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 it's 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 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 small power supplies which are used to power a single block at a time, so they didn't require heavy wire to carry large currents, since they don't have to supply power to multiple trains.

DCC gives you the ability to run multiple trains simultaneously, 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.

What's Next

Getting started with a Starter Set.