LAYOUT              TIPS              RAILROADS              LINKS

DIGITAL CONTROL

PC-controlled layout to NMRA-DCC standards

 

dcclog.gif (2135 bytes)
HemTO STARTPAGE
"With DCC you run the train - not the track"
lok dekoder.jpg (15221 bytes)

BoosterSome tips                               Stationär dekoderStationary decoder

BoosterHow does it work?              BlocksensorBlock sensor

Winlok 2.1Winlok 2.1                              LokdekoderLoco- decoders

BoosterBooster

 

Some tips

When the decision is taken to go DCC you have several choices.The first question is whether you want to control your layout from a computer (PC / Mac) or a digital central unit with traditional trottles. Next choice is homebuilt or a turnkey system from any of the model railroad suppliers.
The turnkey systems includes lots of accessories and follows the NMRA DCC standard with respect to mobile decoders for locos but individual solutions for stationary decoding for turnouts, signals etc.- i.e. not compatible. Most new systems based on a central unit have the option to use a PC. The market offers a large variety of software for model railroading - mostly in Windows environment.

If you decide to build a digital system by yourself you will as allways save some money and also have great fun. With basic knowledge in electronics and soldering it is not that complicated. You will find several alternatives in literature on the internet.
Rutger Friberg`s NMRAF- solutions of boosters and stationary decoders is a very good example.

I started to build my layout based on analog technology with block sections and four trottels controlled from a panel with LED's and switches.
I took the first step towards digital control in the beginning of 1996 by looking for  PC-software.

My choice fall on Winlok 2.1 and I started to run the free demo version downloaded from internet. I recommend to define all functions on the layout and run the software in simulation mode to test your ideas before buying or building the digital hardware.
With a large interest of self building and very good instructions from the books of  Rutger Friberg I decided to build the boosters and the stationary decoders. The mobile decoders used are Lenz. I found it to complicated to build loco decoders for the N-scale even if there are some examples using PIC-processors that claims good knowledge in programming and surface mount technology.

TillbakaTOP OF PAGE
How does it work?

Short description of digital (DCC)
model railroading

The central unit with a trottle (alternatively PC) transmits via a booster a stream of digital pulses to the track. The output includes both power and data.

All mobile loco decoders on the track receives the pulses and decodes the information. Each loco have an individual "address" and only one locomotive responds to the actual address followed by data for loco control. Several locos on the same track can with this technique be individually controlled from the central unit. A rectifier in the mobile decoder separates power for the motor and data for control of various functions in the locomotive.

The NMRA DCC standard defines a long list of functions included in the decoder registers.
Most mobile decoders will only take care of the basic functions in the locomotives.

Forward / Reverse   -    Start level   -   Speed   -    Acceleration   -   Retardation   -    Light on / off

The speed is controlled by 14 to 128 steps depending on type and manufacturer of the decoder.
More advanced functions like smoke, sound and couples can be operated from some decoders or more than one decoder installed in the locomotive. A real challenge for the N-scale model railroader.

The choice of decoder depends on the available space and current for the loco usually not more than 0,5 Amps for the N-scale locos. If you measure the "stall"-current before you install the decoder you will be safe by knowing the maximum loco current for any situation.
Connect a DC-amp instrument between the analogue voltage supply and the track. Hold the loco locked to the track and turn the trottle to maximum and read the current.Don’t forget to add the loco lamp current to obtain the total max current.

You can find suitable N-scale decoders from various vendors.  Lenz, Digitrax, Arnold and others have a good assortment in small size. The new DCC handbook by Rutger Friberg and Stan Ames have a complete list of decoders with all data.
I have used the Lenz LE 030 and 040 with EMF-technology. This facility with feedback of motor load to the drive logic’s in the decoder will keep the loco to a constant speed independent of load from the wagons or going up or downhill.

MJ-digital / PC.gif (4808 bytes)

The block diagram shows an example of a DCC system controlled from a PC with a feedback from block sensors to obtain a live presentation of all train movements on the PC-screen.  The software Winlok 2.1 is used in this layout.
Separate boosters for track and stationary decoders connected to individual power supplies minimizes any interaction between the control of trains and switches. Same switches like PECO have a high momentary power consumption that could give large voltage drops.

The PC transmits the pulsed signal from a COM port (RS232) to the NMRAF 8 boosters sending the code and power to NMRAF 5 or LS150 decoders .
The signal from the block sensors indicates if the actual section is occupied or not - connected to a the parallel input board (PIO8255) installed in the PC. The software Winlok 2.1 is prepared with drivers for this board and included functions to indicate the status from this input. The boosters have an overload output also connected to the PIO 8255 so the software can switch off power if a short circuit occurs..

The layout can be easily switched from digital to analogue to give the loco`s not yet modified to digital a chance to show up and still use the ability to be indicated on the PC-screen from the feedback from the block sensors.

