spy1101001

Best control method for Lego trains?

Recommended Posts

hi all,

I have just started into the world of Lego trains and controlling them with Arduino and i'm afraid it's become somewhat of an obsession! I have always loved Lego and trains since I was a child but could never afford it. I have a son who's 6 and shares my love of trains so I figured now was a good time to start! :-D

I have limited amount of Lego at the moment, and have been mucking around in LDD and Stud.io building some signals, etc..this also includes using Arduino to control lights as well as trains..my first try with using some IR transmitter LEDs worked, but not real well which made me wonder whether IR is really the best method of control..I have read alot of comments already from people that RF is really the way to go so I will try that next when the 433Mhz Tx and Rx pair arrive.

This led me to think of the next weakest link in the chain..the battery, which only lasts so long and is a pain to have to pull out and change..I know Lego and even third party companies have a rechargeable battery, but I'm buggered if I'm gonna pay $100-120 for each one!!!

I've  never had any 9v or 12v rail-powered Lego, and the way I understand it, you switch on the control, it powers the rail so much and makes the train go...but what if the rail was powered on all the time and you still controlled the train with an internal controller (like the RF receiver).

Any thoughts on this? Sorry if I sound like a noob, since I have no experience with how the track-powered system works.

sPy from Oz.

Share this post


Link to post
Share on other sites

Hi Spy,

the LEGO 10V and 9V train system works as any usual model railway: A transformer powers the two metal rails. The train motor has pickups ensuring the electric connection to the powered rails. The LEGO 9V train motor block uses all four wheels as pickups. The 12V motor uses an extra brick with 2 spring loaded pins, which are pushed down onto the powered rails. In both cases, the train's speed/power is regulated by adjusting the voltage fed into the rails (and hence the train motor).

In order to use power functions remote and receiver with the 9V-train system, you need to disconnect the motor from the power pickups, instead connect the pickups to the PF-receiver via an H-bridge to avoid polarity problems with the PF-receiver. Then, you can connect any LEGO 9V motor to the PF-receiver and set the rail voltage to constantly 9V. Doing so, you can set up up to 8 trains for control by PF IR-remote controls on a single electric rail circuit.

Regards

 

Xris

Edited by Xris

Share this post


Link to post
Share on other sites
2 hours ago, Xris said:

Then, you can connect any LEGO 9V motor to the PF-receiver and set the rail voltage to constantly 9V. Doing so, you can set up up to 8 trains for control by PF IR-remote controls on a single electric rail circuit.

If you want to power more than 3 motors, you should better switch out that LEGO transformer for a stronger one. You might have to supply power to the rails on 2 or more places if you are using longer rail circuits, as the voltage drops significantly on the connection points of those 9V rails.

However, by using such a method please keep in mind to avoid shorting out your power supply in the layout. Something like a wye will not be possible without interrupting power at the rail connectors...

Share this post


Link to post
Share on other sites

If you want to do real automation like I do, the 9V system is the better candidate. Example: you want to automate a rail crossing. That means that you have to stop one train to let the other pass. If you have multiple trains running on the same track where the train needs to stop in front of the crossing, you have to find out to which train you need to send the stop-signal (for example by RFID). Plus an extra sensor to detect the train close to the crossing. When using the 9V system, you just cut the power from the rails (isolated track segment (that is controlled by an arduino using an L293D motor driver)) and a train that arrives at the crossing stops by itself because it's no longer powered from the rails. Just an example of many. You can find the above described situation in more detail in this video:

Think about what you want to achieve with your automation in detail and write down the pros and cons of each system.

Share this post


Link to post
Share on other sites

Greeting again MightyArjen! Yes, you're right..unfortunately, I haven't got any 9v track or 9v trains, so I guess I'm stuck with using 433 Mhz RC pairs AND batteries! (ugh)...as for identifying which train to stop, I have been thinking about that too..I don't know if it would work, but I was thinking of using colour sensors alongside (not literally) LDRs to detect which train is passing...what do you guys think? You definitely have to differentiate between all of your powered trains somehow...using a return signal from train to master controller would be OK, but you still have to determine WHERE the trains are!! :-) Frustrating!

sPy from Oz

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.