hmc472/hardware/wiring-diagram.svg
Ryan Malloy b5794c5f8d Add hardware wiring documentation and KiCad schematic
- wiring.md: Pin mapping table, module pinout, logic levels
- wiring-diagram.svg: Visual connection diagram (S2 Mini ↔ HMC472A)
- hmc472-controller.kicad_pro/sch: KiCad project for EDA work

GPIO1-6 → V1-V6 (active-low, 16/8/4/2/1/0.5 dB)
5V VBUS → +5V, GND → GND
2026-02-03 00:04:56 -07:00

139 lines
7.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 500" width="800" height="500">
<defs>
<style>
.board { fill: #1a472a; stroke: #0d2818; stroke-width: 2; }
.board-label { font-family: monospace; font-size: 14px; font-weight: bold; fill: white; }
.pin-label { font-family: monospace; font-size: 11px; fill: #333; }
.pin-label-white { font-family: monospace; font-size: 10px; fill: #e0e0e0; }
.wire { stroke-width: 2; fill: none; }
.wire-data { stroke: #2196F3; }
.wire-power { stroke: #f44336; }
.wire-gnd { stroke: #333; }
.title { font-family: sans-serif; font-size: 18px; font-weight: bold; fill: #333; }
.subtitle { font-family: sans-serif; font-size: 12px; fill: #666; }
.note { font-family: sans-serif; font-size: 11px; fill: #555; }
.note-box { fill: #fff8e1; stroke: #ffb300; stroke-width: 1; }
.header { fill: #333; }
.pin { fill: #c9a227; stroke: #8b7355; stroke-width: 1; }
.sma { fill: #c9a227; stroke: #8b7355; stroke-width: 1; }
.usb { fill: #333; stroke: #222; stroke-width: 1; }
.chip { fill: #1a1a1a; stroke: #333; stroke-width: 1; }
</style>
</defs>
<!-- Title -->
<text x="400" y="30" text-anchor="middle" class="title">HMC472A Attenuator Controller Wiring</text>
<text x="400" y="50" text-anchor="middle" class="subtitle">ESP32-S2 Mini to HMC472A Module Connection Diagram</text>
<!-- ESP32-S2 Mini Board -->
<rect x="80" y="100" width="180" height="280" rx="5" class="board"/>
<text x="170" y="125" text-anchor="middle" class="board-label">ESP32-S2 Mini</text>
<text x="170" y="140" text-anchor="middle" class="pin-label-white">(WEMOS/LOLIN)</text>
<!-- USB-C on S2 Mini -->
<rect x="145" y="90" width="50" height="15" rx="3" class="usb"/>
<text x="170" y="101" text-anchor="middle" style="font-size:8px;fill:#888;">USB-C</text>
<!-- ESP32 chip representation -->
<rect x="130" y="155" width="80" height="60" rx="2" class="chip"/>
<text x="170" y="190" text-anchor="middle" style="font-size:9px;fill:#666;">ESP32-S2</text>
<!-- S2 Mini Pin Header (left side, top to bottom) -->
<g transform="translate(85, 230)">
<!-- Pin rectangles -->
<rect x="0" y="0" width="25" height="10" class="pin"/><text x="30" y="9" class="pin-label-white">3V3</text>
<rect x="0" y="15" width="25" height="10" class="pin"/><text x="30" y="24" class="pin-label-white">GPIO1</text>
<rect x="0" y="30" width="25" height="10" class="pin"/><text x="30" y="39" class="pin-label-white">GPIO2</text>
<rect x="0" y="45" width="25" height="10" class="pin"/><text x="30" y="54" class="pin-label-white">GPIO3</text>
<rect x="0" y="60" width="25" height="10" class="pin"/><text x="30" y="69" class="pin-label-white">GPIO4</text>
<rect x="0" y="75" width="25" height="10" class="pin"/><text x="30" y="84" class="pin-label-white">GPIO5</text>
<rect x="0" y="90" width="25" height="10" class="pin"/><text x="30" y="99" class="pin-label-white">GPIO6</text>
<rect x="0" y="105" width="25" height="10" class="pin"/><text x="30" y="114" class="pin-label-white">GND</text>
</g>
<!-- S2 Mini Pin Header (right side) -->
<g transform="translate(210, 230)">
<rect x="0" y="0" width="25" height="10" class="pin"/><text x="-5" y="9" text-anchor="end" class="pin-label-white">5V</text>
<rect x="0" y="105" width="25" height="10" class="pin"/><text x="-5" y="114" text-anchor="end" class="pin-label-white">GND</text>
</g>
<!-- HMC472A Module Board -->
<rect x="520" y="100" width="200" height="280" rx="5" class="board"/>
<text x="620" y="125" text-anchor="middle" class="board-label">HMC472A Module</text>
<text x="620" y="140" text-anchor="middle" class="pin-label-white">6-bit RF Attenuator</text>
<!-- HMC472A chip representation -->
<rect x="555" y="155" width="60" height="40" rx="2" class="chip"/>
<text x="585" y="180" text-anchor="middle" style="font-size:8px;fill:#666;">HMC472A</text>
<!-- SMA Connectors -->
<ellipse cx="540" y="230" rx="15" ry="20" class="sma"/>
<text x="540" y="260" text-anchor="middle" class="pin-label-white">RF IN</text>
<ellipse cx="700" cy="230" rx="15" ry="20" class="sma"/>
<text x="700" y="260" text-anchor="middle" class="pin-label-white">RF OUT</text>
<!-- HMC472A Control Header (8-pin) -->
<g transform="translate(595, 280)">
<rect x="0" y="0" width="25" height="10" class="pin"/><text x="30" y="9" class="pin-label-white">+5V</text>
<rect x="0" y="15" width="25" height="10" class="pin"/><text x="30" y="24" class="pin-label-white">V6 (0.5dB)</text>
<rect x="0" y="30" width="25" height="10" class="pin"/><text x="30" y="39" class="pin-label-white">V5 (1dB)</text>
<rect x="0" y="45" width="25" height="10" class="pin"/><text x="30" y="54" class="pin-label-white">V4 (2dB)</text>
<rect x="0" y="60" width="25" height="10" class="pin"/><text x="30" y="69" class="pin-label-white">V3 (4dB)</text>
<rect x="0" y="75" width="25" height="10" class="pin"/><text x="30" y="84" class="pin-label-white">V2 (8dB)</text>
<rect x="0" y="90" width="25" height="10" class="pin"/><text x="30" y="99" class="pin-label-white">V1 (16dB)</text>
<rect x="0" y="105" width="25" height="10" class="pin"/><text x="30" y="114" class="pin-label-white">GND</text>
</g>
<!-- Wiring: Power (5V) - Red -->
<path d="M 235 235 H 280 V 120 H 560 V 280 H 595" class="wire wire-power"/>
<circle cx="235" cy="235" r="4" fill="#f44336"/>
<circle cx="595" cy="285" r="4" fill="#f44336"/>
<!-- Wiring: GND - Black -->
<path d="M 110 340 H 70 V 400 H 580 V 390 H 595" class="wire wire-gnd"/>
<circle cx="110" cy="340" r="4" fill="#333"/>
<circle cx="595" cy="390" r="4" fill="#333"/>
<!-- Wiring: GPIO1 → V1 (16dB) - Blue -->
<path d="M 110 250 H 50 V 415 H 590 V 375 H 595" class="wire wire-data"/>
<circle cx="110" cy="250" r="3" fill="#2196F3"/>
<circle cx="595" cy="375" r="3" fill="#2196F3"/>
<!-- Wiring: GPIO2 → V2 (8dB) -->
<path d="M 110 265 H 55 V 410 H 585 V 360 H 595" class="wire wire-data"/>
<circle cx="110" cy="265" r="3" fill="#2196F3"/>
<circle cx="595" cy="360" r="3" fill="#2196F3"/>
<!-- Wiring: GPIO3 → V3 (4dB) -->
<path d="M 110 280 H 60 V 405 H 580 V 345 H 595" class="wire wire-data"/>
<circle cx="110" cy="280" r="3" fill="#2196F3"/>
<circle cx="595" cy="345" r="3" fill="#2196F3"/>
<!-- Wiring: GPIO4 → V4 (2dB) -->
<path d="M 110 295 H 65 V 395 H 575 V 330 H 595" class="wire wire-data"/>
<circle cx="110" cy="295" r="3" fill="#2196F3"/>
<circle cx="595" cy="330" r="3" fill="#2196F3"/>
<!-- Wiring: GPIO5 → V5 (1dB) -->
<path d="M 110 310 H 70 V 385 H 570 V 315 H 595" class="wire wire-data"/>
<circle cx="110" cy="310" r="3" fill="#2196F3"/>
<circle cx="595" cy="315" r="3" fill="#2196F3"/>
<!-- Wiring: GPIO6 → V6 (0.5dB) -->
<path d="M 110 325 H 75 V 375 H 565 V 300 H 595" class="wire wire-data"/>
<circle cx="110" cy="325" r="3" fill="#2196F3"/>
<circle cx="595" cy="300" r="3" fill="#2196F3"/>
<!-- Legend -->
<rect x="280" y="420" width="240" height="70" rx="5" class="note-box"/>
<text x="400" y="438" text-anchor="middle" style="font-weight:bold;" class="note">Wiring Summary</text>
<line x1="290" y1="445" x2="310" y2="445" stroke="#f44336" stroke-width="3"/>
<text x="315" y="449" class="note">Power (+5V)</text>
<line x1="400" y1="445" x2="420" y2="445" stroke="#333" stroke-width="3"/>
<text x="425" y="449" class="note">Ground</text>
<line x1="290" y1="465" x2="310" y2="465" stroke="#2196F3" stroke-width="3"/>
<text x="315" y="469" class="note">Data (GPIO→Vx)</text>
<text x="400" y="483" text-anchor="middle" class="note" style="font-style:italic;">Active-LOW: LOW=Attenuate, HIGH=Pass</text>
</svg>