Blog Home

Hacking a USB battery bank to gather telemetry

Arduino TeamNovember 17th, 2021

USB battery banks are a dime-a-dozen and useful for recharging all of those devices in your life. But the typical cheap battery banks don’t provide you with much information about their status. You usually just get a few LEDs that provide a very general idea of how much battery life remains. Keenan Johnson needed more info for an upcoming project and so he hacked a USB battery bank to gather telemetry.

The most useful data about a USB battery bank is its voltage at any given time, which tells you approximately how much longer the batteries will last. But there is other telemetry that Johnson wanted to have, including the charging current and output current. This USB battery bank contains an HT66F018 microcontroller to monitor the battery cells and control charging/discharging, but it runs custom firmware and doesn’t make the telemetry accessible through a standard interface like I2C or SPI.

Fortunately for Johnson, the PCB inside the battery bank has handy pins marked P+, LOAD, and CHRG. Those correspond to battery voltage, output current, and charging current respectively. Johnson could measure those with a multimeter, but needed a better way to monitor the telemetry. To gather that, he connected a MKR WiFi 1010 board to the test points via an ADC (Analog-to-Digital Converter) module. Johnson programmed a simple interface that he could access remotely that shows him battery voltage, load current, and charge current, and also added an Adafruit NeoPixel LED status indicator.


Leave a Reply

You must be logged in with your Arduino account to post a comment.