Skip to the content
2 layers120 × 95 mmAmp, the printed circuit board in 3D

A KiCad 10 project for a powered-speaker node: an ESP32-S3 dev board drops into a socket, an I²S DAC + class-D amp turn the stream into 40–50 W of audio, and the whole thing runs from a single USB-C cable via USB-PD.

Size
120 × 95 mm
Copper layers
2
Thickness
1.6 mm
Parts
68
Nets
46
Pads
305
Tracks, vias
0, 0
Pours
2
Routed
Not yet
KiCad
KiCad 10.0 (file 20260206)
Created
12 Jun 2026
Updated
10 Jul 2026

Overview

Amp is an open-source printed circuit board by rmalchow, from the rmalchow/ondaire repository on GitHub. It is a 2-layer board of 120 × 95 mm with 68 parts on 46 nets.

It is built around the CH224K, LM2596S-5.0 and AMS1117-3.3, with the PCM5102APW, TPA3116D2 and SS54 among its other parts. Its parts include 23 capacitors, 16 resistors, 7 ICs, 4 connectors and 2 diodes. It belongs with the audio and music boards and the ESP32 boards of this library.

Main components

6

README

esp32/amp/README.md

ondaire amp — ESP32-S3 carrier / 50 W class-D node

A KiCad 10 project for a powered-speaker node: an ESP32-S3 dev board drops into a socket, an I²S DAC + class-D amp turn the stream into ~40–50 W of audio, and the whole thing runs from a single USB-C cable via USB-PD. JST plugs bring out a rotary encoder and an I²C OLED.

This carrier is the hardware counterpart to the esp32/ firmware in this repo — the GPIO map, I²S pins and encoder pins are taken straight from esp32/boards/board_esp32s3_*.h, so a flashed Super Mini or Waveshare Zero works with no reconfiguration.

Status — schematic ERC-clean; board placed + ground-poured, not yet routed. Schematic, symbols, footprints, BOM and netlist are generated and validated (kicad-cli sch erc → 0 errors). The .kicad_pcb has every footprint placed in a functional floorplan with GND zones on both layers; DRC is clean except the expected unrouted ratsnest (no overlaps/clearance/short errors). Signal and power routing is the remaining manual step. A few values need a datasheet/board check before you order — see Verify before you order.


Block diagram

text
            ┌───────── USB-C (PD) ─────────┐
   charger  │  VBUS ─┬─────────────► +20V rail ──────────────┐
   ─────────┤  CC1/2─┤ CH224K       (≈3 A @ 20 V)            │
   20V/65W+ │  D±  ───┘ PD sink                              │
            └─────────┘  (CFG1: NC = request 20 V)           │
                                                             │
          +20V ──► LM2596S-5.0 buck ──► +5V ──► AMS1117-3.3 ──► +3V3
                                         │                      │
                                         ▼                      ▼
                                   ESP32-S3 socket        PCM5102A DAC
                                   (Super Mini / Zero)    (MCLK-less I²S)
                                         │  I²S BCK/LRCK/DIN     │
                                         └──────────────────────┘
                                                                │ OUT L/R
                                       L+R passive sum ◄─────────┘
                                                │
                          +20V ──► TPA3116D2 (PBTL mono) ──► LC filter ──► SPEAKER
                                       ▲   ▲                              (4 Ω, ~50 W)
                                  SD/FAULT  gain=20 dB
                                       │
   JST: OLED (I²C SDA/SCL) ────────────┤ ESP32 GPIO
   JST: rotary encoder (A/B/SW) ───────┘

What was decided

ChoiceDecisionWhy
Amp topologyTPA3116D2, mono PBTLOne speaker per node; PBTL gives ~40–50 W into 4 Ω from a 20 V rail (min load 1.6 Ω).
DACPCM5102A, MCLK-lessMatches the firmware (i2s_mclk = -1, internal PLL); clean 2.1 Vrms line out, no I²C config.
PowerUSB-PD 20 V via CH224KSingle-cable power; 20 V is the TPA3116's sweet spot. Single-resistor select, default = 20 V.
ESP socketBoth Super Mini + ZeroPopulate one footprint; identical nets, so one board fits either dev board.
Buck / LDOLM2596S-5.0 → AMS1117-3.320 V is above most synchronous bucks' input max; LM2596 (40 V in) is robust. Separate clean 3V3 for the DAC.

Signal & power chain (the important bits)

