element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project Videos
  • Challenges & Projects
  • element14 presents
  • Project Videos
  • More
  • Cancel
Project Videos
Documents Raspberry Pi Controlled Lego Train with Build HAT -- Episode 560
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Project Videos to participate - click to join for free!
Related
Recommended
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 20 Jul 2022 7:50 PM Date Created
  • Last Updated Last Updated: 22 Jul 2022 7:24 AM
  • Views 297203 views
  • Likes 7 likes
  • Comments 12 comments

Raspberry Pi Controlled Lego Train with Build HAT -- Episode 560

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

So, the Duplo train can be automated using coloured tiles, but the Lego train can’t… Until now. With a Raspberry Pi, a build Hat and the Lego train Motor 88011, Let's modify the Lego Hogwarts Express Train (Set 75955) to run autonomously using coloured Lego tiles!

 

Supplemental Content:

  • Link to the Github:  https://github.com/hifromkatie/LegoTrain
  • Resources_560.zip

Bill of Material:

Product Name Manufacturer Quantity Buy Kit
RPI4-MODBP-4GB - Raspberry Pi 4 Model B RASPBERRY-PI 1 Buy Now
16GB MicroSD Card with NOOBS for Raspberry Pi TRANSCEND 1 Buy Now
SC0622 RASPBERRY PI BUILD HAT RASPBERRY-PI 1 Buy Now
8459-0674 BATTERY STRAP, 9V, WIRE LEAD MULTICOMP PRO 1 Buy Now
BUD INDUSTRIES Battery Retainer Clip, PP3 (9V) x 1, Through Hole, Wire Leads BUD INDUSTRIES 1 Buy Now
CLIFF ELECTRONIC COMPONENTS DC Power Connector, Plug, 2 A, 2.1 mm, 9.5 mm, Cable Mount, Solder CLIFF ELECTRONIC COMPONENTS 1 Buy Now
MULTICOMP PRO Rechargeable Battery, 1.2 V, Nickel Metal Hydride, 2.6 Ah, AA, Raised Positive and Flat Negative MULTICOMP PRO 2 Buy Now
1356 Color Sensor, Flora, White Illumination LED ADAFRUIT 1 Buy Now
 

Additional Parts:

Lego HogwartsTM Express Train – 75955
Train Motor V46 – 88011

element14 presents

element14 presents  |  About Katie Dumont |  Project Videos

  • rpi 4
  • LEGO
  • color sensing
  • harry potter
  • element14 presents
  • raspberrypi
  • katie
  • Build Hat
  • e14p_katie
  • friday_release
  • Share
  • History
  • More
  • Cancel
Actions
  • Share
  • More
  • Cancel
  • Sign in to reply
  • beacon_dave
    beacon_dave over 3 years ago in reply to hifromkatie

    Another bit of trivia that I can recall is that the earlier trains had fine teeth cut into the wheels which meshed with fine teeth cut into the top edge of the rails (only one of the curved rails had teeth, outer I think, the other rail was smooth on top). The later trains had smooth wheels but the driven wheels had rubber bands fitted for traction.

    If you look closely in the above two videos you might be able to see this.

    Not sure what they did when the rails transitioned from blue to grey though.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • hifromkatie
    hifromkatie over 3 years ago in reply to beacon_dave

    Great info, I didn't know all that. Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • hifromkatie
    hifromkatie over 3 years ago in reply to weiwei2

    We've got a Lego train line in our garden too, unfortunately the weather wasn't good enough so had to set up a temporary line in the house to do the video footage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • weiwei2
    weiwei2 over 3 years ago

    I love it. have being wanting to control my LEGO train sets to run in the garden too

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 3 years ago in reply to hifromkatie

    If I recall correctly, the earlier trains started out using the standard Lego battery box mounted on wheels so lacked the functionality of the signal stop and the reversing post.

    I think the 122 set was the first train I had which was like that:

    https://youtu.be/TGiWWMXjIjY?t=102

    It was unusual as it could also run off the rails by using the alternative supplied wheels or caterpillar tracks.

    I think the track may have been sold separately from the train as I can recall it coming in individual track boxes of straight and curved sections, but it was probably sold as a train plus track layout bundle from the toy shops to fit the budget/space.

    The 181/182 train sets were probably some of the earlier ones to incorporate a purpose-built battery box tender with the added control functionality. I guess that the control was needed once sets with sidings and points were marketed to prevent runaway trains and collisions from happening.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • hifromkatie
    hifromkatie over 3 years ago in reply to DAB

    Thanks :)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • hifromkatie
    hifromkatie over 3 years ago in reply to beacon_dave

    Oh awesome, I've seen that generation of the Lego trains (in pictures & videos), but never seen it stop like that, so hadn't realised it had a button under the tender. Thanks for sharing

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • hifromkatie
    hifromkatie over 3 years ago in reply to kmikemoo

    Thanks, It took me a white to figure out where I was going to put the start stop button, but it fitted under the funnel perfectly

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 3 years ago

    Great build Katie.

    Well done.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 3 years ago in reply to beacon_dave

    Close - the stop button was on the underside of the tender battery box and not the motor itself...

    https://youtu.be/Dmg5UZdPhSQ?t=143

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube