12V LiFePO4 UPS for Home Assistant and network gear. First full outage validation (May 6, 2026): 217 min AC-off, 4.18 Ah / 53.3 Wh delivered, graceful shutdown via slope-based cliff_imminent trigger — confirmed end-to-end. Includes design docs and outage reports.
Loading README and project media…
12V LiFePO4-Based Uninterruptible Power Supply
A 12V LiFePO4-based uninterruptible power supply for keeping a Home Assistant Green and Xfinity XB7 cable modem running during grid outages. Built into an IP65 enclosure with Home Assistant monitoring via ESPHome INA260 current sensor.
Honest context: A $85 APC BE600M1 provides comparable backup capability. This build costs roughly the same over 10 years as that option (based on battery replacements and electricity usage). The engineering rationale — longer battery life, faster switchover, direct HA integration, no DC-DC converter voltage regulation — is documented in design-rationale.md. Build this if those tradeoffs matter to you.
[!CAUTION] This project involves lithium batteries and AC mains voltage. Improper handling can cause fire, electric shock, or equipment damage.
Disclaimer: Information provided for educational purposes only. Build at your own risk.
Validated Runtime: ~3.6 hours to hardware LVD (11.8V) under a sustained 14.9W load.
Monitoring upgrade note: The Shelly Plus Uni has been replaced by an ESPHome XIAO ESP32-C3 + Adafruit INA260 current sensor. All capacity figures below are now coulomb-counted by INA260 rather than inferred from voltage profiles. The May 2026 figures supersede the March 2026 D3 estimates.
The UPS delivers a reliable ~3.6 hours of runtime at typical HA Green + XB7 loads. This is ~42% of the theoretical maximum runtime at full charge (10 Ah / 1.18A = 8.47h).
This result is not due to battery degradation, measurement error, or software issues. It is a direct consequence of the single-rail 13.3V CV architecture.
The system uses a single shared rail for both charging and load. To keep the voltage safe for the connected equipment, charging is capped at 13.3V. This holds the battery at approximately 65% SOC, preventing proper absorption charging at 14.4V. As a result, approximately 3.5 Ah (~35%) of the battery's rated 10 Ah capacity is never accessible.
| Capacity zone | Ah | Reason |
|---|---|---|
| Float ceiling — never loaded | ~3.5 Ah | 13.3V float ≈ 65% SOC; requires 14.4V charger to recover |
| Rate/LVD penalty | ~1.3 Ah | IR drop at 1.18A strands charge above LVD threshold |
| Delivered (INA260 measured) | 4.18 Ah | Coulomb-counted, May 6 2026 |
| Protected at LVD cutoff | ~0.8 Ah | Intentional; prevents over-discharge |
| Below LVD to rated-empty | ~0.8 Ah | Intentional; cell protection |
The system performs exactly as designed. The layered protection (voltage warnings → automated shutdown → BP-65 hardware LVD) is robust and all three tiers are now fully live-validated.
Current validated specification: ~3.6h runtime at 14.9W average under the existing single-rail topology, based on INA260 coulomb counting (May 6 2026).
A two-stage charging architecture (dedicated 14.4V charger + DC-DC regulator) would be required to approach the full ~7.1–8.5 hour theoretical runtime.
Reports and data can be found in docs/. Last validated: May 2026 (INA260 coulomb counting)

The chart records a full two-cycle discharge test performed March 25–26, 2026 using a Netgear R6400 router (~7W DC) as a substitute load, with battery voltage logged via the Shelly Plus Uni at 5-second intervals.
Discharge 1 (7.76h): Voltage held the characteristic LiFePO4 flat plateau from 13.2V to 13.0V over 7.76 hours — a drop of only 0.2V at light load, confirming textbook cell behavior. Recharge (10.1h): AC restored; PSU returned the battery to float within minutes, peaking at 13.28V and holding stable through a 10-hour recharge window. Discharge 2 (9.36h): A second full discharge ran the battery to LVD cutoff. The Victron BP-65 tripped at 11.77V — within 0.03V of the 11.8V design target — confirming protection circuit accuracy. Post-LVD OCV rebound to 12.13V confirms healthy cell chemistry with no permanent capacity loss from the deep discharge.
Key findings:
AC grid powers a Mean Well HDR-60-12 PSU set to 13.3V float, which charges a 12V 10Ah LiFePO4 battery through a MOSFET ideal diode. On grid failure, loads switch directly to battery in under 1ms. A Victron BatteryProtect BP-65 disconnects loads at 11.8V to prevent over-discharge. An ESPHome XIAO ESP32-C3 with Adafruit INA260 current sensor and DS18B20 temperature sensor reports battery voltage, current, power, and accumulated Ah/Wh to Home Assistant.

