DIY UPS for Home Assistant Green & Xfinity XB7 Modem
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 Shelly Plus Uni.
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.
Upcoming: UPS-MONITOR-V1 — Custom Replacement for the Shelly Plus Uni
The Shelly Plus Uni does the monitoring job, but it's a generic device with limitations: voltage-only (no current), reports 5 Hz max, and consumes ~0.5 W continuously. A purpose-built board is more efficient and gives me data the Shelly can't.
UPS-MONITOR-THT V1 ships to OSH Park this week. 46×78 mm, 2-layer, ENIG, ~$28 for 3 boards. Specifications:
- Seeed XIAO ESP32-C3 — Wi-Fi reporting to HA via ESPHome
- Adafruit INA260 breakout — simultaneous bus voltage and current measurement at 0.5% / ±0.15% accuracy, 1.25 mV LSB on shunt
- DS18B20 on a terminal block — battery temperature for SOC compensation
- Pololu D24V7F3 — 4–36 V → 3.3 V at 600 mA rated, ~88% efficient at this load
- All through-hole, all socketed for hand assembly and field repair
Power budget at 13.4 V battery: ~10 mA typical, ~22 mA peak (Wi-Fi TX bursts). Replaces the Shelly's ~0.5 W with ~0.2 W — adds nothing meaningful to the existing 13.7 W system load.
Why not jump straight to the INA228? I'm using one board to replace the Shelly on this UPS and a second board to monitor my 500 Ah LiFePO4 bank with a 2000 W inverter. Both Adafruit breakouts share the same 8-pin header footprint, so the same PCB hosts either chip without a respin. The INA260 has an integrated 15 mΩ shunt sufficient for this ~80 mA UPS application; the INA228 with external 200 A DROK shunt handles the inverter bank.
Design files, OSH Park Gerbers, and full BOM documentation will be published in the DIY-LiFePO4-UPS repo when boards arrive (~2 weeks). First comparison data against the Shelly to follow.



Performance
Summary Validated Runtime: 4.25 hours to software shutdown (12.2V) and ~4.3 hours to hardware LVD (11.8V) under a sustained 14.5W load.
Key Finding
The UPS delivers a reliable ~4.3 hours of runtime at typical Xfinity XB7 Modem and HA Green loads (~15w). This is ~55% of the theoretical maximum capacity of the 10Ah LiFePO4 battery. 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.
Why the Runtime is Limited
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 restricts the battery to approximately 65–75% SOC and prevents proper absorption charging at 14.4V. As a result, the top ~25–35% of the battery’s rated capacity is never accessible.
Discharge Characteristics
Extremely flat voltage plateau from 13.0V down to 12.8V (delivers the majority of usable energy)
Sharp “cliff” begins at ~12.45V, after which voltage drops rapidly
12.4V warning provides an effective “immediate action” alert (~5–6 minutes before shutdown)
Conclusion
The system performs exactly as designed. The layered protection (voltage warnings → automated shutdown → BP-65 hardware LVD) is robust and safe.
Current validated specification: ~4.3 hours runtime at 14.5W under the existing single-rail topology.
A two-stage charging architecture...
Read more »
Bill Collis







Sagar 001
Bud Bennett
Manuel Alfonso
Hi Nicholas,
This is one of the nuances of the design -
Neither — this design bypasses CC-CV entirely by using passive float
charging.
How it works:
- PSU is set to 13.3V (LiFePO4 resting voltage)
- Current is naturally limited by the voltage differential between PSU and battery
- As battery charges, the differential shrinks → current tapers organically
- At equilibrium, current drops to near-zero (microamps)
The BMS role:
- The Cyclenbatt's built-in 10A BMS provides protection only (OVP, UVP, OCP, short circuit)
- It does not regulate charging current — it would only intervene if current exceeded 10A (which can't happen here since max PSU output is 8.5A, and typical charge current is <2A)
Why this works for LiFePO4:
- LiFePO4 has a flat discharge curve and tolerates indefinite float at 13.3V
- No risk of overcharge since 13.3V is below the 14.4-14.6V charge termination voltage
- Trade-off: charges to ~95% SoC rather than 100%, but extends cycle life
Hope that answers you question.
Bill