ESP32 电池切换控制
Table
| Hazard / failure | Effect | Required mitigation / verification |
|---|---|---|
| Two relays closed together | Battery-to-battery uncontrolled equalization current, fire | Hardware default-off; OE/KILL gating; one-hot firmware; break-before-make; contact feedback; test fault injection |
| ESP32 reset/brownout while shifting | Spurious relay pulse | 74HC595 OE held disabled and clear asserted by hardware until valid latched one-hot word; input defaults; KILL independent of firmware |
| Relay welded closed | Next selection parallels batteries | Per-relay contact feedback or common fault plus pre-switch voltage/current checks; refuse next close; service relay |
| Wrong relay DC rating | Contact welding/arcing | Verify ≥20A at ≥12VDC from manufacturer datasheet, not AC rating only |
| Undersized terminal/trace | Overheating/fire | ≥20A DC terminal; no 16A DB128V; thermal verification in PCB stage |
| Missing/remote fuse | Cable/fire hazard | External 20A replaceable fuse at each battery positive terminal |
| BAT_BUS dead-time resets controller | Loss of control / unsafe restart | OR-ing control supply from battery inputs; calculate and test hold-up |
| 12V applied to ESP32 | Module destruction/fire | Feed only regulated 3.3–6V to B+/B- per module page; labeled connector/net |
| ADC overvoltage/transient | Damaged ADC/MCU, wrong selection | 1% divider, series resistance, RC, 3.3V clamps; validate 20V full scale and surge |
| Current sensor saturation/polarity error | Wrong energy/control decision | ≥±20A, target ±30A; bidirectional calibration and polarity test |
| WiFi malfunction/remote command | Unsafe switching | Local invariant and KILL cannot be overridden by web request; authentication/network risk review |
| Lithium battery/BMS fault | Fire or overcharge | Each pack requires appropriate BMS; controller is not a charger; solar controller remains responsible for chemistry charging profile |
Regulatory / risk posture