USB-PD (CH224K). USB-C VBUS feeds the +20 V rail directly; the CH224K only negotiates. Voltage is set in single-resistor mode: R1 on CFG1→GND, with CFG2/CFG3 unconnected. R1 unpopulated = 20 V; 6.8 k = 9 V, 24 k = 12 V, 56 k = 15 V (WCH CH224K DS §5.2.1). D± route to the CH224K for BC1.2 fallback.

Amp (TPA3116D2 PBTL). Wired per the TI datasheet mono mode (SLOS708G §7.4.1, Fig. 36):

  • LINP, LINN → GND (this selects PBTL/mono at power-up).
  • Signal into RINP/RINN (single-ended L+R sum, AC-coupled).
  • Outputs paralleled: OUTPR ∥ OUTNR → SPK+, OUTPL ∥ OUTNL → SPK−, each half-bridge through its own 10 µH inductor, 1 µF across the speaker (PBTL filter, min L = 10 µH / C = 1 µF).
  • MODSEL = GND (BD modulation, lowest THD with the LC filter).
  • PLIMIT tied to GVDD (no power limit). GAIN/SLV = 5.6 k to GVDD → 20 dB, master mode (lowest gain the part offers).
  • SDZ (enable) ← ESP GPIO1 with a 100 k pull-down (amp stays off at boot). FAULTZ → GPIO4 (10 k pull-up). MUTE tied low (software volume handles mute).
  • All four BSxx bootstrap caps = 220 nF. AVCC fed from +20 V through a 3.3 Ω RC. PowerPAD → GND (thermal vias).

Gain / headroom. At 20 dB the PCM5102A's 2.1 Vrms full-scale over-drives the 20 V rail by a few dB, so the firmware's digital volume sets the real level — keep it below ~−4 dBFS for clean full power (normal listening is well under that). To hard-limit in hardware, populate R17 (MIXIN→GND, DNP) to attenuate/divide the summer.

GPIO map (matches esp32/boards/board_esp32s3_*.h)

SignalGPIONotes
I²S BCK5→ PCM5102A BCK
I²S LRCK6→ PCM5102A LCK
I²S DIN7→ PCM5102A DIN (MCLK-less; SCK→GND)
Encoder A / B / SW15 / 16 / 17KY-040 / EC11 via JST (J4)
I²C SDA / SCL8 / 18SSD1306 OLED via JST (J3)
Amp enable (SDZ)1new — drive high to un-shutdown the amp
CH224K PG2new — power-good input
Amp FAULTZ4new — fault input (open-drain)

GPIO 1/2/4/8/18 are the carrier-only additions; they're free and conflict-free on both boards. The firmware doesn't drive amp-enable / fault / OLED yet — the board is forward-looking on those. (3V3 from the dev board is left unconnected; the carrier makes its own clean 3V3 for the DAC.)

Power budget

RailSourceLoadWorst-case
+20 VUSB-PDTPA3116 PVCC~3 A at full output
+5 VLM2596S-5.0ESP32 (Wi-Fi TX peaks) + LDO~1 A
+3V3AMS1117-3.3DAC + OLED + pull-ups~50 mA

Full output (~50 W audio, ~90 % amp efficiency) + logic ≈ 60 W → use a ≥ 65 W (20 V / 3.25 A) charger; a 100 W (20 V/5 A) supply gives headroom. A 60 W (20 V/3 A) charger works but limits peak SPL.

Files

FileWhat
amp.kicad_proProject. Open this in KiCad 10.
amp.kicad_schSchematic (generated).
amp.kicad_pcbBoard: placed + GND-poured, unrouted (generated).
amp.kicad_symProject symbols: TPA3116D2 + the two ESP32 sockets (generated).
amp.pretty/Project footprints: ESP32 dev-board sockets (generated, placeholder geometry).
sym-lib-table, fp-lib-tableRegister the amp libs for this project.
bom.csvGrouped BOM with LCSC starting points (generated).
gen_*.py, ksym.pyThe generators — edit these, not the outputs.

Regenerating

The schematic/symbols/footprints/BOM are produced from declarative data so the design is diffable and editable. After changing gen_sch.py (netlist/parts):

sh
cd esp32/amp
python3 gen_symbols.py      # amp.kicad_sym
python3 gen_footprints.py   # amp.pretty/*
python3 gen_sch.py          # amp.kicad_sch
python3 gen_bom.py          # bom.csv
python3 gen_pcb.py          # amp.kicad_pcb (needs KiCad's pcbnew python module)
kicad-cli sch erc amp.kicad_sch   # validate schematic
kicad-cli pcb drc amp.kicad_pcb   # validate board

