From c469238dd5560cf5afe46ebd93e627a42f174a75 Mon Sep 17 00:00:00 2001 From: noise Date: Tue, 30 Jun 2026 16:41:22 -0400 Subject: [PATCH] Power sheet stage 1: 15V input protection (ideal-diode + TVS) First stage of the power tree. New carrier/Power.kicad_sch (generated by tools/build_power.py): J_PWR 15V inlet -> D_REV LM74700-Q1 ideal-diode controller + Q_REV N-FET (reverse-polarity / reverse-current) -> VIN_PROT, with SMBJ18A input TVS and 100uF/25V || 10uF/50V bulk + VCAP cap. Part-selection note: the spec's buck candidates miss its own >=20V Vin rule (TPS54424=17V, TPS54560=async); the 3 sync bucks (stages 2-4) will use >=30V synchronous parts, datasheet-verified, feeding +5V/+3V3_RF/+3V3_AUX. tools/build_power.py generalizes the build_ekey approach: generic place() attaches a net label / GND symbol per pin (by-name connectivity, grid-snapped); PWR_FLAGs co-located on real pin coords. Verify: ERC 133->133 (zero new); analyzer +16 added, 0 regressions; netlist confirms the ideal-diode topology (+15V_IN/VIN_PROT/GATE_REV/VCAP_REV/GND). Confirm vs LM74700-Q1 datasheet: C_VCAP value, EN tie, FET Vds/SOA, gate R. Co-Authored-By: Claude Opus 4.8 (1M context) --- PORT_STATUS.md | 9 +- carrier/CM5IO.kicad_pro | 4 + carrier/CM5IO.kicad_sch | 10 + carrier/Power.kicad_sch | 1803 +++++++++++++++++++++++++++++++++++++++ tools/build_power.py | 160 ++++ 5 files changed, 1982 insertions(+), 4 deletions(-) create mode 100644 carrier/Power.kicad_sch create mode 100644 tools/build_power.py diff --git a/PORT_STATUS.md b/PORT_STATUS.md index 3fa7614..4688527 100644 --- a/PORT_STATUS.md +++ b/PORT_STATUS.md @@ -97,10 +97,11 @@ Notes that bit us (don't re-learn the hard way): power sheet; (b) the temp PWR_FLAG on +3V3_RF must be REMOVED once the buck drives it (else dual-driver ERC); (c) optionally route `WIFI_DISABLE#` to a CM5 GPIO for SW radio control; (d) analyzer CG-AUD 5:1 sig/gnd on J_E is inherent to the M.2 connector (INFO, not fixable). New tool: `tools/build_ekey.py` (place connector + auto-NC + labels). -4. **Remaining add phase**: 15V→5V buck front-end (reverse-protection + TVS); the two 3.3V rails - (`+3V3_RF` for the E-key — wire its buck EN to CM5 `PCIE_PWR_EN`/106 and drop the temp PWR_FLAG — - and `+3V3_AUX` for GPS/IO); GPS connector; PPS distribution (GPS PPS → TVS → Schmitt buffer → - fan-out: CM5 `Ethernet_SYNC_OUT` + 2 header taps). SPICE-validate the buck divider + PPS network. +4. **Power sheet** (`carrier/Power.kicad_sch`, generated by `tools/build_power.py`) — staged, **sync + datasheet-built parts** (user choice). **Spec rating fix:** the spec's buck candidates miss its own ≥20V-Vin rule (TPS54424=17V, TPS54560=async) — selecting synchronous ≥30V parts instead (LM61460-class 6A for +5V & +3V3_RF/4A; TPS54202 28V for +3V3_AUX), each verified vs datasheet before commit. + - **Stage 1 — input protection ✅ DONE.** J_PWR(15V) → D_REV `LM74700-Q1` ideal-diode + Q_REV N-FET (reverse-polarity/-current) → `VIN_PROT`; `SMBJ18A` TVS + 100µF/25V ∥ 10µF/50V bulk; C_VCAP charge-pump cap. Netlist-verified topology; ERC 133→133 (zero new); analyzer 0 regressions. **Confirm vs LM74700-Q1 datasheet:** C_VCAP value, EN-to-+15V_IN, FET pick (Vds≥30V, SOA/inrush) + optional gate R. + - **Stage 2** U_BUCK5 15→5V 5A → `+5V`. **Stage 3** U_BUCK33R 15→3.3V 4A → `+3V3_RF` (then REMOVE the E-key temp PWR_FLAG; wire buck EN ← CM5 `PCIE_PWR_EN`/106). **Stage 4** U_BUCK33A 15→3.3V 1A → `+3V3_AUX`. SPICE-validate each feedback divider (like the reference U8/AP3441). +5. **GPS + PPS distribution**: GPS connector (PPS+UART+3V3+GND); PPS → TVS → Schmitt (LVC1G17) → + fan-out: CM5 `Ethernet_SYNC_OUT` (J2 pin-6 net, 3.3V, no translator) + 2 header taps. SPICE/timing check. ## Out-of-repo notes diff --git a/carrier/CM5IO.kicad_pro b/carrier/CM5IO.kicad_pro index 06cdbb6..b6a9527 100644 --- a/carrier/CM5IO.kicad_pro +++ b/carrier/CM5IO.kicad_pro @@ -837,6 +837,10 @@ [ "c57f5f03-e2c5-5c1b-ba90-8072a2a088a0", "M2_Ekey" + ], + [ + "9c7ccf72-dd3e-5ed3-bb43-2939833eb069", + "Power" ] ], "text_variables": {} diff --git a/carrier/CM5IO.kicad_sch b/carrier/CM5IO.kicad_sch index d582a27..b7ef82b 100644 --- a/carrier/CM5IO.kicad_sch +++ b/carrier/CM5IO.kicad_sch @@ -3469,6 +3469,16 @@ (property "Sheetfile" "M2_Ekey.kicad_sch" (at 205 31.75 0) (effects (font (size 1.27 1.27)) (justify left top))) (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55" (page "4")))) ) + (sheet + (at 205 60) + (size 30 20) + (stroke (width 0.1524) (type solid) (color 132 0 132 1)) + (fill (color 255 255 255 0.0000)) + (uuid "9c7ccf72-dd3e-5ed3-bb43-2939833eb069") + (property "Sheetname" "Power" (at 205 56.18 0) (effects (font (size 1.27 1.27)) (justify left bottom))) + (property "Sheetfile" "Power.kicad_sch" (at 205 57.45 0) (effects (font (size 1.27 1.27)) (justify left top))) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55" (page "5")))) + ) (sheet_instances (path "/" (page "1") diff --git a/carrier/Power.kicad_sch b/carrier/Power.kicad_sch new file mode 100644 index 0000000..8fa7792 --- /dev/null +++ b/carrier/Power.kicad_sch @@ -0,0 +1,1803 @@ +(kicad_sch + (version 20231120) + (generator "eeschema") + (generator_version "8.0") + (uuid "63c7bc0a-7271-5cb4-b0b2-ea6295da83e4") + (paper "A4") + (title_block + (title "CM5 Carrier - Power") + (rev "A") + (comment 1 "15V inlet -> ideal-diode -> VIN_PROT -> 3 bucks (+5V, +3V3_RF, +3V3_AUX)") + ) + (lib_symbols +(symbol "Device:R" + (pin_numbers hide) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "R" + (at 2.032 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 0 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at -1.778 0 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "R res resistor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "R_*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "R_0_1" + (rectangle + (start -1.016 -2.54) + (end 1.016 2.54) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "R_1_1" + (pin passive line + (at 0 3.81 270) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) +(symbol "Device:C" + (pin_numbers hide) + (pin_names + (offset 0.254) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "C" + (at 0.635 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "C" + (at 0.635 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 0.9652 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Unpolarized capacitor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "cap capacitor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "C_*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "C_0_1" + (polyline + (pts + (xy -2.032 -0.762) (xy 2.032 -0.762) + ) + (stroke + (width 0.508) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -2.032 0.762) (xy 2.032 0.762) + ) + (stroke + (width 0.508) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "C_1_1" + (pin passive line + (at 0 3.81 270) + (length 2.794) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 2.794) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) +(symbol "Device:C_Polarized" + (pin_numbers hide) + (pin_names + (offset 0.254) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "C" + (at 0.635 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "C_Polarized" + (at 0.635 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 0.9652 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Polarized capacitor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "cap capacitor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "CP_*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "C_Polarized_0_1" + (rectangle + (start -2.286 0.508) + (end 2.286 1.016) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -1.778 2.286) (xy -0.762 2.286) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -1.27 2.794) (xy -1.27 1.778) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (rectangle + (start 2.286 -0.508) + (end -2.286 -1.016) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + ) + (symbol "C_Polarized_1_1" + (pin passive line + (at 0 3.81 270) + (length 2.794) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 2.794) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) +(symbol "power:GND" + (power) + (pin_numbers hide) + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "GND" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"GND\" , ground" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "GND_0_1" + (polyline + (pts + (xy 0 0) (xy 0 -1.27) (xy 1.27 -1.27) (xy 0 -2.54) (xy -1.27 -1.27) (xy 0 -1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "GND_1_1" + (pin power_in line + (at 0 0 270) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) +(symbol "power:PWR_FLAG" + (power global) + (pin_numbers + (hide yes) + ) + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (in_pos_files yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "#FLG" + (at 0 1.905 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "PWR_FLAG" + (at 0 3.81 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Special symbol for telling ERC where power comes from" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "flag power" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "PWR_FLAG_0_0" + (pin power_out line + (at 0 0 90) + (length 0) + (name "" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (symbol "PWR_FLAG_0_1" + (polyline + (pts + (xy 0 0) (xy 0 1.27) (xy -1.016 1.905) (xy 0 2.54) (xy 1.016 1.905) (xy 0 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (embedded_fonts no) + ) +(symbol "Power_Management:LM74700" + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (in_pos_files yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "U" + (at -9.525 -8.89 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "LM74700" + (at 7.62 -8.89 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "Package_TO_SOT_SMD:SOT-23-6" + (at -9.525 -8.89 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "http://www.ti.com/lit/gpn/LM74700-Q1" + (at -9.525 -8.89 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Low Iq reverse battery protection ideal diode controller, SOT-23-6" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "ideal-diode or-ing" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_fp_filters" "SOT?23*" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "LM74700_0_1" + (rectangle + (start -10.16 7.62) + (end 10.16 -7.62) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "LM74700_1_1" + (pin passive line + (at -12.7 -2.54 0) + (length 2.54) + (name "VCAP" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 0 -10.16 90) + (length 2.54) + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at -12.7 -5.08 0) + (length 2.54) + (name "EN" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at 7.62 10.16 270) + (length 2.54) + (name "CATHODE" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "4" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin output line + (at 0 10.16 270) + (length 2.54) + (name "GATE" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "5" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at -7.62 10.16 270) + (length 2.54) + (name "ANODE" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "6" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) +(symbol "Transistor_FET:Q_NMOS_GDS" + (pin_names + (offset 0) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (in_pos_files yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "Q" + (at 5.08 1.905 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Q_NMOS_GDS" + (at 5.08 0 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 5.08 2.54 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "N-MOSFET transistor, gate/drain/source" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "transistor NMOS N-MOS N-MOSFET" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Q_NMOS_GDS_0_1" + (polyline + (pts + (xy 0.254 1.905) (xy 0.254 -1.905) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.254 0) (xy -2.54 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 2.286) (xy 0.762 1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 0.508) (xy 0.762 -0.508) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 -1.27) (xy 0.762 -2.286) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 -1.778) (xy 3.302 -1.778) (xy 3.302 1.778) (xy 0.762 1.778) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 1.016 0) (xy 2.032 0.381) (xy 2.032 -0.381) (xy 1.016 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + (circle + (center 1.651 0) + (radius 2.794) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 2.54 2.54) (xy 2.54 1.778) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (circle + (center 2.54 1.778) + (radius 0.254) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + (circle + (center 2.54 -1.778) + (radius 0.254) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + (polyline + (pts + (xy 2.54 -2.54) (xy 2.54 0) (xy 0.762 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 2.921 0.381) (xy 3.683 0.381) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 3.302 0.381) (xy 2.921 -0.254) (xy 3.683 -0.254) (xy 3.302 0.381) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "Q_NMOS_GDS_1_1" + (pin input line + (at -5.08 0 0) + (length 2.54) + (name "G" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 2.54 5.08 270) + (length 2.54) + (name "D" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 2.54 -5.08 90) + (length 2.54) + (name "S" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) +(symbol "Device:D_TVS" + (pin_numbers + (hide yes) + ) + (pin_names + (offset 1.016) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (in_pos_files yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "D" + (at 0 2.54 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "D_TVS" + (at 0 -2.54 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Bidirectional transient-voltage-suppression diode" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "diode TVS thyrector" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_fp_filters" "TO-???* *_Diode_* *SingleDiode* D_*" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "D_TVS_0_1" + (polyline + (pts + (xy -2.54 1.27) (xy -2.54 -1.27) (xy 2.54 1.27) (xy 2.54 -1.27) (xy -2.54 1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.508 1.27) (xy 0 1.27) (xy 0 -1.27) (xy -0.508 -1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 1.27 0) (xy -1.27 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "D_TVS_1_1" + (pin passive line + (at -3.81 0 0) + (length 2.54) + (name "A1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 3.81 0 180) + (length 2.54) + (name "A2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) +(symbol "Connector:Screw_Terminal_01x02" + (pin_names + (offset 1.016) + (hide yes) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (in_pos_files yes) + (duplicate_pin_numbers_are_jumpers no) + (property "Reference" "J" + (at 0 2.54 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "Screw_Terminal_01x02" + (at 0 -5.08 0) + (show_name no) + (do_not_autoplace no) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Description" "Generic screw terminal, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_keywords" "screw terminal" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "ki_fp_filters" "TerminalBlock*:*" + (at 0 0 0) + (show_name no) + (do_not_autoplace no) + (hide yes) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (symbol "Screw_Terminal_01x02_1_1" + (rectangle + (start -1.27 1.27) + (end 1.27 -3.81) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + (polyline + (pts + (xy -0.5334 0.3302) (xy 0.3302 -0.508) + ) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -0.5334 -2.2098) (xy 0.3302 -3.048) + ) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -0.3556 0.508) (xy 0.508 -0.3302) + ) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -0.3556 -2.032) (xy 0.508 -2.8702) + ) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (circle + (center 0 0) + (radius 0.635) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (circle + (center 0 -2.54) + (radius 0.635) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (pin passive line + (at -5.08 0 0) + (length 3.81) + (name "Pin_1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at -5.08 -2.54 0) + (length 3.81) + (name "Pin_2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + (embedded_fonts no) + ) + ) + (symbol + (lib_id "Connector:Screw_Terminal_01x02") + (at 80.01 80.01 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "138ccd89-316e-5500-a880-7404227f9795") + (property "Reference" "J_PWR" (at 82.55000000000001 79.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Value" "15V_DC_IN" (at 82.55000000000001 81.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Footprint" "TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal" (at 80.01 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 80.01 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Description" "" (at 80.01 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "32ee5f27-8526-5407-aaa5-2624a8431ab2")) + (pin "2" (uuid "c97b89b9-8fc6-50bc-86b9-2b4d1e9aa61b")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "J_PWR") (unit 1)))) + ) + (label "+15V_IN" + (at 74.93 80.01 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "6a0186bc-1b0f-5d02-9cc9-2b58ad665a19") + ) + (symbol + (lib_id "power:GND") + (at 74.93 82.55 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "8def5da0-db83-5909-a5b9-32339f4cb34b") + (property "Reference" "#PWRJ_PWR2" (at 74.93 85.55 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "GND" (at 74.93 84.55 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 74.93 82.55 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 74.93 82.55 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "1deae2c7-a33b-55bc-8f85-710875dc61eb")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#PWRJ_PWR2") (unit 1)))) + ) + (symbol + (lib_id "Power_Management:LM74700") + (at 119.38 80.01 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "e1d47221-0b9d-5e63-9c6b-2f617f5b1bb0") + (property "Reference" "D_REV" (at 121.92 79.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Value" "LM74700-Q1" (at 121.92 81.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Footprint" "Package_TO_SOT_SMD:SOT-23-6" (at 119.38 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 119.38 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Description" "" (at 119.38 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "93e07f85-de89-51b3-b20e-46d6f423cc5a")) + (pin "2" (uuid "cf6745a0-40a2-5342-b0be-a3f9b6729aa6")) + (pin "3" (uuid "bd09d25c-11ed-5241-a16a-d5532b0e266a")) + (pin "4" (uuid "c867d754-56c1-502e-896f-4ee34d25f950")) + (pin "5" (uuid "2bf914a5-e64b-588d-8a13-468583e7a939")) + (pin "6" (uuid "1f815a26-d4c1-5179-b6e2-12b4cff852cd")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "D_REV") (unit 1)))) + ) + (label "+15V_IN" + (at 111.76 69.85 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "f3718e41-1f27-5599-bf84-1faaf54302ba") + ) + (label "+15V_IN" + (at 106.68 85.09 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "3a6f2938-bcc7-54f3-8919-8488e03126d3") + ) + (label "VIN_PROT" + (at 127.0 69.85 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "e9a16564-356b-57fd-9f38-09da0a780ac9") + ) + (label "GATE_REV" + (at 119.38 69.85 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "31d2d6c3-274d-5315-9bbe-6d57d895cf79") + ) + (label "VCAP_REV" + (at 106.68 82.55 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "e9f15989-c80c-5d09-89b5-f5ee1789b3b3") + ) + (symbol + (lib_id "power:GND") + (at 119.38 90.17 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "f9767a09-25e4-52e9-a73f-aca3afe030a4") + (property "Reference" "#PWRD_REV2" (at 119.38 93.17 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "GND" (at 119.38 92.17 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 119.38 90.17 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 119.38 90.17 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "4a09d51f-8a89-55f3-a1d8-27d95495670a")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#PWRD_REV2") (unit 1)))) + ) + (symbol + (lib_id "Transistor_FET:Q_NMOS_GDS") + (at 139.7 90.17 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "ef966840-dbbf-56d1-97bb-f4f2fd044f98") + (property "Reference" "Q_REV" (at 142.23999999999998 89.17 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Value" "CSD18540 (Vds>=30V)" (at 142.23999999999998 91.17 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Footprint" "Package_TO_SOT_SMD:TO-263-2" (at 139.7 90.17 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 139.7 90.17 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Description" "" (at 139.7 90.17 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "94370b7d-192e-53f7-b251-68df884a1fff")) + (pin "2" (uuid "99de816e-caa0-527a-a8d0-ef007cc8acb0")) + (pin "3" (uuid "86396f6b-7a08-5266-b2ee-d077f878dd92")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "Q_REV") (unit 1)))) + ) + (label "GATE_REV" + (at 134.62 90.17 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "f85b1430-45a9-5342-b097-28e8b8534cf7") + ) + (label "VIN_PROT" + (at 142.24 85.09 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "f2da23ac-a512-5cb1-a414-6898e0fb3258") + ) + (label "+15V_IN" + (at 142.24 95.25 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "b4dbc2e9-bd58-5415-a7c3-9e227b76df09") + ) + (symbol + (lib_id "Device:C") + (at 119.38 100.33 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "e663a40a-0120-5745-ae82-4ba6f6493de7") + (property "Reference" "C_VCAP" (at 121.92 99.33 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Value" "1u" (at 121.92 101.33 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Footprint" "Capacitor_SMD:C_0402_1005Metric" (at 119.38 100.33 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 119.38 100.33 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Description" "" (at 119.38 100.33 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "ee6cb68c-edba-5f32-aec9-77a20a0c8af4")) + (pin "2" (uuid "c8d009ee-0f10-5832-8bd2-d7d0964a4297")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "C_VCAP") (unit 1)))) + ) + (label "VCAP_REV" + (at 119.38 96.52 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "5f91176d-3a87-5b4d-87eb-31fc203e3848") + ) + (symbol + (lib_id "power:GND") + (at 119.38 104.14 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "4ab12bfc-dd31-59f3-9d55-00ce58765061") + (property "Reference" "#PWRC_VCAP2" (at 119.38 107.14 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "GND" (at 119.38 106.14 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 119.38 104.14 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 119.38 104.14 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "7ad03b45-36a7-5dd2-b4b5-aa8d8d2bae6b")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#PWRC_VCAP2") (unit 1)))) + ) + (symbol + (lib_id "Device:D_TVS") + (at 160.02 80.01 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "cdc750b8-ea53-5f55-ac5d-7788ac206958") + (property "Reference" "TVS_IN" (at 162.56 79.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Value" "SMBJ18A" (at 162.56 81.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Footprint" "Diode_SMD:D_SMB" (at 160.02 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 160.02 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Description" "" (at 160.02 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "897afdc2-3b0c-5c38-b6a9-3ee119f7ffd6")) + (pin "2" (uuid "4b2bf424-5028-5456-8022-7deb26c87c66")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "TVS_IN") (unit 1)))) + ) + (label "VIN_PROT" + (at 156.21 80.01 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "19b62c7e-49d8-51bf-afac-22699cfdd064") + ) + (symbol + (lib_id "power:GND") + (at 163.83 80.01 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "3855c4fe-b4f0-5737-b42d-d3ca4d8cfadb") + (property "Reference" "#PWRTVS_IN2" (at 163.83 83.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "GND" (at 163.83 82.01 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 163.83 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 163.83 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "325a832a-c3a0-5b01-8994-7c42cb9dae92")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#PWRTVS_IN2") (unit 1)))) + ) + (symbol + (lib_id "Device:C_Polarized") + (at 170.18 80.01 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "307c2b9f-38c6-58a7-8692-3a828d80213e") + (property "Reference" "C_BULK1" (at 172.72 79.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Value" "100u/25V" (at 172.72 81.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Footprint" "Capacitor_SMD:CP_Elec_8x10" (at 170.18 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 170.18 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Description" "" (at 170.18 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "27a8dc89-4edd-54ae-b180-3f211178a4c0")) + (pin "2" (uuid "fa0aba18-7db3-56b5-bb36-38ac68b2db63")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "C_BULK1") (unit 1)))) + ) + (label "VIN_PROT" + (at 170.18 76.2 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "e1a66db3-3fdb-529b-bacc-9a7f17d059f1") + ) + (symbol + (lib_id "power:GND") + (at 170.18 83.82 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "8538b833-fc46-5d70-9c2d-3aa625b84450") + (property "Reference" "#PWRC_BULK12" (at 170.18 86.82 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "GND" (at 170.18 85.82 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 170.18 83.82 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 170.18 83.82 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "cb185ee6-fec2-57b3-9ae5-3a2d7b4735a9")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#PWRC_BULK12") (unit 1)))) + ) + (symbol + (lib_id "Device:C") + (at 180.34 80.01 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "83e33833-3390-51a3-97f4-83f5c8472534") + (property "Reference" "C_BULK2" (at 182.88 79.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Value" "10u/50V" (at 182.88 81.01 0) (effects (font (size 1.27 1.27)) (justify left))) + (property "Footprint" "Capacitor_SMD:C_1210_3225Metric" (at 180.34 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 180.34 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Description" "" (at 180.34 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "4e66f5b1-0ef7-5a04-ac3c-49aa3ce3320c")) + (pin "2" (uuid "990c61f3-da1c-54a4-9a11-a092c117b6de")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "C_BULK2") (unit 1)))) + ) + (label "VIN_PROT" + (at 180.34 76.2 0) + (effects (font (size 1.27 1.27)) (justify left)) + (uuid "1da3dc49-77b0-5815-96f5-cbac8076c96c") + ) + (symbol + (lib_id "power:GND") + (at 180.34 83.82 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "11ae63ae-24fb-5048-a42f-7adeaec9aea2") + (property "Reference" "#PWRC_BULK22" (at 180.34 86.82 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "GND" (at 180.34 85.82 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 180.34 83.82 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 180.34 83.82 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "e1db4e81-845e-503a-8903-e40f9b98027c")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#PWRC_BULK22") (unit 1)))) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 111.76 69.85 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "f46453fa-0c06-59df-bc14-5d0d93dd5c2e") + (property "Reference" "#FLG15IN" (at 111.76 66.85 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "PWR_FLAG" (at 111.76 67.85 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 111.76 69.85 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 111.76 69.85 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "a1220450-13c7-5513-9e4c-61b56f70e298")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#FLG15IN") (unit 1)))) + ) + (symbol + (lib_id "power:PWR_FLAG") + (at 156.21 80.01 0) + (unit 1) + (exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no) + (uuid "48ae8b91-206b-5bbd-a09f-c76f2def09a0") + (property "Reference" "#FLGVINP" (at 156.21 77.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Value" "PWR_FLAG" (at 156.21 78.01 0) (effects (font (size 1.27 1.27)))) + (property "Footprint" "" (at 156.21 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (property "Datasheet" "" (at 156.21 80.01 0) (effects (font (size 1.27 1.27)) (hide yes))) + (pin "1" (uuid "fcebb774-28ce-5368-b1fb-89af26485295")) + (instances (project "CM5IO" (path "/e63e39d7-6ac0-4ffd-8aa3-1841a4541b55/9c7ccf72-dd3e-5ed3-bb43-2939833eb069" (reference "#FLGVINP") (unit 1)))) + ) + (sheet_instances + (path "/" + (page "5") + ) + ) +) diff --git a/tools/build_power.py b/tools/build_power.py new file mode 100644 index 0000000..e95a9f6 --- /dev/null +++ b/tools/build_power.py @@ -0,0 +1,160 @@ +#!/usr/bin/env python3 +"""build_power.py — generate the CM5-carrier Power sheet, stage by stage. + +Same connectivity model as build_ekey.py: every component pin gets a named label +(or a power:GND symbol) coincident with its connection point, so nets form by name +with no wire routing. Coords are grid-snapped to 1.27mm so labels bind to pins. + +STAGE 1 (this file): input protection — + J_PWR(15V) -> D_REV(LM74700 ideal-diode + Q_REV N-FET) -> VIN_PROT, with input TVS + + bulk. Reverse-polarity + reverse-current via the ideal-diode controller. +Later stages (bucks) append to PLACEMENTS and re-run. + +Datasheet items to CONFIRM against LM74700-Q1 (values, not topology): + - C_VCAP value/reference (charge-pump reservoir; ~1uF typ) + - EN handling (tied to +15V_IN for always-on; EN abs-max covers 15V) + - Q_REV FET pick (Vds>=30V, low Rds(on), SOA for inrush) + optional gate resistor + - TVS standoff (SMBJ18A: 18V standoff / ~29V clamp < buck Vin rating) +""" +import re, sys, os, uuid as uuidlib + +ROOT_UUID = "e63e39d7-6ac0-4ffd-8aa3-1841a4541b55" +PROJECT = "CM5IO" +KSS = "/Applications/KiCad/KiCad.app/Contents/SharedSupport/symbols" +HERE = os.path.dirname(os.path.abspath(__file__)) +CARRIER = os.path.join(HERE, "..", "carrier") + +def U(label): return str(uuidlib.uuid5(uuidlib.NAMESPACE_DNS, "cm5carrier-power-" + label)) +SHEET_SYMBOL_UUID = U("sheet-symbol") +SHEET_FILE_UUID = U("sheet-file") + +def g(v): return round(round(v / 1.27) * 1.27, 2) + +def paren_end(t, s): + d = 0 + for i in range(s, len(t)): + if t[i] == '(': d += 1 + elif t[i] == ')': + d -= 1 + if d == 0: return i + 1 + raise ValueError("unbalanced") + +def get_symbol(text, name): + m = re.search(r'\(symbol\s+"' + re.escape(name) + r'"', text) + return text[m.start():paren_end(text, m.start())] if m else None + +def lib_pins(seg): + out = {} + for pm in re.finditer(r'\(pin\b', seg): + s = pm.start(); ps = seg[s:paren_end(seg, s)] + at = re.search(r'\(at\s+([\d.-]+)\s+([\d.-]+)\s+([\d.-]+)\)', ps) + nu = re.search(r'\(number\s+"([^"]+)"', ps) + if at and nu: + out.setdefault(nu.group(1), (float(at.group(1)), float(at.group(2)), float(at.group(3)))) + return out + +# ---- lib_symbol sources ----------------------------------------------------------- +carrier_hs = open(os.path.join(CARRIER, "CM5_HighSpeed.kicad_sch")).read() +LIBS = {} # lib_id -> (embed_block, {pin:(lx,ly,ang)}) +def add_from(lib_id, srctext, srcname=None): + srcname = srcname or lib_id.split(':')[-1] + blk = get_symbol(srctext, lib_id) or get_symbol(srctext, srcname) + if not blk: sys.exit("missing lib_symbol " + lib_id) + if ('"' + lib_id + '"') not in blk[:60]: + blk = blk.replace('(symbol "' + srcname + '"', '(symbol "' + lib_id + '"', 1) + LIBS[lib_id] = (blk, lib_pins(blk)) + +# reuse R/C/C_Polarized/GND verbatim from the carrier (guaranteed compatible) +for lid in ["Device:R", "Device:C", "Device:C_Polarized", "power:GND"]: + add_from(lid, carrier_hs) +# from KiCad libs (renamed to full lib_id) +add_from("power:PWR_FLAG", open(f"{KSS}/power.kicad_sym").read(), "PWR_FLAG") +add_from("Power_Management:LM74700", open(f"{KSS}/Power_Management.kicad_sym").read(), "LM74700") +add_from("Transistor_FET:Q_NMOS_GDS", open(f"{KSS}/Transistor_FET.kicad_sym").read(), "Q_NMOS_GDS") +add_from("Device:D_TVS", open(f"{KSS}/Device.kicad_sym").read(), "D_TVS") +add_from("Connector:Screw_Terminal_01x02", open(f"{KSS}/Connector.kicad_sym").read(), "Screw_Terminal_01x02") + +# ---- placement engine ------------------------------------------------------------- +body = [] +def emit_label(net, x, y, ang=0): + body.append(f'\t(label "{net}"\n\t\t(at {x} {y} {ang})\n' + f'\t\t(effects (font (size 1.27 1.27)) (justify left))\n\t\t(uuid "{U("l-"+net+f"-{x}-{y}")}")\n\t)\n') +def emit_glabel(net, x, y, ang=0): + body.append(f'\t(global_label "{net}"\n\t\t(shape input)\n\t\t(at {x} {y} {ang})\n' + f'\t\t(effects (font (size 1.27 1.27)) (justify left))\n\t\t(uuid "{U("gl-"+net+f"-{x}-{y}")}")\n\t)\n') +def emit_gnd(x, y, tag): + body.append(f'\t(symbol\n\t\t(lib_id "power:GND")\n\t\t(at {x} {y} 0)\n\t\t(unit 1)\n' + f'\t\t(exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no)\n\t\t(uuid "{U("gnd-"+tag)}")\n' + f'\t\t(property "Reference" "#PWR{tag}" (at {x} {y+3} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + f'\t\t(property "Value" "GND" (at {x} {y+2} 0) (effects (font (size 1.27 1.27))))\n' + f'\t\t(property "Footprint" "" (at {x} {y} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + f'\t\t(property "Datasheet" "" (at {x} {y} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + f'\t\t(pin "1" (uuid "{U("gp-"+tag)}"))\n' + f'\t\t(instances (project "{PROJECT}" (path "/{ROOT_UUID}/{SHEET_SYMBOL_UUID}" (reference "#PWR{tag}") (unit 1))))\n\t)\n') +def emit_flag(x, y, tag): + body.append(f'\t(symbol\n\t\t(lib_id "power:PWR_FLAG")\n\t\t(at {x} {y} 0)\n\t\t(unit 1)\n' + f'\t\t(exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no)\n\t\t(uuid "{U("flg-"+tag)}")\n' + f'\t\t(property "Reference" "#FLG{tag}" (at {x} {y-3} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + f'\t\t(property "Value" "PWR_FLAG" (at {x} {y-2} 0) (effects (font (size 1.27 1.27))))\n' + f'\t\t(property "Footprint" "" (at {x} {y} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + f'\t\t(property "Datasheet" "" (at {x} {y} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + f'\t\t(pin "1" (uuid "{U("fp-"+tag)}"))\n' + f'\t\t(instances (project "{PROJECT}" (path "/{ROOT_UUID}/{SHEET_SYMBOL_UUID}" (reference "#FLG{tag}") (unit 1))))\n\t)\n') + +def place(lib_id, ref, value, footprint, ox, oy, pin_nets): + """Place a symbol at grid-snapped (ox,oy); attach each pin's net by name. + pin_nets: {pinnum: 'NET' | ('gnd',) }. GND pins use a power:GND symbol.""" + ox, oy = g(ox), g(oy) + _, pins = LIBS[lib_id] + extra = ('\t\t(property "Description" "" (at %g %g 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' % (ox, oy)) + sym = (f'\t(symbol\n\t\t(lib_id "{lib_id}")\n\t\t(at {ox} {oy} 0)\n\t\t(unit 1)\n' + f'\t\t(exclude_from_sim no) (in_bom yes) (on_board yes) (dnp no)\n\t\t(uuid "{U("sym-"+ref)}")\n' + f'\t\t(property "Reference" "{ref}" (at {ox+2.54} {oy-1} 0) (effects (font (size 1.27 1.27)) (justify left)))\n' + f'\t\t(property "Value" "{value}" (at {ox+2.54} {oy+1} 0) (effects (font (size 1.27 1.27)) (justify left)))\n' + f'\t\t(property "Footprint" "{footprint}" (at {ox} {oy} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + f'\t\t(property "Datasheet" "" (at {ox} {oy} 0) (effects (font (size 1.27 1.27)) (hide yes)))\n' + extra) + for num in sorted(pins, key=lambda n: int(re.sub(r'\D', '', n) or 0)): + sym += f'\t\t(pin "{num}" (uuid "{U("p-"+ref+"-"+num)}"))\n' + sym += f'\t\t(instances (project "{PROJECT}" (path "/{ROOT_UUID}/{SHEET_SYMBOL_UUID}" (reference "{ref}") (unit 1))))\n\t)\n' + body.append(sym) + for num, net in pin_nets.items(): + lx, ly, _ = pins[num]; px, py = round(ox + lx, 2), round(oy - ly, 2) + if net == ('gnd',): emit_gnd(px, py, ref + num) + elif isinstance(net, tuple) and net[0] == 'global': emit_glabel(net[1], px, py) + else: emit_label(net, px, py) + return ox, oy + +# ---- STAGE 1: input protection ---------------------------------------------------- +GND = ('gnd',) +place("Connector:Screw_Terminal_01x02", "J_PWR", "15V_DC_IN", "TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal", + 80, 80, {'1': '+15V_IN', '2': GND}) +drev = place("Power_Management:LM74700", "D_REV", "LM74700-Q1", "Package_TO_SOT_SMD:SOT-23-6", + 120, 80, {'6': '+15V_IN', '3': '+15V_IN', '4': 'VIN_PROT', '5': 'GATE_REV', '1': 'VCAP_REV', '2': GND}) +place("Transistor_FET:Q_NMOS_GDS", "Q_REV", "CSD18540 (Vds>=30V)", "Package_TO_SOT_SMD:TO-263-2", + 140, 90, {'1': 'GATE_REV', '2': 'VIN_PROT', '3': '+15V_IN'}) +place("Device:C", "C_VCAP", "1u", "Capacitor_SMD:C_0402_1005Metric", 120, 100, {'1': 'VCAP_REV', '2': GND}) +tvs = place("Device:D_TVS", "TVS_IN", "SMBJ18A", "Diode_SMD:D_SMB", 160, 80, {'1': 'VIN_PROT', '2': GND}) +place("Device:C_Polarized", "C_BULK1", "100u/25V", "Capacitor_SMD:CP_Elec_8x10", 170, 80, {'1': 'VIN_PROT', '2': GND}) +place("Device:C", "C_BULK2", "10u/50V", "Capacitor_SMD:C_1210_3225Metric", 180, 80, {'1': 'VIN_PROT', '2': GND}) +# PWR_FLAGs co-located exactly on real pins so they bind: +15V_IN @ D_REV.6 (ANODE), +# VIN_PROT @ TVS.1 (a power_in driver for VIN_PROT, needed once bucks consume it). +def pin_abs(origin, lib_id, num): + lx, ly, _ = LIBS[lib_id][1][num] + return round(origin[0] + lx, 2), round(origin[1] - ly, 2) +fx, fy = pin_abs(drev, "Power_Management:LM74700", "6"); emit_flag(fx, fy, "15IN") +vx, vy = pin_abs(tvs, "Device:D_TVS", "1"); emit_flag(vx, vy, "VINP") + +# ---- file scaffold ---------------------------------------------------------------- +libsyms = "\n".join(blk for blk, _ in LIBS.values()) +sheet = ('(kicad_sch\n\t(version 20231120)\n\t(generator "eeschema")\n\t(generator_version "8.0")\n' + f'\t(uuid "{SHEET_FILE_UUID}")\n\t(paper "A4")\n' + '\t(title_block\n\t\t(title "CM5 Carrier - Power")\n\t\t(rev "A")\n' + '\t\t(comment 1 "15V inlet -> ideal-diode -> VIN_PROT -> 3 bucks (+5V, +3V3_RF, +3V3_AUX)")\n\t)\n' + '\t(lib_symbols\n' + libsyms + '\n\t)\n' + "".join(body) + + '\t(sheet_instances\n\t\t(path "/"\n\t\t\t(page "5")\n\t\t)\n\t)\n)\n') +assert sheet.count('(') == sheet.count(')'), f"UNBALANCED {sheet.count('(')} vs {sheet.count(')')}" +print("sheet-symbol uuid:", SHEET_SYMBOL_UUID) +print("parens balanced:", sheet.count('(')) +out = os.path.join(CARRIER, "Power.kicad_sch") +if '--apply' in sys.argv: open(out, 'w').write(sheet); print("WROTE " + out) +else: print("DRY RUN (--apply to write)")