As you build your model railway layout, you will eventually come across the concept of track detection, or operating LEDs, turnouts. Or signals depending upon whether a train is in a particular section of track.
There are three main ways of achieving this. All work, although for me, I prefer the type that detects the whole time a train is in a particular section.
How it Works
The Three Main Types Are;
- A small sensor is placed between the sleepers. As trains pass over the sensor, it activates a relay on a PC board, which can be used to operate accessories, level crossing lights, signals, etc.
- These only look at a single point on the layout, so they do not remain triggered for the entire time a train is in the section. That means the signalling could go green allowing a following train to crash into the back of the train which ahs just passed the detector.
- Reed Switches
- This type is also a spot sensor and only operates when a magnetic field is passing over it. This could be a loco or a special wagon with a magnet in it.
- Current Detectors
- This is what I use. It remains triggered while a train is in the section. The current drawn by the train is used to trigger the sensor.
A wire from one feed to the track is passed through a torroid. This detects current and when current is flowing a relay is triggered indicating occupancy.
By placing resistors across the wheels of wagons, you can detect occupancy for the whole train and the device only resets when the section is empty.
Personally, I have resistor wheels on all my guards and brake vans. The only disadvantage ot this is if the train is so long that the loco is in the next section before the brake van enters the current section. You can avoid this by setting train length maximums. You should do this to make sure you can store trains in sidings or passing loops.
If you are running long trains you may need wagons with resistor sets at various parts of the train. Carriage lighting can also trigger track detection.
Cost of detectors
I have been using NCE BD20 detectors. These cost around $30 each plus postage in Australia.
Digitrax have a detector as well and they are not cheap.
Recently, I purchsed some DC concepts track detectors as well. They are around A$30 each too.
To use them, simply set your track up in sections and run one of the feeder wires from the section 2turns through the torroid. When a train enters the section, the relay triggers and then can be used to power accessories. The module requires a 5v or 12v DC power supply. I have a 12v DC bus on my layout for this purpose.
Simple Uses for track detectors.
Operate an LED to show unoccupied tracks and sidings. This is useful, especially if you have hidden tracks. You can then select a track with no train in it, avoiding crashes!
After experimenting with various devices, I am now using a 12v supply to the detector and feeding it into the logic input of an arduino relay. By having a SPDT relay, I can switch 12v DC to one of two outputs, either lighting up a red/greed dual led, or triggering dcc instructions via a mini panel.
The diagram indicates how to wire this. I have used a red/green led with 3 legs. Using a 5v DC power supply, I include a 300 Ω resistor to limit the current. If you are using a 12v bus, I would suggest a 1 kΩ resistor.
After isolating a section of track on one rail, the feeder is passed through the coil of the detector and then to the main bus.
It is important that you only have one feeder to the section of track or the detector won’t work! All feeders for the section need to be connected via the track detector.
You can then remotely install the led in a control panel to indicate occupancy.
Operate an automated signalling system. With an NCE Mini Panel, you can use your detector to power a sequence of signals, providing realistic automated signalling. There is a 6 second delay once the train leaves the section, which is quite realistic!
Here you connect the relay centre contact to earth and the two other contacts to inputs on a mini panel or to drive 5v logic, arduino, etc. With a mini panel you can then operate a sequence of commands to change signals, points, etc.
Kill power. You could use your track detector to remove power from the preceding section. Passing track current through the relay, power can be switched off for approaching trains, avoiding collisions. The best way to do this is to have a small section of track before each section, with a feeder passing through the relay contacts. If you have stay alives fitted, you will need to make sure the section is long enough so the train stops before the next section.
Arduino Relays can be purchased for a small amount.