The schematic is a connectivity-capture style: components on a grid with a global label on every pin (same name = same net). It's ERC-clean and exports a correct netlist; tidy the layout/wiring in Eeschema if you want a pretty sheet.

PCB layout

gen_pcb.py builds the board with the pcbnew API: it reads each footprint's real courtyard size and shelf-packs the parts into functional regions (power-in

  • PD top-left, buck/LDO across the top, DAC upper-right, amp + output filter + speaker lower-right, sockets + user-IO on the left), then pours GND on both copper layers. The TPA3116 uses the _ThermalVias footprint, so its PowerPAD is already stitched to the back plane.

What's left for you (in Pcbnew):

  1. Fill zones — they're saved unfilled (a headless-pcbnew limitation); press B or Edit → Fill All Zones on open. This connects the whole GND net.
  2. Route the ~46 non-GND nets. Suggested priorities:
    • Wide tracks for +20V and the speaker outputs (≥1.5 mm; ~3.5 A) and the buck +5V path; keep the buck's SW node / catch-diode loop tight.
    • Keep the four TPA3116 output → inductor → speaker runs short and symmetric; the LC filter and bulk PVCC caps right at the amp.
    • I²S (BCK/LRCK/DIN) short from socket to DAC; star the DAC analog ground.
  3. Finalize the ESP32 socket land patterns (placeholders — see below) and add a mechanical support header on the board's far edge.
  4. Re-run DRC. The generated board is DRC-clean apart from the unrouted ratsnest (no overlap/clearance/short errors) and a couple of cosmetic silk-over-pad warnings; 2-layer works, 4-layer is recommended for a quiet ground plane under the amp.

The placement is a starting point — nudge parts to suit your routing. Re-running gen_pcb.py overwrites amp.kicad_pcb, so once you start routing by hand, stop regenerating it (keep editing the schematic + re-import instead).

Assembly (Aisler)

