metronome/hardware/eda
Me Here adc92c7c02 PM_K-1 hardware: fix the 2 real import issues (crystal footprint + USB shield error)
- Crystal Y1: footprint was a 4-pad type (Crystal_SMD_3225-4Pin) on a 2-pin symbol ->
  pads 3/4 had no symbol pin. Switched to Crystal_SMD_2012-2Pin to match (set to the
  chosen crystal's real footprint at BOM time; ground the case pads if 4-pad).
- USB-C J5: the library symbol's shield pin "S1" mismatches older KiCad footprints that
  name the shell pads "SH" -> "pad S1 not found" ERROR. Dropped the shield net from the
  schematic; the USB shell->chassis is now a layout-time tie (direct or 1Mohm||cap),
  which is version-independent and standard practice. Error resolved; ERC 0.

The remaining ~46 import warnings are HARMLESS: "no net for pad N" on intentionally
unconnected pins (spare RP2350 GPIOs, unused relay NO contacts, unused ULN2003/74LVC14
channels, IC NC pins) -- expected on any board, nothing to fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 19:30:48 -05:00
..
circuits PM_K-1 hardware: fix the 2 real import issues (crystal footprint + USB shield error) 2026-05-31 19:30:48 -05:00
schematics PM_K-1 hardware: register pm_k1 fp-lib (fix import errors) + white bg on SVGs 2026-05-31 17:57:10 -05:00
sim PM_K-1 hardware: render simulations as PNG plots (gnuplot) so they're viewable 2026-05-31 18:39:46 -05:00
Containerfile PM_K-1 hardware: render simulations as PNG plots (gnuplot) so they're viewable 2026-05-31 18:39:46 -05:00
gen_bom.py PM_K-1 hardware: consolidated BOM + LAYOUT.md + PCB-layout tutorial 2026-05-31 00:15:15 -05:00
make_svg.py PM_K-1 hardware: per-block schematic SVGs (netlistsvg) so the design is viewable 2026-05-31 16:42:04 -05:00
README.md PM_K-1 hardware: reproducible EDA container (KiCad 9 + ngspice) 2026-05-30 19:17:54 -05:00
run.sh PM_K-1 hardware: reproducible EDA container (KiCad 9 + ngspice) 2026-05-30 19:17:54 -05:00

PM_K-1 EDA environment

A reproducible container with the tools to design, check, and simulate the core board — so the work doesn't depend on whatever happens to be installed on a given machine, now or in 50 years.

What's inside

  • KiCad 9 — schematic capture + PCB layout, and a CLI (kicad-cli) that can run ERC (Electrical Rules Check) and DRC, and export netlists/PDF/Gerbers.
  • ngspice — SPICE simulator for validating the analog audio circuits before we commit copper (op-amp stages, filters, input loading, etc.).
  • python3 — scripting, BOM munging, optional code-defined-schematic helpers.

Why a container?

The system KiCad here is 7.0, whose CLI can't run ERC (that arrived in KiCad 8). Rather than fight the host, we pin a known toolchain. Anyone — including future-you — rebuilds the exact environment with one command.

Use it

cd hardware/eda
./run.sh                                   # interactive shell, lands in hardware/kicad/
./run.sh kicad-cli version                 # confirm KiCad 9
./run.sh kicad-cli sch erc pm_k1_core.kicad_sch   # run ERC on the schematic
./run.sh ngspice -b ../eda/sim/input_loading.cir  # run a simulation (cwd is kicad/)

run.sh builds the image on first use, then mounts the whole repo at /work (so KiCad sees hardware/). Use RUNTIME=docker ./run.sh … to use Docker instead of Podman.

Layout

eda/
  Containerfile      # the pinned toolchain (KiCad 9 + ngspice + python)
  run.sh             # build-if-needed + run with the repo mounted
  sim/               # ngspice decks (SPICE simulations of the analog circuits)