Solar Monitor Battery Charging Failure
I need pause my LEGO nostalgia trip and revisit my solar power monitor project, so a quick recap of the story so far: About a year and a half ago, I built a project to monitor power output of my cheap Harbor Freight solar panels. Power is measured by an Adafruit INA219 sensor breakout board controlled by an ESP8266 microcontroller running software compiled by ESPHome based on my specification YAML. Data is reported to my personal instance of Home Assistant running under KVM hypervisor. I originally wanted to run this device strictly off solar power, but never figured out the analog power bits, so I resigned to incorporating a battery into the device. I had an old USB power bank that could no longer deliver useful USB power, so I took it apart to repurpose the still-working battery cell and charging capability for my solar monitor.
Fast forward to this week: browsing my recent data in Home Assistant, I noticed the solar monitor battery voltage has been erratic for a few days. It usually charges up in the early morning soon after sunrise, then gradually fall through the day until the next morning. But now it no longer charges on a smooth curve in the morning, what's going on? Looking at charging status LEDs, I can see it changing state erratically once every few seconds. Maybe blinking in charging sequence for a bit, then maybe all four would be illuminated as if the battery was fully charged, then they would go out as if charging power disappeared, or some combination of those states.
Pulling out my voltmeter, I checked the following candidate explanations:
- Perhaps the buck converter I had used to convert solar panel DC voltage down to 5V is misbehaving? I checked the voltage of enable pin: it is steady at 3.3V. I checked the output voltage: a steady 4.9V with no fluctuation. The buck converter seems to be performing nominally.
- Perhaps the lithium-ion battery cell is failing? I monitored the battery terminal voltage as the charger cycled through its charging/not-charging states, looking to see if the battery voltage is behaving unexpectedly. Maybe it dropped below critical minimum (3V) or shot up to maximum (4.2V) upon charge. Neither was the case: voltage fluctuated around 3.6V. A little higher when charging and a little lower when discharging, signs of a nominally working battery cell.
If the power input is good and the battery looks good, process of elimination says the problem is the repurposed power bank charging circuit between them. This was not a huge surprise since this piece of electronics was already known to be defective: The reason I took it apart was because the output stage could no longer deliver 5V USB power output. I'm actually rather pleased I got another year and a half of useful life out of the power input charging stage before the whole thing gave out.


Comparing year-and-a-half old picture (left) against current state (right), the most obvious sign of degradation is near the micro-USB power input port, the yellow epoxy towards one corner touching component U9 has visibly darkened. Is it charring from overheating, or some other degradation? That is not clear. What is clear is that I now need something else to manage charging the single 18650 lithium-ion battery cell.