Skip to the content
PCBKitNew board
4 layers65 × 40 mmPowermod, the printed circuit board in 3D

Machine-generated PCB design for a Raspberry Pi Zero 2 W power scheduler / UPS / battery board. The electrical design is defined in code (netlist.py); the board was laid out and routed with the scripted KiCad +…

Size
65 × 40 mm
Copper layers
4
Thickness
1.6 mm
Parts
77
Nets
45
Pads
256
Tracks, vias
431, 204
Pours
11
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
15 Jul 2026
Updated
21 Jul 2026

Overview

Powermod is an open-source printed circuit board by zdeager, from the zdeager/powermod repository on GitHub. It is a 4-layer board of 65 × 40 mm with 77 parts on 45 nets, routed with 431 tracks and 204 vias.

It is built around the PY32F003F18P6TU, TPS63020DSJR and BM8563, with the TP4056, XC6206P332MR and M2.5 among its other parts. Its parts include 28 resistors, 16 capacitors, 5 ICs, 5 diodes and 5 connectors.

Main components

9

README

hardware/README.md

PowerMOD hardware

Machine-generated PCB design for a Raspberry Pi Zero 2 W power scheduler / UPS / battery board. The electrical design is defined in code (netlist.py); the board was laid out and routed with the scripted KiCad + Freerouting toolchain below, then hand-finished.

The board — powermod.kicad_pcb (final)

