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.