Skip to the content
PCBKitNew board
4 layers30 × 23.5 mmNIMRS-21Pin Decoder, the printed circuit board in 3D

NIMRS-21Pin Decoder

CDFER/NIMRS-21Pin-Decoder21

An open source 21-Pin DCC Decoder for model trains

Size
30 × 23.5 mm
Copper layers
4
Thickness
1.04 mm
Parts
89
Nets
85
Pads
373
Tracks, vias
1,360, 197
Pours
359
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
10 May 2025
Updated
12 Feb 2026

Overview

NIMRS-21Pin Decoder is an open-source printed circuit board by CDFER, from the CDFER/NIMRS-21Pin-Decoder repository on GitHub. It is a 4-layer board of 30 × 23.5 mm with 89 parts on 85 nets, routed with 1,360 tracks and 197 vias.

It is built around the ESP32-S3FN8, TPS63070RNM and B5817WS, with the MMDT3904 and BZX584C18 among its other parts. Its parts include 28 capacitors, 23 resistors, 5 ICs, 5 diodes and 4 inductors. It belongs with the ESP32 boards of this library.

Main components

5

README

README.md

NIMRS-21Pin-Decoder

PCB Render

A miniature DCC decoder for model railways featuring an ESP32-S3 microcontroller, designed to fit standard 21-pin sockets. Includes motor control, sound output, and lighting control in a 30x15.5mm footprint (following NMRA spec).

I don't quite have the time to work on this project at the momemnt but Kyle (ProjectInitiative) is starting to work on firmware for this board. You can follow the progress here: https://github.com/ProjectInitiative/NIMRS-Firmware

Features

  • Compact Design: 30mm × 15.5mm × 1.0mm 4-layer PCB
  • Power Management: Dual TPS63070 buck-boost converters for stable 9V (motor) and 3.3V (logic) supplies
  • Quiet Operation: DRV8213 motor driver with real-time adjustable off-time current regulation
  • Audio System: MAX98357A I2S amplifier driving 4-8Ω speaker
  • Wireless Capable: U.FL antenna connector for ESP32-S3's Wi-Fi
  • DCC Compatibility: Handles ~15V square wave AC input

Technical Specifications

Core Components

  • MCU: ESP32-S3FN8 (240MHz dual-core, 8MB embedded flash)
  • Motor Driver: TI DRV8213
  • Audio Amplifier: MAX98357A
  • Power Regulation: Dual TPS63070 buck-boost converters

PCB Stackup

  1. Top Layer: Signals with GND pour
  2. Inner 1: Full GND plane
  3. Inner 2: Signals with 3V3 pour
  4. Bottom Layer: GND plane with sparse signals

PCB Layers

Design Highlights

  • Single-sided assembly and 0.3/0.4mm for cost efficiency
  • Optimized ground planes for EMI reduction
  • Decoupling buck-boost for stable motor PWM operation
  • WiFi + BT support with U.FL antenna

Getting Started

  1. Clone the repository:

    bash
    git clone https://github.com/CDFER/NIMRS-21Pin-Decoder.git
  2. Open in KiCad v9.0+

  3. Review design files:

Repository Structure

text
├── Custom_Footprints.pretty  # Custom component footprints
├── Datasheets               # Component technical documents
├── Images                   # PCB visuals and renders
├── LICENSE
└── README.md

For those wondering the 21-Pin decoder socket uses a 1.27mm, 22Pin back entry connector and I am using the BD050-22-A-0-0500-L-D from GCT (the CAD file, footprint and symbol can be found in the custom footprints library I have made).

Top View

License

MIT License - See LICENSE for details.

Contributing

Pull requests welcome! Please discuss major changes via issues first.

Parts

