Digital Command Control Tutorial - Power

DCCWiki, a community DCC encyclopedia.
Jump to: navigation, search

Summary: DCC Power Tutorial

phase

This article is part
of the DCC Tutorial
Tutorial pages...

DCC compared to computers
Basic System
Power
Starter Sets

Intro 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

  1. There is a binary signal on the power bus, which is sent from the booster to the train.
  2. 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.
  3. There is the signal phase present on the rails, where one rail is energized (ON) while the other is held to 0 or OFF.
  4. 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.
  5. The phase of the rails does NOT control the direction of the locomotive.

Some DCC Details

WAVE1.JPG

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. This happens at a very rapid rate. 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 points change 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.

Mathematically, the signal would be expressed as X +jY + X − jY, where X is time and Y is amplitude.

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.
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 not a significant factor 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 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.

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

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

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, if that is correct, 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

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.

DCC Power

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.

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

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 disputed at a short circuit is determined by the I2R rule. Where 1A polling through a 5 Ohm resistance dissipates 5W of energy, 5A results in 125W. This energy, in the form of heat, could quickly melt trucks, engines, etc.

To 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. While this is mainly to protect the booster'd components from damage, it also protects your investment in rolling stock.

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.

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

What Is Next?

Continue to "Getting started with a Starter Set."