
RP2040-Decoder
gab-k/RP2040-Decoder
Cost effective DIY DCC Decoder for model railroad locomotives

Cost effective DIY DCC Decoder for model railroad locomotives
RP2040-Decoder is an open-source printed circuit board by gab-k, from the gab-k/RP2040-Decoder repository on GitHub. It is a 2-layer board of 25 × 20 mm with 57 parts on 59 nets, routed with 445 tracks and 123 vias.
It is built around the RP2040, BDR6133 and W25Q64JVSSIQ, with the HT7533S, T2N7002BK,LM and KMB24F among its other parts. Its parts include 20 connectors, 17 capacitors, 9 resistors, 5 transistors and 4 ICs. It belongs with the RP2040 boards of this library.
Designed to be a low-cost, open-source alternative to commercial DCC decoders, it utilizes the Raspberry Pi RP2040 dual-core microcontroller. The decoder features DCC protocol decoding and command interpretation alongside motor control in a compact 25x20 mm form factor.
The system uses each of the two ARM Cortex-M0+ cores for separate tasks:
Optimized for ease of use; supports UF2 drag-and-drop flashing and serial logging.
Revision without USB, one sided assembly, flashed via SWD.
To get started, you will first need the hardware. The different options for acquiring a board are outlined here.
For the software, you have a few options: you can either build it from source or use the ready-to-flash binaries built by the CI pipeline on each release. Flashing the firmware can be done via SWD or, if you are using the USB hardware version, simply by dragging and dropping the file using your regular file explorer.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 10 | 100n | RP2040-Decoder_Additional_Footprints:C_0603_1608Metric | C3, C4, C7, C8, C9, C10, C11, C12, C13, C15 |
| 5 | 10u | RP2040-Decoder_Additional_Footprints:C_0603_1608Metric | C1, C2, C5, C6, C14 |
| 5 | T2N7002BK | Package_TO_SOT_SMD:SOT-23 | Q1, Q2, Q3, Q4, Q5 |
| 4 | 6k8 | RP2040-Decoder_Additional_Footprints:R_0603_1608Metric | R1, R2, R5, R6 |
| 3 | 1k | RP2040-Decoder_Additional_Footprints:R_0603_1608Metric | R7, R8, R9 |
| 2 | 0 | TestPoint:TestPoint_Pad_D2.0mm | J3, J8 |
| 2 | 1 | TestPoint:TestPoint_Pad_D2.0mm | J4, J9 |
| 2 | 10p | RP2040-Decoder_Additional_Footprints:C_0603_1608Metric | C16, C17 |
| 2 | 2 | TestPoint:TestPoint_Pad_D2.0mm | J5, J10 |
| 2 | 3 | TestPoint:TestPoint_Pad_D2.0mm | J6, J11 |
| 1 | +3V3 | TestPoint:TestPoint_Pad_D2.0mm | J7 |
| 1 | +V | TestPoint:TestPoint_Pad_D2.0mm | J14 |
| 1 | 200 | RP2040-Decoder_Additional_Footprints:R_0603_1608Metric | R3 |
| 1 | 4 | TestPoint:TestPoint_Pad_D2.0mm | J12 |
| 1 | 5 | TestPoint:TestPoint_Pad_D2.0mm | J13 |
| 1 | BDR6133 | RP2040-Decoder_Additional_Footprints:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalVias | U2 |
| 1 | DNF | RP2040-Decoder_Additional_Footprints:R_0603_1608Metric | R4 |
| 1 | GND | TestPoint:TestPoint_Pad_D2.0mm | J17 |
| 1 | HT7533S | Package_TO_SOT_SMD:SOT-23 | U1 |
| 1 | KMB24F | Package_TO_SOT_SMD:TO-269AA | D1 |
| 1 | M_OUT_A | TestPoint:TestPoint_Pad_D2.0mm | J16 |
| 1 | M_OUT_B | TestPoint:TestPoint_Pad_D2.0mm | J15 |
| 1 | RP2040 | RP2040-Decoder_Additional_Footprints:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm | U4 |
| 1 | RUN | TestPoint:TestPoint_Pad_D2.0mm | J20 |
| 1 | SWCLK | TestPoint:TestPoint_Pad_D2.0mm | J18 |
| 1 | SWDIO | TestPoint:TestPoint_Pad_D2.0mm | J19 |
| 1 | T0 | TestPoint:TestPoint_Pad_D2.0mm | J1 |
| 1 | T1 | TestPoint:TestPoint_Pad_D2.0mm | J2 |
| 1 | W25Q64JVSSIQ | RP2040-Decoder_Additional_Footprints:SOIC-8_5.23x5.23mm_P1.27mm | U3 |
| 1 | X322512MSB4SI | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |

gab-k/RP2040-Decoder
Cost effective DIY DCC Decoder for model railroad locomotives

chatelao/xDuinoRail-Decoder
The friendly decoder development plattform for model railroad tinkers.



xDuinoRails/xDuinoRails_Thor
Make a Seeed XIAO board a mtc21 decoder, all the electronics needed is on this little board: - mtc21/plux16 compatible connector - DC Motor - 2x Functions - DCC / DCC-ACK / RailCom

ABaboshin/IoTrains
The existing systems in the market are either with old roots (DCC) or not opensource (Märklin). More then that they were built over 20 years ago and therefore have historical restrictions.

khaddra/osborne-floppy-emulator
Floppy disk drive emulator for the Osborne 1. Unfinished.


Jack-p-hammer/HeartBridge
Software, electronics, mechanical parts and simulation for HeartBridge, an automated CPR machine. The project started as MIT 2.009 Green Team's 2025 class project and has continued since.
It measures 25 × 20 mm and has 2 copper layers, 1.6 mm thick.
57 parts, built around the RP2040, BDR6133, W25Q64JVSSIQ and HT7533S. 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.
From the gab-k/RP2040-Decoder repository on GitHub, at the commit this page was made from: the board is KiCad/Legacy/RP2040-Decoder.kicad_pcb and its schematic KiCad/Legacy/RP2040-Decoder.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask gab-k before reusing the design.