初始导入:PhoneRail 五路手机直供电源板

原理图/PCB 已在 EasyEDA 里做到 12 页跨页 0 漏接,固件刚完成骨架包 A1。
这次是把已有的一切一次性纳入版本控制,没有改动任何设计内容。

纳入:
- 设计与需求文档、PROGRESS.md、小米8 参考原理图 PDF 与追脚脚本
- .claude/ 下的 EasyEDA 桥接工具链与几何/网表缓存(eda-parts.json、
  pcb-parts.json、pcb-pads.json、p2-ch1.json 等,是重画各页的唯一事实来源)
- 117 张验证截图(本项目所有方向问题都是靠人眼看截图发现的,属于证据不是垃圾)
- firmware/ 的 A1 骨架与 site/ 文档站源码

.gitignore 排除:构建产物(firmware/build、host/build、sdkconfig)、
site/node_modules、__pycache__、桥接日志 _bridge.log、脚本自标的 *.stale。

.gitattributes 默认 `* -text`:现有 .py/.json 大多是 CRLF,原样存,
不让 git 重写行尾。唯一例外是 *.sh 强制 LF —— 带 \r 的 shell 脚本 bash 跑不了。

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QYuExfgyYa6DzRRcUso8M8
这个提交包含在:
zhou yang
2026-09-06 18:18:14 +08:00
共同撰写人 Claude Opus 5
当前提交 2bfe308b30
共修改 526 个文件,包含 80633 行新增和 0 行删除
+52
查看文件
@@ -0,0 +1,52 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 466" role="img"
aria-label="分层与职责边界:上位机做崩溃判定,ESP32 只做遥测执行记录,保护在硬实时层">
<defs>
<marker id="lg-arw" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0 0 L10 5 L0 10 z" class="dg-head"/>
</marker>
</defs>
<!-- 上位机 -->
<rect x="150" y="10" width="600" height="58" rx="8" class="dg-panel"/>
<text x="450" y="34" class="dg-th dg-c">农场管理系统(既有,本项目不交付 —— N7)</text>
<text x="450" y="55" class="dg-s dg-c">adb 探活 · 业务调度 · 崩溃判定</text>
<!-- 业务面 -->
<line x1="270" y1="68" x2="270" y2="150" class="dg-wire" marker-end="url(#lg-arw)"/>
<text x="262" y="103" class="dg-s dg-r">adb over WiFi</text>
<text x="262" y="119" class="dg-s dg-r">业务面</text>
<!-- 控制面 -->
<line x1="630" y1="68" x2="630" y2="150" class="dg-wire" marker-end="url(#lg-arw)"/>
<text x="642" y="97" class="dg-s">控制面(SW-12)</text>
<text x="642" y="113" class="dg-s">WiFi 常态</text>
<text x="642" y="129" class="dg-s">USB CDC 兜底</text>
<!-- 手机 -->
<rect x="120" y="150" width="300" height="66" rx="8" class="dg-box"/>
<text x="270" y="181" class="dg-t dg-c">5 台小米8 主板</text>
<text x="270" y="200" class="dg-s dg-c">业务负载</text>
<!-- 控制器 -->
<rect x="480" y="150" width="300" height="66" rx="8" class="dg-box dg-key"/>
<text x="630" y="181" class="dg-t dg-c">PhoneRail 控制器 · ESP32-S3</text>
<text x="630" y="200" class="dg-s dg-c">遥测 · 执行 · 记录</text>
<!-- 控制器 → 手机 -->
<line x1="480" y1="183" x2="420" y2="183" class="dg-wire" marker-end="url(#lg-arw)"/>
<text x="450" y="240" class="dg-s dg-c">供电 · 侧键 · EDL · VBUS</text>
<!-- 控制器 → 硬实时层 -->
<line x1="630" y1="216" x2="630" y2="292" class="dg-wire" marker-end="url(#lg-arw)"/>
<text x="642" y="258" class="dg-s">只能建议,不能否决</text>
<!-- 硬实时层 -->
<rect x="120" y="292" width="660" height="96" rx="8" class="dg-panel dg-hard"/>
<text x="450" y="318" class="dg-th dg-c">硬实时层 —— 不含任何软件</text>
<text x="450" y="341" class="dg-t dg-c">eFuse 独立 OVP / 限流(SR-3) · 放电 MOS 与 EN 反相联锁(SR-7)</text>
<text x="450" y="362" class="dg-t dg-c">EFUSE_EN / VBUS_EN / 栅极的上下拉电阻(SR-6)</text>
<text x="450" y="381" class="dg-s dg-c">凡是「必须及时」的事都已经在这一层里,固件跑不到也烧不了手机</text>
<text x="450" y="424" class="dg-s dg-c">因此固件是「遥测 + 执行器 + 记录仪」,不是保护装置</text>
<text x="450" y="446" class="dg-s dg-c">看门狗复位是可接受的失效(复位即全关);上位机失联则什么都不做(§10.2)</text>
</svg>

