DIGITAL COMMAND CONTROL (DCC)

DECODER PROGRAMMING

ON THE TETON SHORT LINE

Wayne Roderick, 3rd Division, PNR, NMRA (life)

07/12/98 rev 12/07/01

11/30/04 This page and links are obsolete and I will not further update it as I now use the EasyDCC system for programming.

The Teton Short Line staff of one was heavy into the problems of do-it-yourself decoder programming when we discovered the nifty little PR1 gadget sold byDigitrax. It's a compact hardware interface between your computer and a decoder equipped loco that allows you to program decoders direct from a PC. John Kabat has donated freeware to run it from DOS and Hans Tanner has donated freeware to run it from WINDOWS. It comes packaged with both John's and Hans software and you can go to the respective sites for updates. Loy's Toys, quickly had one on my doorstep for less than $40.

PR1 connections

Upon examining it, I found the PR1 has a whole bunch of tiny surface mount components stuffed into the shell of a 25pin "D" connector that you plug into a serial COM port. Two pair of wires come from it. One pair for clean DC power (about 18-20v) and a pair to a programming track. It's totally isolated from the model railroad and it's DCC system. Load up the software and programming is a snap using Windows or DOS. It's especially enhanced for Digitrax decoders, but it can program the CV's for other decoders using the NMRA Recommended Practices 9.2.3. I've found that programming is a time consuming task, even with this nifty tool and my earlier idea of "keeping the railroad running while programming in SERVICE mode" is undesirable. That feature of DCC interface device (DCCID) has been abandoned.

Some isolated problems with the PR1 have been reported on the DCC SIG and of course that is to be expected of a device the operates on the infamous RS232 standard with many differant machines in many differant situations. Keep in mind, it's a Digitrax product enhanced for their decoders, but still very usable with others. I don't know who designed the PR1, nor do I have access to the schematics, and it's too compact for these old eyes to reverse engineer, but there is a couple of fine programmers trying to make it work with as many decoders in as many configurations as possible. I expect that later versions of the software and possibly the PR1 too, will be better and better.

I'll expand on some of these reported problems and my concern or fix if appropriate.

1-POWER SUPPLY. This is not really a problem with the PR1 unless you make it so by failing to provide a clean source of 15-20 DC. It doesn't need a lot of current unless you have additional load in the loco. You could probably run it with a couple of 9 volt batteries shunted with a husky filter capacitor. I used a wall wart source from the junk box feeding a standard LM317 regulator circuit. Some folks have reported that they had to run the voltage on the high end of the range in order to get the ACK pulse. I believe problem 3 explains the need for this.

2-INSUFFICIENT LOAD. the PR-1 wants to see a decoder on the track and reports back to the software if its present. I observed that the DOS program sends a pulse on TD-pin 2 of about 0.4msec and the WIN program sends a pulse string of about 10 msec a few times per second while probing for a decoder. If a decoder is present, the PR1 stretchs the query by about 10msec more and returns it on RD-pin3. The software wants to see this before it will work. Why? Darned if I know. A very light load (fuel efficient decoder?) might not load it enough. Needs about 10k or less on the track. Not a problem for me, and I haven't verified the validity of this observation.

3-TOO MUCH LOAD. Inside the PR-1 is a couple of 220 ohm resistors apparently intended to limit current to the loco and decoder so the motor won't take off and run. When a programming command is successfully executed in the decoder, an acknowledge (ACK) current pulse is generated by turning the loco motor on for at least 60 msec. This brief current increase is sensed by the PR1 and a positive voltage pulse applied to CD-pin8. This is an important function when the software READS a CV value because it does it by sending all possible values until a ACK pulse is received. The problem can occur when extra devices in the loco such as lights, smoker, sound etc draw too much current through the PR1 limiting resistors. The voltage on the decoder drops too low and/or the ACK pulse is lost in the higher current. This was a problem for me and my answer was to adapt our programming booster that had been originally designed to overcome this exact problem, so that it behaves similiar to the PR1 using John Kabat's freeware. The adaptation includes changing the interface from TTL to RS232 so it can talk with my computer instead of the DCC system.

Schematic, TSL Programmer

This is probably not the way, I'd design and build it from scratch, but the programming booster was already constructed so the simple thing to do was modify it to fool the software into thinking it was a PR1. I'm not sure that I've got it done right for all situations, but it works for me. Use the info as you see fit.

The PR1 software wants to see the CTS and DSR lines active as an indication that the PR1 is connected, so we jumper these back. The 555 timer that formerly stretched the acknowledgement (ACK) pulse was re-used to stretch the LOCO-PRESENT interrogations from the TX terminal and return them on the RX terminal. An engine or decoder does not have to be present, so the concern for minimum load current goes away.

The ACK pulse that was formerly stretched with the 555 timer is now brief, but apparently acceptable to the software. The brief audio chirp from the piezo device is also adequate and I find it reassuring to hear the ACK. Remember, the software READS a CV by trying all possible values until the ACK pulse is received. By using the #1815 lamp bulb current limiter and AC coupling of the pulse, we overcame our problems of excess current load in the loco preventing this function.

The inexpensive PR1 and its freeware generously donated by John and Hans for our benefit, is a great tool and it's only going to get better. I suggest you go for it and if one of the problems we've discussed becomes significant, then you DIY fellows have some options. :-)

Make sure you check John and Hans web pages for software updates. Some of the handshaking need has been eliminated and that would further simplify your "PR1 like" programmer. .

Return to Teton Short Line Home Page