| Parameter | Value |
|---|---|
| PSU | Mean Well HDR-60-12, 13.3V float |
| Battery | Cyclenbatt 12V 10Ah LiFePO4 |
| Float voltage | 13.3V (set on PSU trimmer, lacquered) |
| LVD cutoff | 11.8V (Victron BP-65, Setting 7) |
| LVD reconnect | 12.8V (30s delay after threshold met) |
| Device voltage envelope | 11.71–13.11V at terminals (2A worst-case) |
| Switchover time | <1ms (MOSFET ideal diode) |
| Typical load | 16.0W AC wall / 14.9W DC at devices + monitor (INA260 measured) |
| Accessible capacity | 4.18 Ah / 53.3 Wh (INA260 coulomb-counted, May 2026) |
| Runtime at typical load | ~3.6 hours to LVD |
| Battery lifespan | 10–20 years (calendar aging at 13.3V float, 63–75°F) |
| Enclosure | LeMotech IP65 ABS, 9.6″×7.6″×4.5″ |
| Monitoring | ESPHome XIAO ESP32-C3 + INA260 + DS18B20 → Home Assistant |
| Total build cost | ~$224 + ~$25 ESPHome monitor board |
Mode 1 — AC Present: PSU outputs 13.3V through ideal diode; battery held at float equilibrium. Loads draw from PSU, not battery.
Mode 2 — AC Failure: PSU output drops to 0V. Ideal diode blocks. Battery feeds loads directly, no interruption.
Mode 3 — Low Battery (~12.4V): ESPHome Cliff phase alert. HA notification: Critical Warning.
Mode 4 — Low Battery (~12.2V): ESPHome detects threshold. Home Assistant initiates graceful HA Green shutdown; modem continues on battery.
Mode 5 — LVD Cutoff (11.8V): Victron BP-65 disconnects loads after 90-second hold-off.
Mode 6 — AC Restoration: PSU resumes 13.3V, ideal diode switches source, BP-65 reconnects after 30s hold-off. PSU immediately enters CC mode at 4.5A (~60W) bulk recharge, tapering to CV float over approximately 10–15 minutes.

| Automation | Threshold | Mar 26 | Mar 28 | May 6 | Status |
|---|---|---|---|---|---|
| Early Warning | < 13.0V for 2 min | ✅ | ✅ | ✅ | PASS |
| Critical Warning | < 12.4V | ✅ | ✅ | ✅ | PASS |
| Graceful Shutdown | < 12.2V for 1 min | ⚠️ Not tested | ⚠️ Not tested | ✅ Confirmed | PASS |
| BP-65 hardware LVD | ~11.8V | ✅ Direct (11.77V) | ✅ Inferred | ✅ Confirmed (11.675V) | PASS |
All four tiers are now fully live-validated. The graceful shutdown automation was confirmed on May 6, 2026 — the final outstanding commissioning item.

Elevation (top) and plan (bottom) views of LeMotech junction box. Interior Dimensions in inches.

| File | Contents |
|---|---|
| docs/bom.md | Full bill of materials with vendor, price, and notes |
| docs/wiring.md | From/To wiring tables, fuse locations, component mounting |
| docs/specifications.md | Electrical, performance, and protection spec tables |
| docs/design-rationale.md | Build-vs-buy analysis, float charging strategy |
| docs/component-selection.md | Per-component selection rationale |
| docs/cost-analysis.md | Build cost breakdown and 10-year lifecycle comparison |
| docs/safety.md | AC and battery safety procedures |
| docs/voltage-drop-analysis.md | Wiring resistance and voltage drop calculations |
| docs/supplemental-analysis.md | Thermal Analysis & Enclosure Heat Budget, Runtime Analysis, Failure Modes & Effects Analysis (FMEA) |
| docs/design-specification.md | Formal requirements, design decisions, and verification matrix |
| docs/commissioning.md |
If this build log or the design rationale saved you time or money on your own UPS project, consider sponsoring continued measurement and documentation work.
| System commissioning process and results |
| docs/Final_As_Built_Performance_&_Cost_Summary.md | Final As-Built Performance & Cost Summary |
| docs/UPS_Validation_Report.md | Final Validation Report with Home Assistant configuration |
| docs/UPS_Report_2026-04-05.md | Inaugural commissioning report (Apr 5, 2026) |
| docs/UPS_Report_2026-05-06.md | Outage test report; INA260 first measurement; 12.2V automation confirmed |
| Top-Off-Charger/top-off-charger-design.md | Bench top-off / top-balance charger for the removed battery: pre-build design with from/to wiring tables |