AlmightyArjen

Quadruple crossing automated by Arduino

Recommended Posts

This rail crossing is automated by two Arduino's. One Arduino will take care of the actual crossing (making the freight trains start/stop and the signals) the other Arduino controls the passenger trains which start/stop from two different stations. Because there's only one priority track for the passenger trains on the crossing, but both stations have two tracks, the latter Arduino also has to control the direction of the passenger trains on the crossing and also flip the switches to make sure the passenger train ends up at an empty track at the station. Both Arduino's have some low level communication between them: as soon as a passenger train is started, the crossing-Arduino is told to put the lights on red and to stop the track. The crossing-Arduino has a setting that tells it for how long the lights should be red. Oh, and there's of course also the Lego Terminator. Enjoy!

 

 

Share this post


Link to post
Share on other sites

Indeed, great work! So are all of the trains track powered? Looks like you need to give the freight trains a little longer clearance interval (as per that... tippy camera car)

Share this post


Link to post
Share on other sites

Thanks! And yes, all the trains are track powered. Adjusting the interval was indeed a thing, one passenger train was (a lot) faster than the other. I tried different motors to get their speed as close to each other as I could. Given that I didn't want the freight trains wait too long when a fast passenger train was passing the crossing, I decreased the clearance for a slow train as much as possible. It went wrong a few times, a nice fails video will be coming out in a few weeks.

Share this post


Link to post
Share on other sites
7 hours ago, Man with a hat said:

Great job again. Looks quite impressive and it seems to run so perfectly.

Yeah well, it took me a while to make it run like it did ;)

Share this post


Link to post
Share on other sites

I always enjoy your posts. Your work is always so much different from the rest of us normal builders.

Share this post


Link to post
Share on other sites
17 hours ago, AlmightyArjen said:

And here's the fail video :D

https://youtu.be/glZiQdLM9dQ

I love this!  So obviously there was "some" trial and error in getting the timing right.  So is it strictly based off timing or is there some block sensors involved in train detection?

Share this post


Link to post
Share on other sites

 

3 hours ago, Roadmonkeytj said:

I love this!  So obviously there was "some" trial and error in getting the timing right.  So is it strictly based off timing or is there some block sensors involved in train detection?

Like every other project of mine, it never works the first time! The problems were with the timing.

Share this post


Link to post
Share on other sites

There will always be differences in friction etc. which make layouts that rely on time unrelieable.

I think the only real solution would be to add serveral sensors to detect the actual position of the trains.

Share this post


Link to post
Share on other sites
8 hours ago, Tcm0 said:

There will always be differences in friction etc. which make layouts that rely on time unrelieable.

I think the only real solution would be to add serveral sensors to detect the actual position of the trains.

Yeah but I wanted to try something without sensors, that was the challenge...

Share this post


Link to post
Share on other sites

I'm not sure which I enjoyed more, the properly working setup or the fails compilation.

Watching it go was just amazing. I've never got much into the trains, but it is really impressive some of the stuff I see.

I almost woke the kids laughing at the fails video. I could hear them start to stir upstairs.

Share this post


Link to post
Share on other sites
6 hours ago, Bludchylde said:

I'm not sure which I enjoyed more, the properly working setup or the fails compilation.

Watching it go was just amazing. I've never got much into the trains, but it is really impressive some of the stuff I see.

I almost woke the kids laughing at the fails video. I could hear them start to stir upstairs.

Thanks, always good to hear!

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.