IoT Battery Monitor Brings Charging Data to the Cloud

Ryan Susman built his own IoT battery monitor to track the performance of an upgraded uninterruptible power supply unit.

Most people don’t want their toaster or vacuum cleaner to connect to the internet, but that doesn’t mean that the IoT (Internet of Things) isn’t useful. There are many situations in which cloud-based data collection and remote control through the internet can be a boon. Ryan Susman has been tinkering with uninterruptible power supply (UPS) upgrades and thought it would be handy to monitor the battery status. He initially turned to an off-the-shelf solution, but managed to fry that device. Instead of buying another one, he built his own IoT battery monitor using an ESP32.

Susman’s UPS upgrade experiments have focused on expanding standard APC units with larger external batteries. The original circuitry in the APC units still handle charging and power distribution, but they work with different batteries that have more capacity. That should work fine, but Susman wanted to be able to keep an eye on things. In particular, he wanted to monitor current flow — both when charging and discharging.

To achieve that, he installed a beefy shunt on the exterior of an APC unit. The external batteries connect to the APC unit’s control circuitry through that shunt, so all current has to flow through the shunt. Because Susman knows the exact voltage drop created by that shunt, he knows what it should measure when there isn’t any current flow. When there is current flow, the voltage drop changes accordingly. By continuing to measure the voltage drop, Susman can then calculate the amount of current and determine if the batteries are charging or discharging.

Susman selected a NodeMCU ESP32 development board to collect those measurements. It does so through an ADS1115 ADC module, which was necessary to measure the voltage drop (an analog reading). The ESP32 connects to Susman’s local WifI network and uploads the collected data to a MongoDB database. That keeps a log of each reading, which it can then present in a web interface along with a graph.

This may seem like a project with narrow appeal, because there are few people interested in upgrading their UPS with this functionality. But this would work with just about any system that uses batteries, so it could be useful for a wide range of applications.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles