Skip to content

CDFER/NIMRS-21Pin-Decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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).

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:

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

  3. Review design files:

Repository Structure

├── 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.

Releases

No releases published