Skip to the content
PCBKitNew board
2 layers20 × 54 mmSwitch PCB ESP01, the printed circuit board in 3D

Rust and Godot Based Autonomous Lego Train System

Size
20 × 54 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
10
Pads
27
Tracks, vias
60, 2
Pours
19
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
2 Oct 2023
Updated
26 Sep 2024

Overview

Switch PCB ESP01 is an open-source printed circuit board by RustyRailways, from the RustyRailways/RustyRailways repository on GitHub, published under the MIT licence. It is a 2-layer board of 20 × 54 mm with 9 parts on 10 nets, routed with 60 tracks and 2 vias.

Its parts include 5 connectors, 2 resistors and 2 transistors. It belongs with the ESP8266 boards of this library.

README

README.md

Rusty Railways

Rusty Railways Logo

Description

Group Project by lucaSartore (Sartore Luca), cattai-lorenzo (Cattai Lorenzo), MrLakige (Callegari Michele), Technorico (Peruzzo Federico) for Embedded Software for The Internet of Things - 145996 taught by professor Kasim Sinan Yildirim at University of Trento, DISI Department.

This is a system that automates the motion of Lego trains and rail switches. You can tell the system in which station you want a train to go (either using an HTTP request or using our GUI), and the system will figure out the best way to achieve the goal, even moving trains that are on your way if necessary.

Video

Watch the video

Components

The system is implemented using 5 different components:

  • The Master: This is the component that does all the calculations to find the optimal path, and then controls the trains and the switches, you can learn more about the master here
  • The Client: (Godot based client to create the train track and control/monitor the train system), you can learn more about the client here
  • The Map: The map is a support data structure (a modified graph in particular) used by the master, you can learn more about the master here
  • The Common Infrastructure: The common infrastructure defines some basic messages that all components need to communicate with each other, as well as the IPs and the hardware abstraction layer traits, you can learn more about the master here
  • The Trains: You can learn more about the code that manages the trains here
  • The Switches: You can learn more about the code that manages the switches here

Documentation

Installation

Here you can find a quick list of the things you need to do, to try our project yourself.

Master Installation

The current implementation of the master runs on a Linux system (e.g. Raspberry Pi with Raspberry Pi OS) so to run it, you just need to install the regular rust toolchain. Given that we used a Hardware Abstraction Layer (HAL) to implement the master, with a bit more work, it can be executed on something smaller (like an ESP-32), if you are interested in this you can check out the train toolchain installation down below.

Train Toolchain Installation

The train code is written in embedded rust, with the embedded-hal and embedded-svc crates. To install the software needed to build for our target (The ESP-32) you can follow the tutorial here.

Switch Toolchain Installation

To compile the switch code you can follow this tutorial we have written.

Client Installation

See Client README.md.

3D Printing

Files to print the switch mechanism are located here You can find a 3D printing tutorial here.

Electronic Components

To build the switch PCB you can follow this tutorial we have written

Special Thanks

FabLab UniTn for the space, tools and part of the materials used

Parts

9
QtyValueFootprintReferences
3Conn_01x02RustyRailways_Lib:01x02_TerminalBlockJ1-3.3V1, J2-5V1, J3-GND1
210kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR1, R2
2Q_NMOS_SGDConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalQ1, Q2
1Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ4-Servo1
1Conn_02x04_Odd_EvenRustyRailways_Lib:ESP01J0-ESP01S1

Questions

How big is the Switch PCB ESP01 PCB?

It measures 20 × 54 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Switch PCB ESP01 use?

9 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Switch PCB ESP01 KiCad files?

From the RustyRailways/RustyRailways repository on GitHub, at the commit this page was made from: the board is switch/hardware/Switch_PCB/KiCAD/Switch_PCB_ESP01/Switch_PCB_ESP01.kicad_pcb and its schematic switch/hardware/Switch_PCB/KiCAD/Switch_PCB_ESP01/Switch_PCB_ESP01.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Switch PCB ESP01 design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    9 parts1.1kCC-BY-4.0
  • 2 layers15.6 × 17.3 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    SKR Mini TFT Thermistor Board

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    9 parts1.1kGPL-3.0
  • 2 layers39.1 × 49.5 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    Keyboard after

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    9 parts547GPL-3.0