Well it’s been 4 months since I started this topic (crusade? Obsession?), But I have finally done it.
Just as a reminder, I started trying to design a very simple single line ‘warning’ system for a mate. He decided he didn’t need it, but by then I had become obsessed with making a completely automatic, single line signalling system.
After wasting 3 months trying to get an ultrasonic detector to work and giving up, I then tried to use infrared beams
reflected off the sides of trains. That proved very ‘iffy’ in getting good detection from low sided flat wagons.
So I went back to my tried and trusted method of infrared (IR) beams across the track. I have used this method for years to control the turnouts on reverse loops. Very reliable, as the loco/wagon breaks the beam – ie on or off. The only problem is gaps between wagons and it is hard to set up initially.
So this is the arrangement I’ve come up with. The IR transmitting diodes are on the left and the receivers are inside the signal hut, with the rest of the electronics. The signal head is on the wall – they are meant to be visible to operators – not scale train drivers!
and this is what is inside the hut:
There’s 2 detectors approx 100mm apart so that the order in which they detect means I can tell the direction the train is travelling. There’s one of these ‘pairs’ at each end of the single line. They are connected by a single pair of wires.
Then came the part that really exercised my old brain. Writing (and testing) the logic programs for the picaxe microcontrollers I use at each end. But finally I think I have it all working and installed on the single line between my Termite and Melaleuca stations.
Basically it allows up to 3 trains to follow one another through a section, and allows trains to shunt out into a section and then return without upsetting the signals logic.
Signal aspects are Stop, Caution and Clear and may be either red and green leds (red+green=Caution) or a servo operated 3-aspect semaphore.
I have made a video that illustrates some of the many scenarios that the logic has to cater for.
(I have since installed a much brighter green led!)
For those of you still with me, here’s some of the ‘specification’ that I set myself.
a) When a train enters the single line at A, the signal at A shows Stop for say 10 seconds, then shows Caution as an indication that a 2nd train is now allowed to follow. It also sends a 'message' to B indicating 'one train in section' which causes the signal at B to show Stop.
b) if the train continues through the section, when it leaves at B, the B signal clears and sends a message to A indication 'no train in section', and that clears the A signal.
c) If a second train follows the first into the section at A, the signal at A again shows Stop for 10s and then Caution. (still allowing for a 3rd train to follow later) but a message is sent to B indicating there are 'two trains in the section'. When the first train reaches B, no signals change, but the message to A indicates only 'one train in section'. When that second train arrives at B, its signal clears and the message to A saying 'no trains' causes A to set its signal clear.
d) if a 3rd train has followed the first two at A, the signal at A shows Stop to indicate no more trains can follow. The message to B indicates 'three (or more) trains in section'. As the trains arrive at B, the messages 'count down' and the signal at A reverts to Caution when only 1 or 2 trains are left in the section, and clears when there are no more trains in section.
e) whenever a trains passes a stop signal, an alarm sounds. This occurs for either
1) entering from the wrong end onto an occupied section, or
2) a 4th or more following/shunting train entering from one end, or
3) a following/shunting train entering the section from one end, while the 10s timer is active (see a).
There are MANY other cases mainly to do with shunting trains etc. which are too numerous to mention without boring you more.
It might be easier to list the scenarios where it
operates INcorrectly
- When 4 or more trains follow one another from one end. After the 3rd train reaches the other end, both ends show clear even though there are trains in the section A wrong-side failure.
- When a train does not clear both detectors and then it backs out, the signal still shows Caution even though no trains in section. A right-side failure. Use Reset Button to clear both ends.
- When a train enters or leaves both ends ‘at the same time’.
And having finished it, I doubt I’ll ever install any more on my other single line sections.
If I did do it again, I’d go for the simpler idea of only one train allowed in the section – no following trains, no Caution signals – just Stop or Clear.