TillbakaTOP OF PAGE
Winlok 2.1

Tannersoft -Winlok.jpg (8170 bytes)                            
                                                                                          BoosterSee large "Winlok layout"

The use of a computer to run the layout is often missunderstood.

" I prefer to run my trains by myself and not let the computer take over"

A limited view of computer technology – it is your decision - manual or automatic.Trottles are available on the PC-screen controlled from the mouse and why not a joystick.

With Winlok 2.1 you design a copy of your track layout on the screen including switches, blocks and signals as active elements bound to real events on your railroad model.

Before you start your train - a route is activated that will define the status of involved switches, blocks and signals. Several routes can be defined simultaneously sharing common tracks and switches with interaction between the trains to different priorities.

The feedback from block sensors indicates the position of the trains indicated on the PC-screen. All active functions can be operated by a mouse click on screen by pointing on individual switches, blocks or routes etc.
Complicated? – No, all functions are defined in a standard Windows environment with straight forward instructions and help menus with the result stored in a database linking all data in a logical scheme.

With above tools you run your layout manually following all events on screen.

Winlok gives you a choice of different levels of complexity. For the more experienced programmer a Pascal-like script language is included to simulate both train engineers and central control of the whole layout in a "ATC"-like fashion. Several trains sharing routes can be automatically operated from the PC.

TillbakaTOP OF PAGE
NMRAF 8 booster
NMRAF8.jpg (26691 bytes)
A large layout will take several boosters appointed to different sections.Some turnouts like PECO takes a lot of current that will need a separate supply not to interfere with other devices.
The NMRAF 8 consists of a data logic and a power distribution circuitry. Multiple boosters can share the same data logic on a master connected to the PC com port and the slave boosters only having the power output mated from individual transformers or windings from one transformer.
Multiple boosters are necessary when track voltage differ from voltage level to switches and signals. The NMRAF 8 can be equipped with an overload protection (Polyswitch).
Schematics and instructions are found the in "Electronics for model railroading 5" by Rutger Friberg.
TillbakaTOP OF PAGE
The LS150 and NMRAF 5 stationary decoders
NMRAF5.jpg (23347 bytes)
The stationary decoders Lenz LS150 and  NMRAF 5 is used for turnouts with solenoids. The decoders have 12 (NMRAF5=8) pulsed outputs, two for each turnout (left / right).

Several accessories on a layout demands control with "on / off" functionality like signals, lights and block control. As shown above the NMRAF 5 can be modified to include a "flip/flop" that is switched between two status.
NMRAF5 standard.gif (3353 bytes)
Lenz LS150 for 6 turnouts A standard NMRAF 5 for four turnouts
N5_bistab_relä.gif (2712 bytes)N5_bistab_signal.gif (2568 bytes)
NMRAF 5 modified with "flip / flop" to operate on/off functions like Signals, streetlight etc.

A relay in one of the f/f legs or two LED`s (red / green) can be operated with this solution. The Winlok software will take care of these functions defined as block, signal etc. Each NMRAF 5 can control four "flip/flops".

The standard NMRAF transistors are BDX34 capable to drive solenoids. When modified for "on / off" functionality the transistors used are BC557 or equivalent.
TillbakaTOP OF PAGE
Block sensor connected to computer

Blockdetektor.jpg (31235 bytes)
Why block control with DCC? - a DCC layout will operate the loco`s individually without any block sections!
By keeping the blocks you can mix analogue and DCC on a layout for different sections. The relay  could connect any supply to the track controlled from the PC. But it`s recommended to be careful when mixing analogue and DCC.

The beauty by keeping block sections running DCC is having block sensors that tells if the actual block is occupied or not. A nice feature – with indications on the layout displayed on the PC-screen and also used in the software to keep track of the
                                       trains in "ATC" mode.
The described hardware can be operated by any DCC software using a com.port (RS232) with a pulse code following the NMRA specifications.

The  DCC pulses are brought to the track through the diod bridge D2 giving a signal to the block sensor D3 if there is a load on the track section caused buy a locomotive or a lighted wagon - moving or parked.
The outputs from the block sensors are connected to a computer input interface board with a PIO 8255.
The diode D4 and capacitor C1 ensures a stable sensor signal from the transistor T3
.
TillbakaTOP OF PAGE
Loco- decoder installations

To install a decoder in HO-scale loco or larger normally doesn't give and problems as space is not an issue. N-scale or Z is a challenge and demands lots of preparations and a good portion of patience.
There are no standard solutions for the mechanical adaptation - every locomotive has to be taken care of individually
.
I will in following show a couple of examples of decoder installations with detailed information's for the Fleischman "Rc4" and "Du" N-scale loco`s. The decoders used follows the established NMRA-DCC standards.
The NMRA standard in
cludes a communic
ation protocol and definition of decoder registers with respect to content and functions. Most decoder installations will only use the basic functions. I recommend to study the Rutger Fribergs book no. 5 and the new  DCC book by Rutger Friberg, Stan Ames and Ed Loizeaux to get a deeper knowledge of the DCC standards.
Decoder installation in the Swedish Rc4 - loco
dek_RC4-gold.jpg (50118 bytes)
The RC4 is an example of a N-scale locomotives with extremely good analogue run characteristics that gets even better with a DCC modification.
The decoder used is the
"Lenz mini Gold" LE 10410 decoder . Alternatively LE 040 or Digitrax smallest fits also into the RC4.
The measured "stall"-current is 300mA, that's ok with good margin for above decoders.
Start to prepare the loco both electrically and mechanically and check for running with no problems from an analogue supply. Very important if anything fails during the installation. Open the loco and remove the connections to the pantographs.

