Download a PDF version of this page: Level Crossing Project (PDF)
A magnet under the train operates reed switches positioned on the track. The trigger reed switch starts the sequence by switching on the amber light, a few seconds later the two red lights start to flash. When the train has passed the level crossing it operates the cancel reed switch which switches off the lights until the next train arrives.
There is a PCB pattern for this project, but if you don't have facilities to make PCBs you can build this project on stripboard instead. Please see the New Railway Modellers website for a stripboard layout and advice on making model lamps and barriers.
This project uses a 555 monostable circuit to switch on the amber LED for a few seconds. When this switches off it triggers a 555 bistable circuit which switches on a 555 astable circuit to flash the red LEDs. The red LEDs switch off when the train passes the cancel switch.
The reed switches can be held in place between the rails with a small piece of blu tac. Each locomotive will need a miniature magnet glued to its underside, test first with blu tac, then use superglue.