Asper

Automatic level crossing

Recommended Posts

(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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.