之后

宽度:  |  高度:  |  大小: 2.9 KiB

+43
查看文件
@@ -0,0 +1,43 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 760 404" role="img"
aria-label="双链路架构:WiFi 与 USB CDC 两个传输适配器汇到单一命令处理器">
<defs>
<marker id="kg-arw" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0 0 L10 5 L0 10 z" class="dg-head"/>
</marker>
</defs>
<rect x="60" y="10" width="270" height="46" rx="8" class="dg-box"/>
<text x="195" y="30" class="dg-t dg-c">WiFi(MQTT / HTTP)</text>
<text x="195" y="47" class="dg-s dg-c">常态链路</text>
<rect x="430" y="10" width="270" height="46" rx="8" class="dg-box"/>
<text x="565" y="30" class="dg-t dg-c">USB CDC(调试口 J22)</text>
<text x="565" y="47" class="dg-s dg-c">兜底链路,与日志同一条流</text>
<line x1="195" y1="56" x2="195" y2="92" class="dg-wire" marker-end="url(#kg-arw)"/>
<line x1="565" y1="56" x2="565" y2="92" class="dg-wire" marker-end="url(#kg-arw)"/>
<rect x="60" y="92" width="270" height="46" rx="8" class="dg-box"/>
<text x="195" y="112" class="dg-t dg-c">传输适配器 A</text>
<text x="195" y="129" class="dg-s dg-c">只管收发字节与分帧</text>
<rect x="430" y="92" width="270" height="46" rx="8" class="dg-box"/>
<text x="565" y="112" class="dg-t dg-c">传输适配器 B</text>
<text x="565" y="129" class="dg-s dg-c">只管收发字节与分帧</text>
<path d="M195 138 V168 H565 V138" class="dg-wire" fill="none"/>
<line x1="380" y1="168" x2="380" y2="196" class="dg-wire" marker-end="url(#kg-arw)"/>
<rect x="150" y="196" width="460" height="84" rx="8" class="dg-box dg-key"/>
<text x="380" y="222" class="dg-t dg-c">单一命令处理器</text>
<text x="380" y="244" class="dg-s dg-c">鉴权 · 限幅与越界拒绝(SR-13) · 全局序号判重</text>
<text x="380" y="264" class="dg-s dg-c">安全约束只写在这里,绝不写进适配器</text>
<line x1="380" y1="280" x2="380" y2="312" class="dg-wire" marker-end="url(#kg-arw)"/>
<rect x="150" y="312" width="460" height="46" rx="8" class="dg-box"/>
<text x="380" y="332" class="dg-t dg-c">执行器状态机 / 遥测</text>
<text x="380" y="349" class="dg-s dg-c">§10.6 · §10.3</text>
<text x="380" y="386" class="dg-s dg-c">两条链路同时在线,不做主备切换 —— 谁先送到算谁的,靠序号去重</text>
</svg>

之后

宽度:  |  高度:  |  大小: 2.4 KiB

