Author Topic: Implementation of a charge level indicator  (Read 388 times)

0 Members and 1 Guest are viewing this topic.

Offline VulpeculaTopic starter

  • Newbie
  • Posts: 8
  • Country: de
Implementation of a charge level indicator
« on: December 19, 2022, 03:53:53 pm »
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
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6399
  • Country: ca
Re: Implementation of a charge level indicator
« Reply #1 on: December 19, 2022, 04:30:07 pm »
you could use an lm3914  linear  led driver ??   with the right values, it could be used as an battery gauge  ?? very cheap and simple to implement

something like this

https://www.ebay.com/itm/265185004806?


you have 3 models  the lm3914, lm3915, lm3916     it varies between linear and logarithmic values on the leds,  you have dot mode or led ramp  etc .....
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2666
  • Country: fr
    • kripton2035 schematics repository
Re: Implementation of a charge level indicator
« Reply #2 on: December 19, 2022, 05:42:15 pm »
use a HM1160 chip. does all what you need in a tiny package.
http://aitendo3.sakura.ne.jp/aitendo_data/product_img/ic/power/HM1160/HM1160-E.pdf

available at least at aliexpress : https://www.aliexpress.com/item/1005003135937876.html
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf