Author Topic: Calculate battery consumption, to know battery remaining  (Read 1590 times)

0 Members and 1 Guest are viewing this topic.

Offline paul_allsoppTopic starter

  • Newbie
  • Posts: 6
Calculate battery consumption, to know battery remaining
« on: January 23, 2017, 04:38:25 pm »
Hey all.

I've designed a project with an ESP8266 at it's heart, which I would like to drive from a Li-ion battery. So I have two questions about this:

1. What's the best practice approach to measure the current consumption of the project?
2. How do I add an LED bar to show the remaining charge in the battery, with the purpose of knowing when to recharge it?

Thanks for any info on this.
Paul
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Calculate battery consumption, to know battery remaining
« Reply #1 on: January 23, 2017, 05:13:06 pm »
The simplest is to measure the battery voltage and create a lookup table relating voltage with charge level.  I believe this is what most cheaper devices use, and it works reasonably well as long as you're not dealing with large discharge currents.  The readings will be skewed while charging though.

The more accurate way is to use a voltage and current monitor to measure and accumulate the total energy consumed from the battery.  It might take a couple of charge/discharge cycles to "teach" it the battery capacity this way.
 
The following users thanked this post: paul_allsopp

Offline paul_allsoppTopic starter

  • Newbie
  • Posts: 6
Re: Calculate battery consumption, to know battery remaining
« Reply #2 on: January 23, 2017, 05:42:53 pm »
 

Offline suicidaleggroll

  • Super Contributor
  • ***
  • Posts: 1453
  • Country: us
Re: Calculate battery consumption, to know battery remaining
« Reply #3 on: January 23, 2017, 06:25:30 pm »
That's just a current sensor, there are hundreds of current sensors you could use if you wanted to do it yourself.  You could also use a self-contained "fuel gauge" to do it for you, eg LTC2942

http://www.digikey.com/products/en/integrated-circuits-ics/pmic-battery-management/713?k=fuel%20gauge
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf