Skip to the content
2 layers9 × 18 mmWired N-1A-2-1, the printed circuit board in 3D

DCC Mobile Decoder Reference Implementation Hardware & Software

Size
9 × 18 mm
Copper layers
2
Thickness
1.6 mm
Parts
37
Nets
34
Pads
138
Tracks, vias
168, 25
Pours
3
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
8 Nov 2022
Updated
18 Mar 2024

Overview

Wired N-1A-2-1 is an open-source printed circuit board by bicknell, from the bicknell/DCC-Mobile-Decoder repository on GitHub. It is a 2-layer board of 9 × 18 mm with 37 parts on 34 nets, routed with 168 tracks and 25 vias.

It is built around the QH8MA3TCR. Its parts include 12 connectors, 11 resistors, 4 capacitors, 4 diodes and 4 transistors. It belongs with the PIC boards of this library.

Main components

1

README

hardware/decoders/Wired-N-1A-2-1/README.md

Wired-N-1A-2-1

About

The Wired-N-1A-2-1 design is a basic 1A N-Scale decoder based off the Breadboard-1 reference design.

  • 1A Capacity
  • 2 Functions (FOF, FOR)
  • ICSP programming exposed via pads.
  • Components on top side only enabling cheap fabrication.

3D Render

Actual size 9mm x 18mm:

Board

Intended Use Case

Used for any hard wired N/Z scale application, from locomotives that do not support drop in decoders, to passenger car and caboose lighting operations.

Schematic

View the schematic: Wired-N-1A-2-1.pdf

Supporting CALCULATIONS.md discussions how component values were determined.

Schematic Walkthrough

Power Supply

Power from the two rails is fed into a bridge rectifier made up of four discrete diodes D11-D14. As DCC is a square wave, the output is nearly but not quite continuous DC power with low ripple. That power is split off to drive the motor and functions directly, labeled as Vdrive. A linear regulator U11 is used to generate +5v for the micro-processor, and has two support capacitors.

The project requirements for this design are to operate from 6v to 30v of input.

Micro-controller

A PIC18F06Q40 processor is used in this design due to it's avaialbility in a 3mm x 3mm VQFN-20 package. PIC processors require minimal support components. C21 is a local bypass capacitor that is placed closed to the power pins. C23 and R11 form a hold up circuit for MCLR which must be kept high during normal operation. If MCLR drops, the chip will reset.

Particular notes on this part:

  • This design does not use a Vref pin.

H-Bridge

The H-Bridge controls the current to the motor. It is driven by a PWM signal generated by the micro-controller. The software generates 4 PWM signals, P1A-P1D, which are used to control speed and direction.

The H-bridge is simply 4 high power MOSFETs arranged in an H configuration. This design uses two discrete dual MOSFET chips each with 1 PNP and 1NPN MOSFET, which is a common arrangement. Resistors are placed on the gate inputs to prevent inrush from damaging the micro-controller.

External diodes are omitted on this design to save space, the body diode of the MOSFET must do the job.

In order to calculate BackEMF, a 100nf capacitor C31 is added to reduce signal noise. The resistors R35 and R36 then reduce the voltage to an appropriate level for the analog input of the micro-controller. By monitoring this voltage the micro-controller can calculate the load.

Functions

This design supports functions F0F, F0R, F1-F6.

Functions F0F, F0R, and F1-F6 are designed to be connected to external device in a "common anode" configuration.

Vdrive power is provided as a common anode source at both ends of the board. The MOSFET connects to ground when turned on by the micro-processor. A resistor is provided on the gate of each MOSFET to manage inrush current.

External Connectivity

MA & MB are the two motor connection solder pads.

RL & RR are the left and right rail solder pads.

F0F, F0R, & F0-F6 are the function solder pads.

CA are the Common Anode solder pads.

MCLR, +5, GND, PGD, PGD make up the ISCP connection points.

Parts