89
QtyValueFootprintReferences
10Test PointCustom_Footprints:TestPoint_Pad_D1.0mmTP1, TP2, TP3, TP4, TP5, TP6, TP7, TP8, TP9, TP10
810uFPCM_JLCPCB:C_0402C1, C2, C7, C9, C11, C15, C16, C75
822uFPCM_JLCPCB:C_0805C60, C61, C64, C65, C66, C67, C70, C71
410uFPCM_JLCPCB:C_0603C62, C63, C72, C73
41kΩPCM_JLCPCB:R_0402R12, R13, R14, R15
475kΩPCM_JLCPCB:R_0402R4, R6, R8, R71
4B5817WSCustom_Footprints:D_SOD-323D1, D2, D3, D4
4~PCM_JLCPCB:Hole_Tooling_JLCPCBH1, H2, H3, H4
320kΩPCM_JLCPCB:R_0402R5, R7, R9
21.0uH,4.1ACustom_Footprints:IND-SMD_L2.0-W1.6-BL60, L70
21.5pFPCM_JLCPCB:C_0402C12, C13
2100kΩPCM_JLCPCB:R_0402R63, R73
2100nFPCM_JLCPCB:C_0402C68, C76
210kΩPCM_JLCPCB:R_0402R60, R70
220pFPCM_JLCPCB:C_0402C8, C10
2510kΩPCM_JLCPCB:R_0402R3, R61
2MMDT3904Custom_Footprints:SOT-363_SC-70-6Q1, Q2
2RResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR2, R11
2TPS63070Custom_Footprints:RNM0015AU60, U70
1100uFPCM_JLCPCB:C_1206C74
115nH,300mAPCM_JLCPCB:L_0402L3
11uFPCM_JLCPCB:C_0402C17
12.4kΩPCM_JLCPCB:R_0402R10
12.7nHPCM_JLCPCB:L_0402L1
121Pin Loco SocketCustom_Footprints:BD050-22-A-0-0500-L-DJ1
124kΩPCM_JLCPCB:R_0402R72
140MhzCustom_Footprints:Crystal_SMD_2016-4Pin_2.0x1.6mmX1
1470ΩPCM_JLCPCB:R_0402R1
151kΩPCM_JLCPCB:R_0402R62
1BZX584C18Custom_Footprints:D_SOD-523D5
1DRV8213DSGRCustom_Footprints:WSON-8-1EP_2x2mm_P0.5mm_EP0.9x1.6mmU4
1ESP32-S3FN8Custom_Footprints:QFN-56-1EP_7x7mm_P0.4mm_EP4x4mm_ThermalViasU1
1MAX98357ACustom_Footprints:TQFN-16-1EP_3x3mm_P0.5mm_EP1.23x1.23mmU2
1U.FLCustom_Footprints:IPEX-SMD_BWIPX-1-001EJ2
1~PCM_JLCPCB:Part_Num_JLCPCBPN1

The 85 most common of 89 parts.

Questions

How big is the NIMRS-21Pin Decoder PCB?

It measures 30 × 23.5 mm and has 4 copper layers, 1.04 mm thick.

What parts does the NIMRS-21Pin Decoder use?

89 parts, built around the ESP32-S3FN8, TPS63070RNM, B5817WS and MMDT3904. 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 NIMRS-21Pin Decoder KiCad files?

From the CDFER/NIMRS-21Pin-Decoder repository on GitHub, at the commit this page was made from: the board is Decoder PCB/NIMRS-21Pin-Decoder.kicad_pcb and its schematic Debug PCB/Debug PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the NIMRS-21Pin Decoder design in my own project?

Its repository states no licence, so its author keeps all rights: ask CDFER before reusing the design.

Similar boards

  • 2 layers287.8 × 126.7 mmNoName, the printed circuit board in 3D

    NoName

    AlaaSaadAbdo/battoota

    Keyboards

    267 parts188
  • 4 layers110 × 110 mmSmoothiev2-prime, the printed circuit board in 3D

    Smoothiev2-prime

    Smoothieware/Smoothieboard2

    Hardware files for the Smoothieboard v2, and extension boards

    453 parts71
  • 2 layers51 × 21 mmMitayi Pico D1, the printed circuit board in 3D

    Mitayi Pico D1

    CIRCUITSTATE/Mitayi-Pico-D1

    Open-Source RP2040 Microcontroller Development Board

    75 parts36MIT
  • 2 layers45.8 × 40.2 mmGoProControl, the printed circuit board in 3D

    GoProControl

    synfinatic/GoProControl

    GoPro WiFi controller board using an ESP8266 allowing easy integration with other circuits

    27 parts13GPL-3.0
  • 2 layers63 × 80 mmBrakeOutBoard, the printed circuit board in 3D

    BrakeOutBoard

    gmoccapy/T4-MFA

    This is a color MFA designed to be used in a Volkswagen T4 Van

    65 parts9
  • 2 layers55.9 × 78.7 mmCEM3340 VCO, the printed circuit board in 3D

    CEM3340 VCO

    JordanAceto/CEM3340_VCO

    PCB for a CEM3340 based VCO with sine, triangle, saw, and pulse waves.

    96 parts4CC-BY-4.0
  • 2 layers290 × 100 mmESP32-Wall Clock, the printed circuit board in 3D

    ESP32-Wall Clock

    SkullKill/ESP32-Wall-Clock-PCB

    ESP32 based 30cm Wall Mounted Clock. WiFi, NTP, SNMP, web interface, MicroUsb, Type-C, HG3613 Retrofit

    207 parts3GPL-3.0
  • 4 layers110 × 80 mmEsp32p4 extreme, the printed circuit board in 3D

    Esp32p4 extreme

    Andreuxxx1977/esp32-p4

    An open-hardware, actively cooled ESP32-P4 board for heavy multimedia work: a 2-lane MIPI camera, a 2-lane MIPI display, USB 2.0 High-Speed, 10/100 Ethernet, UHS-I microSD, 32 MB flash and 32 MB PSRAM.

    234 parts1CERN-OHL-P-2.0