An Arduino controlled Lego Trains layout
Eagle CMake C++ Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
controllers Allow a train to appear on the dispatch queue only once at a time. Jan 7, 2017
docs Add images to documentation Jan 7, 2017
rfid Initial commit Jan 3, 2017
.gitignore Update .gitignore for Eagle PCB layout tool Jan 6, 2017
LICENSE Add documentation Jan 6, 2017


A simple Lego Trains layout controlled by Arduino Nano clones, designed and built during the 2016 Christmas break.

Trains request access to the single track section by means of RFID tags stuck to the engine motors. The tags are read by MFRC522 based RFID readers in the passing sections of the track. Should the single track section be clear, the points are set as required and the train is sent on its way. While the single track section is occupied, any further requests for access to the section are queued.

Circuit diagrams

Circuit diagrams (created using Eagle) for the RFID reader and train and points controller can be found in the eagle directory. For convenience diagrams are also provided in PNG format. More...

Custom Lego parts

Custom 3D-printed Lego parts are required to switch the points. Additional custom parts include track sections to hold the RFID reader, and signals which double up as IR transmitters. More...


This code is open source software, licensed under the Apache 2.0 License.