Pi Trains

A fully automated model train set, using Hall Effect sensors and a Raspberry Pi. Please visit for more information

Public Chat
Similar projects worth following
Please visit for more information about how the system works and instructions on how to use the various sensors and devices, but here's a short description and a demo video link:

This project is a conglomeration of electronic goodies that let you automate control of your model trains. The heart of the system is, of course, a Raspberry Pi. The primary sensors are Hall Effect sensors, which effectively allow you to know where the train is at any given time. Other goodies include a L298N motor driver and SG-90 servos.

Here’s a quick demo video:

If you want to learn more about the Raspberry Pi, or electronics in general, and like model trains, then this project is perfect for you!

Below is a partial list of devices used in this project.  For a more colorful list, visit the [device photos] page.

» For a complete parts list, visit

» For more information about the Hall Effect, please [click here]

» For more information about this project, please visit

  • 1
    Where to start

    We recommend reading through the Device Pages to both learn and test for yourself how each individual device works before trying to build the entire train set which is described in the System Pages.

    For more information, please visit

View all instructions

Enjoy this project?



Neo-bud wrote 02/27/2023 at 02:18 point

I have seen this project in action at the Dallas Model Rail Road show and it was super cool. Been following and learning from the creator ever since. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates