aboutsummaryrefslogtreecommitdiff
path: root/knowledge/tooling/thermal-vias.md
diff options
context:
space:
mode:
authorLouis <louis@dnge.de>2026-11-11 10:08:41 +0100
committerLouis <louis@dnge.de>2026-11-11 10:08:41 +0100
commit2e433fcd0d1afadd8ab786dd30d7d4546bdee43d (patch)
treef2a5603703d56b08c1eaa672eaf529ec4b2cc3fa /knowledge/tooling/thermal-vias.md
downloadhw-toolchain-2e433fcd0d1afadd8ab786dd30d7d4546bdee43d.tar.gz
hw-toolchain: placer, routers and KiCad helpers for agent-driven hardware work
Rust placer (simulated annealing) and negotiated-congestion router for 2-layer KiCad boards, pnr.sh to place, route, DRC-check and install candidates, Python KiCad helpers, repo conventions (AGENTS.md) and the tool documentation under knowledge/. Konnect (KiCad MCP, AGPL) as a submodule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'knowledge/tooling/thermal-vias.md')
-rw-r--r--knowledge/tooling/thermal-vias.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/knowledge/tooling/thermal-vias.md b/knowledge/tooling/thermal-vias.md
new file mode 100644
index 0000000..ecd9390
--- /dev/null
+++ b/knowledge/tooling/thermal-vias.md
@@ -0,0 +1,25 @@
+# Thermal vias (tools/thermal_vias.py)
+
+The [Placer](placer.md) and the [Rust router](rust-router.md) refuse footprints with bottom-side pads ("U1 has a bottom-side pad; flipped footprints are not supported"). KiCad's `_ThermalVias` footprint variants carry a B.Cu copy of the exposed pad, so they are refused too. Instead:
+
+1. Use the plain exposed-pad footprint in the schematic.
+2. Keep B.Cu free under the pad with a cost zone in `route.toml`, e.g. `{ layer = "B", fp = "U3", rect = [-2.5, -2.5, 2.5, 2.5], cost = 100 }`. Zone rects do not turn with the part, so use a square that both orientations share.
+3. After routing (`tools/pnr.sh install`), add the vias:
+
+``` sh
+. tools/kicad_env.sh
+$KPY tools/thermal_vias.py board.kicad_pcb U2 U3 U4 [--pitch 1.2 --via 0.6 --drill 0.3]
+```
+
+The script:
+
+- takes each footprint's largest SMD pad and lays a centred grid of vias on it (1.2 mm pitch, inset by radius + 0.1 mm);
+- gives each via the pad's net;
+- skips positions within clearance (0.2 mm) of another net's B.Cu copper, or closer than 0.25 mm hole to hole;
+- refills the zones, saves and restores the `.kicad_pro`.
+
+Run DRC afterwards.
+
+- **Plane net only.** Use it only for pads on the ground plane's net; an exposed pad on another net would cut islands into the B.Cu pour.
+- **Via-in-pad.** Vias inside the mask opening are open via-in-pad and can wick solder; vias under the mask are tented. At 0.3 mm drill that is fine for typical assembly; ask the fab for plugged vias if voiding matters.
+- **Re-run** after every `pnr.sh install`, which replaces the board.