Make a computer-controlled model railway

If you are thinking of going DCC and using your computer to control your layout, there is an easy and cheap way to get started…

The device you are looking for is called the “Sprog II”, and comes with JMRI software. This can tell you the contents of your “Configuration Variables” or “CVs”, and it can allow you to create a software thottle to control your DCC fitted loco.

There is a program called “Create your own model railway”, alluded to in an earlier post, which allows you to mock up either a “digital” or “analog” layout. You can use this to get some ideas.

With a virtual model railway, the trains are of course, not real and cannot crash or run off the table and fall onto the floor, as they often do in real life!

However, you need to bear this fatuous observation in mind when you come to develop a computer-controlled layout. When a computer controls a model train, it does not know that the train is a real model and not a virtual train, and unless your layout is fitted with some kind of feedback electronics, a crash is inevitable.

It is important at the outset to consider what facilities your layout will have for telling the computer where the trains are.

The options are:

1. Physical switches under the track

2. Infra-red detectors

3. Radio Frequency Identification or “RFID”

4. A combination of the above.

The pros and cons of these options are:

1. Physical switches

for: cheap and reliable

against: needs a lot of wiring which defeats the purpose of DCC.

2. Infra-red detectors:

For: does work. Against: expensive and needs a lot of wiring. Does sometimes fail if the area of the layout where the detector is located comes under bright sunlight. If you can put the detector in a tunnel, then so much the better.

3. RFID. For: does work, the RFID tags are very cheap, and can be put on every single logo, carriage, wagon. Against: needs detectors situated round the layout which are expensive. RFID, being radio is subject to interference. RFID tags and readers must be operated away from point motors and locomotive motors, and any other electrical equipment.

Hornby are intending to introduce RFID tags and detectors for use with Railmaster software. This will be the cheapest option on the market.

Hornby  e-LINK module, Railmaster software and 1 amp transformer (PC/Laptop Required) is £68

It can be difficult to plan a layout so that the RFID detector is away from the points, since you need the train to be detected on the approach to the station where the points are.

RFID does work, but it does sometimes fail. A physical switch is necessary to prevent a train from crashing at a terminus or siding: an experimental computer controlled layout must be a “tail chaser”.

Apart from the fact that the computer must have some way of knowing where the trains are, it must also have a way of knowing which way the points have been set. This does at first glance appear to be a simple problem, but it is not.

In the JMRI software, for instance, a number of “states” that a point can be in have to be defined: such as “Thrown”, “Not Thrown”, “Straight”, “Diverge” , “unknown”.  When an operating session begins, there has to be a way for the computer to find out whether a point is thrown or not.  The easiest way is to fit a physical switch to the point. This is PECO part PL-15.

This consideration is important, because, even if the computer knows it has operated the point, it must also know if the point is stuck on “straight” or “diverge” or jammed halfway, if for example a piece of ballast is trapped between the point blade and the rail!

At the outset the, you need to think about how the computer will tell the state of the points, and where the trains are. And that’s not easy.