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).
- 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
- MCU: ESP32-S3FN8 (240MHz dual-core, 8MB embedded flash)
- Motor Driver: TI DRV8213
- Audio Amplifier: MAX98357A
- Power Regulation: Dual TPS63070 buck-boost converters
- Top Layer: Signals with GND pour
- Inner 1: Full GND plane
- Inner 2: Signals with 3V3 pour
- Bottom Layer: GND plane with sparse signals
- 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
-
Clone the repository:
git clone https://github.com/CDFER/NIMRS-21Pin-Decoder.git
-
Open in KiCad v9.0+
-
Review design files:
├── 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).
MIT License - See LICENSE for details.
Pull requests welcome! Please discuss major changes via issues first.


