CT Decoder Setup

by Nigel Cliffe

CT make very small DCC decoders which offer perhaps the best control of small motors I've ever seen. It works exceptionally well on motors ranging from old Farish open-frame types, through more modern "cans", to small coreless designs from Maxon and Faulhaber. But, to get the best out of the decoder, it needs some CV values changing to "tune" the decoder to the locomotive and the motor. The major problem with CT is the lack of reliable documentation.

This short article outlines how I adjust the motor control CV's in CT DCX74, DCX75, SL74 and SL75 decoders. I'll illustrate things with both manual setting of CV's through a handset, and via a computer running JMRI (DecoderPro). A loco needs to run well without a decoder before trying to tune the decoder; its not possible to correct mechanical shortcomings and bad pickup with decoder settings !

Precision Motor Control

The CT decoder can sense how the motor is performing. It does this by measuring the back-EMF from the motor at a high frequency. The motor is controlled using Pulse Width Modulation (PWM), which happens at a high frequency of 16kHz or 32kHz. With the information gathered during the sensing of the back-EMF, the decoder can then alter the control of the motor. There are a number of CV's which influence how the sensing is performed and what is done with the results. Those results can be stunning, even old Farish steam locos can run totally smoothly with an imperceptibly slow bottom speed.

Many of the CV's described here are unique to CT. Though other makers may have similar properties, their CV's will be different. If using JMRI (DecoderPro), then the software designers try to use the common wording for common properties, even when the CV numbers are different, so properties should be in similar places on the screens for different decoders.

I begin the setup of a CT decoder by setting various parameters which control the motor. This can take quite a few iterations, so keeping notes of the changes made is a good idea. And, whilst one locomotive might give clues to another apparently similar loco, I find that the small mechanical differences between locomotives does alter the values which work best.

If all goes wrong, and you want to reset the decoder to its factory settings, CT decoders use a non-standard method. To reset the decoder, set the short address (CV1) to zero, this will reset all parameters in the decoder to their factory settings.

Programming Mode. ("1" in screenshot below)

When using the programming track (service mode programming), there are several methods for reading/writing data to a DCC decoder. The CT decoders work in "direct bit" mode. If using a command station handset to program a decoder, consult its manual for how to change the programming mode. If using JMRI software, the programming mode can be checked/changed via the link circled "1" in the screenshot below.

Track Voltage Reference ("2" in screenshot below)

The Track Voltage Reference (CV64) is supposed to reflect the track voltage from the DCC system, which in turn is used by the chip to set the motor speed. But, it can be used to fool the chip into running at a different speed by pretending that the track voltage is different to reality. This can be useful as a substitute to altering the gearing of a motor; for example, setting the track reference voltage to 250 will make a typically "too fast" old Farish steam locomotive run with a more realistic slower top speed, and at the same time, also gains more control at the bottom of its speeds.

Adjust this value to give an acceptable range of speeds when using the entire throttle speed range, higher numbers will make the locomotive run slower.

Note that if you use a Sprog to program locomotives, and then move the locomotives to a layout with a different controller, chances are that the track voltage of the two systems are different; you might find settings need to be adjusted to cope with the real layout.

Motor Frequency ("3" in screenshot below)

The Frequency used by the chip in controlling the motor can be changed using bit-7 in CV137 (thus CV137 takes values of 0 or 128 for this parameter). The default setting (0) means the motor is controlled at either 150Hz or 16Khz, the setting for the PWM Period (CV9, below) determines which is used.

For 2mm models, I'd be using at least 16kHz due to the values for PWM Period being higher than 134. With some motors (notably Faulhaber and Maxon), selecting the 32kHz option (CV137=128) may improve motor control. It may be necessary to experiment with this parameter, setting the other options and seeing what gives the best overall combination - the "alternative CV set" described at the bottom might be useful for this comparison.

Note that the other bits in CV137 control obscure features of the SL74/SL75 sound decoders, probably only relevant to very advanced setups. If using JMRI, the software takes care of things and keeps the bits "separate" on different tabs.

Motor PWM Period. ("4" in screenshot below)

The PWM period is set in CV9. This is setting how long the sensing period should be to measure the back-EMF.

For recent CT firmware and smaller motors, this takes values from 134 to 192 (values 1-63 are also valid, but would be applicable for motor designs not used in 2mm scale). I find values between 134 and 155 tend to work best. I set this by initially trying 134, then increasing the value and observing the results of the loco running at all speeds; I'm looking for smooth running and no stuttering. ("Recent CT Firmware" covers all the DCX74/75's I've ever seen).

