A magnet under the train operates reed switches positioned on the track. The first reed switch changes the signal to red as the train passes, then further along the track a second reed switch changes the signal back to green ready for the next train. The isolated section of track just in front of the signal is switched off by the relay when the signal is red so a train will stop automatically at the red signal.
This project uses a 555 bistable circuit.
Parts Required:
Resistors: | 1k ×2, 33k ×2 |
Capacitors: | 220µF |
Diode | 1N4001 , 1N4148 |
LED | Red, Green (3mm best) |
IC | 555 timer |
Socket | 8-pin DIL for IC |
Switch | Push-switch ×2 |
Switch | Reed switch ×2 |
Relay | SPCO 12V coil |
Magnet | Miniature magnet each locomotive needs one |
Stripboard | 11 rows × 24 holes |
Strip Board Layout:
Track connections:
- Connect the reed switches to push-switches A and B (see the stripboard layout).
- The switches can be held in place between the rails with a small piece of blu tac.
- Connect the track wires to the COM and NC contacts of the relay.
- When soldering to the track make sure you solder to the outside of the rail.
- Each locomotive will need a miniature magnet glued to its underside - test first with blu tac, but superglue is probably best once you are sure it is in the correct position.
- Note that railway signals have red at the bottom, unlike road traffic lights where red is at the top.
Circuit diagram: