Skip to the content
PCBKitNew board
6 layers14 × 8 mmD20, the printed circuit board in 3D

DCC / Railcom decoder (NEM651, double sided)

Size
14 × 8 mm
Copper layers
6
Thickness
0.8 mm
Parts
51
Nets
42
Pads
160
Tracks, vias
393, 58
Pours
3
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
5 Nov 2024
Updated
9 Jul 2026

Overview

D20 is an open-source printed circuit board by git4dcc, from the git4dcc/RTB_D20 repository on GitHub, published under the Apache-2.0 licence. It is a 6-layer board of 14 × 8 mm with 51 parts on 42 nets, routed with 393 tracks and 58 vias.

It is built around the PMZB200UNEYL, BAT30F4 and BAS3007ARPPE6327HTSA1, with the BC847BDW1 and BC857BDW1 among its other parts. Its parts include 19 resistors, 10 connectors, 9 capacitors, 6 transistors and 4 diodes.

Main components

5

README

README.md

RTB_D20

Real-time Bus (RTB) Kicad_Libs Apache License 2.0

My Homebrew D20 decoder is a double sided mobile decoder with NEM-651 connector. The decoder is designed to integrate into the RTB digital control infrastructure.

See also
User Guides

The decoder has the following features,

  • NEM-651 connector
  • DCC
    • DCC-A automatic logon
    • DCC-R protocol extension
    • Service Mode Programming
  • Railcom
    • Channel 1/2
    • POM, xPOM
    • DYN: Speed, QoS, Track-voltage, Motor-current, AUX-current, Temp, Distance travelled
  • Double sided
  • Dimension: 14 x 8 mm
  • 7-20V track voltage
  • heartbeat LED
  • adjustable max motor current (default 300mA)
  • adjustable max AUX current (default 500mA)
  • over temp protection
  • Function output: LF/LR (dimmable, 1.4kHz) open drain
  • Function output: AUX1/AUX2 (dimmable, 1.4kHz) open drain and logic level (3.3V)
  • Function output: AUX3/AUX4 logic level (3.3V)
  • optional external buffer capacitor (max. 1500uF)
  • <10mA idle power consumption
  • Firmware update over main tracks via DCC-R protocol

Hardware

The current PCB layout uses SMD footprints with 0.5mm pitch, 0402 and 0201 parts. Reflow soldering is mandatory.

PCB

  • 6-layer PCB, FR4, 14 x 8 x 0.8mm (double sided)
  • CPU: AVR64DD28
  • Motor bridge: DRV8231
  • Connector: NEM-651

Kicad

Schematic | Layout | Gerber

Dependency

:yellow_circle: Requires my Kicad project library RTB_SamacSys in the same directory tree.

Firmware

Filename structure: { pcb }{ code }{ version }.hex

Example: D20F0001.hex