+117
查看文件
@@ -0,0 +1,117 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 622" role="img"
aria-label="PhoneRail 系统组成:12V 适配器进下板五路功率级,经 2×20 排针接载板与五块小米8 主板">
<defs>
<marker id="dg-arw" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
<path d="M0 0 L10 5 L0 10 z" class="dg-head"/>
</marker>
</defs>
<!-- ── 适配器 ── -->
<rect x="380" y="10" width="200" height="36" rx="18" class="dg-box"/>
<text x="480" y="33" class="dg-t dg-c">DC 12 V / 10 A 适配器</text>
<line x1="480" y1="46" x2="480" y2="70" class="dg-wire" marker-end="url(#dg-arw)"/>
<!-- ── 下板 ── -->
<rect x="40" y="72" width="880" height="230" rx="10" class="dg-panel"/>
<text x="56" y="95" class="dg-th">下板(电源板 + 控制大脑) 160 × 125 mm</text>
<!-- 功率链 -->
<rect x="56" y="106" width="156" height="46" rx="5" class="dg-box"/>
<text x="134" y="125" class="dg-t dg-c">输入保护</text>
<text x="134" y="141" class="dg-s dg-c">F1 · TVS · 反接 P-MOS</text>
<rect x="229" y="106" width="156" height="46" rx="5" class="dg-box"/>
<text x="307" y="125" class="dg-t dg-c">五路独立 Buck</text>
<text x="307" y="141" class="dg-s dg-c">480 kHz · 4 A / 路</text>
<rect x="402" y="106" width="156" height="46" rx="5" class="dg-box dg-hot"/>
<text x="480" y="125" class="dg-t dg-c">eFuse ×5</text>
<text x="480" y="141" class="dg-s dg-c">OVP 4.36 V · 限流 4.45 A</text>
<rect x="575" y="106" width="156" height="46" rx="5" class="dg-box"/>
<text x="653" y="125" class="dg-t dg-c">分流 5 mΩ + INA226</text>
<text x="653" y="141" class="dg-s dg-c">每路 V + I</text>
<rect x="748" y="106" width="156" height="46" rx="5" class="dg-box"/>
<text x="826" y="125" class="dg-t dg-c">输出 ×5</text>
<text x="826" y="141" class="dg-s dg-c">P+ / P− 到排针</text>
<line x1="212" y1="129" x2="229" y2="129" class="dg-wire" marker-end="url(#dg-arw)"/>
<line x1="385" y1="129" x2="402" y2="129" class="dg-wire" marker-end="url(#dg-arw)"/>
<line x1="558" y1="129" x2="575" y2="129" class="dg-wire" marker-end="url(#dg-arw)"/>
<line x1="731" y1="129" x2="748" y2="129" class="dg-wire" marker-end="url(#dg-arw)"/>
<!-- 控制 -->
<rect x="56" y="166" width="156" height="48" rx="5" class="dg-box dg-key"/>
<text x="134" y="186" class="dg-t dg-c">ESP32-S3-WROOM-1</text>
<text x="134" y="202" class="dg-s dg-c">19 根信号</text>
<rect x="229" y="166" width="156" height="48" rx="5" class="dg-box"/>
<text x="307" y="186" class="dg-t dg-c">DAC63204 ×2</text>
<text x="307" y="202" class="dg-s dg-c">0x4A / 0x4B</text>
<rect x="402" y="166" width="156" height="48" rx="5" class="dg-box"/>
<text x="480" y="186" class="dg-t dg-c">74HC595 ×3</text>
<text x="480" y="202" class="dg-s dg-c">24 位移位链</text>
<rect x="575" y="166" width="156" height="48" rx="5" class="dg-box"/>
<text x="653" y="186" class="dg-t dg-c">PCA9555</text>
<text x="653" y="202" class="dg-s dg-c">0x20 · FLT / PG</text>
<rect x="748" y="166" width="156" height="48" rx="5" class="dg-box"/>
<text x="826" y="186" class="dg-t dg-c">INA226 #6</text>
<text x="826" y="202" class="dg-s dg-c">输入侧 0x43</text>
<!-- I²C 干线 -->
<line x1="56" y1="228" x2="904" y2="228" class="dg-bus"/>
<line x1="134" y1="214" x2="134" y2="228" class="dg-bus"/>
<line x1="307" y1="214" x2="307" y2="228" class="dg-bus"/>
<line x1="653" y1="214" x2="653" y2="228" class="dg-bus"/>
<line x1="826" y1="214" x2="826" y2="228" class="dg-bus"/>
<line x1="653" y1="152" x2="653" y2="228" class="dg-bus"/>
<text x="480" y="243" class="dg-s dg-c">I²C 单条总线 400 kHz —— 10 个器件(含载板 LM75BD)</text>
<rect x="56" y="252" width="848" height="40" rx="5" class="dg-box"/>
<text x="480" y="277" class="dg-t dg-c">侧键驱动管 ×15 · 风扇驱动(低边 PWM + 续流管) · 辅助 12 V→3.3 V / 5 V</text>
<!-- ── 板间 ── -->
<g class="dg-pins">
<path d="M180 302 h120 M180 306 h120 M180 310 h120"/>
<path d="M660 302 h120 M660 306 h120 M660 310 h120"/>
<path d="M180 362 h120 M180 366 h120 M180 370 h120"/>
<path d="M660 362 h120 M660 366 h120 M660 370 h120"/>
</g>
<line x1="240" y1="312" x2="240" y2="360" class="dg-wire dg-dash"/>
<line x1="720" y1="312" x2="720" y2="360" class="dg-wire dg-dash"/>
<text x="480" y="330" class="dg-t dg-c">2×20 排针 ×2(共 80 针)—— 只走电源与低速控制</text>
<text x="480" y="349" class="dg-s dg-c">一根高速差分都不穿连接器 · 13 mm 缝=装配空间 + 侧面进风的天然风道</text>
<!-- ── 上板 ── -->
<rect x="40" y="374" width="880" height="234" rx="10" class="dg-panel"/>
<text x="56" y="397" class="dg-th">上板(载板) 220 × 135 mm</text>
<rect x="56" y="408" width="156" height="52" rx="5" class="dg-box"/>
<text x="134" y="439" class="dg-t dg-c">小米8 主板 ①</text>
<rect x="229" y="408" width="156" height="52" rx="5" class="dg-box"/>
<text x="307" y="439" class="dg-t dg-c">小米8 主板 ②</text>
<rect x="402" y="408" width="156" height="52" rx="5" class="dg-box"/>
<text x="480" y="439" class="dg-t dg-c">小米8 主板 ③</text>
<rect x="575" y="408" width="156" height="52" rx="5" class="dg-box"/>
<text x="653" y="439" class="dg-t dg-c">小米8 主板 ④</text>
<rect x="748" y="408" width="156" height="52" rx="5" class="dg-box"/>
<text x="826" y="439" class="dg-t dg-c">小米8 主板 ⑤</text>
<rect x="56" y="474" width="414" height="44" rx="5" class="dg-box"/>
<text x="263" y="493" class="dg-t dg-c">USB2517I 7 口 Hub · 上游 USB-C(UFP)</text>
<text x="263" y="509" class="dg-s dg-c">VBUS 负载开关 ×5,默认断开</text>
<rect x="490" y="474" width="414" height="44" rx="5" class="dg-box"/>
<text x="697" y="493" class="dg-t dg-c">侧键顶针 ×15 · EDL 模拟开关 ×5</text>
<text x="697" y="509" class="dg-s dg-c">EDL_EN 的下拉在载板侧,不在下板</text>
<rect x="56" y="532" width="848" height="44" rx="5" class="dg-box dg-hot"/>
<text x="480" y="551" class="dg-t dg-c">5 × (P+ / P− 焊盘 + 2200 µF 铝电解 + MLCC 组)</text>
<text x="480" y="567" class="dg-s dg-c">电容组必须在排线端;每路独立回流地</text>
<text x="480" y="595" class="dg-s dg-c">定位孔 NPTH Φ2.5 + 尼龙立柱 —— 五台手机的地绝不在载板上并成一根(SR-12)</text>
</svg>

之后

宽度:  |  高度:  |  大小: 6.4 KiB