PbMonitor: Build a Smart Battery Monitor for UPS and Energy Storage
Extend your UPS and solar battery life! PbMonitor shows real-time voltage, current, and temperature per battery — built with ESP32-C3 and MQTT for Home Assistant integration.
Monitoring individual batteries in a UPS or solar setup is critical to prevent failures, but most systems only show overall voltage. PbMonitor is a DIY solution that fixes this gap. Using an ESP32-C3, MCP3008 ADC, and a Hall-effect current sensor, PbMonitor tracks each battery’s voltage, current, and temperature in real time and streams the data to Home Assistant via MQTT.
If you're managing a battery bank — whether for backup power or renewable energy — this project is a must-have to extend battery life and detect early failures.
Figure 1: PbMonitor system connected to the 48-V battery bank for real-time monitoring.
Why I Built PbMonitor
While running a 48 V UPS system with four 12 V lead-acid batteries, I noticed health imbalances that could lead to early failure. Commercial systems didn't offer a way to monitor each battery separately — so I designed PbMonitor to fill this critical gap.
Figure 2: The 48-V battery pack configuration comprising four
12-V lead-acid batteries in series
Key Features of PbMonitor
Accurate Voltage Monitoring: Precision resistor dividers + 10-bit MCP3008 ADC.
Reliable Current Sensing: ACS72981 Hall-effect sensor for real bidirectional current measurement.
Thermal Safety: Fast-reacting thermistors for battery and ambient temperature monitoring.
Compact, Practical PCB: Small 53.5 × 36 mm layout with clear labeling and JST connectors.
Smart Home Integration: Seamless MQTT communication with Home Assistant dashboards.
How It Performs
PbMonitor quickly revealed charging imbalances and discharge rate differences in my battery bank. For example, two batteries dropped to critical voltage levels much faster than others — insights I wouldn't have had without monitoring each cell separately.
Data is displayed in real time via MQTT topics, and the system can easily trigger automations or alerts inside Home Assistant.
Figure 3: Block diagram of the battery-monitoring System project.
What's Next for PbMonitor?
Noise Filtering: Smooth out current readings for even more stable monitoring.
Data Logging: Add SD card and RTC modules for long-term charge/discharge tracking.
Enhanced Display: Web server interface for setups without Home Assistant access.
Hardware Improvements: Stronger PCB mounting, additional thermistors, and predictive battery health analytics
Want to build your own smart battery monitoring system?
Find the full step-by-step article with code, schematics, and in-depth engineering discussion inElektor May/June 2025 (Article ID: 240704-01).
Veuillez saisir votre adresse électronique. Les instructions de réinitialisation de votre mot de passe vous seront immédiatement envoyées par courriel.
Discussion (0 commentaire(s))