21 August 2019
|
Fine-tuning a digital decoder to suit driving or operating requirements can seem confusing. We guide you through the first programming steps.
You have started with DCC control, bought a DCC-fitted locomotive or added your first DCC decoder to a DCC-ready locomotive. Now what? Most controllers can change a locomotive address directly from the handset, but for anything else, delving into the Configuration Variables (CVs) is the next step.
CVs vary from decoder to decoder, with only eight mandated or recommended by the National Model Railroad Association (NMRA) who set DCC standards. They are listed in the table below.
CV Name |
CV Number |
Default Value |
Read Only? |
Primary Address |
1 |
3 |
|
Vstart |
2 |
|
|
Acceleration Rate |
3 |
|
|
Deceleration Rate |
4 |
|
|
Manufacturer Version No. |
7 |
|
Yes |
Manufacturer ID |
8 |
|
Yes |
Packet Time-out Value |
11 |
|
|
Configuration Data |
29 |
|
|
The first CV controls the decoder address and is set to 3 from the factory. This number is what differentiates the decoder from other decoders, so it knows when it is being ‘talked to’ by the DCC controller. You can set CV1 to any value from 1 to 127.
Before we start changing things, make sure you know the current values stored in the decoder. Most manufacturers issue a data sheet with the decoder, listing the CVs supported and their default values. But what if you bought a locomotive with a decoder already installed? This is where CVs 7 and 8 come in handy. Put your locomotive on your programming track and read these CVs. A quick internet search will result in a cross-reference between the values and the appropriate manufacturer. It is always good practice to read from the decoder and write down the value of any CV before you change it, should you need to restore it if you make a wrong setting.
Multi-function CV29
Some CVs use their space in the decoder's memory as a bank of eight on/off switches. While this lets you do a lot with very little memory, it can get very complex for those of us that aren't on speaking terms with binary code. The table below lists how CV29 works. Don’t worry, there are online calculators to help you and should the worst happen and you forget the default values, simply consult your decoder manual.
Bit |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Value |
1 |
2 |
4 |
8 |
16 |
32 |
64 |
128 |
Function |
Direction |
28/128 speed steps |
DC operation |
Railcom |
Complex Speed Curve |
Long Address |
Reserved |
reserved |
To throw any of these eight ‘switches’, you set the appropriate bit ‘on’ by adding its value to CV29. Most decoders come with CV29 set to 6 as standard – 28/128 speed steps and DC operation enabled. That’s bits 1 and 2 ‘on’ - values 2 and 4 added together to make 6.
Let’s assume you’ve added a decoder to your locomotive and it runs the wrong way - you set it off forwards and it runs tender (or number 2 end of a diesel) first. Simply increase the value of bit 0 in CV29 by 1 and it will reverse direction. It saves unsoldering the wires to the motor!
All this messing with binary can be daunting, but there are a few on-line resources that do the work for you. The 2mm Scale Association’s website allows you to tick the functions you require and it tells you the value to put into CV29. Visit www.2mm.org.uk/articles/cv29 calculator.
Acceleration and Deceleration
Let’s assume your locomotive runs OK, but sets off like a scalded cat and stops like someone has thrown an anchor out of the cab. Let’s set it up so that it accelerates and decelerates at a more realistic rate. Here we’re looking at CVs 3 and 4.
This pair of CVs can take a value from 0 to 255, though lower values between 5 and 10 are common. Set CV3 to 0 and the locomotive will immediately jump to the speed set by your controller (known as a ‘speed step’). Increase the value in CV3 and the locomotive will take longer to reach the desired speed. Experiment with a few values and try to match the performance of the locomotive with what you expect from it. A heavy freight locomotive should take longer to reach its desired speed than a small tank locomotive with a few wagons. Likewise, increasing CV4’s value will lengthen the time it takes for the locomotive to slow to a stop when the throttle is set to zero.
Speed Adjustment
Assuming your locomotive runs too fast at maximum speed on your controller or doesn’t move at all on speed step 1, this can be sorted with CVs too. The first, CV2 (Vstart), tells the decoder the voltage at which the speed curve will start.
Next, we have CV5 – Vhigh and CV6 – Vmid. As you might expect, CV5 tells the decoder what voltage to apply to the motor at the highest speed step and CV6 at the middle point. Neither of these is on the NMRA’s mandatory or recommended list, so some decoders might not have them available, but it is uncommon these days.
Experiment with CV2 to get the locomotive crawling along at speed step 1, then adjust the ‘top end’ CV5 to something appropriate to the locomotive. Then, set CV6 to approximately half the value of CV5. When you get confident, adjust CV6 to make the speed curve non-linear. Lowering the value of CV6 from half that of CV5 will give finer speed control at lower speed steps. Increasing its value above half will give finer control at higher speed steps. – see the graph below.
The decoder calculates the speed curves automatically from the three CVs, giving a smooth transition from the speed step to speed step. It doesn’t matter if you’re using 28 or 128-speed steps, the decoder does all the work for you.
Hopefully, this quick introduction into the world of CVs should get your locomotives running exactly how you want them. If you'd like more advice on how to set up a DCC decoder, our easy-to-follow tutorial should be your first stop.
For more advice on about DCC, head to our dedicated section.