I need my device to have multiple power sources, and connect to different power supplies depending on power availability. Each power source is a different rechargeable, Lithium-ion battery like this one. I am wondering what sensors/techniques/devices/etc. exist so I can determine "Battery #1 has 43% charge remaining, while Battery #2 is at 7%. Use Battery #1."

Clearly this is possible since all of our 'smart phones' predict with decent accuracy how much charge/capacity remains. Thoughts?

  • 1
    \$\begingroup\$ Get the current battery voltage? Li-ion cells are usually between 4.2 to 3 V. \$\endgroup\$ – initramfs May 4 '15 at 17:08
  • \$\begingroup\$ Thanks @CPUTerminator (+1) - no, I mean, how to determine what % the battery has left in it before it dies. For instance, right now, my iPhone says I have 17% left on it - how does it know this? What sensors/devices can be used to make this determination? Thanks again! \$\endgroup\$ – smeeb May 4 '15 at 17:11
  • 3
    \$\begingroup\$ No, it's not a simple voltage measurement. \$\endgroup\$ – Matt Young May 4 '15 at 17:17

The term you're looking for is "gas gauging." This is usually done with dedicated ICs, measuring voltage and current. TI and Linear Tech are couple of the big players.


Thing to keep in mind with determining state-of-charge of batteries is that their voltage is only a rough indication of that, and particularly when they're under load their internal resistance changes their voltage output, which misleads you into thinking they're at a lower SoC than they actually are. This is particularly the case with Lithium chemistry batteries, because their discharge-vs-time curve is comparatively flat (not perfectly flat, just flatter than other chemistries) for most of their capacity (except the start & end).

"Professional" battery SoC calculation is done by integrating the area under the current-vs-time curve, essentially to count how many coulombs of energy is going into or out of the battery, & comparing that to either (a) the theoretical/designed coulomb capacity of the battery, or (b) keeping track over long periods of time how many coulombs you get out of a 'full charge', which is preferable because this drops as the battery ages.

Encapsulated batteries like are in laptops & cell-phones have these chips built into the case of the battery (along with the battery protection module), and the host CPU can interrogate the battery to find out its SoC as a neat & fairly accurate %age.

Allowing your gadget to operate all the way down until it turns itself off, once in a while, is a good way letting the 'gas-guage' chip update its total-coulomb-capacity measurement.

As @Matt Young said, there are many 'gas gauge' battery management chips out there for doing this.

related: http://jeelabs.org/2012/11/26/watts-amps-coulombs/ Why are batteries measured in ampere-hours but electricity usage measured in kilowatt-hours?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.