Automatic Block / Switch Control System
revised 10-18-06

Some months ago I was given the opportunity to design, build and install an automatic train control system for a new garden railroad.  This successful project was composed of a number of individual elements that you may be able to incorporate into your railway.  Each of the individual parts and their integration into a finished system will be described in detail over the next few weeks.

Overview of the Layout

The layout is composed of two independent loops, each having an outdoor and an indoor section.  The outside part of each loop runs for several hundred feet around trees, over a waterfall, around ponds and across bridges and trestles. 

The inside section is entered through a wide hole in the side of the house that goes into the garage.




A 12’ x 18’ wooden platform supports the track inside of the garage.  This is where all of the train operation that I was asked to automate takes place.  The layout’s owner wanted to have five trains running on these two loops so that only two trains would be outside at a time, one on each loop.  The other trains would be parked inside on the platform.  As one train finishes an outside run and returns to the garage a different train emerges for its tour of the yard.


On the platform are a number of bypass sidings.  As you can see in the drawing, the outer loop, labeled “one-in” and “one-out”, has two sidings and can accommodate two trains.  The inner loop, “two-in” and “two-out”, has three sidings for three trains.

There are seven switches on the platform but the one that is labeled "3" is not included in this project as it is only used for a storage siding.  It is important to note that all trains go through the two loops in a counter clockwise direction, entering at either "one-in" or "two-in".  This means that control is only needed for switches 1, 4, and 6.  Switches 1 and 4 control the inner loop’s three sidings with switch 6 controlling the two on the outer loop.  Optical position sensors are installed at the points on the track labeled a, b, c, d, and e.  The sections of track between a controlled switch and an optical sensor (between switch 4 and sensor a for example) are isolated from the main track power and make up a block where power can be removed so that trains can be made to stop or start as needed.


To make things more interesting the platform is about 5' off of the ground and only 24" from the ceiling.  It was great fun crawling on it to set up the switches, blocks and sensors!  Since that was done a hole has been cut in the platform making access to the center of the platform much easier!

Another interesting item is the garage door opener that has been installed above the platform to open and close the access door.

The door opener may seem excessive but one of the main design objectives was to automate the whole operation as much as possible. 


Components of the System

The following five components will be addressed individually in this series of articles.


1 - Block Control

Since at least three of this layout’s five trains will be inside at any one time track power must be removed from or applied to sections of track as needed.  Microcontroller activation of each block must also be considered.  Methods of insulating blocks and connecting power to them will be explored.


2 – Switch Motor Control

Switches have to be set to either have a train go straight or to turn.  Again this must happen in response to microcontroller commands.  Various switch motor control devices, including those from LGB, AristoCraft and Circuitron (Tortoise), will be examined along with what is needed to activate and reverse them.


3 – Block Speed Control

The entire layout operates under radio controlled track power using AristoCraft's Train Engineer.  A circuit needs to be installed that will help to keep the speed of trains down when they are in the controlled blocks.  This will avoid problems that may crop up if a train enters a switch or passes a sensor at excessive speed.


4 – Train Sensing

The microcontroller needs to know when a train has left a block and when it has reentered it so that it can be sure that only one train is on a given outside loop at a time.  The design, construction and use of trackside sensors will be reviewed.



5 – Microcontroller Connections, Software & Operation

The “glue” that binds all of the individual components together is the microcontroller.  Again we call on the venerable PICAXE for this important task.  This is also where we design a user interface that allows changes in operation as well as an LCD screen for reporting status on the train’s position and operation.  Error conditions must also be anticipated and accommodations for them included in the software. 


I think that this series will have something that will interest most readers, even those who are not yet ready to start incorporating microcontrollers in their layout design.  I look forward to presenting this series and to hearing your ideas and applications for what is shown.