Description
pcbName of matching hardware (D20)
codeType of code contained (R=rom, B=bootloader, F=flash, U=bld update, P=UPDI factory code)
versionRelease version (####)

Firmware files

UPDI

The fuse settings as well as the P-code (D20Pxxxx.hex) has to be installed by using UPDI.
Connecting the decoder via its track pins to a 5V(DC) power supply will boot its CPU. This way, its easy to program the fuses and flash.

<img src=supplemental/images/D20_updi.jpg width=800>

Details
Fuse SettingP-code Install
<img src=supplemental/images/D20_updi_fuses.jpg width=500><img src=supplemental/images/D20_updi_memory.jpg width=500>

Images

topbottom

YouTube

Some YouTubes to see the D20 decoder in action.

This project is intended for hobby use only and is distributed in accordance with the Apache License 2.0 agreement.

Parts

51
QtyValueFootprintReferences
6Conn_01x01RTB:DummyNet-ConnectorJ4, J5, J6, J7, J8, J10
410kResistor_SMD:R_0402_1005MetricR5, R6, R11, R12
433kResistor_SMD:R_0402_1005MetricR1, R2, R15, R17
4PMZB200UNEYLPackage_DFN_QFN:Diodes_DFN1006-3Q3, Q4, Q5, Q6
3220kResistor_SMD:R_0402_1005MetricR7, R8, R14
2100nCapacitor_SMD:C_0402_1005MetricC3, C5
212kResistor_SMD:R_0402_1005MetricR16, R18
222u/6VCapacitor_SMD:C_0402_1005MetricC8, C9
29.1kResistor_SMD:R_0402_1005MetricR9, R10
2BAT30F4RTB:BAT30F4D3, D4
2padRTB:DummyNet-ConnectorJ2, J9
11Resistor_SMD:R_0402_1005MetricR19
1100n/50VCapacitor_SMD:C_0603_1608MetricC7
110u/25VCapacitor_SMD:C_0603_1608MetricC2
11kResistor_SMD:R_0402_1005MetricR13
11uCapacitor_SMD:C_0402_1005MetricC6
122Resistor_SMD:R_0402_1005MetricR4
122u/25VCapacitor_SMD:C_0603_1608MetricC4
122u/4VCapacitor_SMD:C_0402_1005MetricC1
13.3kResistor_SMD:R_0402_1005MetricR3
1AVR64DD28-I_STXPackage_DFN_QFN:QFN-28-1EP_4x4mm_P0.4mm_EP2.3x2.3mmIC1
1BAS3007ARPPE6327HTSA1RTB:BF998215D2
1BC847BDW1Package_TO_SOT_SMD:SOT-666Q1
1BC857BDW1Package_TO_SOT_SMD:SOT-666Q2
1CapacitorConnector_PinHeader_1.27mm:PinHeader_1x02_P1.27mm_HorizontalJ3
1DRV8231ADSGRRTB:SON50P200X200X80-9NIC3
1LEDLED_SMD:LED_0402_1005MetricD1
1NCP730BMPackage_SON:WSON-6-1EP_2x2mm_P0.65mm_EP1x1.6mm_ThermalViasIC2
1NEM651Connector_PinHeader_1.27mm:PinHeader_1x06_P1.27mm_HorizontalJ1

Questions

How big is the D20 PCB?

It measures 14 × 8 mm and has 6 copper layers, 0.8 mm thick.

What parts does the D20 use?

51 parts, built around the PMZB200UNEYL, BAT30F4, BAS3007ARPPE6327HTSA1 and BC847BDW1. 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 D20 KiCad files?

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

Can I use the D20 design in my own project?

Its repository publishes it under the Apache-2.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

  • 6 layers15.3 × 11.4 mmD22, the printed circuit board in 3D

    D22

    git4dcc/RTB_D22

    DCC / Railcom decoder (Plux16, double sided)

    48 parts1Apache-2.0
  • 6 layers17 × 10.9 mmD24, the printed circuit board in 3D

    D24

    git4dcc/RTB_D24

    DCC / Railcom decoder (NEM651, single sided), WS28xx

    53 partsApache-2.0
  • 6 layers17 × 10.9 mmD16, the printed circuit board in 3D

    D16

    git4dcc/RTB_D16

    DCC / Railcom decoder (NEM651, single sided)

    43 parts2Apache-2.0
  • 6 layers15.2 × 9.5 mmD21, the printed circuit board in 3D

    D21

    git4dcc/RTB_D21

    DCC / Railcom decoder (Next18, double sided)

    48 parts1Apache-2.0
  • 4 layers50.9 × 15.5 mmD12, the printed circuit board in 3D

    D12

    git4dcc/RTB_D12

    DCC Railcom Decoder FLM V100

    72 partsApache-2.0
  • 4 layers76 × 11 mmD15, the printed circuit board in 3D

    D15

    git4dcc/RTB_D15

    Minitrix V160 N-Scale Locomotive Decoder (DCC/RailCom)

    83 partsApache-2.0
  • 4 layers160.8 × 12 mmD13, the printed circuit board in 3D

    D13

    git4dcc/RTB_D13

    DCC/RailCom Function Decoder for Minitrix Passenger Cars

    153 partsApache-2.0
  • 4 layers17.3 × 15.3 mmEngine, the printed circuit board in 3D

    Engine

    Lambosaurus/Train-Controller-HW

    39 parts