diff --git a/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_dru b/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_dru index 96403a9..362e232 100644 --- a/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_dru +++ b/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_dru @@ -1,4 +1,48 @@ (version 1) + +# hbox-watchdog v4 — design rules +# +# Why three rules instead of one blanket minimum: +# +# The old file was a single unconditional (min 0.15mm). A custom rule outranks +# the netclass table, and an unconditional rule matches EVERY pair on the board, +# so it was silently overriding the HV24 netclass's 0.5 mm clearance everywhere. +# The netclass said 0.5; DRC was only ever enforcing 0.15. +# +# These three are mutually exclusive on the case that matters, so they give the +# same answer whether KiCad resolves by rule order or by specificity: +# +# 1. neither item is HV24 -> 0.15 mm (unchanged) +# 2. either item is HV24 -> 0.50 mm +# 3. except U2 pad-to-pad, its own land pattern -> 0.15 mm +# +# Rule 3 exists for exactly one pair. U2 is the MP1584EN buck (SOIC-8-EP): +# pad 7 (24V, 1.95 x 0.6) to pad 9 (the 2.29 x 3.0 exposed thermal pad, GND) is +# 0.355 mm, and that is the manufacturer's qualified land pattern — it is set by +# the package, not by routing, so no amount of rerouting can open it. Scoping +# the exception to Pad-to-Pad inside U2 keeps it from relaxing anything else: +# measured on this board, U2's courtyard contains 9 pads and all 9 belong to U2, +# so this condition cannot match a foreign pad. The tracks and vias that pass +# through that courtyard are excluded by the A.Type/B.Type test and stay at the +# full 0.5 mm. +# +# HV24 = /24V_IN, 24V, IGN_IN, Q10_GATE (netclass_patterns in the .kicad_pro) +# +# Note: raising HV24 to 0.5 mm also widens the copper pour pullback around those +# nets, because a zone floods to max(its own clearance, the effective DRC +# clearance) — 0.3 mm before, 0.5 mm now. Press B to refill before running DRC. + (rule "Minimum clearance 1" (constraint clearance (min 0.15mm)) + (condition "A.NetClass != 'HV24' && B.NetClass != 'HV24'") +) + +(rule "HV24 clearance" + (constraint clearance (min 0.5mm)) + (condition "(A.NetClass == 'HV24' || B.NetClass == 'HV24') && !(A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('U2') && B.memberOfFootprint('U2'))") +) + +(rule "HV24 exception: MP1584EN land pattern" + (constraint clearance (min 0.15mm)) + (condition "A.Type == 'Pad' && B.Type == 'Pad' && A.memberOfFootprint('U2') && B.memberOfFootprint('U2')") ) diff --git a/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_pcb b/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_pcb index f4b60b4..cc70403 100644 --- a/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_pcb +++ b/03-Architecture-Hardware/kicad/hbox-watchdog-v4.kicad_pcb @@ -58999,7 +58999,7 @@ (uuid "357fbcc3-4ce7-4abb-9b6e-fa375f12652e") ) (segment - (start 191.79 92.1) + (start 192.34 92.1) (end 191.79 91.51) (width 1) (layer "F.Cu") @@ -59023,8 +59023,8 @@ (uuid "6df4c8df-a9ee-47a1-b804-5b5569776a32") ) (segment - (start 194.53 94.84) - (end 191.79 92.1) + (start 195.08 94.84) + (end 192.34 92.1) (width 1) (layer "F.Cu") (net "/3V3_MODEM") @@ -59056,7 +59056,7 @@ ) (segment (start 196.5 104.25) - (end 194.53 102.28) + (end 195.08 102.28) (width 1) (layer "F.Cu") (net "/3V3_MODEM") @@ -59087,8 +59087,8 @@ (uuid "d36ee6a6-6b9f-4e5e-b859-4071092616cc") ) (segment - (start 194.53 102.28) - (end 194.53 94.84) + (start 195.08 102.28) + (end 195.08 94.84) (width 1) (layer "F.Cu") (net "/3V3_MODEM") @@ -60801,7 +60801,7 @@ (segment (start 198.55 68.08) (end 197.41 68.08) - (width 1) + (width 0.6) (layer "F.Cu") (net "FREQ_FAN") (uuid "854214dc-b383-4346-9e86-16d0d073ba4d") @@ -60953,7 +60953,7 @@ (segment (start 181.485 122.395) (end 181.485 126.38) - (width 1.5) + (width 0.8) (layer "F.Cu") (net "24V") (uuid "30ed4012-33fd-47aa-81ea-a996984f4150") @@ -60969,7 +60969,7 @@ (segment (start 195.84 69.35) (end 198.55 69.35) - (width 1) + (width 0.6) (layer "F.Cu") (net "24V") (uuid "479e5357-3d7a-41aa-ac4c-4a9ccb125d81") @@ -62015,7 +62015,7 @@ (uuid "528129cc-2468-48f9-af8d-2ee159f72acd") ) (segment - (start 166.575 125.625) + (start 166.175 125.625) (end 164.71 125.625) (width 0.2) (layer "F.Cu") @@ -62023,8 +62023,8 @@ (uuid "169dd56f-b678-44cd-9f60-2c982a6a22e2") ) (segment - (start 170.85045 129.90045) - (end 166.575 125.625) + (start 171.1504 129.9005) + (end 166.175 125.625) (width 0.2) (layer "F.Cu") (net "/USB_CC2") @@ -62056,7 +62056,7 @@ ) (segment (start 168.852 131.8989) - (end 170.85045 129.90045) + (end 171.1504 129.9005) (width 0.2) (layer "F.Cu") (net "/USB_CC2")