37
QtyValueFootprintReferences
410KResistor_SMD:R_0201_0603MetricR23, R24, R31, R33
4D_SDiode_SMD:D_SOD-523D11, D12, D13, D14
31K3Resistor_SMD:R_0201_0603MetricR21, R36, R37
2100nFCapacitor_SMD:C_0201_0603MetricC21, C23
22.2uFCapacitor_SMD:C_0402_1005MetricC11, C12
2220Resistor_SMD:R_0201_0603MetricR32, R34
26K6Resistor_SMD:R_0201_0603MetricR22, R35
2QH8MA3DCC Project Footprints:TSMT8Q31, Q32
2Q_Dual_NPN_PNP_BRT_E1B1C2E2B2C1Package_TO_SOT_SMD:SOT-666Q33, Q41
1+5Connector_Wire:SolderWirePad_1x01_SMD_1x2mmJ15
1CAConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ1
1F0RConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ13
1FOFConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ12
1GNDConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ16
1MAConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ2
1MBConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ3
1MCLRConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ14
1NCP730BMT500TBGPackage_DFN_QFN:DFN-6-1EP_2x2mm_P0.65mm_EP1x1.6mmU11
1PGCConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ18
1PGDConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ17
1PIC18FPackage_DFN_QFN:VQFN-20-1EP_3x3mm_P0.4mm_EP1.7x1.7mmU21
1RLConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ10
1RRConnector_Wire:SolderWirePad_1x01_SMD_1x2mmJ11

More from bicknell/DCC-Mobile-Decoder

4
  • 2 layers50.8 × 76.2 mmBreadboard-1, the printed circuit board in 3D

    Breadboard-1

    bicknell/DCC-Mobile-Decoder

    DCC Mobile Decoder Reference Implementation Hardware & Software

    76 parts14
  • 2 layers50.8 × 76.2 mmBreadboard-2, the printed circuit board in 3D

    Breadboard-2

    bicknell/DCC-Mobile-Decoder

    DCC Mobile Decoder Reference Implementation Hardware & Software

    75 parts14
  • 2 layers9 × 25 mmWired N-1A-8-1, the printed circuit board in 3D

    Wired N-1A-8-1

    bicknell/DCC-Mobile-Decoder

    DCC Mobile Decoder Reference Implementation Hardware & Software

    56 parts14
  • 4 layers9 × 61.3 mmAtlas N-1A-2-GP40-1, the printed circuit board in 3D

    Atlas N-1A-2-GP40-1

    bicknell/DCC-Mobile-Decoder

    DCC Mobile Decoder Reference Implementation Hardware & Software

    48 parts14

Similar boards

  • 2 layers40 × 34 mmDD HIP9011, the printed circuit board in 3D

    DD HIP9011

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    37 parts1.2k
  • 2 layers53.9 × 23.2 mmAnalog, the printed circuit board in 3D

    Analog

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    37 parts1kGPL-3.0
  • 2 layers52 × 51.8 mmEsp32-homeassistant rf bridge, the printed circuit board in 3D

    Esp32-homeassistant rf bridge

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    37 parts915
  • 2 layers87.8 × 59.8 mmFreeDeck SMD 2020-02, the printed circuit board in 3D

    FreeDeck SMD 2020-02

    FreeYourStream/freedeck-hardware

    all the stuff you need to build your own FreeDeck

    37 parts772
  • 2 layers65 × 28 mmBMS Cell Module, the printed circuit board in 3D

    BMS Cell Module

    stuartpittaway/diyBMS

    Do it yourself battery management system for Lithium ion battery packs/cells

    37 parts676GPL-3.0
  • 2 layers48 × 32 mmFlatSat, the printed circuit board in 3D

    FlatSat

    Pwnsat/FlatSat

    Flatsat v1.0 is a hardware based platform for aerospace cybersecurity research

    37 parts575GPL-2.0
  • 2 layers38.1 × 153.7 mmDEFOG PANEL, the printed circuit board in 3D

    DEFOG PANEL

    jrsteensen/OpenHornet

    OpenHornet 1:1 F/A-18C Simulator Repository

    37 parts431
  • 2 layers47.8 × 27.4 mmVsf stm32h7b0, the printed circuit board in 3D

    Vsf stm32h7b0

    vsfteam/vsf

    Versaloon Software Framework -- a tiny preemptive-capable event-driven incremental software framework for embedded systems

    37 parts341Apache-2.0

Questions

How big is the Wired N-1A-2-1 PCB?

It measures 9 × 18 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Wired N-1A-2-1 use?

37 parts, built around the QH8MA3TCR. 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 Wired N-1A-2-1 KiCad files?

From the bicknell/DCC-Mobile-Decoder repository on GitHub, at the commit this page was made from: the board is hardware/decoders/Wired-N-1A-2-1/Wired-N-1A-2-1.kicad_pcb and its schematic hardware/decoders/Atlas-N-1A-2-GP40-1/Atlas-N-1A-2-GP40-1.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Wired N-1A-2-1 design in my own project?

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