Pater Practicus
Home
Downloads
Pater Practicus
Home
Downloads
More
  • Home
  • Downloads
  • Home
  • Downloads

Automated level-crossing signs AND gates

New and improved!

It's been a little while since I first shared my working model railway level-crossing lights project, and I've now revisited it with some significant improvements – and new versions of the videos.


For the signs themselves, I've designed 3D printable cowls for the lights, with an option to print the backs instead of using Sugru. The files for both of these are downloadable from the links below. 


And, I've found a permanent home for the controller, mounted under the signal box, where it takes power from the tracks.

Lights Part 1

Updated Pico controller

Also updated is my Raspberry Pi Pico controller – now with power from the tracks and an added remote control button, so you don't have to lift up the signal box every time a train comes past.

Lights Part 2

Full automation with break-beam sensors

...and in my latest video, I've fully automated the operation, triggering – and finishing – the light sequence with break-beam sensors.


The code for this can be found below.

Lights Part 3

Crossing Lights Downloads

Crossing Light Back_v1.stl (zip)Download
Crossing Light Cowl v2.stl (zip)Download
Level Crossing Signs_v2 (pdf)Download
Level Crossing Signs_v3_Rail Blue (pdf)Download
Main_Full_Beam.py (zip)Download

NEW! Automated gates

Work in progress

I've started work on getting my crossing gates to open and close automatically - initially with servos, operated with buttons. Ultimately I will get the break beams to trigger the gates soon, but first I need to get the basic mechanism working.


Very much work in progress at the moment, you can see how I'm getting on in my latest video. The files for the base are available to download below (usual usage rules apply).

Gates Part 1

Further developments in part 2

In my latest video, I got the stand-alone crossing running really well - complete with a new 3D printed base and crossing gates, which fit directly onto the Tower Micro Servos. The files for these can be found below.


And, after a bit of a detour into stepper motors, I also finally managed to mount the gates on my layout, using smaller servos, with individual bases dropped into holes cut in the crossing.

Gates Part 2

Full automation!

In the final part of the project I've got the gates and lighting sequence working together. Now, when the train breaks the beam on the far side of the track, the lighting sequence begins - and triggers the closing of the gates, just in time for the approaching train.


With some simple adaptations to both lighting and gate controllers, the two Raspberry Pi Picos now seamlessly integrate the functions.


Gates Part 3

Stand-alone servo powered crossing and gates

For the stand-alone Tower Servo version, the full crossing base can be printed in PLA along with the track centre, while the gates and posts are best printed in resin. For opposite gates, the files need flipping in the slicing software to get matching pairs. The posts are not directional and can all be printed the same.


The Micropython code is also included, using the pins as described at the end of the video. Full wiring schematic to follow.

Level Crossing_Base_v8.stl (zip)Download
Level Crossing_Centre_v8.stl (zip)Download
Level Crossing_Gate_v8.stl (zip)Download
Level Crossing_Post_v8.stl (zip)Download
Servo_3.py (zip)Download
Wiring Schematic (pdf)Download

Mini servo version

For the 1.7g digital servo version each gate has its own base, two of which need to be flipped for opposite corners. The same gates are used as above, but with the addition of a shim to fit the smaller servo spindles.


The code is the same as above, but with tweaks to the PWM values as described in the video.

Level Crossing_Small Servo_Base_v8.stl (zip)Download
Level Crossing_Small Servo_Ring_v8.stl (zip)Download
Wiring Schematic 2 (pdf)Download

Synchronised code

For the final film, I adapted the code for each of the Picos, adding in triggers from the lighting controller to signal the gate controller to open and close the gates at the right time. Each needs to be named 'main.py' in order for them to run automatically on the Picos.

Lighting Controller.py (zip)Download
Gate Controller.py (zip)Download
  • Privacy Policy

Pater Practicus

Copyright © 2026 Pater Practicus - All Rights Reserved.

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

DeclineAccept