Automatic Semaphore Signals
Duncan Webster and Paul Middlehurst
For as long as I’ve been a member at out club (Warrington), we have had a signal indicating when the swinging link giving access to the steaming bays was open. This was very simple, a plunger operated switch made contact when the locking bolt was withdrawn, and turned on an orange flashing beacon, same as you see on construction vehicles. This was all very well, but if the battery went flat (we don’t have mains power), someone tripped over the cable and disconnected it, or the switch failed to make contact, the light didn’t work. Not very fail safe. Following a break in and theft of the flashing beacon, and failure of the plunger operated switch, this was altered so that the locking bolt had a magnet fitted in its point, this magnet closed a reed switch (ex burglar alarm), and this operated a relay such that loss of connection sets the light flashing. The actual lights were high powered MR 11 style LEDS, all of 200 mA current and un-missably bright.
Then we went on a club visit to our good friends at Mold MES. They have full colour light signalling, and all our members commented on the extra interest that these provide in driving. I resurrected my earlier experiments using a magnet on the driving trolley actuating reed switches mounted on the track to operate a bistable latch which controlled the signalling (photos 1 & 2).
This worked fine, but has the disadvantage that if a train is brought on or removed mid section using the swinging link, the signalling system is confused. Bringing a train on can be covered by arranging the swinging link switch to set the section to occupied, but if a train is removed you need a manual override to set the section to clear. This would be prone to human error, which to someone brought up in the nuclear industry would be anathema, so it never went any further. Secondly, if someone brought his own driving trolley without the requisite magnet it wouldn’t work. The answer is track circuiting, so that if an axle is allowing current to flow between the rails in a section, the signal is set to danger. Paul then took up the challenge of providing semaphore signals which would fail safe in the event of flat battery or loss of connection to the track.
First thing to sort out was track circuiting. Using copper wire to join the aluminium rails is guaranteed to give problem long term as bi-metallic corrosion will occur. We have therefore used aluminium wire and stainless nuts/bolts as shown in photo 3. A jig was made to get all the holes in the right place, and a rotary wire brush cleaned up the joint area. A member also produced some gloop specially designed for jointing aluminium busbars. This is pretty tedious work, but has survived one winter with no loss of continuity. Connection between aluminium and copper is made using aluminium solder inside a box filled with potting resin to prevent ingress of water. We have found that insulated fishplates at the ends of sections are not always necessary, if they are, paxolin does the trick
The schematic of the train detection circuit is shown in fig 1.
One rail is connected via a resistor (in the box of tricks) to 5v, the other to ground. At the far end of the section, the rails are connected by a second, equal resistor. Thus with no train in section, the ‘live’ rail should be at 2.5v. If there is a train in section, the live rail will drop to a low voltage (0v in an ideal world), and if any external connection is lost, the bottom end of the resistor in the box of tricks will rise to 5v. This voltage is monitored by the electronics, and anything less than 1.7v counts as track occupied, anything between 1.7v and 3.3v counts as track clear and anything above 3.3v counts as a fault. To cater for intermittent contact as experienced with a train comprising 3.5” gauge loco and one off four wheel trolley, the box of tricks waits until it has received clear continuously for 3 seconds before it puts the signal to clear. The 3.5” rail is not included in the system on the basis that all driving trolleys are 5” gauge.
We now need a semaphore arm that will return to danger if it loses connection to the electrical system or the battery goes flat. This implies that it should be continuously energised when in the clear position, so to maximise battery life we need low current and a well balanced signal arm. Anyone who has been to Llangollen will have seen the GWR centre pivot signal on the main platform (photo 4 shows a similar signal at Droitwich, reproduced courtesy of Adrian Roscalen), just what we need.
Warrington was actually the furthest north reached by the GWR, so it is not out of place. I made a drawing by scaling off the photo, and cut an arm from an old plastic bath panel. The motor obviously needs to back wind under the weight of the arm if it loses power. Just the job for a stepper motor, Paul had one out of an old 5.25” floppy drive. The arm is mounted directly on the motor shaft, very simple indeed. The signal lamp is a high power bi-colour red/green LED.
This was all lashed together in time for our night steam-up and met with generally favourable reception (see the video clip on our website /?page_id=199, (don’t blame me for the sound track, Paul has an odd sense of humour). The committee approved a budget to make 6 off (3 homes 3 distants). The production models have arms made by a local sign making company from Traffolite (very light, no painting, no rust) at an unbelievably low price, and NEMA 17 stepper motors bought off e-bay. Photo 5 shows the assembly, all mounted in a plastic box from Newey and Eyre. The rather super finials were made by fellow club member Steve Hudson (beech wood balls off e-bay, spikes from pound shop). We’ve got a volunteer to paint the posts white.
Distant signals are exactly the same mechanically,
but the input is provided by the home signal box-of-tricks, which pretends to be a track circuit as shown schematically in fig 2. The electronics is exactly the same, the program is very similar except it does not have the time delay. Photo 6 shows a distant signal. Before anyone comments, Steve has since painted the finial yellow.
The electronics is provided by an Arduino board, in this case a mini as we were going to build 6 off. These cost around £2 from China, so using individual chips is not attractive. A ULN 2003 Darlington transistor array boosts the current to motor driving capability. Just to finish it off, the signal lamp is provided by a high intensity bi-colour red/green LED. An overview schematic is shown in fig 3. Photo 7 shows the circuit board and motor. The full schematic, PCB layout and code can be downloaded from our website /
Swing Link Signal
In principle we could have used a semaphore as above with the swing link switch arranged to short out the track and so set the signal to danger whether there was a train present or not. However we are used to a flashing light and it was felt that we should maintain this. We therefore have a colour light signal with two reds, one yellow and a green (photo 8).
Alternate flashing reds is top priority and means swing link open, steady reds means train in section, and I don’t need to explain yellow and green. This uses much the same logic as the semaphores, and is actually cheaper as one arduino controls two signals (distant and home).
If the box of tricks loses connection to the track (or distant signal for a home) the arm is set to danger, and the light set to flash. If the battery goes flat, the arms fall by gravity to danger. I do intend to make a battery isolator circuit so that if the voltage drops to less than 12v, the battery will be disconnected. This will stop the batteries being damaged by over-discharge.
No project would be complete without the odd glitch, we had a few. The first was that the set up worked perfectly until it was enclosed by the box. It would then have spasms which did not seem to relate to any input. This was traced to radio frequency oscillation, and was cured by fitting a capacitor from the current limiting resistor (see later) to ground. Second problem was that the light for the distant should obviously be yellow or green. You can’t get yellow/green bi-colour LED’s, but theory seemed to say that having both red and green on at the same time would give yellow. Be that as it may, having both on and shining through a yellow filter gave red light with great confusion. Solution was to fit two LEDs, one yellow, one green. The third more difficult problem was that to minimise current consumption, Paul fitted a resistor in series with the motor, chosen so that the signals still just worked with a battery voltage of 11.5v, which is pretty flat. Worked fine on the bench, but not at the track. This took some tracking down, but was eventually found to be due to 2 factors. Firstly, to protect against connecting the battery the wrong way round, we fitted a diode in the supply, which causes a 0.6v drop, and we also got some voltage drop down the cable. We got the cable for free (thanks Phil), if you’re buying it don’t skimp, even a few hundred milliamps down a long length causes the odd volt or so drop. Solution, reduce the series resistor, easy once you’ve found it. Paul tried pulse width modulating the motor current, but couldn’t get it to work.
It all worked nicely for some time, but then the home signal started misbehaving. Paul tried swapping everything, motor, electronics etc, to no avail. We then noticed that if you swapped the arms, the other box misbehaved. Obviously something to do with the arms, but the home was counterweighted to have slightly less out of balance than the distant. The penny finally dropped, because it has the fork cut out of one end, and no counterweight, the polar moment of inertia is less on the distant. Although the out of balance is quite low, the inertia is high, and the motor was missing steps. Paul changed the code to do half stepping, and slowed it down, hopefully that one is now fixed.
One of our younger members has been making a signal for years (well he was younger when he started!). Although we could not incorporate it into the automatic system, we did not want to rule out its use, so it has been converted to remote non-automatic operation as a starter signal. This does not fail safe, but as it is under the control of the station staff, this was thought acceptable. It is driven by a geared electric motor (photos 9 & 10), with end of travel micro-switches.
A simple crank linkage drives the signal arm up 45 degrees for half a rev of the motor. There is thus no chance of the arm over-travelling and wiping out the micro-switches. The schematic is given in fig 4.
Unless you count the diodes, no electronics, which will appeal to some. Suitable motors giving around 30rpm are available from e-bay, this one was in Paul’s scrap box and is probably bigger than needed. To reduce the load needed to lift the upper quadrant arm, a substantial counterweight has since been added. Reversal of the supply by a 2 pole 2 way switch causes the motor to revolve clockwise or anticlockwise to the appropriate limit switch. It would not be difficult to control this from the Arduino and make it automatic. The signal lamp is a pocket LED torch from the pound shop. I could make it work off the main 12v battery, but as it is only lit at night its batteries will last a long time. When the arm is at danger, a yellow light is illuminated on the preceding home signal post. Chairman Bruce is making a nice box to cover the gubbins.
Early Operating Experience
Apart from the glitches outlined above, the only operating problem we have had stems from not having signalling all the way round the track. This means that the section of track after the first distant was not part of the track circuit system. There could therefore be a train standing at the first home signal and when that signal cleared, the first distant cleared so a following train expected a clear run, but found a standing train. We hope we have resolved this by incorporating the section twixt the first distant and first home into the track circuiting so that the distant doesn’t clear until both the home signal is clear and the section is not occupied. As the first home is the flashing light, which is unique anyway the different software is not a problem.
Next project could be a calling on signal based, so that a train can be called into the station before the previous one has cleared the section, but it would be nice to get back to engine building. At present I seem to be choosing projects as an excuse to graft on some electronics, but from the feedback I’ve had I’m not alone. Any questions contact me via the club website.
Note: Both Home and Distant signals are technically the same except for the code, the colour of the LEDs and the semaphore arm.