Skip to the content
4 layers46 × 74 mmOpenRetroPad, the printed circuit board in 3D

Custom PCB for OpenRetroPad

Size
46 × 74 mm
Copper layers
4
Thickness
1.6 mm
Parts
71
Nets
77
Pads
297
Tracks, vias
457, 123
Pours
6
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
2 Jan 2021
Updated
9 Jan 2023

Overview

OpenRetroPad is an open-source printed circuit board by OpenRetroPad, from the OpenRetroPad/OpenRetroPadHW repository on GitHub. It is a 4-layer board of 46 × 74 mm with 71 parts on 77 nets, routed with 457 tracks and 123 vias.

It is built around the ATMEGA32U4-MU, CH330N and USBLC6-2SC6, with the AMS1117-3.3 among its other parts. Its parts include 20 capacitors, 19 resistors, 9 diodes, 5 ICs and 4 connectors. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

4

README

ATmega32u4/readme.md

OpenRetroPadHW - ATmega32u4

Overview

This board is based around an ATmega32u4 which is commonly seen on the official Arduino Micro and Leonardo boards. They are also on a fair number of third party Arduino compatible boards known as 'Pro Micro' (e.g. sparkfun's Pro Micro).

The current design includes two USB-C plugs of which both can be used for programming, J2 over a CH330N/CH340N USB-UART serial connection or J1 over USB DFU.

A 2x4 female 2.54mm/0.1in header is also available for an nRF24L01 wireless transceiver module.

Controllers can be connected via a male DB25 mounted on the PCB. The recommended way of doing this with off the shelf controllers is by splicing cheap extension cables with a DB25 connector.

The PCB has been designed to be manufactured and assembled with JLCPCB. Cost was part of the decision to use this company, but also the easy integration with their sister company LCSC which makes the ordering process for the BOM relatively painless (providing you are using parts available in their library).

Software

KiCad was used to design the schematic and PCB. Version 6 has come leaps and bounds and is a very capable ecad software compared to commercial offerings.

The schematic uses a heirachical design and vector buses extensively. To view the pins for each vector bus, select the Tools -> Bus Definitions menu in the schematic editor.

Output PNG files were generated using the following linux commands,

text
pdftoppm OpenRetroPad.pdf png/OpenRetroPad.pdf -png -r 600
pdftoppm OpenRetroPad-Assembly.pdf png/OpenRetroPad-Assembly.pdf -png -r 600
pngquant --ext .png -f --skip-if-larger --speed 1 --strip png/*.png

Plugins

  • Board2Pdf has been used to generate the assembly PDF from the PCB layers. COlours have been adjusted to roughly match the default KiCad 6 theme colours for copper, silkscreen etc.

  • KiCAD JLCPCB tools has been used to simplify the part selection for the BOM and generate assembly outputs for the manufacturer.

Hardware Design

Mechanical

M3 (3.2mm diameter) mounting holes have been added to the corner of the board. These holes have exposed copper for screws, but are not grounded. For precise measurements, see the assembly PDF above.

TODO:

  • Consider grounding mounting hole pads
Power

The board is powered by either USB-C connector, which have been separated from each other, and provided with some basic reverse polarity protection, with a schottky diode on each VBUS connection. This will mean an approximate 0.3V drop on the 5V line but that should be more than fine for this purpose. The microcontroller still runs acceptably fine above 4.5V at 16MHz.

Assumptions have been made that the 5V USB supply is relatively stable so for the digital supply only decoupling capacitors are used. However, a ferrite bead has also been used for filtering the two analog supply inputs.

A larger 'bulk' 10u capacitor has been added near the each USB connector supply, and each CC pin has been pulled down with 5.1k resistors as per the USB spec Rd pulldown resistor for basic USB power. The CC pins have been routed to the microcontroller for the data connector to measure the voltage divider and power available.

A power LED is used on the 5V line. This LED can be physically disabled by cutting the JP1 solder bridge.

TODO:

  • Test if both USB-C connectors can be used simultaneously with the schottky diodes
  • Potentially add ferrite bead on each USB supply
  • Fuses on inputs?
  • Consider filter on USB shield - potentially small cap and large resistor, or even a ferrite bead
Microcontroller

The microcontroller was initially based on microchip application mate AN2519 - AVR Microcontroller Hardware Design Considerations (DS00002519).

The quad flat package was used for this microcontroller, as opposed to the quad flat no-lead package. Throughout the covid chip shortage, the QFP part were harder to source and more expensive, but have now come back down to reasonable levels.

Programming via USB DFU

The board can be programmed via UART, but some information is provided here for programming via USB DFU if any issues are encountered.

Bootloader uses PC7 as output for led pulsing in hardware bootloader mode ( https://github.com/arduino/ArduinoCore-avr/blob/master/bootloaders/caterina/Caterina.c#L151 and https://github.com/arduino/ArduinoCore-avr/blob/master/bootloaders/caterina/Caterina.c#L95 ). This LED can otherwise be used in user code for status indication. TX (D5) and RX (B0) are also broken out for LED activity.

Switch 1 (labelled 'HWB') enters hardware bootloader mode. Switch 2 (labelled 'Reset') resets the microcontroller. To enter the hardware bootloader, in this order: press reset, press hwb, release reset, release hwb. HWB has weak pullup to not use bootloader on reset.

USB DFU mode as per http://ww1.microchip.com/downloads/en/DeviceDoc/doc7618.pdf

DFU drivers can be found in FLIP Flip is not required to be installed unless uploading a .hex file manually

Flags to avrdude to upload: -c flip1 -p m32u4 -P usb Flip is not required to be installed for avrdude to use the protocol.

UART

The CH330N/CH340N are interchangeable parts. Datasheet recommends not powering CH340 and MCU separately. Could cause issues when using TX/RX port for controllers.

TODO:

  • Investigate powering separately, adding diode instead of resistors to RXD/TXD
I/O

The DB-25 male connector is connected as per the wiring table here

The 5V and 3.3V lines are both fused for protection.

Once the microcontroller is booted (a few milliseconds), the HWB button can be used as a user programmable button.

There are multiple LEDs on the board that can be used for I/O.

Wireless Transceiver

The original software had functionality for wireless connections using an nRF24L01 module. This board provides a header to plug in one of these modules. They don't appear to be "official" nordic semi modules in any capacity, but any module with the pinout matching the header (check the back side of the PCB) should work.

Parts

71
QtyValueFootprintReferences
11100nCapacitor_SMD:C_0603_1608MetricC5, C8, C9, C10, C15, C16, C17, C18, C19, C20, C21
91kResistor_SMD:R_0603_1608MetricR7, R8, R10, R12, R13, R14, R15, R17, R18
41uCapacitor_SMD:C_0603_1608MetricC2, C4, C7, C13
43.2mm M3MountingHole:MountingHole_3.2mm_M3_Pad_ViaH1, H2, H3, H4
45.1kResistor_SMD:R_0603_1608MetricR1, R2, R3, R4
310uCapacitor_SMD:C_0805_2012MetricC1, C3, C6
210kResistor_SMD:R_0603_1608MetricR11, R19
220pFCapacitor_SMD:C_0603_1608MetricC11, C12
222rResistor_SMD:R_0603_1608MetricR5, R6
2330Resistor_SMD:R_0603_1608MetricR9, R16
2500mAInductor_SMD:L_0603_1608MetricFB3, FB4
2500mAFuse:Fuse_0805_2012MetricF1, F2
2D_SchottkyDiode_SMD:D_SOD-323D1, D9
2RXLED_SMD:LED_0603_1608MetricD3, D7
2TXLED_SMD:LED_0603_1608MetricD2, D8
2USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U4, U5
2USB_C_Receptacle_USB2.0Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12J1, J2
116MHzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
11N5817Diode_SMD:D_SOD-323D5
1AMS1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U1
1ATmega32U4-MPackage_QFP:TQFP-44_10x10mm_P0.8mmU2
1CH330NPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1DB25_Male_MountingHolesConnector_Dsub:DSUB-25_Male_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mmJ4
1HWBOpenRetroPad:Alps_SKRKSW1
1Logo_Open_Hardware_LargeSymbol:OSHW-Logo2_7.3x6mm_SilkScreenLOGO1
1Logo_Open_Hardware_SmallSymbol:KiCad-Logo2_5mm_SilkScreenLOGO2
1NRF24OpenRetroPad:NRF24L01J3
1PowerLED_SMD:LED_0603_1608MetricD6
1RESETOpenRetroPad:Alps_SKRKSW2
1SJ_2_BRJumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mmJP1
1UserLED_SMD:LED_0603_1608MetricD4

Similar boards

  • 4 layers110 × 80 mmAkkupack ng, the printed circuit board in 3D

    Akkupack ng

    eurovibes/akkupack-ng

    A AKKU-Pack gas gauge

    156 parts
  • 2 layers38.3 × 20.8 mmESP AHT10-Extra, the printed circuit board in 3D

    ESP AHT10-Extra

    c-/ESP-AHT10-Extra

    minimalist ESP-8266 temperature/humidity sensor

    27 parts20
  • 2 layers160 × 100 mm36C3 Badge Hardware, the printed circuit board in 3D

    36C3 Badge Hardware

    CatoLynx/36C3-Badge

    VFD and LED badge fitting the 36C3 design

    159 parts5GPL-3.0
  • 2 layers64 × 72 mm16seg Controller, the printed circuit board in 3D

    16seg Controller

    CatoLynx/16_Segment_Display_HW_Controller

    ESP32-based controller board for large 16-segmend LED display

    59 parts1
  • 2 layers75 × 60 mmBaggerdails, the printed circuit board in 3D

    Baggerdails

    Linutronix/baggerdails

    Linutronix trade fair bucket wheel demo - dails

    61 parts
  • 4 layers48 × 19.9 mmTransmisor, the printed circuit board in 3D

    Transmisor

    m-turambar/Glamdring

    Experiments with STM32 MCUs

    46 parts

Questions

How big is the OpenRetroPad PCB?

It measures 46 × 74 mm and has 4 copper layers, 1.6 mm thick.

What parts does the OpenRetroPad use?

71 parts, built around the ATMEGA32U4-MU, CH330N, USBLC6-2SC6 and AMS1117-3.3. 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 OpenRetroPad KiCad files?

From the OpenRetroPad/OpenRetroPadHW repository on GitHub, at the commit this page was made from: the board is ATmega32u4/OpenRetroPad.kicad_pcb and its schematic ATmega32u4/ATMega32U4-M.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the OpenRetroPad design in my own project?

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