metronome/hardware/eda
Me Here fb9afe2b27 PM_K-1 hardware: custom TQ2SA relay footprint (verified) + project fp lib
hardware/kicad/pm_k1.pretty/Relay_DPDT_Panasonic_TQ2-SA.kicad_mod -- built from the
Panasonic TQ-SMD datasheet "Recommendable mounting pad, SA type" (2.54mm pitch, 1.0x2.94mm
pads, rows +/-3.31mm, pin map coil 1/10 / pole1 COM3 NC4 NO2 / pole2 COM8 NC7 NO9).
Validated via `kicad-cli fp upgrade` (parses to canonical KiCad 9 format). board.py now
references pm_k1:Relay_DPDT_Panasonic_TQ2-SA and pm_k1:RV-8803-C7.

RV-8803-C7 footprint NOT built: every host with its land pattern blocks/times-out my
fetcher (Micro Crystal, EM Micro, Mouser) and SnapEDA needs login. Won't guess a 0.8mm-pitch
land pattern (geometry + pin-pad mapping). Drop a verified RV-8803-C7.kicad_mod into
pm_k1.pretty (SnapEDA / datasheet) and it resolves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 15:49:49 -05:00
..
circuits PM_K-1 hardware: custom TQ2SA relay footprint (verified) + project fp lib 2026-05-31 15:49:49 -05:00
sim PM_K-1 hardware: Stage 4 -- balanced output driver (completes the audio chain) 2026-05-30 20:27:04 -05:00
Containerfile PM_K-1 hardware: Stage 1 input receiver as SKiDL (code-defined schematic) 2026-05-30 19:43:07 -05:00
gen_bom.py PM_K-1 hardware: consolidated BOM + LAYOUT.md + PCB-layout tutorial 2026-05-31 00:15:15 -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)