Asper Posted September 12, 2016 (Warning: this is not for purists, I even had to cut one LEGO cable!) A while ago I started playing with electronics combined with LEGO trains (http://www.eurobrick...22#entry2473697). But also using an Arduino with LEGO is great fun, my first finished project is an automatic level crossing: You can see two PF motors moving the barriers. An Arduino uses four reed switches to count the coupling magnets on two tracks - the barrier will open only if no train is between the reed switches. The PF motors are connected to an Arduino "Motor Shield". Both motors are connected to the same output. So I had to cut a PF cable - but I'm using both parts, since a PF battery box provides the power. Two red LEDs blink while the barriers are closed. The barriers are really fast, and closing them has higher priority than opening (you can see this in the video at 0:14). The orientation of the reed switches is critical, so not every train is detected in every direction on every track. We used this at "Bricking Bavaria" and the second day we found a combination that worked and the level crossing worked from 10-17. Share this post Link to post Share on other sites
MaxSupercars Posted September 12, 2016 Nice, but why did you put the bars on the same side? It is not so realistic. Otherwise good work... :) Max Share this post Link to post Share on other sites
AlmightyArjen Posted September 12, 2016 Nice, but why did you put the bars on the same side? It is not so realistic. Otherwise good work... :) Max Probably because of the cables: it's easier to have them on the same side. Nice project to begin with anyway! Share this post Link to post Share on other sites
Asper Posted September 13, 2016 Thank you! but why did you put the bars on the same side? I integrated this on site into an existing layout - it's a result of restrictions in place, time and cable length. Share this post Link to post Share on other sites
kieran Posted September 13, 2016 Works well though, well done Share this post Link to post Share on other sites
LEGO Train 12 Volts Posted September 14, 2016 Amazing! The motorized level crossing is a nice train stuff classic: Share this post Link to post Share on other sites
1980-Something-Space-Guy Posted September 15, 2016 That's pretty sweet! Works like a charm, it seems! Share this post Link to post Share on other sites