(export (version "E")
  (design (source "dcm-hw-v1") (date "2026-11-06") (tool "dcm-generate.py"))
  (components
    (comp (ref "J1") (value "2-way 5.08 mm") (footprint "") (datasheet "manufacturer-terminal-blocks") (description "DC input terminals"))
    (comp (ref "F1") (value "1.1 A hold / 2.2 A trip") (footprint "") (datasheet "bourns-mf-r") (description "Resettable series protection"))
    (comp (ref "D1") (value "3 A 40 V Schottky") (footprint "") (datasheet "onsemi-ss34") (description "Reverse-polarity protection"))
    (comp (ref "D2") (value "15 V standoff 600 W") (footprint "") (datasheet "littelfuse-smbj") (description "Transient clamp across the protected rail"))
    (comp (ref "R1") (value "0.1 Ω 0.5 % 1 W") (footprint "") (datasheet "vishay-crcw2512") (description "Current shunt, external to the module"))
    (comp (ref "U1") (value "INA226AIDGSR") (footprint "") (datasheet "ti-ina226") (description "Bus voltage and shunt current measurement, I2C"))
    (comp (ref "C1") (value "10 µF 25 V X7R") (footprint "") (datasheet "murata-grm") (description "Bulk decoupling at the module supply"))
    (comp (ref "C2") (value "100 nF 25 V X7R") (footprint "") (datasheet "kemet-c-series") (description "High-frequency decoupling at the module supply"))
    (comp (ref "R2") (value "4.7 kΩ 1 %") (footprint "") (datasheet "yageo-rc") (description "I2C pull-up, SDA, to 3.3 V"))
    (comp (ref "R3") (value "4.7 kΩ 1 %") (footprint "") (datasheet "yageo-rc") (description "I2C pull-up, SCL, to 3.3 V"))
    (comp (ref "J2") (value "2-way 5.08 mm") (footprint "") (datasheet "manufacturer-terminal-blocks") (description "Load output terminals"))
    (comp (ref "J3") (value "4-way 2.54 mm header") (footprint "") (datasheet "wurth-6130") (description "I2C and 3.3 V link to the microcontroller"))
    (comp (ref "U2") (value "ESP32-DevKitC-32E") (footprint "") (datasheet "espressif-devkitc") (description "Microcontroller, off-board, connected by J3"))
    (comp (ref "TP1") (value "test point, VIN") (footprint "") (datasheet "keystone-5000") (description "Probe point, raw input"))
    (comp (ref "TP2") (value "test point, VPROT") (footprint "") (datasheet "keystone-5000") (description "Probe point, protected rail / shunt high side"))
    (comp (ref "TP3") (value "test point, VLOAD") (footprint "") (datasheet "keystone-5000") (description "Probe point, load side of the shunt"))
    (comp (ref "TP4") (value "test point, GND") (footprint "") (datasheet "keystone-5000") (description "Probe point, common ground"))
    (comp (ref "TP5") (value "test point, SCL") (footprint "") (datasheet "keystone-5000") (description "Probe point, I2C clock"))
  )
  (nets
    (net (code "1") (name "3V3")
      (node (ref "U1") (pin "6"))
      (node (ref "C1") (pin "1"))
      (node (ref "C2") (pin "1"))
      (node (ref "R2") (pin "1"))
      (node (ref "R3") (pin "1"))
      (node (ref "J3") (pin "1"))
      (node (ref "U2") (pin "3V3"))
    )
    (net (code "2") (name "GND")
      (node (ref "J1") (pin "2"))
      (node (ref "D2") (pin "A"))
      (node (ref "U1") (pin "1"))
      (node (ref "U1") (pin "2"))
      (node (ref "U1") (pin "7"))
      (node (ref "C1") (pin "2"))
      (node (ref "C2") (pin "2"))
      (node (ref "J2") (pin "2"))
      (node (ref "J3") (pin "2"))
      (node (ref "U2") (pin "GND"))
      (node (ref "TP4") (pin "1"))
    )
    (net (code "3") (name "NC")
      (node (ref "U1") (pin "3"))
    )
    (net (code "4") (name "SCL")
      (node (ref "U1") (pin "5"))
      (node (ref "R3") (pin "2"))
      (node (ref "J3") (pin "4"))
      (node (ref "U2") (pin "IO22"))
      (node (ref "TP5") (pin "1"))
    )
    (net (code "5") (name "SDA")
      (node (ref "U1") (pin "4"))
      (node (ref "R2") (pin "2"))
      (node (ref "J3") (pin "3"))
      (node (ref "U2") (pin "IO21"))
    )
    (net (code "6") (name "VFUSED")
      (node (ref "F1") (pin "2"))
      (node (ref "D1") (pin "A"))
    )
    (net (code "7") (name "VIN")
      (node (ref "J1") (pin "1"))
      (node (ref "F1") (pin "1"))
      (node (ref "TP1") (pin "1"))
    )
    (net (code "8") (name "VLOAD")
      (node (ref "R1") (pin "2"))
      (node (ref "U1") (pin "8"))
      (node (ref "U1") (pin "9"))
      (node (ref "J2") (pin "1"))
      (node (ref "TP3") (pin "1"))
    )
    (net (code "9") (name "VPROT")
      (node (ref "D1") (pin "K"))
      (node (ref "D2") (pin "K"))
      (node (ref "R1") (pin "1"))
      (node (ref "U1") (pin "10"))
      (node (ref "TP2") (pin "1"))
    )
  )
)
