The next chapter in my Lego prototyping quest has completed. I have created an automatic train crossing using two sensors, two servos, and an Arduino board.
There is one sensor at either end of the crossing which can detect when a train passes. As soon as either of them detect the train the gates are closed. The gates remain closed until the sensor the other side first has detected the train as it passes and then no longer detects any trains. In this way the gates remain closed until the entire train has passed regardless of the number of cars and the speed of the train.
Once I get longer leads I can place the sensors farther away from the crossing and thus slow the speed of the gates. I apologise for the very crude design, but given time bubble builds everything into neat Lego constructions which hides everything from sight. Also, the servos I use are a bit old, which is why things seem to shake. These will be replaced by new ones later on.
The video is included below:
Edited by TheBrickster, 08 January 2010 - 03:59 AM.