Jump to content

MOC: Robot controlled Lego engine

  • Please log in to reply
3 replies to this topic

#1 Kolaf


    Posts: 24
    Joined: 25-December 09
    Member: 8735

Posted 03 April 2010 - 10:43 AM

Posted Image

Hi all,

It has been awhile since last time, but I have now completed my first prototype experimental Lego train engine (which is evidenced by its design). I have filmed it going one round on my kitchen tables and uploaded to YouTube. Below I have pasted in the text from the video description on youtube which describes what you see.

I apologise for the bumpy filming, but I had to fight my three-year-old for control of the tables and train :)

Begin pasted text:

This is a prototype research Lego engine. It's powered by a Lego power functions XL motor which again is powered by six rechargeable AA batteries (divided into two battery holders for maximum flexibility). The control is provided by an Arduino board (Roboduino), with input from an IR receiver and a distance sensor. Interface between the board and the engine is a regular electronic speed controler.

Using the Harmony one remote control I can control the target speed, and the train will smoothly accelerate up to the target speed in either direction (the acceleration is perhaps a bit slow for now). When encountering an obstacle on the track (like an illegally parked police car in this demo) the engine will emergency brake, and standstill until the obstacle has been removed. Once the track is again clear it will automatically accelerate up to the previously set target speed.

Once the train approaches the railway station I can command the engine to stop using the remote control, and it will smoothly decelerate to a standing position.

This is the first step towards automating the Lego train. Eventually it should be able to detect train stations and curves to automatically adjust its speed/stop for a period of time.

Hope you like it.

Edited by TheBrickster, 06 April 2010 - 02:23 PM.

#2 EvilTwin


    Posts: 39
    Joined: 17-June 09
    Member: 6429

Posted 04 April 2010 - 12:53 PM

That's pretty neat Kolaf. Is the distance sensor part of the Roboduino system, or are you using something like a Mindstorms sensor?


#3 lightningtiger


  • Gungans taste like chicken

    Posts: 21406
    Joined: 28-October 09
    Member: 7997
    Country: Australia

Posted 04 April 2010 - 01:30 PM

Ditto ditto - fantastic train concept - love the crash prevention system - very clever - Mindstorms ?
Excellent design job 'Kolaf' and keep on bricking ! :sweet:

#4 Kolaf


    Posts: 24
    Joined: 25-December 09
    Member: 8735

Posted 04 April 2010 - 08:08 PM

Thank you both for your enthusiasm. There is nothing mindstorm in it, the distance sensor is something I got from the same store where I bought the Arduino board. Similarly, the IR receiver and everything else is standard electronics, the only Lego thing in the drive system is the motor.

Since the video I have tweaked the acceleration and braking functions to look more "real". Even when approaching an obstacle it will emergency brake (which takes 5 to 10 cm), instead of stopping instantly as it does in the video.

I need to work some on the design, though. Does anyone have a better idea for the drive train from a power functions motor? It looks quite big at the front there. Also, the design of the boogie is a bit flimsy to be small enough to fit into the body.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users