Skip to the content
2 layers97.5 × 66 mmMQTT Railway Signal Controller, the printed circuit board in 3D

MQTT Railway Signal Controller

NegevMaster/MQTT-Railway-Signal-Controller

A PlatformIO firmware project for an ESP32-based railway signal controller that drives multiple signal mast layouts over MQTT.

Size
97.5 × 66 mm
Copper layers
2
Thickness
1.6 mm
Parts
80
Nets
114
Pads
293
Tracks, vias
717, 83
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
7 Sep 2026
Updated
17 Sep 2026

Overview

MQTT Railway Signal Controller is an open-source printed circuit board by NegevMaster, from the NegevMaster/MQTT-Railway-Signal-Controller repository on GitHub, published under the MIT licence. It is a 2-layer board of 97.5 × 66 mm with 80 parts on 114 nets, routed with 717 tracks and 83 vias.

It is built around the PCA9685PW. Its parts include 54 resistors, 14 connectors, 4 ICs, 3 capacitors and 1 diode. It belongs with the home automation and IoT boards of this library.

Main components

1

README

README.md

MQTT Railway Signal Controller

A PlatformIO firmware project for an ESP32-based railway signal controller that drives multiple signal mast layouts over MQTT.

Overview

This project listens for MQTT commands and updates railway signal lamps connected to PCA9685 boards. It is designed for a modular signal setup with support for standard signal states and distant-signal combinations.

Features

  • ESP32 firmware using Arduino/PlatformIO
  • Wi-Fi + MQTT control
  • PCA9685 PWM signal board support
  • Flashing and steady LED states
  • Signal status handling for main and distant signals
  • Clean local configuration override for Wi‑Fi and MQTT credentials

Hardware

  • ESP32 development board
  • One or more PCA9685 I2C PWM controllers
  • Railway signal LEDs or LED modules on the PCA9685 outputs
  • Wi‑Fi network and MQTT broker

Repository layout

  • src/ – firmware entry points and signal logic
  • include/ – shared configuration and declarations
  • lib/ – project libraries (if added later)
  • test/ – test scaffolding
  • platformio.ini – PlatformIO build configuration

Setup

  1. Copy the sample config file:
    bash
    copy include\config.local.h.example include\config.local.h
  2. Edit include/config.local.h and fill in your local Wi‑Fi and MQTT values.
  3. Build and upload:
    bash
    pio run -e esp32dev
    pio run -e esp32dev -t upload
  4. Optionally monitor serial output:
    bash
    pio device monitor -e esp32dev

MQTT topic structure

The firmware subscribes to topics under the base prefix defined in config.h:

cpp
#define BASE_MQTT_TOPIC "trains/track/signalmast/"

Messages are expected to include the signal name and a display state such as Sygnał S1, Sygnał S2, and similar values used by the project.

Security note

This repository intentionally does not include real credentials. Keep your personal Wi‑Fi and MQTT settings in include/config.local.h, which is ignored by Git.

License

This project is licensed under the MIT License. See LICENSE for details.

Parts

80
QtyValueFootprintReferences
491KResistor_SMD:R_0805_2012MetricR10, R11, R12, R13, R14, R15, R16, R17, R19, R20, R21, R22, R23, R24, R25, R26 +33
510KResistor_SMD:R_0805_2012MetricR1, R2, R18, R47, R54
4Conn_01x03_SocketConnector_JST:JST_XH_B3B-XH-A_1x03_P2.50mm_VerticalJ1, J2, J3, J4
4Conn_01x05_SocketConnector_JST:JST_XH_B5B-XH-A_1x05_P2.50mm_VerticalJ8, J9, J10, J11
4MountingHole_4mmMountingHole:MountingHole_4mmH1, H2, H3, H4
3100nFCapacitor_SMD:C_0805_2012MetricC1, C2, C3
3Conn_01x04_SocketConnector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_VerticalJ5, J6, J7
3Conn_01x06_SocketConnector_JST:JST_XH_B6B-XH-A_1x06_P2.50mm_VerticalJ12, J13, J14
3PCA9685PWPackage_SO:TSSOP-28_4.4x9.7mm_P0.65mmU2, U3, U4
1GREENLED_THT:LED_D3.0mm_FlatTopD1
1~RF_Module:MCU_Seeed_ESP32C3U1

Similar boards

  • 2 layers220 × 329.2 mmControl Boards, the printed circuit board in 3D

    Control Boards

    nasa-jpl/open-source-rover

    A build-it-yourself, 6-wheel rover based on the rovers on Mars!

    148 parts9.8kApache-2.0
  • 4 layers100.1 × 60.2 mmHades, the printed circuit board in 3D

    Hades

    pms67/HadesFCS

    Complete flight control system designed from scratch. Hardware designed with KiCad.

    215 parts1kBSD-3-Clause
  • 2 layers94 × 79 mm5 - Lizard Car, the printed circuit board in 3D

    5 - Lizard Car

    TRD-B/Lizard

    3D printed RC race car with custom electronics

    54 parts129CC-BY-4.0
  • 2 layers54.2 × 75.2 mmKiCAD Design, the printed circuit board in 3D

    KiCAD Design

    Brobiwann/ESP-spider

    The ESP-Spider is a quadruped robot inspired by the miniKame (https://github.com/JavierIH/miniKame) . Like the miniKame, it uses sinusoidal functions to control servo positions, but the design and code were developed…

    70 parts44
  • 2 layers130.6 × 112 mmSWN, the printed circuit board in 3D

    SWN

    4ms/SWN

    Spherical Wavetable Navigator source code

    614 parts43
  • 2 layers156.2 × 168.9 mmLPC176x MultiFunction, the printed circuit board in 3D

    LPC176x MultiFunction

    RobertPHeller/RPi-RRCircuits

    A collection of circuit designs for various MCUs, not just Raspberry Pis relating to Model Railroading

    236 parts24
  • 2 layersHB LC Dim6PWM CV, the printed circuit board in 3D

    HB LC Dim6PWM CV

    stan23/myPCBs

    Verschiedene Platinen für HomeMatic, AskSinPP und SmartHome

    57 parts21

Questions

How big is the MQTT Railway Signal Controller PCB?

It measures 97.5 × 66 mm and has 2 copper layers, 1.6 mm thick.

What parts does the MQTT Railway Signal Controller use?

80 parts, built around the PCA9685PW. 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 MQTT Railway Signal Controller KiCad files?

From the NegevMaster/MQTT-Railway-Signal-Controller repository on GitHub, at the commit this page was made from: the board is Electrical/MQTT_Railway_Signal_Controller.kicad_pcb and its schematic Electrical/MQTT_Railway_Signal_Controller.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the MQTT Railway Signal Controller 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).