DCC Explained
Very basic way it works.
DCC stands for Digital Command Control – nothing to do with DC or AC current – at least in the title.
It is a system that allows multiple trains to sit on the same track with the same supply whilst allowing them to be individually controlled. It is very different from the DC (direct current) way of controlling a train. In DC if a train is moving forward and you suddenly reverse the connections to the track, the train will go backwards. In DCC if you reverse the connections the train will go forwards as if nothing had happened. How can this be?
The supply to the track is always on at full voltage. But the supply is not DC it is AC. Furthermore, it is AC which has a square wave profile. Foe a split second one rail will be at something like +15V, and a split second later it will be at -15V. The frequency is very high about 8000 cycles per second.
The trains are intelligent – they have a decoder – a small chip fitted inside. This decoder knows the identity of the train, and it knows what to do when it gets instructions. Let’s leave the identity for a moment and look at how the decoder gets instructions. In the DCC Ex system this is achieved through a “commandStation” and a “controller”. The controller may look a bit like a handheld remote control, usually a bit different in shape, it may be a web based application, or it may be a computer program. However it looks physically it is designed to send text commands to the commandStation when a user presses some button on the controller. For example when the user presses a button to switch power on to the main track the controller will send <1 MAIN> to the commandStation. There is no need to know how the controller does this it may send the data by a wire connection, or it may send the data by a wireless connection.
There is a universally agreed set of commands so the various units should be interchangeable across manufacturers.
So what does the commandStation do with these instructions. It has to communicate with the train via the track, and all the track can do is change the time between switching between + and -. It is agreed that a pulse of a certain length is regarded as representing zero (about 100 microseconds), and a pulse of about half (58 microseconds) represents a 1.
To send a command a packet of binary 1s and 0s is sent to the track in the form of switching the voltage. (The precise form of a packet is described on a number of YouTube videos for anyone interested) The decoder in the train receives this packet and knows how to interpret it into an action – like “move forward at speed 20”.
The bit missing in this is the identity of the train. When a train is bought with a DCC “fitted” decoder the decoder is usually set to an id (identity) of 3. The first part of the packet sent by the command station will contain the id of the train for which the command is intended. So only if the packet says the command is intended for id 3, will our new train respond. If we buy a second train, we will need to change its id to say 4. Each controller will have a way of doing this, but again it is done through the track – often a separate bit of track as you would only want to change the id of one train.
The next most obvious question is how does the train vary its speed if the voltage is always a square wave fluctuating between the same +15V and -15V? The motor in the train is a DC motor. The decoder causes the electronics in the train to rectify (changes AC to DC) the track voltage. To then get variations in speed the DC is chopped into short pulses. The shorter the pulses implies the motor will see the DC voltage for a shorter time and so go slower. The longer the pulses the faster the train will go. This has a technical name and is called pulse-width modulation (PWM).
Decoder terminology.
When buying a train, you will see: DCC Ready, DCC fitted, DCC Sound fitted.
DCC Ready means the train can be fitted with a decoder but none is supplied. Without a decoder the train will act like an ordinary DC train. To fit a decoder is simple but fiddly and slender fingers help, together with screwdrivers for very small screws.
DCC fitted means that a decoder is fitted, and the train will be able to follow the basic stop, start forwards, backwards and speed controls. In addition many decoders have a more sophisticated set of commands to change properties such as acceleration and deceleration rates – and many others.
DCC sound fitted means that will have all the functions of DCC fitted but in addition a goodly number of sound and sound related functions. Sound decoders are good fun but expensive. The range of functions, and which buttons on a controller can be used for these, is (at least in the case of Bachmann trains) supplied with the train.
Reversing Loops.
We wanted a track which incorporated a reversing loop. The diagram below shows such an example.
You can see that if the points at A and B are both set to go on the middle section of the track then there will be a dead short across the supply. How is this problem avoided?
The central section of the track is isolated at both ends as shown by the blue lines across the track. So, without help the central section is dead. A special device called an auto-reversing switch is connected between some section of the live track and the (otherwise) dead section. This can feed power to that section of either polarity according to circumstances. How does it know which way to switch the connections? (Strictly, here we have AC square wave so polarity is not really the correct word – it is used her to relate to connecting each side of the track to the correct terminal).
Suppose a train is heading up the section from A and suppose also that the central section has the wrong polarity. As the wheels of the train cross the very narrow insulating gap a short circuit is produced. The auto reverser is designed to immediately notice this short and switch the polarity before the commandStation feels any distress. CommandStations are specifically designed to allow this. Usually more than one set of wheels on the train picks up the current from the track and the auto reverser changes the connection well before the second wheels pick up current from the middle section of track.
When the train gets to the other end of the section a second short will occur and the auto reverser will change the central section of track back again.
Note that with DCC the auto reverser is simply avoiding long term short circuits which would not be good. It is not preventing the train from going backwards. We said at the outset that you can switch over the tracks in DCC and the train continues in the same direction.