Files
xdeSpace/pcb/loop-detector/loop-detector-principle.html
T

475 lines
25 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>环路车检器:检测方法推荐 + 原理图</title>
<style>
:root {
color-scheme: light dark;
--bg: #f8fafc;
--fg: #172033;
--muted: #5b6475;
--line: #64748b;
--neutral: #e2e8f0;
--input: #bfdbfe;
--process: #c7d2fe;
--storage: #99f6e4;
--external: #fde68a;
--risk: #fecaca;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #0f172a;
--fg: #e5e7eb;
--muted: #a3adbd;
--line: #94a3b8;
--neutral: #334155;
--input: #1d4ed8;
--process: #4338ca;
--storage: #0f766e;
--external: #92400e;
--risk: #991b1b;
}
}
body {
margin: 0;
background: var(--bg);
color: var(--fg);
font: 14px/1.4 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
main { max-width: 1280px; margin: 32px auto; padding: 0 20px; }
svg { width: 100%; height: auto; display: block; }
.title { font-size: 20px; font-weight: 650; fill: var(--fg); }
.label { font-size: 14px; font-weight: 600; fill: var(--fg); }
.small { font-size: 12px; fill: var(--muted); }
.tiny { font-size: 11px; fill: var(--muted); }
.node { stroke: var(--line); stroke-width: 1; }
.neutral { fill: var(--neutral); }
.input { fill: var(--input); }
.process { fill: var(--process); }
.storage { fill: var(--storage); }
.external { fill: var(--external); }
.risk { fill: var(--risk); }
.edge { stroke: var(--line); stroke-width: 1.5; fill: none; }
.wire { stroke: var(--line); stroke-width: 1.3; fill: none; }
.wireb { stroke: var(--line); stroke-width: 2; fill: none; }
.zone { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 6 5; opacity: 0.8; }
.comp { fill: none; stroke: var(--fg); stroke-width: 1.6; }
.compf { fill: var(--fg); stroke: none; }
.rec { fill: var(--fg); stroke: none; }
.rec-o { fill: none; stroke: var(--fg); stroke-width: 1.4; }
.badge { fill: #16a34a; }
.badge-t { fill: #fff; font-size: 11px; font-weight: 700; }
.hl { stroke: #16a34a; stroke-width: 2.5; }
</style>
<main>
<!-- ============ 图1:检测方法对比推荐 ============ -->
<svg viewBox="0 0 1240 560" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="ar1" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#64748b"/>
</marker>
</defs>
<text x="20" y="34" class="title">环路车检器 · 检测方法对比与选型推荐</text>
<text x="20" y="56" class="small">选型核心:灵敏度(能否测摩托/自行车)× 抗干扰(变频器/电力谐波)× 成本。结论先行:主推 ①LC振荡+频率计数;复杂电磁环境上 ④;高灵敏需求上 ②。</text>
<!-- 卡片1 -->
<rect x="24" y="80" width="288" height="440" rx="10" class="node neutral"/>
<rect x="24" y="80" width="288" height="440" rx="10" class="hl" fill="none"/>
<rect x="24" y="80" width="288" height="36" rx="10" fill="#16a34a"/>
<text x="168" y="104" text-anchor="middle" fill="#fff" font-size="14" font-weight="700">① LC振荡 + 频率计数 ★★★★★</text>
<text x="40" y="140" font-size="12.5" font-weight="600">原理</text>
<text x="40" y="158" class="tiny">车辆进入 → 线圈等效电感↓ →</text>
<text x="40" y="174" class="tiny">振荡频率↑ → MCU 定时器测频/测周期</text>
<text x="40" y="202" font-size="12.5" font-weight="600">灵敏度</text>
<text x="40" y="220" class="tiny">★★★☆ 轿车/SUV 稳定;调阈值可测摩托</text>
<text x="40" y="248" font-size="12.5" font-weight="600">抗干扰</text>
<text x="40" y="266" class="tiny">★★★ 配自适应阈值 + 频偏跟踪</text>
<text x="40" y="294" font-size="12.5" font-weight="600">成本</text>
<text x="40" y="312" class="tiny">低(MCU + 三极管/比较器即可)</text>
<text x="40" y="340" font-size="12.5" font-weight="600">适用</text>
<text x="40" y="358" class="tiny">主流道闸/停车场/流量计数,市场 90%</text>
<text x="40" y="396" font-size="12.5" font-weight="600">要点</text>
<text x="40" y="414" class="tiny">周期法优于计数法:低速/停留不丢车</text>
<text x="40" y="430" class="tiny">回差阈值防抖动;基准慢速自适应抗温漂</text>
<text x="40" y="470" class="tiny" fill="#16a34a" font-weight="700">✅ 推荐主方案:成熟、稳定、成本最优</text>
<!-- 卡片2 -->
<rect x="326" y="80" width="288" height="440" rx="10" class="node neutral"/>
<text x="470" y="104" text-anchor="middle" class="label">② PLL 锁相 / 相位比较 ★★★★</text>
<text x="342" y="140" font-size="12.5" font-weight="600">原理</text>
<text x="342" y="158" class="tiny">PLL 锁定振荡信号,车辆引起</text>
<text x="342" y="174" class="tiny">相位/频率误差 → 输出误差电压</text>
<text x="342" y="202" font-size="12.5" font-weight="600">灵敏度</text>
<text x="342" y="220" class="tiny">★★★★★ 可测自行车/电动车/行人拖车</text>
<text x="342" y="248" font-size="12.5" font-weight="600">抗干扰</text>
<text x="342" y="266" class="tiny">★★★ 环路锁定本身有滤波作用</text>
<text x="342" y="294" font-size="12.5" font-weight="600">成本</text>
<text x="342" y="312" class="tiny">中(PLL IC 或 MCU 内置 PLL 外设)</text>
<text x="342" y="340" font-size="12.5" font-weight="600">适用</text>
<text x="342" y="358" class="tiny">混行车道、ETC 车道、摩托车检测</text>
<text x="342" y="396" font-size="12.5" font-weight="600">要点</text>
<text x="342" y="414" class="tiny">环路带宽要窄:抗抖但响应慢,需折中</text>
<text x="342" y="430" class="tiny">适合与 ① 组合做双通道校验</text>
<text x="342" y="470" class="tiny" fill="#0f766e" font-weight="700">✅ 高灵敏场景备选</text>
<!-- 卡片3 -->
<rect x="628" y="80" width="288" height="440" rx="10" class="node neutral"/>
<text x="772" y="104" text-anchor="middle" class="label">③ 电桥阻抗检测 ★★</text>
<text x="644" y="140" font-size="12.5" font-weight="600">原理</text>
<text x="644" y="158" class="tiny">环路与参考臂构成平衡电桥,</text>
<text x="644" y="174" class="tiny">车辆使阻抗失衡 → 输出失调电压</text>
<text x="644" y="202" font-size="12.5" font-weight="600">灵敏度</text>
<text x="644" y="220" class="tiny">★★ 中低,依赖桥臂匹配精度</text>
<text x="644" y="248" font-size="12.5" font-weight="600">抗干扰</text>
<text x="644" y="266" class="tiny">★★ 温漂/老化使零位漂移严重</text>
<text x="644" y="294" font-size="12.5" font-weight="600">成本</text>
<text x="644" y="312" class="tiny">低(纯模拟)</text>
<text x="644" y="340" font-size="12.5" font-weight="600">适用</text>
<text x="644" y="358" class="tiny">早期产品 / 教学演示</text>
<text x="644" y="396" font-size="12.5" font-weight="600">要点</text>
<text x="644" y="414" class="tiny">需定期人工调零,现场维护成本高</text>
<text x="644" y="470" class="tiny" fill="#991b1b" font-weight="700">⚠️ 不推荐量产</text>
<!-- 卡片4 -->
<rect x="930" y="80" width="288" height="440" rx="10" class="node neutral"/>
<text x="1074" y="104" text-anchor="middle" class="label">④ 多频扫频 + 自适应调谐 ★★★★</text>
<text x="946" y="140" font-size="12.5" font-weight="600">原理</text>
<text x="946" y="158" class="tiny">DDS/扫频实时搜索谐振点,</text>
<text x="946" y="174" class="tiny">自动调谐避开干扰频段(变频器/谐波)</text>
<text x="946" y="202" font-size="12.5" font-weight="600">灵敏度</text>
<text x="946" y="220" class="tiny">★★★★ 扫频带宽内全频段可调</text>
<text x="946" y="248" font-size="12.5" font-weight="600">抗干扰</text>
<text x="946" y="266" class="tiny">★★★★★ 变频器干扰场景的终极解</text>
<text x="946" y="294" font-size="12.5" font-weight="600">成本</text>
<text x="946" y="312" class="tiny">高(DDS/高精度 ADC + 算法)</text>
<text x="946" y="340" font-size="12.5" font-weight="600">适用</text>
<text x="946" y="358" class="tiny">工业区/充电桩/变频器密集场所</text>
<text x="946" y="396" font-size="12.5" font-weight="600">要点</text>
<text x="946" y="414" class="tiny">与 ① 兼容:频率计数做粗判,</text>
<text x="946" y="430" class="tiny">扫频谱特征做细判与干扰识别</text>
<text x="946" y="470" class="tiny" fill="#0f766e" font-weight="700">✅ 复杂电磁环境旗舰方案</text>
</svg>
<!-- ============ 图2:原理图 ============ -->
<svg viewBox="0 0 1240 880" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="ar2" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0,0 L10,5 L0,10 z" fill="#64748b"/>
</marker>
</defs>
<text x="20" y="34" class="title">环路车检器原理图 — LC 振荡 + 频率计数方案(推荐①)</text>
<text x="20" y="56" class="small">信号链:环形线圈 → 浪涌保护 → 匹配变压器 → 谐振/考毕兹振荡 → 比较器整形 → MCU 测频判车 → 光耦隔离 → 继电器输出</text>
<!-- ===== 总线:VCC 5V (y=240) 与 GND (y=430, y=650) ===== -->
<path d="M20,240 H1220" class="wire" stroke-dasharray="8 4"/>
<text x="26" y="233" class="tiny">VCC 5V</text>
<path d="M320,430 H1200" class="wire" stroke-dasharray="8 4"/>
<text x="326" y="423" class="tiny">GND</text>
<path d="M20,650 H1220" class="wire" stroke-dasharray="8 4"/>
<text x="26" y="643" class="tiny">GND(电源地)</text>
<path d="M700,430 V650" class="wire"/>
<!-- ===== A. 环形线圈 + 路面 ===== -->
<rect x="24" y="262" width="172" height="196" rx="8" class="node neutral"/>
<text x="110" y="252" text-anchor="middle" class="small">路面(切割槽)</text>
<rect x="58" y="300" width="104" height="118" rx="4" class="rec-o" stroke-width="3"/>
<rect x="74" y="316" width="72" height="86" rx="3" class="rec-o" stroke-width="2.4"/>
<rect x="90" y="332" width="40" height="54" rx="2" class="rec-o" stroke-width="1.8"/>
<text x="110" y="472" text-anchor="middle" class="small">环形线圈 3~5 匝</text>
<text x="110" y="488" text-anchor="middle" class="tiny">L≈50~200μH(待现场验证)</text>
<!-- 引线 -->
<path d="M162,300 H210 V310" class="wireb" marker-end="url(#ar2)"/>
<path d="M162,418 H210 V430" class="wireb" marker-end="url(#ar2)"/>
<text x="180" y="286" class="tiny">引线(双绞屏蔽 ≤20m</text>
<!-- ===== B. 端子 + 浪涌保护 ===== -->
<rect x="215" y="295" width="26" height="26" rx="3" class="node neutral"/>
<text x="228" y="313" text-anchor="middle" class="tiny">A</text>
<rect x="215" y="415" width="26" height="26" rx="3" class="node neutral"/>
<text x="228" y="433" text-anchor="middle" class="tiny">B</text>
<rect x="250" y="262" width="96" height="200" rx="6" class="zone"/>
<text x="298" y="254" text-anchor="middle" class="tiny">浪涌保护</text>
<path d="M241,308 H330" class="wire"/>
<path d="M241,428 H330" class="wire"/>
<!-- 双向TVS -->
<path d="M288,308 V344" class="wire"/>
<path d="M288,392 V428" class="wire"/>
<path d="M288,344 L282,356 H294 Z" class="comp"/>
<path d="M288,392 L294,380 H282 Z" class="comp"/>
<path d="M288,356 V380" class="wire"/>
<text x="300" y="386" class="tiny">TVS1</text>
<!-- 压敏 -->
<path d="M318,308 V350" class="wire"/>
<path d="M318,386 V428" class="wire"/>
<rect x="312" y="350" width="12" height="36" class="comp"/>
<text x="336" y="370" class="tiny">RV1</text>
<!-- ===== C. 匹配变压器 T1 ===== -->
<rect x="340" y="262" width="140" height="200" rx="6" class="zone"/>
<text x="410" y="254" text-anchor="middle" class="tiny">T1 匹配变压器 1:1~1:2</text>
<!-- 初级 -->
<path d="M370,310 V328" class="wire"/>
<path d="M370,328 a7,7 0 0 1 0,14 a7,7 0 0 0 0,14 a7,7 0 0 1 0,14 a7,7 0 0 0 0,14 a7,7 0 0 1 0,14" class="comp"/>
<path d="M370,398 V420" class="wire"/>
<path d="M330,310 H370" class="wire" marker-end="url(#ar2)"/>
<path d="M330,430 H370" class="wire"/>
<circle cx="370" cy="310" r="2.4" class="compf"/>
<!-- 磁芯 -->
<path d="M392,300 V430" class="wireb"/>
<path d="M400,300 V430" class="wireb"/>
<!-- 次级 -->
<path d="M424,320 V336" class="wire"/>
<path d="M424,336 a7,7 0 0 0 0,14 a7,7 0 0 1 0,14 a7,7 0 0 0 0,14 a7,7 0 0 1 0,14 a7,7 0 0 0 0,14" class="comp"/>
<path d="M424,406 V420" class="wire"/>
<circle cx="424" cy="320" r="2.4" class="compf"/>
<!-- C1 谐振电容 与次级并联 -->
<path d="M424,320 H452 V330" class="wire"/>
<path d="M424,420 H452 V410" class="wire"/>
<path d="M446,330 H458" class="comp"/>
<path d="M446,410 H458" class="comp"/>
<path d="M452,330 V410" class="wire"/>
<text x="478" y="368" class="tiny">C1 谐振电容</text>
<text x="478" y="382" class="tiny">100~470pF</text>
<!-- 谐振上端 → 基极耦合 -->
<path d="M424,320 H480 V336" class="wireb" marker-end="url(#ar2)"/>
<text x="446" y="306" class="tiny">Cc1 10pF</text>
<path d="M452,300 H464" class="comp"/>
<path d="M452,312 H464" class="comp"/>
<path d="M458,300 V312" class="wire"/>
<!-- 次级下端 → 地 -->
<path d="M424,420 V430" class="wire"/>
<!-- ===== D. 考毕兹振荡器 ===== -->
<rect x="462" y="248" width="180" height="196" rx="6" class="zone"/>
<text x="552" y="240" text-anchor="middle" class="tiny">考毕兹振荡器(基极调谐)</text>
<!-- Rb1: VCC→基极 -->
<path d="M480,240 V252" class="wire"/>
<rect x="474" y="252" width="12" height="34" class="comp"/>
<path d="M480,286 V300" class="wire"/>
<text x="440" y="272" class="tiny">Rb1 100k</text>
<!-- Rb2: 基极→地 -->
<path d="M500,352 V356" class="wire"/>
<rect x="494" y="356" width="12" height="34" class="comp"/>
<path d="M500,390 V430" class="wire"/>
<text x="520" y="376" class="tiny">Rb2 47k</text>
<!-- C3: 基极→地 -->
<path d="M506,340 V352" class="wire"/>
<path d="M500,352 H512" class="wire"/>
<path d="M501,352 V364" class="wire"/>
<path d="M506,352 V364" class="wire"/>
<path d="M501,364 H506" class="comp"/>
<path d="M501,392 H506" class="comp"/>
<path d="M506,364 V392" class="wire"/>
<path d="M506,392 V430" class="wire"/>
<text x="522" y="416" class="tiny">C3 100p</text>
<!-- Q1 NPN -->
<path d="M480,300 H500 V340" class="wire"/>
<circle cx="500" cy="342" r="2.4" class="compf"/>
<path d="M500,342 L516,314 V290" class="wire"/>
<path d="M500,342 L514,370 V390" class="wire"/>
<path d="M504,360 L514,354" class="comp"/>
<path d="M508,364 L518,358" class="comp"/>
<text x="540" y="336" class="tiny">Q1</text>
<text x="540" y="350" class="tiny">S9018</text>
<!-- Rc: VCC→集电极 -->
<path d="M516,240 V256" class="wire"/>
<rect x="510" y="256" width="12" height="30" class="comp"/>
<path d="M516,286 V290" class="wire"/>
<text x="540" y="272" class="tiny">Rc 2.2k</text>
<!-- Lx: 集电极→基极(谐振电感) -->
<path d="M516,290 H526 V270" class="wire"/>
<path d="M526,270 V280" class="wire"/>
<path d="M526,280 a6,6 0 0 0 0,12 a6,6 0 0 1 0,12 a6,6 0 0 0 0,12" class="comp"/>
<path d="M526,316 V322" class="wire"/>
<path d="M526,322 H500 V336" class="wire"/>
<text x="540" y="306" class="tiny">Lx 谐振</text>
<!-- C2: 集电极→地 -->
<path d="M526,270 H540 V300" class="wire"/>
<path d="M540,300 V308" class="wire"/>
<path d="M534,308 H546" class="comp"/>
<path d="M534,356 H546" class="comp"/>
<path d="M540,308 V356" class="wire"/>
<path d="M540,356 V430" class="wire"/>
<text x="560" y="336" class="tiny">C2 100p</text>
<!-- 输出耦合 Cc2 -->
<path d="M516,290 H600" class="wireb" marker-end="url(#ar2)"/>
<path d="M548,284 H560" class="comp"/>
<path d="M548,296 H560" class="comp"/>
<path d="M554,284 V296" class="wire"/>
<text x="556" y="276" class="tiny">Cc2</text>
<!-- ===== E. 比较器整形 ===== -->
<rect x="616" y="248" width="140" height="200" rx="6" class="zone"/>
<text x="686" y="240" text-anchor="middle" class="tiny">U1 比较器(带回差)</text>
<path d="M600,290 H640" class="wireb" marker-end="url(#ar2)"/>
<path d="M640,290 V310" class="wire"/>
<path d="M686,300 L706,330 L686,360 Z" class="comp"/>
<path d="M706,330 H750" class="wireb" marker-end="url(#ar2)"/>
<text x="712" y="322" class="tiny">+</text>
<text x="712" y="352" class="tiny"></text>
<!-- Vref 分压 -->
<path d="M640,350 H668" class="wire"/>
<path d="M668,240 V268" class="wire"/>
<rect x="662" y="268" width="12" height="30" class="comp"/>
<path d="M668,298 V320" class="wire"/>
<path d="M668,350 H686" class="wire"/>
<path d="M668,350 V380" class="wire"/>
<rect x="662" y="380" width="12" height="26" class="comp"/>
<path d="M668,406 V430" class="wire"/>
<text x="610" y="392" class="tiny">Vref 分压</text>
<text x="610" y="406" class="tiny">(R3/R4)</text>
<!-- 频率标注 -->
<text x="640" y="452" class="tiny">方波输出 f≈f₀</text>
<!-- ===== F. MCU ===== -->
<rect x="800" y="240" width="200" height="220" rx="10" class="process node"/>
<text x="900" y="262" text-anchor="middle" class="label">MCU</text>
<text x="900" y="278" text-anchor="middle" class="tiny">STM32/GD32F103</text>
<text x="816" y="302" class="tiny">· 定时器输入捕获测周期</text>
<text x="816" y="322" class="tiny">· f = Fclk / period → Δf</text>
<text x="816" y="342" class="tiny">· 数字滤波 + 消抖</text>
<text x="816" y="362" class="tiny">· 灵敏度阈值(多档)判断</text>
<text x="816" y="382" class="tiny">· 存在/通过 状态机</text>
<text x="816" y="402" class="tiny">· 基准频率慢速自适应(抗温漂)</text>
<text x="816" y="422" class="tiny">· 继电器输出 + 自检/看门狗</text>
<path d="M750,310 H800" class="wireb" marker-end="url(#ar2)"/>
<text x="756" y="300" class="tiny">PA0 捕获</text>
<path d="M1000,330 H1030" class="wireb" marker-end="url(#ar2)"/>
<text x="1004" y="320" class="tiny">PA1</text>
<!-- 状态LED -->
<path d="M900,460 V476" class="wire"/>
<path d="M900,476 L894,488 H906 Z" class="comp"/>
<path d="M900,488 V494" class="wire"/>
<path d="M894,494 H906" class="comp"/>
<path d="M900,494 V506" class="wire"/>
<path d="M894,506 H906" class="comp"/>
<path d="M900,506 V520" class="wire"/>
<path d="M900,520 V650" class="wire"/>
<text x="918" y="492" class="tiny">D2 状态LED</text>
<text x="918" y="506" class="tiny">R6 限流</text>
<!-- VDD -->
<path d="M860,240 V230" class="wire"/>
<text x="846" y="224" class="tiny">VDD 3.3V</text>
<!-- ===== G. 光耦 + MOS + 继电器 ===== -->
<rect x="1030" y="290" width="70" height="90" rx="4" class="node neutral"/>
<text x="1065" y="282" text-anchor="middle" class="tiny">U2 光耦</text>
<!-- 光耦内 LED -->
<path d="M1042,320 L1042,330 L1052,330 L1052,320 Z" class="comp"/>
<path d="M1052,320 V326" class="wire"/>
<!-- 光耦内 光敏管 -->
<circle cx="1062" cy="352" r="2" class="compf"/>
<path d="M1062,352 L1072,344 V352" class="wire"/>
<path d="M1062,352 L1072,360 V352" class="wire"/>
<path d="M1052,326 H1046 V352 H1060" class="wire"/>
<path d="M1066,340 L1072,336" class="comp"/>
<path d="M1066,344 L1072,340" class="comp"/>
<!-- R5 限流 -->
<path d="M1030,330 H1016" class="wire"/>
<rect x="1004" y="324" width="12" height="12" class="comp"/>
<text x="996" y="312" class="tiny">R5</text>
<!-- Q2 MOS -->
<path d="M1065,360 V375" class="wire"/>
<path d="M1065,375 H1090" class="wire"/>
<rect x="1080" y="368" width="22" height="14" rx="2" class="comp"/>
<path d="M1102,375 H1108" class="wire"/>
<path d="M1080,368 V375" class="wire"/>
<path d="M1080,382 V375" class="wire"/>
<path d="M1080,368 H1074" class="wire"/>
<path d="M1080,382 H1074" class="wire"/>
<text x="1108" y="380" class="tiny">Q2</text>
<text x="1108" y="394" class="tiny">N-MOS</text>
<!-- Q2 drain 上 / source 下 -->
<path d="M1080,368 V430" class="wire"/>
<text x="1090" y="362" class="tiny">D</text>
<text x="1090" y="388" class="tiny">S</text>
<!-- 继电器 -->
<rect x="1120" y="250" width="60" height="46" rx="4" class="node neutral"/>
<path d="M1130,258 L1170,288" class="wire"/>
<text x="1150" y="282" text-anchor="middle" class="tiny">K1</text>
<path d="M1108,375 H1120 V273" class="wire"/>
<path d="M1180,273 H1200" class="wire"/>
<!-- 触点 -->
<path d="M1200,273 V300" class="wire"/>
<path d="M1200,300 H1216" class="wireb"/>
<circle cx="1200" cy="300" r="2" class="compf"/>
<path d="M1216,258 H1220" class="wire"/>
<path d="M1216,342 H1220" class="wire"/>
<circle cx="1216" cy="258" r="2" class="compf"/>
<circle cx="1216" cy="342" r="2" class="compf"/>
<text x="1222" y="254" class="tiny">NO</text>
<text x="1222" y="346" class="tiny">NC</text>
<text x="1222" y="304" class="tiny">COM</text>
<text x="1124" y="318" class="tiny">→ 道闸/PLC</text>
<!-- K1 线圈电源 -->
<path d="M1120,240 V250" class="wire"/>
<text x="1080" y="238" class="tiny">K1 线圈接 VCC(或外供)</text>
<!-- ===== H. 电源 ===== -->
<rect x="20" y="560" width="1200" height="120" rx="8" class="zone"/>
<text x="30" y="580" class="tiny">电源与保护</text>
<rect x="40" y="596" width="86" height="30" rx="4" class="node neutral"/>
<text x="83" y="615" text-anchor="middle" class="tiny">VIN 12~24V</text>
<path d="M126,611 H140" class="wire"/>
<path d="M140,605 L148,611 L140,617 Z" class="comp"/>
<path d="M148,611 H158" class="wire"/>
<path d="M158,596 V626" class="wire"/>
<path d="M158,596 L164,584 H176 L170,596 Z" class="comp"/>
<path d="M158,626 L170,596 H176 L164,584 Z" class="comp"/>
<text x="190" y="604" class="tiny">D1 防反接</text>
<text x="190" y="618" class="tiny">TVS2 吸收浪涌</text>
<path d="M158,611 H200" class="wire"/>
<rect x="200" y="596" width="70" height="30" rx="4" class="node neutral"/>
<text x="235" y="615" text-anchor="middle" class="tiny">U3 LDO 5V</text>
<path d="M270,611 H300" class="wire"/>
<rect x="300" y="596" width="80" height="30" rx="4" class="node neutral"/>
<text x="340" y="615" text-anchor="middle" class="tiny">U4 LDO 3.3V</text>
<path d="M340,596 V540" class="wire"/>
<path d="M340,540 H860 V230" class="wire"/>
<path d="M340,626 V650" class="wire"/>
<!-- 滤波电容 -->
<path d="M160,650 H120" class="wire"/>
<path d="M120,640 H126" class="comp"/>
<path d="M120,650 H126" class="comp"/>
<path d="M123,640 V650" class="wire"/>
<text x="96" y="668" class="tiny">Cin</text>
<path d="M340,650 H300" class="wire"/>
<path d="M300,640 H306" class="comp"/>
<path d="M300,650 H306" class="comp"/>
<path d="M303,640 V650" class="wire"/>
<text x="276" y="668" class="tiny">C5</text>
<path d="M400,650 H380" class="wire"/>
<path d="M380,640 H386" class="comp"/>
<path d="M380,650 H386" class="comp"/>
<path d="M383,640 V650" class="wire"/>
<text x="392" y="668" class="tiny">C6</text>
<!-- ===== 图例 ===== -->
<rect x="20" y="700" width="1200" height="160" rx="8" class="neutral node"/>
<text x="36" y="722" class="label">元件图例</text>
<text x="36" y="746" class="tiny">L 电感(线圈符号)</text>
<path d="M56,756 a6,6 0 0 1 0,12 a6,6 0 0 0 0,12 a6,6 0 0 1 0,12" class="comp"/>
<text x="140" y="746" class="tiny">C 电容</text>
<path d="M160,756 H172" class="comp"/><path d="M160,768 H172" class="comp"/><path d="M166,756 V768" class="wire"/>
<text x="244" y="746" class="tiny">R 电阻</text>
<rect x="264" y="752" width="12" height="16" class="comp"/>
<text x="340" y="746" class="tiny">TVS 双向</text>
<path d="M360,756 L354,768 H366 Z" class="comp"/>
<path d="M360,768 L366,756 H354 Z" class="comp"/>
<text x="440" y="746" class="tiny">NPN 三极管</text>
<path d="M456,764 H470" class="wire"/><circle cx="470" cy="764" r="2" class="compf"/>
<path d="M470,764 L482,748 V764" class="wire"/>
<path d="M470,764 L480,776 V784" class="wire"/>
<path d="M474,774 L484,768" class="comp"/>
<text x="560" y="746" class="tiny">MOS</text>
<rect x="580" y="756" width="20" height="12" rx="2" class="comp"/>
<text x="660" y="746" class="tiny">继电器</text>
<rect x="680" y="754" width="16" height="12" class="comp"/>
<path d="M684,756 L692,764" class="wire"/>
<text x="36" y="806" class="tiny">关键设计点:① 环路经匹配变压器隔离耦合,直连会受地环路干扰;② 谐振电容 C1 决定频段,频率 f₀≈1/(2π√(LC));③ 灵敏度=Δf 阈值,建议多档可调 + 回差;④ 基准频率上电自学习 + 慢速跟踪,抗温漂;⑤ 输出必须光耦隔离,防浪涌反灌烧 MCU;⑥ 软件加看门狗,继电器粘连检测。</text>
<text x="36" y="830" class="tiny">⚠️ 数值为典型参考:线圈电感取决于尺寸/匝数/引线长度,谐振频率推荐 20~150kHz(越低抗干扰越差、灵敏度越高,需现场折中)。</text>
</svg>
</main>