In the long term all electronic functions on the layout will use DCC.

Digital Command Control, for those who don't know, offers many advantages over conventional DC analogue control systems. The main one being the simplicity of wiring. DCC allows one to control many locomotives individually on the layout without having to electrically isolate parts of the track. The only exceptions being the number of locomotives drawing current from the track and reverse loops. I wont go into too much detail here since there are plenty of other web sites devoted to this.

I currently have a Digitrax Zephyr starter system which I will be expanding with computer control using JMRI over the Digitrax Loconet.

The computer will connect to Loconet with a Locobuffer which I have built myself.

All points will be electrically operated, except perhaps for those in the fiddle yard, using DIY Accessory Decoders

Wiring the Layout

For the layout I've adopted a "Bus" wiring method whereby a pair of wires carrying the DCC power/signal (the bus) is run around under the layout and tapped with feeds from the track.

In this case I've used figure 8 speaker wire for the bus, punctuated with terminal blocks every metre or so, and finer fig 8 wire for the feeds.

No particular reason for using speaker wire other than that it seemed silly to go out and buy special wire when I had great knotted balls of speaker wire cluttering up the wardrobe. If I was buying wire specially for the job I would probably use black and red pair, thick for the bus and not so thick for the feeds, just to make it easier to identify which rail is going to which side of the bus pair. As it is the feed wires are a little thick and obtrusive where they are soldered onto the track.

Hornby Pug DCC Conversion

Disassembled Pug Model

The Pug disassembled. I had to cut the weight horizontally from front to back then cut the top piece down to fit the decoder in. The decoder is a Digitrax DH121. If I was doing it today I'd use a DZ123, which is a quarter of the size and has ample power for a little Pug.

Pug with decoder in place

The pug with the decoder stuffed into place. The bundle of wires are for lights, which I will probably never install but you never know.

Pug model reassembled

The reassembled Pug. Apart from the grey and orange wires it looks the same as it did before.

Peco Point Motors

I mounted point motors under the baseboard rather than directly to the bottom of the points. This initially presented some problems because firstly the actuator pins were too short and secondly it was very difficult to line them up with the point. I extended the pins by crimping some 1.2mm piano wire onto the pin with some 3mm brass tubing (sorry, no pictures of this).

To line the motor up with the point I drilled two 2mm holes through diagonally opposite tab slots in the point straight down through the baseboard. I then bent the oposing tabs on the point motor outward at right angles, leaving the corresponding tabs straight. I pushed the straight tabs up through the holes in the baseboard (after carefully locating the extended actuator pin thorugh the hole in the point's draw bar) and fastened the bent tabs to the baseboard with screws.

point motor mounted under baseboard

Point mtoro under baseboard

Point motor under baseboard

Point motor under baseboard

Accessory decoders

I constructed accessory decoders based on the designs of Mike Bolton from MERG and Lars Lungren from the Tillorps Mekaniska Werkstad ; a model railway club in Sweden. Both designs are based around similar PICs and code. The following table outlines the differences:

Comparison between MERG and TMW accessory decoders
MERG Acc4/5 Accessory decoder TMWAcc1 Accessory decoder
Runs from separate power source and is electrically isolated from track power with opto couplers. Is powered directly from track or a second booster.
Uses the newer PIC16F628A microcontroller with more up-to-date code that is compatible with Digitrax command stations. (It is also supposed to be cheaper but it costs the same as a PIC16F84A in Australia.) Uses the original PIC16F84A microcontroller with older code that cannot be programmed or commanded by a Digitrax or LENZ DCC system. (I only discovered this after building one.)
Uses expensive logic level power MOSFETs to drive point motors but these can drive multiple point motors from one output. (desirable at crossovers) Uses two cheaper darlington array solenoid driving chips (ULN2803) to drive point motors but these can only drive one motor per output.
Some of the components are hard to get here.


Initially I constructed the TMWACC1 decoder on Veroboard.

TMWACC1 on veroboard

I thought about making printed circuit boards but I'd never done this before and I wasn't sure how well the TMW would work. A Veroboard design can be changed whereas a printed circuit cannot and also Veroboard is cheaper.

Now let me state that, while I do have qualifications in electronics, I know very little about either programming PICs or DCC codes so I'm basically relying on these guys when it comes to what's in the PIC. After building the TMWACC1 I discovered that the Digitrax Zephyr couldn't talk to it. It doesn't activate points and it can't program the CVs. You see CVs for accessory decoders are supposed to start at #513 but the Zephyr (and most other Digitrax controllers for all I know) can only program CVs up to 255.

After some reading I realized that the MERG decoder had already addressed this problem and new code had been written. Unfortunately this was written for the newer PIC16F628A microcontroller and I'd already purchased three PIC16F84As. I emailed Lars Lungren with my dillema. Now, Lars is a very nice and helpful man (he even speaks very good English which is more than you can say about my Swedish) but he was, on this occasion, on his way out the door for a holiday.

So instead I went out and purchased a PIC16F628A, programmed it with the latest MERG firmware and, hey presto: it worked straight away.

However, not being entirely happy with the design I decided to make it so that the decoder and capacitor discharge circuit were powered from a separate power supply and the DCC was received via opto couplers, thus isolating the PIC from the DCC supply. I also discovered that the Digitrax unit, while able to write to the decoder's CVs, could not read them back, so I added a LED that gives a flash whenever the decoder sends an Acknowledge. I also had to change the design a little to use 4N25 opto couplers that I was able to get from the local electronics shop. This was the result.

The new cicuit schematic

Circuit Schematic for Accessory Decoder

The final decoder

Accessory Decoder mark 2