The locomotives normally include a printed circuit board (PCB) bringing the wheel connections to motor and lamps. Disconnect the motor from the PCB and remove coils, capacitors and the rectifiers to the lamps.(hidden at the lamp connections)

"Mini Gold" decoder  in RC4

RC4 printed circuit board

Alternate installations of bulbs

Dekoder koppling.gif (3713 bytes)
 
The "Lenz mini Gold" decoder is placed from underside in the space between the boggies after removing the pantograph switch. Solder the decoder wires to the PCB and cut the PCB etches (x) as shown in the figure. Check all connections from the drawing. Use a thin soldering iron and follow general rules for ESD protection.
Make sure the motor poles are only connected to the orange and grey wires. Other connections like the wheels may destroy the decoder. Secure the wires with "loctite"

Some loco`s like the RC4 have the left or right wheel tied to chassis in connection with the common lamp pole. This doesn't give any problems except for half rectified supply to the bulbs with less light that could be compensated by a alternate choice of lamps. The blue decoder wire is left disconnected in the RC4.
Decoder installation in the Swedish Du-loco.
dekoder DU.jpg (26646 bytes)
This N-scale locomotive have a  limited space for a decoder installation. I am using the LE 040 for the DU-loco. A mid part of the PCB is removed (cut off) to give some room for the decoder. The chassis has to be cut down 3 mm, see figure. The LE 040 is fixed by dual glue tape.
Du lok dcc.gif (4086 bytes)

The DU-loco have as standard dual cable connections to the wheels on both sides where one pair will loose the connection to the PCB when it's cut off. Extra wires have to be soldered.
Both left and right wheels are isolated from the chassis so the blue wire connected to chassis is used as common pole for the lamps.
The wires from the decoder is soldered to the PCB as shown in the figure. Follow the same procedures as for the RC4 loco.
Ready to program the locos

The moment have come to give the loco decoder the four basic parameters. Address,
start level, acceleration and retardation.
Do always use a separate programming track apart from the layout - preferable an oval of minimum
1 meter of diameter for final adjustments of the parameters.
If the programming by mistake takes place on the ordinary layout all locos will pick up the same parameters and the old erased. Stationary decoders like the NMRAF 5 will loose its basic functions and have to be sent back to factory.

The DCC central units have a special programming mode and  when running from PC a loco programming routine individual for each software is used. The decoder supplier tells the default setting at delivery and how the parameters can be altered. Test the loco with the default values before any changes.

Give the loco a free unique address. Tandem coupled loco`s are given the same address with individual parameters depending on each locomotives characteristics. The startlevel can differ a lot depending on motor and friction. A certain voltage level is needed to get it moving. Be accurate with 14 run steps avaliable and don't through away lots of steps on a not moving loco. The first step shall be tuned to give a smooth slow start and the rest of the steps distributed up to top speed. Acceleration and retardation is programmed to give a realistic movement - run the test track!
Keep in mind that hundreds of tons don`t stop in 10 meters. 

The DCC technique can be treated as AC (alternating current) giving a lot more tolerance against dirt and oxide. A general problem for the "2R" railroader. Some locomotives without boogies are difficult to run smoothly even with DCC. I have tested tandem coupled locos to extend the connetion to the track. Permanent coupled wagons is another solution to extend the number of contacts to the track.
This method could be the only alternative to modify a Z-scale loco to DCC by having the decoder in a wagon with wires to the motor in the loco.

Steam locomotives with a tender is an excellent example where the decoder can be installed in a coupled unit. The above solutions are just example on individual installation used for small scale locomotives.


dekoder BR150.jpg (29935 bytes)dekoder BR628.jpg (21415 bytes)dekoder tender.jpg (26769 bytes)
 
   LAYOUT              TIPS              RAILROADS              LINKS
TillbakaTOP OF PAGE
Per-Ake Jansson