format c:_

Site: HomeGalleryCopyright and Disclaimer
Hobbies: GadgetsiPodLEGORobotsFlashTutorialsDownloads
Contact: PollsLinkingGuestbookContact info

You are here:
format c:_
Robots
→ Smart Train 1

 · Smart Train 1

September 2005
     ( )   (       

Controlling a train and its tracks using LEGO Mindstorms.
This project was built in conjunction with the LEGO City to automate the train driving through it. It consists of four main sections: A station, a track switch, a roll-by sensor and a level crossing. I also created a Flash animation to show how the modules act together.

The Station

This station allows passengers to get on and off the train. But underneath the platform, a light sensor detects the train when it arrives. It can be placed either to detect the wheels (then it can even count them if necessary) or the body of the train. I chose the latter option.
The black 1x6 bricks on the other side of the rail help reduce the influence of ambient light. You might get better results by combining the station with the roll-by sensor. The roll-by sensor could detect when the train is close to the station and slow it down, and the station sensor would bring it to a complete stop exactly at the right position.

Rail switch

Using pneumatics, this module is able to switch the direction the train will take. Though this invention works, some things should be taken into consideration:

  • The switch should be activated well before the train drives through it.
  • Some of the switches are rather stiff, make sure you use the one that's easiest to move.
  • Sometimes there are problems regarding the power redirection (read below).
  • You can use this design with your favorite pneumatic compressor and valve switch. My chices were modified versions of Ralph Hempel's compressor and Ben Williamson's valve switch.

Some parts where removed to show the inside of the rail switch.

You know that with LEGO rails, they only recieve power when at least one of the switches is set so that power is delivered to that part of the track. In order to achieve this, the switch must be moved all the way in the desired direction. Because my rail switch uses the pneumatic mini-cylinder, this is not always done correctly, thus resulting in power loss as soon as the train crosses the switch. I'm working on a version using the large cylinder. Meanwhile, you should be careful when using this design (though it worked fine with me most of the time).
Note that since neither the switching track nor the yellow lever are included in MLCad, I had to simulate them myself using standard bricks.

Roll-by sensor

This is actually a pole reverser switch attached in a way that one side short circuits it shortly when it rotates. This way it can be read by an RCX/Scout as a normal touch sensor that opens and closes rapidly by connecting it with the other side. You can even measure the length of the train by counting the clicks it produces on the sensor.

You can see that the pole reverser is mounted on the back side of a 2x2-2x2 bracket. The large wheel that turns the pole reverser touches the train withoug tilting it or slowing it down too much.
The train signals next to the modules are merely decorative, but add a more realistic feeling to your train system.

Level crossing

This crossing can be coupled with the roll-by sensor or the station sensor to lower the crossing gate when the train is about to come and raise them again afterwards. It is powerd by a micro-motor, but you can use a normal motor as long as you gear it down so it does not move the crossing gate too quickly. A touch or rotation sensor might increase the accuracy a little, but it was not necessary in my case.
The bar that connects both gates hanging over the rails might not look that nice and you can use two (micro-)motors (if you have them) to make the design more compact. In my LEGO City it did not bother much, because it was placed directly under the upper set of rails.

Flash animation

A little flash movie to help you understand how the modules work together.
Please note that, as the outer set of rails is actually above the street, it does not need a level crossing.
You can download the MLCad files for all modules by clicking here. (.zip file)
The following pictures show the real (not CAD-rendered) versions of my modules, except for the roll-by sensor.


© Daniel Rojas 2002-2006 Top ↑

navigation home · stuff

E-mail:

Visitor map:
Add yourself to the visitor map!


SITE STATUS: Green
Site is fully operational and being maintained.


Free Domain Name - www.YOU.co.nr!
Get Firefox!