LEGO Train Automation with RCX PBricks

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
59,363
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 15, 2010

Hi All,

this movie is about my favorite toy: LEGO (and building across multiple themes). Classic bricks, technic bricks, PBricks of all kind -- basically all stuff that TLC has in the shelves -- freestyle!

This is my very first movie, so please forgive all shaky, stretchy, too loud, too quite, and too whatever sections.

Very briefly:

Each train shown is controlled by an LEGO RCX1.0 PBrick. It picks up power from the rails (9 -- 18 V AC or DC) through a modified LEGO 9V train motor. Should AC/DC power fail on some track stretches, the RCX falls automatically back to battery power. The RCX outputs power the 9V train motors. Each train has a unique ID. The PBricks communicate with a host control program via the IR link and a 2 byte message protocol (e.g., message 192 + message 15 means that the train with ID 192 should run at full power level, 192+98 = head light on etc.).

Since IR communication always need a line of sight, I have built half duplex IRRF-transceiver bricks, which run smoothly at 3 V, 10 mA max. (and thus can be powered from an active RCX input). A host control program running on a PC generates the 2 byte messages and sends them to the LEGO IR tower. The host IRRF transceiver converts the IR light to corresponding 433 MHz RF bursts. All trains have identical IRRF transceivers on board. The transceiver translates the RF bursts to IR light which are detected by the RCX. The RCX acknowledges any recognized messages to the host control program, so that a reasonable amount of protocol safety is established. My host control program is written in stone age VB6.

There is more information available, check the RailBricks website (a quite lengthy article in magazine issue 3 and an instruction in the building section "Diesel Locomotives" for a GP40_RCX).

More to come ...

Play well and have fun!

Thorsten

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (ThorstenBenter)

  • Isn't this like back emf on regular dcc decoders for the constant speed? Nice remote control idea.

  • @MrRailroadrunner

    oh well I don't have any clue what "back emf" is; never had the chance to play with DCC - the code on the RCX is a plain vanilla PID control loop, nothing fancy at all.

    Regards,

    Thorsten

  • AWESOME! How did you connect the rcx to the train motors? Please reply!

    Thanks

  • @twinbrickproductions

    Directly. The RCX can directly operate two train motors + light on the third output.

    The only problem is that the pulse-width-modulated RCX outputs do only generate low torque on the train motors at power levels 1 to 3. So a useful range is 3 to 5 and than they really go fast; level 6 and 7 may be too much.

    But that is why the PID output power control loop was programmed into the RCX. Railbricks has the software as well.

    Regards,

    Thorsten

  • COOL!!!! I was wondering if you could make one with the new NXT? If so, please do. I want to try to make one but I only have the NXT. I want to know if it's possible. Thanks

  • Absolutely, software wise. The RobotC program running on the RCX trains is easily adapted to run on the NXT. If you find a way to power the train off from the NXT motors, then you have PID already built in.

    However, the NXT PBrick is HUGE - I haven't yet figured out how to fit that monster reasonably looking into a 7 wide train. Also you need the LiPo along with a custom charging cable (can easily be done!) or run on batteries only.

    Yes, should work, needs work though.

    Regards, Thorsten

see all

All Comments (23)

Sign In or Sign Up now to post a comment!
  • niceeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeeeeeeeeeeeee­eeeeeeeeeeeeeeeeeeee

  • nice train i like view

  • 6:11 is the best :D

  • Great gp40!!!!

  • I want that BNSF locomotive :D

  • @ThorstenBenter Thanks for the tips!!!! I made a custom powerhaul that I think you would like. Please check it out! And please rate and comment!!!!!!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more