P and I adjustment ("5" and "6" in screenshot below)

The P and I values alter how the EMF sensed by the chip is used to alter the control of the motor. CV51 controls P, and CV52 controls I. Both take values from 0 to 255.
The setting of these depends in the specific motor and mechanical properties of the locomotive. I start by reading the values back from the chip, typically P=80 and I=40. Try halving both values (ie. P=40, I=20) and see if the effect is better or worse. Then pick another pair of values (keeping proportions similar), such as P=30, I=15, and slowly home in on the best values. Having got to the best pair of values, then try adjusting I on its own (bear in mind, any value from 0-255 is legal). This should, eventually(!), get smooth running in both directions at all speeds, particularly at low speeds with no lumpiness.



The other parameters on the "motors" pane above are the BEMF Pull (labelled 7) and Acceleration and Decelleration (labelled 8, discussed below).

I rarely adjust the BEMF pull (CV50, values from 0 to 255), leaving it at a high value; its impact is mostly found when running "consists" or "double heading" when a lower value of BEMF pull will stop two locomotives "fighting" each other as one speeds up and the other slows down. However, if stuck, it may be worth experimenting with slightly lower values, perhaps from 200 upwards.


Acceleration, Decelleration & Speed Curves

Once the motor parameters are working to your satisfaction, it is time to consider the way the locomotive responds to the throttle instructions; its acceleration and decelleration and the speed curves.

Acceleration and Decelleration (CV3 and CV4, labelled 8 above).

These take values from 0 to 255, and control how rapidly the locomotive accelerates and decelerates. I find that the optimum value is a very personal thing, dependent on the type of layout and the physical egonomics of the handset/throttle. So, play with values and see what works for you. Sometimes having a larger value for acceleration (CV3) than decelleration (CV4) can be better.

Speed Curves.

In common with most decoders, the CT models can use either the simple 3-point speed curve, or the full 28-point curve. The choice of which is used is set in CV29, bit 4 (see my article on CV29), or via a radio-button in the JMRI interface.

I rarely find it necessary to adjust things, I just use the default 3-point curve, setting the start speed (CV2) to 1 or 2, the mid-point (CV6) to around 128, and the max speed (CV5) to 255.

Note that the use of Voltage Reference (above) is much more effective at taming top-speed than the max-speed (CV5) setting.

The 28 point curve can be set; I'd suggest that doing this by hand is the way to insanity; JMRI has a nice "slider" interface to do it.


Yard Mode, Alternative CV sets and other esoteric options

The CT chip has a huge range of esoteric options, some cover running, others control the lighting outputs.

Yard Mode.

The CT chip allows the owner to have a function key for "yard mode", and to determine what this key does. There are two stages to setting up Yard Mode. Firstly, the function map has to be altered to select which function key will set Yard Mode (third column of tick boxes in the upper screen shot, in this example, Function Key 3 is selected for Yard Mode). For manual setting of CV's, this is the parameter "RA" in the CT function mapping, consult the CT function map document for details.
Secondly, the behaviour needs to be set (top left of lower screen shot); the choices being to "disable the acceleration/decelleration factors", and "run the loco at half speed". Either or both can be selected using CV116; bit 0 for the acceleration option, and bit 1 for half speed. Thus values of CV116 are 0,1,2,3.


Alternative CV Sets

The CT chip has the ability to store two complete sets of CV values which the user can flip between with a single parameter. This might be useful to allow comparison of different settings, or to have a loco which is used in radically different environments. This is shown in the screenshot below, central column, or can be set manually in CV109, and takes values of 0 or 1 (to select either CV set). In practise, I suspect that setting up all the CV's to be almost identical twice is something which only users of software like JMRI will undertake.


Other Esoteric Options

The main trick which I exploit is for uncoupling, which I've detailed on another page. Even without an electromagnet driven coupling on the locomotive, the small movements which can be triggered from a function key might be useful (ie. a "nudge up" function key).

Many of the other running tricks are tied to specific command stations and specialised hardware. For example, the CT chip can respond to Zimo HLU speed control modules, but that requires Zimo command station and other hardware. The SL-series sound chips (but not the DCX motor only chips) can respond to Assymetric DCC braking instructions.

Away from running, there are a huge number of lighting effects, including flashing lights, dimming of lights, setting of function keys to control dimming, etc., which are controlled by CV's. And, if using the SL-series sound decoders, parameters which alter how the sounds are played.




"Commentary" on CT Decoders available from Arnold Huebsch.

CT Decoder CV reference file, available from the DCC-UK Yahoo Group Files area.

CT Function Map Document, from Tran (CT) website.