element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Arduino Projects
  • Products
  • Arduino
  • Arduino Projects
  • More
  • Cancel
Arduino Projects
Blog LEGO Train Track Switch - Servo, LED, PubNub and Node-RED
  • Blog
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 7 Jan 2016 1:26 AM Date Created
  • Views 1072 views
  • Likes 7 likes
  • Comments 7 comments
  • LEGO
  • node-red
  • nodejs
  • raspberrypi
  • iot
  • pubnub
  • arduino
Related
Recommended

LEGO Train Track Switch - Servo, LED, PubNub and Node-RED

Former Member
Former Member
7 Jan 2016

I've been working on this Arduino project for a while. Mostly mechanical issues, but finally got a solid solution for my LEGO train track switch. I am also using IoT style messaging to emulate a distributed network of "things". It's a little overkill for a single track switch, but it helps to understand the bigger picture with these types of technologies. I plan on integrating this with a train schedule API so I can send the train down a path based on real-world data. I also have an OLED display in the mail, so will be cool to show train times as well.

 

 

Train Track Switch – Servos, LEDs, PubNub and Johnny-five.io | Internet of Lego

image

  • Sign in to reply

Top Comments

  • Former Member
    Former Member over 10 years ago in reply to mcb1 +2
    Hey Mark, I figured I should describe the mechanics a bit more, since that's what took me ages to sort out. I took a bunch of photos that should help describe how I did it. The hardest part was using a…
  • mcb1
    mcb1 over 10 years ago in reply to Former Member

    I'll pass it on to the man.

    he did comment about the force required, and you've nailed how you did it.

     

    Cheers

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to mcb1

    Hey Mark,

     

    I figured I should describe the mechanics a bit more, since that's what took me ages to sort out. I took a bunch of photos that should help describe how I did it.

    The hardest part was using a 5g hobby servo to pull that stiff switch. Tried various gears and lever situations, but they all got really big and clumsy. I finally just attached a small wire to a technic stud and the servo arm. I then used a small technic pin to connect the stud to the switch lever. I have a small 45 degree 1x1 brick n the floor to guide the technic stud in the correct path. If not, the servo tends to get jammed.     https://www.facebook.com/media/set/?set=a.1671388719799991.1073741835.1636231349982395&type=1&l=c9d0cad8a9

     

    Hope this helps!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to Former Member

    I was wondering if you might consider detailing the mechanical aspect.

    We have a Lego train guy at work who has been considering adding electronics to his displays, but the switching was an aspect that didn't appear to have an easy solution.

     

    Thanks

    Mark

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

    Very nice build.

     

    Great way to combine a couple of different hobbies into some fun.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • neilk
    neilk over 10 years ago

    Nice project image..........also looked at your other stuff on fb - very impressive.

     

    Neil

    • 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 © 2026 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