Third party cookies may be stored when visiting this site. Please see the cookie information.
PenguinTutor YouTube Channel

3D printer projects - Outdoor Model Railway Traffic Lights

3D printed G-Scale model railway traffic lights

In this project I'm going to cover the process of creating model railway traffic lights for a G-Scale Outdoor Model Railway.

Traffic lights for outdoor model railway designed in FreeCAD

Designing and 3D printing the traffic lights using FreeCAD

The traffic lights are designed using FreeCAD. This is a free parametric modelling tool. FreeCAD is a powerful tool, although not particularly easy to get started. Once you have you will find it gets easier to create useful 3D models with a good amount of control over the dimensions.

Raspberry Pi Pico

My first method for automation is using a Raspberry Pi Pico microcontroller. The Pico provides a quick way to create connect the traffic lights up using a solderless breadboard. This provides a flexible way to control the traffic lights. The sequence can be changed through a few lines of code.

The wires were soldered into the back of the traffic lights. I crimped the ends of the wires to male crimp pins which helped with inserting the stranded wires into a breadboard. I used 120Ω resistors for each of the anodes and used common cathode for the negative connection to ground.

traffic light wires with male crimp headers connected to breadboard Traffic light with soldered 8mm LEDs

The GPIO ports used on the Raspberry Pi Pico are shown in the image below:

Raspberry Pi Pico GPIO ports on a breadboard

The source code is available to download: Pico uPython traffic light code (pico-upython-trafficlightcode.zip).

Create a custom PCB for an Arduino like circuit using KiCAD

In future I also plan to add details of a custom printed circuit board I've designed.

Future projects

For the latest updates please:
Subscribe to the PenguinTutor YouTube Channel
and
Follow @penguintutor on Twitter

Previous G-Scale 3D building
G-Scale 3D building
Next 3D / 2D Design and 3D printing
3D / 2D Design and 3D printing