Jump to content
  • Sign Up
×
×
  • Create New...

This Raspberry Pi Pico drives tiny level crossing lights for a model train


Recommended Posts

  • Diamond Member

This is the hidden content, please

This Raspberry Pi Pico drives tiny level crossing lights for a model train

It’s no secret that we here at Tom’s Hardware love the Raspberry Pi but did you also know we have a deep appreciation for trains? Whenever these two passions come to a crossroads, we can’t help but get excited. Case in point, today’s project created by maker and developer

This is the hidden content, please
is using a Raspberry Pi Pico to make his level crossing lights more realistic for his model trains and we’re totally onboard with it.

Testing Raspberry Pi Pico level-crossing lights – now triggered by beam-break sensors –
This is the hidden content, please

data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==


This is the hidden content, please

This project was shared in a quick video on his

This is the hidden content, please
channel Pater Practicus. In it, we get a close look at the entire setup — including the Pico and how it’s wired to the lights. The level crossing lights use beam-break sensors to detect when a train is passing to more accurately change the lights.

The lights work by not just detecting when the first train car has passed a sensor but also checking for when the caboose has made its way through. This makes the lights operate more realistically in the way you would find at an actual intersection. All of the logic is handled by the Raspberry Pi Pico.

data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==

(Image credit: Brendan McGrath, Pater Practicus)

The video clip might be short but thankfully we get a good look at the hardware he’s using. The Pico is wired up to a breadboard so the project isn’t a finished piece but more of a proof of concept. The Pico is wired to both the sensors and level crossing lights. We also get a look at the model train which is being manually pushed along a track as well as a few Lego bricks that are being used to hold the sensors in place.

Another cool thing about this video is that we have access to the source code! The script was written by McGrath for the video using MicroPython. If you want to recreate it at home or just get a better idea of how it works, you can pause the video around 10 seconds in to check it out for yourself.

To get a closer look at this Raspberry Pi project in action, you can find the video shared on

This is the hidden content, please
over at the official Pater Practicus channel. If you enjoyed this project, you should also check out this really cool Pi-powered FPV model train ride project.



This is the hidden content, please

#Raspberry #Pico #drives #tiny #level #crossing #lights #model #train

This is the hidden content, please

This is the hidden content, please

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Vote for the server

    To vote for this server you must login.

    Jim Carrey Flirting GIF

  • Recently Browsing   0 members

    • No registered users viewing this page.

Important Information

Privacy Notice: We utilize cookies to optimize your browsing experience and analyze website traffic. By consenting, you acknowledge and agree to our Cookie Policy, ensuring your privacy preferences are respected.