Skip to the content
PCBKitNew board
2 layers54.6 × 69.2 mmMQTTDecoderExpansionBoard, the printed circuit board in 3D

MQTTDecoderExpansionBoard

fallbotics/JMRITrainNode1

TrainNode is a JMRI compatible I/O controller built on the MQTT protocol. Using the Raspberry Pi Pico, the board can support up to 16 turnouts

Size
54.6 × 69.2 mm
Copper layers
2
Thickness
1.6 mm
Parts
24
Nets
43
Pads
215
Tracks, vias
202, 2
Pours
2
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
16 Aug 2024
Updated
27 Aug 2025

Overview

MQTTDecoderExpansionBoard is an open-source printed circuit board by fallbotics, from the fallbotics/JMRITrainNode repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 54.6 × 69.2 mm with 24 parts on 43 nets, routed with 202 tracks and 2 vias.

Its parts include 9 connectors, 6 resistors, 2 ICs, 2 diodes and 2 transistors. It belongs with the RP2040 boards of this library.

README

README.md

image

JMRITrainNode

TrainNode is a JMRI compatible I/O controller built on the MQTT protocol. Using the Raspberry Pi Pico, each node can support up to 16 turnouts as standard, or more with user addons.

Required Hardware

This project uses the Wiznet Ethernet Hat for the Raspberry Pi Pico (RP2040), which is available at major retailers such as Core Electronics in Australia. This is used for networking. The Pico-W is unsupported at this time.

Installation

  • To use TrainNode, you must have a MQTT server with username and password authentication connected to JMRI (JMRI + MQTT). It is recommended to use Eclipse Mosquitto as your MQTT broker.
  • To install TrainNode on the Rpi Pico, install MicroPython for Pico compiled from the Wiznet Github (MicroPython).
  • Next, configure the TrainNode config_example.json file and rename it config.json (see Docs for more info).
  • Finally, copy the files from the code folder to the Pico.
  • The Pico will automatically connect to the network, connecting to the layout MQTT broker. It will now be operational.

Docs

General Settings "server_addr": IP address of the MQTT server "client_name": The client name of the node "MQTT_user": The username of the MQTT server "MQTT_password": The password of the MQTT server "MQTT_port": The port the MQTT server is on "neopixel_pin": The GPIO pin that any neopixels are connected to (ignored when 0 neopixels) "neopixel_count": The number of neopixels attached to the node (put 0 for no neopixels) "device_poll_timeout_ms": The amount of time that the system waits for interupts such as button releases when pressed "max_ip_connect_attempts": The amount of times the node will attempt to connect before powering off (requiring a power cycle)

Device Settings (see example_json for usage)

  • Devices to be controlled by TrainNode
  • The number of devices is not limited except by the program execution time and physical limitations of the Pico (I/O, RAM, etc).
  • Additional data can be added, this will be ignored by the system unless used in the user program space.

The device settings looks as follows:

"address": "jmri/track/turnout/4", "current_state": { "state": "CLOSED", "position": 0 }, "states": { "THROWN": [255, 0, 0], "CLOSED": [0, 255, 0] }, "io": "OUTPUT", "type": "neopixel", "args": { }

Where, "address": "jmri/track/turnout/4", "current_state": wrapper for "state" and "position" (Do not modify) "state": The current state of the device (this is updated in real time), eg. "THROWN" "position": The current position of the device (this is updated in real time), eg. [255, 0, 0] "states": The messages that JMRI will send and the response position, eg. "THROWN": [255, 0, 0], "CLOSED": [0, 255, 0] "io": Whether the device is an INPUT or an OUTPUT "type": The device type (see list below) "args": Any other arguments required by the device (see arguments in list below)

