2

I'm using an ATmega32u4 (Arduino-board) and internal reference to measure the VCC voltage (handheld device with LiPoly-battery). For a very long time I'm getting 3.27V before it drops when it is near the end. How usually the measured battery voltage is converted to a state of charge in %?

Thomas S.
  • 143
  • 2
  • 6
  • Look up table, most often. – Dave Jan 12 '16 at 17:15
  • Usually, voltage by itself is NOT converted to percent. When you see electronic devices that provide precision battery level, those are based on more complex monitoring, not just battery voltage. You can google "battery gas gauge" for more information. Older devices which did NOT have precision battery level indication usually use a simple 3 or 4 segment bar graph. – user57037 Jan 12 '16 at 17:17

2 Answers2

4

A Lipo cell goes from 4.2V to 3.0V as it discharges. However the discharge curve is not linear, and increased current will pull the voltage lower. It is possible to get a reasonably accurate state of charge measurement if you take these factors into account.

Here are example curves for a 3C rated Lipo cell discharged at different currents:- enter image description here

At 0.2C (5 hour discharge time) it goes does down fairly linearly from about 4.1V to 3.6V. At 1C (1 hour discharge time) the curve is similar, but the start and end points are lower.

If your device has predictable current draw then you may be to do a test discharge and measure the voltage as it runs down to get a profile, which can then be used to estimate state of charge in normal operation.

For a very long time I'm getting 3.27V before it drops when it is near the end.

As you can see from the graph above, 3.27V is almost empty for a Lipo battery. Are you sure it is Lipoly and not some other chemistry (eg. LiFePO4)?

EDIT: You say that your ATmega32u4 is measuring the 'VCC voltage' which might actually be the output of the 3.3V regulator, not the battery! To measure voltages higher than VCC you must use a voltage divider to get inside the ADC input's voltage range.

Bruce Abbott
  • 56,322
  • 1
  • 48
  • 93
  • Thanks. You are right, VCC is behind a 3.3V regulator. I want to avoid a voltage divider to avoid draining the battery. – Thomas S. Jan 13 '16 at 07:20
  • 1
    Use a P-chan enh MOSFET to enable power flow to the resistor divider. When enabled, the voltage divider will be active and you can read it. When not enabled, the divider will be at ~0v and consuming ~0 current. – rdtsc Jan 13 '16 at 16:39
  • Here is a nice post about measuring the battery voltage with minimal burden to the battery. This switches on P Trench - FET for a few milliseconds for ADC to measure the voltage. https://jeelabs.org/2013/05/18/zero-power-measurement-part-2 – Prasad De Zoysa Oct 03 '19 at 12:52
0

For LiPO chemistry, the voltage does not change much as the cell is depleted. So measuring voltage is not a very good way to tell the state of charge.

Instead, devices which report state-of-charge for these battery types measure how much current is consumed over time, essentially arriving at a ampere-hour or watt-hour (power consumed) value, and either compare that to a preset value or determine the actual battery capacity from depletion and/or charging characteristics. So power is measured instead of voltage alone.

To arrive at a percentage, if the battery is 1000mA/h capacity (it can deliver 1000mA for 1 hour), it was fully charged, but has been draining 500mA for 1 hour, then the capacity is 50%.

rdtsc
  • 16,238
  • 4
  • 32
  • 70
  • Problem is that I want to have as low as possible power consumption so I want to avoid having running a counter the whole time to just measure the discharging time. – Thomas S. Jan 13 '16 at 07:22
  • 1
    There are many custom-designed IC's on the market that can do this already, such as the MAX17043, conveniently available from Sparkfun and ready for experimentation. Now I'm not recommending either of these, but the Max17043 datasheet claims "Low Power Consumption" and does include a low-power sleep mode. – rdtsc Jan 13 '16 at 16:29