AlmightyArjen

Project in progress: 3 automated stations, random control

Recommended Posts

Hi all!

A friend of mine and I are busy with a huge layout which will be fully automated. It will contain 3 stations on which trains can depart and arrive. It also will have a crossing where trains stop for each other. The trains that are stopped at the station are "parked" on a side track, using motorized switches. The switches will also contain a sensor to make sure that the switch isn't flipped when a train runs over it. The whole thing will be set up on the 17th/18th of May since my girlfiend isn't home then so we can clear out the living room :laugh:

After some thinking we came up with this layout. It's a continious loop and it should be big enough to make 5 or 6 trains run at once. The whole automation part is done by an Arduino and some electronics, so the first step was to design the cable layout to get an idea how long the cables needed to be and stuff like that:

qcysJGO.jpg

I'm now busy with setting up the electronics: voltage regulators for 5V (for the sensors) and 9V (for the motors of the switches) :

s5d5Rr0.jpg

And ofcourse, the trains can't wait to run on the track!

5h96jAC.jpg

Please note the 4512: I came one passenger train short so I've built a few passenger cars for in 4512 style :classic:

3E0LCdy.jpg

Share this post


Link to post
Share on other sites

Looks great!!! you are doing a great job, we still need to come back to that coffee date ;) b.t.w. also check the Teensy, they are small, cheap and very powerful compared to the Mega.

Share this post


Link to post
Share on other sites

Wow! this is really exciting. What type of sensors are you using to detect the trains? I really like the idea of a "dumb" loop with "smart" isolated sidings. Any reason you chose to have two stopping-blocks before one crossing and only one block before the other? Can't wait to see it working!

Share this post


Link to post
Share on other sites

Can't wait to see this running, do you control the power to the track

Share this post


Link to post
Share on other sites

Looks great!!! you are doing a great job, we still need to come back to that coffee date ;) b.t.w. also check the Teensy, they are small, cheap and very powerful compared to the Mega.

Oh yeah, coffee date, totally forgot about that! The Teensy doesn't have enough I/O pins and I had a Mega laying around but thanks for the tip!

Wow! this is really exciting. What type of sensors are you using to detect the trains? I really like the idea of a "dumb" loop with "smart" isolated sidings. Any reason you chose to have two stopping-blocks before one crossing and only one block before the other? Can't wait to see it working!

After some intensive research I'm using these sensors:

http://www.dx.com/p/smart-car-infrared-obstacle-avoidance-sensor-black-blue-213600#.U2QOH_l_t8E

They are more stable than others. Other sensors would loose a bit of fine tuning once the power had been cut off, these sensors don't have that problem.

The "horizontal" train on the crossing has priority and the "vertical" trains have to stop for it. So when sensor 9 at the left detects a train, the isolated parts 6 and 7 are brought back to 0V and if a train passes, it will stop right there. But in theory it could be that there's another train behind it and that one could crash into the stopped train. So when the power is off on those pieces AND sensor 7 detects a train stopping, the program will cut off the voltage from isolated track piece 8 too. The same principle is done for the other track but there station 2 is used for that purpose. It's an extra security built in: we don't know if we need it but we want to run as much trains as possible!

Can't wait to see this running, do you control the power to the track

Yes, the pieces in the red boxes are isolated and can be shut down separately without shutting down the rest of the track.

So instead of controlling the trains, we will be controlling the stations :) I'll make a nice vid of it ofcouse :sweet:

Share this post


Link to post
Share on other sites

Wow! Can't wait to see the results. Have you already set up a time table for which trains to stop at which station (grin)

Share this post


Link to post
Share on other sites

Haha no, since we cannot control which train stops at which station we do not have a time table. We let the system at random decide what kind of action it performs every 20 seconds

Share this post


Link to post
Share on other sites

Today we've put together a small loop with two "stations" to test the program. It turned out that the motorized switches weren't reliable so we needed to adjust them by removing "the click". Further we found some functional errors in the program but as far as we could tested it we are pretty sure that we'll be able to get it all work in two weeks from now! :classic:

QeNRDLt.jpg

Share this post


Link to post
Share on other sites

I love it, you need a volt meter to play lego... he he he

(yeah, I know there are all sorts of impressive microprocessor tricks going on, I just like the photo taken out of context)

Share this post


Link to post
Share on other sites

Yes... When I need a voltmeter, it means that the system does something I don't want it to do :laugh: I did some Input/Output testing of the current wiring (I'm at 50% now) and it all looks good so far!

XUEjIEF.jpg

Share this post


Link to post
Share on other sites

That's nuts, looks like a lot of fun. Are the blue boars h-bridge controllers? If so what do you pay for the board roughly?

Share this post


Link to post
Share on other sites

Thanks for the Tip on dx.com. Never seen that site before

Edited by kieran

Share this post


Link to post
Share on other sites

The layout contains a crossing and what is a crossing without the proper signs? I tried to immitate the 12V-look:

AGigPLC.jpg

Edited by AlmightyArjen

Share this post


Link to post
Share on other sites

Nooo, just one! The rest what you see in the phot above are motordrivers to deliver the current to the motors for the switches and the isolated tracksegments :wink:

Edited by AlmightyArjen

Share this post


Link to post
Share on other sites

Yesterday we've been busy with laying the track down and error finding: there were some mechanical problems in the track and sensors that didn't work correctly. Finally we've managed to make it all work and today we'll shoot a video. Current status:

PKAbnej.jpg

A train needs 70 seconds to complete a full loop :classic:

Share this post


Link to post
Share on other sites

Yesterday we still had lots of troubles with the sensors: unexplainable behaviour or just failing sensors. This effected the whole set up quite a bit and we weren't able to run it like it supposed to run: there were frequently some train crashes :laugh: The video will contain some nice footage I guess and will be online in a week from now. Until then, here are some nice images of the layout :wink:

DeS6FFi.jpg

BTHqH5E.jpg

SXTXjTP.jpg

jkyzEhf.jpg

xjfUKzL.jpg

Share this post


Link to post
Share on other sites

Yes I made it myself and I wanted it to look like the old 12V version. I drilled holes in a 2x3 brick, hollowed the back out and put some LED's and resistors inside.

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.