Available Device Types

  • servo ["freq": Frequency of the servo, "pin": Output GPIO pin, "ramp": true or false for whether the servo will ramp to its final position, "step": The size of the step for the ramp per cycle] (OUTPUT)
  • neopixel ["pixel": the output pixel] (OUTPUT)
  • pin_output ["pin": GPIO pin] (OUTPUT)
  • rfid ["bus": The bus for the SPI interface, "sda": The SDA pin, "scl": The SCL pin, "asw_address": the switch address on the piicodev RFID] (INPUT)
  • button ["pin": GPIO pin, "pullup": true or false for pullup, "debounce": The debounce time in milliseconds, "button_trig": Whether the button is normally closed or normally open] (INPUT)
  • pin_input ["pin": GPIO pin, "pullup": true or false for pullup, "debounce": The debounce time in milliseconds] (INPUT)

Parts

24
QtyValueFootprintReferences
41000Resistor_SMD:R_0603_1608MetricR3, R4, R5, R6
4Conn_01x16_FemaleConnector_PinHeader_2.54mm:PinHeader_1x16_P2.54mm_VerticalJ2, J4, J5, J6
3Conn_01x08_FemaleConnector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ1, J3, J8
21N4007Diode_SMD:D_0603_1608MetricD1, D2
22N7000Package_TO_SOT_THT:TO-92_InlineQ2, Q3
11200Resistor_SMD:R_0603_1608MetricR2
1330Resistor_SMD:R_0603_1608MetricR1
1Conn_01x03_FemaleTerminalBlock:TerminalBlock_Altech_AK300-3_P5.00mmJ12
1Conn_01x04_SocketConnector_JST:JST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ9
1LM317_TO-220Package_TO_SOT_THT:TO-220-3_VerticalU2
1PicoMCU_RaspberryPi_and_Boards:RPi_Pico_SMD_THU1

The 21 most common of 24 parts.

Questions

How big is the MQTTDecoderExpansionBoard PCB?

It measures 54.6 × 69.2 mm and has 2 copper layers, 1.6 mm thick.

What parts does the MQTTDecoderExpansionBoard use?

24 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 MQTTDecoderExpansionBoard KiCad files?

From the fallbotics/JMRITrainNode repository on GitHub, at the commit this page was made from: the board is PCB/MQTTDecoderExpansionBoard.kicad_pcb and its schematic PCB/MQTTDecoderExpansionBoard.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the MQTTDecoderExpansionBoard design in my own project?

Its repository publishes it under the GPL-3.0 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 layers56 × 65 mmSeaTalk1, the printed circuit board in 3D

    SeaTalk1

    dotnet/iot

    This repo includes .NET Core implementations for various IoT boards, chips, displays and PCBs.

    24 parts2.4kMIT
  • 2 layers26.2 × 45.5 mmPL18 multiprotocol, the printed circuit board in 3D

    PL18 multiprotocol

    pascallanger/DIY-Multiprotocol-TX-Module

    Multiprotocol TX Module (or MULTI-Module) is a 2.4GHz transmitter module which controls many different receivers and models.

    24 parts1.9kGPL-3.0
  • 2 layers58 × 35.5 mmHat, the printed circuit board in 3D

    Hat

    menloresearch/asimov-1

    v1 of Asimov, an open-source humanoid robot

    24 parts1.4kCERN-OHL-S-2.0
  • 2 layers21.6 × 19.5 mmMicron Logo LED, the printed circuit board in 3D

    Micron Logo LED

    DraftShift/StealthChanger

    Tool changing system for Vorons and other front mount printer motion systems, not just stealthburner.

    24 parts1.2kGPL-3.0
  • 2 layers158 × 11 mmRainbow Matchstick, the printed circuit board in 3D

    Rainbow Matchstick

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    24 parts1.1kGPL-3.0
  • 2 layers85.6 × 54 mmTRACED wio1262-carrier, the printed circuit board in 3D

    TRACED wio1262-carrier

    hackclub/OnBoard

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

    24 parts915
  • 2 layers36 × 20 mmCombined, the printed circuit board in 3D

    Combined

    adamb314/ServoProject

    Getting the most out of your hobby servo

    24 parts545