65 × 40 mm, 4-layer (F.Cu signal / In1 solid GND / In2 signal / B.Cu signal). Bolts under a Pi Zero 2 W (holes on the Pi's 58×23 grid, flush to the N+W edges); the Pi covers y0–30, and all user-facing parts (USB-C out, battery, button, LEDs, jumpers, test pads) sit on the exposed strip below it. Single-sided assembly.

One KiCad project, one stem: powermod.kicad_pro (netclasses + DRC config), powermod.kicad_sch (generated schematic), powermod.kicad_pcb (board), powermod.kicad_dru (width-enforcement rules — net classes alone are NOT checked by DRC).

Status: fab-ready. Fully routed, 0 unconnected, 0 clearance; the only DRC items are 4 track_width flags on the L2/L1N necks at U3's 0.65 mm pins, which physically cannot be 1.0 mm wide. Pre-fab audit (pad-for-pad netlist diff, datasheet pin checks, operating-point math, the D5 supercap fix): see PREFAB_AUDIT.md — read it before ordering (BOM traps, firmware contract, bring-up plan).

Do NOT regenerate this board from netlist.py. Placement and the USB-C fine-pitch escapes are hand-done. Make changes surgically on powermod.kicad_pcb and update netlist.py in parallel, then prove they agree with a pad-diff (the audit doc describes it).

Electrical source of truth

  • netlist.py — every component, pin, and net (73 components, 45 nets). Run it to (re)generate powermod.kicad_sch, powermod.net, powermod.kicad_sym, sym-lib-table, fp-lib-table. Has a self-test (golden vectors, pin counts).
  • powermod.pretty/ — local footprint lib: the merged-pad USB-C receptacle (reversible twin pads share one pad, so VBUS/GND escape cleanly and DRC sees no coincident-pad conflicts). Required to open the board.

Reusable tools

All the layout/routing/placement scripts live in tools/ (run them from this directory, e.g. python3 tools/finish_board.py powermod.kicad_pcb, so board paths and _sizes.json resolve; they add the parent dir to sys.path to import netlist.py). netlist.py itself stays here — it's the design source and writes the deliverables alongside itself. SPICE decks are in tools/spice/.

Routing pipeline (for derivative boards — not this one):

  • fr_pipeline.py — strip copper + export Specctra DSN / import routed SES. Freerouting must never see a pre-routed board.
  • tools/freerouting.jar (gitignored, ~55 MB) — the autorouter. Java 21+, run with -Djava.awt.headless=true or it hangs on macOS.
  • finish_board.py — post-route finisher: SES import → GND stitching → floating-pour-island tie vias → zone refill. Then DRC with --refill-zones (without it you get hundreds of phantom violations).
  • stitch_gnd.py — the 2.5 mm GND stitching-via grid to the In1 plane.
  • close_nets.py — route leftover nets with the In2-capable grid A*, each route validated by refill+DRC and reverted if it doesn't improve.
  • router.py — grid A* + obstacle model (F/In2/B) used by the above.
  • netclasses.py — inject net-class width targets into a .kicad_pro.

Placement:

  • layout_v2.py — the board generator (gen_pcb: footprints, GND planes, keepouts). layout_mount.py configures it for this board's outline/holes/pinned I/O.
  • place_constrained.py — constraint-aware force-directed placer (net springs, padded repulsion, wide-net/IC halos, rigid converter block).
  • place_search_mount.py / relax_mount.py — placement search scored by Freerouting / overlap relaxer. mount_best.py — placer output snapshot (stale vs the hand-edited board; the board is authoritative).
  • place_check.py — courtyard-overlap + off-board report.
  • make_stencil.py — generates a bare user-facing-parts canvas for human I/O placement (its output board was removed once the layout froze).
  • _sizes.json — cached footprint courtyard sizes (kept in this dir; the placer reads it cwd-relative).

SPICE (tools/spice/):

  • power_path_scenarios.py — behavioural ngspice model of the Q1/Q2/Q3 power path; runs the startup/switchover/unplug scenario matrix (see the SPICE section of PREFAB_AUDIT.md). Needs ngspice on PATH.

Hard-won rules (cost real time — don't relearn them)

  • A green DRC only checks rules that exist: keep powermod.kicad_dru next to the board, and after any rename/move confirm the 4 known track_width flags still fire (if they vanish, the rules got orphaned, not fixed).
  • Netclasses live in the .kicad_pro. A board file copied away from its project routes everything at 0.2 mm and "routes fully" — a fake win.
  • Zone fills are stored in the file: refill before DRC or judging renders.
  • Scripted tracks don't bind to large connector pads (USB-C, bar pads) — those few escapes are interactive-routing territory; small pads bind fine.

History

v1 (58×40, 2-layer) had 3A rails at 0.2 mm (the .kicad_dru lesson); v2 (65×30) was superseded by this board; the QFN-package MCU was swapped for the SOIC-20 ATtiny1616 to break the routing wall; powermod_mount.* was renamed to powermod.* once it became the only board (2026-07-17); then the MCU migrated ATtiny1616 → PY32F003F18P6 (TSSOP-20, ARM Cortex-M0+) on the instock-parts branch (2026-07-18) for JLC assembly availability, with a full reroute — the current board is 65×40, 4-layer, PY32. Lessons live in the tools and PREFAB_AUDIT.md, not in stale board files.

Parts

77
QtyValueFootprintReferences
7100nC_0402_1005MetricC10, C11, C12, C13, C14, C15, C16
5100kR_0402_1005MetricR10, R12, R13, R14, R28
510kR_0402_1005MetricR15, R16, R17, R18, R19
4560R_0402_1005MetricR20, R21, R22, R23
4M2.5MountingHole_2.7mm_M2.5H1, H2, H3, H4
310uC_0805_2012MetricC1, C2, C7
31MR_0402_1005MetricR6, R8, R25
31N4148WSD_SOD-323D3, D4, D5
322uC_0805_2012MetricC3, C4, C5
21uC_0603_1608MetricC8, C9
2330kR_0402_1005MetricR7, R9
25.1kR_0402_1005MetricR2, R3
256kR_0402_1005MetricR4, R5
2AON7407DFN-8-1EP_3x3mm_P0.65mm_EP1.6x2.56mmQ1, Q2
2TJ-S3227LED_TJ-S3227_RG_3.2x2.7mmD1, D2
11.2kR_0402_1005MetricR1
11.5uH_4.5AL_Sumida_CDMC6D28_7.25x6.5mmL1
1180kR_0402_1005MetricR24
11kR_0402_1005MetricR27
132.768kHzCrystal_SMD_3215-2Pin_3.2x1.5mmY1
14.7uC_0603_1608MetricC6
147kR_0402_1005MetricR11
1620kR_0402_1005MetricR26
1BAT_PADTestPoint_Pad_2.0x2.0mmTP2
1BM8563SOIC-8_3.9x4.9mm_P1.27mmU1
1BSS138SOT-23Q3
1BUTTONSW_SPST_PTS647_Sx50SW1
1CHG_JUMPERSolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP1
1GND_PADTestPoint_Pad_2.0x2.0mmTP4
1JST_PH_2JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ3
1PY32F003F18P6TSSOP-20_4.4x6.5mm_P0.65mmU2
1STEMMA_QTJST_SH_SM04B-SRSS-TB_1x04-1MP_P1.00mm_HorizontalJ4
1SWD_HDRPinHeader_1x04_P2.54mm_VerticalJ5
1TP4056SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mmU4
1TPS63020DSJRVSON-14-1EP_3x4.45mm_P0.65mm_EP1.6x4.2mmU3
1USB_C_INUSB_C_Receptacle_TYPE-C_16P_PowerMergedJ1
1USB_C_OUTUSB_C_Receptacle_TYPE-C_16P_PowerMergedJ2
1VBACKUP_GND_PADTestPoint_Pad_2.0x2.0mmTP5
1VBACKUP_PADTestPoint_Pad_2.0x2.0mmTP1
1VOUT_GND_PADTestPoint_Pad_2.0x2.0mmTP6
1VOUT_PADTestPoint_Pad_2.0x2.0mmTP3
1VSEL_JUMPERSolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP2
1XC6206P332MRSOT-23U5

Questions

How big is the Powermod PCB?

It measures 65 × 40 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Powermod use?

77 parts, built around the PY32F003F18P6TU, TPS63020DSJR, BM8563 and TP4056. 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 Powermod KiCad files?

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

Can I use the Powermod design in my own project?

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

Similar boards

  • 4 layers43 × 49.8 mmBattery Management System, the printed circuit board in 3D

    Battery Management System

    creid89/PSU_Capstone_Project_2025_BMS

    Battery Management System for PSU Student EPL (Engineering Prototyping Lab)

    137 parts1
  • 2 layers50.5 × 83 mmPixelpine, the printed circuit board in 3D

    Pixelpine

    machmar/pixelpine

    PixelPine: a 7 cm PCB Christmas tree with 240 charlieplexed LEDs and a personality (KiCad, simulator, firmware sizing, docs)

    271 parts
  • 2 layers73 × 50 mmExtension, the printed circuit board in 3D

    Extension

    roman-khvatov/RoboWay

    Кружок робототехники RoboWay

    61 parts1MIT
  • 4 layersHush main, the printed circuit board in 3D

    Hush main

    Terryzhao-dev/Hush

    Bluetooth dictation mic in an aluminium cup that keeps people nearby from hearing you (ESP32, KiCad, CadQuery)

    108 parts
  • 4 layers89 × 81 mmDKWS PCB, the printed circuit board in 3D

    DKWS PCB

    danielkluka/Diploma-Thesis

    Design of a Secure Data Transmission System in NB-IoT Environment

    121 partsMIT
  • 4 layers40.1 × 60.5 mmHIVES360, the printed circuit board in 3D

    HIVES360

    GhanmiIyed/Beehive-Monitoring

    96 parts
  • 4 layers99 × 80 mmHandheld, the printed circuit board in 3D

    Handheld

    lewipewi/esp-32-gaming-console

    A custom PCB handheld built to run Game Boy games, inspired by the original DMG. Designed from scratch in KiCad — schematic, layout, BOM and firmware.

    61 parts