Designed to be SMT-assemblable. All ICs and passives are SMD (0805 jellybean, HTSSOP/TSSOP/SOT/TO-263). Hand-soldered (not SMT-placed): the ESP32 socket headers, the JST plugs, and the speaker terminal block — Aisler does SMT assembly, so place these THT parts yourself.

  • 2-layer is workable; prefer 4-layer for a solid ground plane under the amp.
  • Footprints use Aisler/JLC-friendly packages; LCSC codes in bom.csv are starting points — verify against the live catalogue.
  • For the TPA3116 PowerPAD, keep the thermal-via footprint variant (it's the one assigned) and pour ground top+bottom.

Verify before you order

These are flagged in the BOM / netlist and need a quick check against your parts:

  1. ESP32 socket footprints (amp.pretty/*) are placeholders — 1×14 headers tapping the GPIO1–18 edge. Super Mini clones vary in length / row spacing, and the Zero is castellated+THT. Measure your actual board and redraw the land pattern (and add a mechanical support header on the far edge). Pad numbers already match the symbol, so the netlist survives the edit.
  2. CH224K footprint — ESSOP-10; confirm the MSOP-10-1EP land matches your exact part marking.
  3. Output inductors — L_12x12mm_H6mm placeholder; pick 10 µH parts rated ≥ 4 A saturation (e.g. shielded power inductors), 33 µH ≥ 3 A for the buck.
  4. Electrolytics — CP_Elec_8x10.5 placeholder; match diameter/pitch to the 470 µF/35 V and 220–330 µF parts you actually buy.
  5. Amp gain (R9) and AM switching-frequency pins (AM0/1/2 → GND default) per the TPA3116 datasheet if you want something other than 20 dB / default fsw.

References

  • TI TPA3116D2 datasheet (SLOS708G) — pinout, PBTL mono (§7.4.1), filters.
  • WCH CH224K datasheet — single-resistor voltage select (§5.2.1).
  • TI PCM5102A datasheet — MCLK-less / internal-PLL operation.
  • esp32/boards/board_esp32s3_*.h — the firmware's GPIO truth.

Parts

68
QtyValueFootprintReferences
12100nFC_0805_2012MetricC2, C3, C4, C7, C8, C9, C11, C18, C20, C21, C22, CP1
810kR_0805_2012MetricR3, R5, R6, R7, R11, R14, R15, R16
71uFC_0805_2012MetricC1, C13, C14, C15, C16, C17, C19
410uH/4AL_7.3x7.3_H4.5LL1, LL2, LR1, LR2
4220nFC_0805_2012MetricCBL1, CBL2, CBR1, CBR2
210uFC_0805_2012MetricC5, C10
2220uF/35VCP_Elec_8x10.5CI1, CP3
24.7kR_0805_2012MetricR12, R13
2470uF/35VCP_Elec_8x10.5CB1, CB2
1100kR_0805_2012MetricR10
11nFC_0805_2012MetricCP2
11uF/63VC_0805_2012MetricCF1
12.2kR_0805_2012MetricR4
12.2uFC_0805_2012MetricC12
122uFC_0805_2012MetricC6
13.3R_0805_2012MetricR8
1330uF/16VCP_Elec_8x10.5CO1
133uH/3AL_12x12mm_H6mmL1
15.6kR_0805_2012MetricR9
1AMS1117-3.3SOT-223-3_TabPin2U3
1CH224KMSOP-10-1EP_3x3mm_P0.5mm_EP1.73x1.98mmU1
1DNP (NC=20V; 6.8k/24k/56k=9/12/15V)R_0805_2012MetricR1
1DNP (atten/downmix)R_0805_2012MetricR17
1ENCODERJST_PH_B5B-PH-K_1x05_P2.00mm_VerticalJ4
1ESP32-S3 Super MiniESP32S3_SuperMini_SocketU6
1ESP32-S3 ZeroESP32S3_Zero_SocketU7
1LM2596S-5.0TO-263-5_TabPin3U2
1OLED I2CJST_PH_B4B-PH-K_1x04_P2.00mm_VerticalJ3
1PCM5102ATSSOP-20_4.4x6.5mm_P0.65mmU4
1PWRLED_0805_2012MetricD2
1SPEAKERTerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ2
1SS54D_SMBD1
1TPA3116D2HTSSOP-32-1EP_6.1x11mm_P0.65mm_EP5.2x11mm_Mask4.11x4.36mm_ThermalViasU5
1USB-C PD inUSB_C_Receptacle_GCT_USB4085J1

Similar boards

  • 2 layers84 × 90 mmDsp amp 2to4, the printed circuit board in 3D

    Dsp amp 2to4

    kurozz/dsp_amp_2to4

    Amplifier with DSP based on TPA3116D2 and ADAU1701 with 4 outputs and stereo input.

    193 parts3
  • 4 layers61.3 × 61.7 mmBio thing, the printed circuit board in 3D

    Bio thing

    noahalam77-code/TheraPatch

    82 partsMIT
  • 4 layers175 × 135 mmSystemboard, the printed circuit board in 3D

    Systemboard

    adrianhelfer/Autocast

    AirPlay Car Stereo

    208 parts
  • 4 layers130 × 105 mmHomeDeck, the printed circuit board in 3D

    HomeDeck

    Kilan777/HomeDeck

    Jarvis HomeDeck: a Raspberry Pi CM4 carrier board and voice-assistant software for a 7-inch smart display (KiCad hardware, generated from Python, plus the Python/JS assistant)

    228 parts1
  • 4 layers170.2 × 170.2 mmNvme Carrier all M2, the printed circuit board in 3D

    Nvme Carrier all M2

    El-Luhb/nvme-Carrier-for-LattePanda-Mu

    nvme Carrier PCB for the LattePanda Mu compute module

    400 parts12MIT
  • 4 layers65 × 57 mmControlboard, the printed circuit board in 3D

    Controlboard

    ut-ras/chessbot

    Python/MQTT software, Raspberry Pi Config files, PCB Schematics for an autonomous chess playing robot

    170 parts7
  • 2 layers99.5 × 75.9 mmAmp, the printed circuit board in 3D

    Amp

    hack-apollo/hack_amp

    50W stereo power amplifier(TPA3116).

    79 parts38GPL-3.0
  • 4 layers125.8 × 48 mmBLUETOOTH SPEAKER, the printed circuit board in 3D

    BLUETOOTH SPEAKER

    mbeayou/esp32-hifi-bluetooth-speaker-pcb-board

    A custom high-fidelity Bluetooth speaker PCB featuring the ESP32 (I2S), PCM5100 DAC, and TPA3116D2 Class D Amplifier. Includes Schematics, Gerber files, and BOM.

    115 parts3MIT

Questions

How big is the Amp PCB?

It measures 120 × 95 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Amp use?

68 parts, built around the CH224K, LM2596S-5.0, AMS1117-3.3 and PCM5102APW. 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 Amp KiCad files?

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

Can I use the Amp design in my own project?

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