Hello all,
I turn to you because I have a problem that I lack a little experience to solve. Maybe I can get some ideas here.
Context is that I have a battery powered system with a microcontroller (
Microchip ATSAME51). The charging of the 2S LiPo battery is done by USB PD and specifically implemented by a
Texas Instruments BQ25792 charge controller behind a
Texas Instruments TPS25750 USB PD controller. I want to add a battery indicator to the system, but don't know exactly how best to implement this yet.
My idea is to have four LEDs, with one LED representing 25% of the total capacity at a time. At 0-25% one LED lights up, at 0-50% two LEDs light up and so on. Maybe with a flashing LED for the case that an area was not yet completely loaded. In general, this is a display like you know it from powerbanks and the like. I hope you understand what I mean.
One possibility for the realization of my plan would be not to switch off the system completely (that is what I am doing right now), but to set the microcontroller in some kind of low-power mode. The charging of the battery ist signaled by the charge controller via an output (the "STAT" pin), which could then trigger an interrupt and cause the microcontroller to read out the state of charge of the battery from the charge controller via I2C. However, I'm not quite sure what that would do to the (idle) power consumption of the system.
But maybe someone knows other/better possibilities to implement something like this. Are there possibly already ready ICs with such a logic?
Thanks a lot
Vulpecula