Thursday, 20 March 2014

Empirically computing the battery use of electronics

Measuring the voltage while discharging the battery
My father uses a small electronic device to measure the heartbeat of his patients during a couple of days. After playing around with alkaline and Ni-Mh batteries he realised that Ni-Mh batteries would sometimes die before the end of the recording and that any brand of fresh alkalines would work:

He came to the same conclusions most people usually come to (but failed to realise a couple of things):
  • Any alkaline he ever purchased were doing the job fine... and could therefore buy the cheapest
  • NiMh rechargeable batteries should not be trusted (note: that is if you use them like anyone else).
This article will investigate how one can estimate the battery capacity and device power consumption.

Why does everybody has trust issues with NiMh rechargeable batteries

Well first of all, most NiMh chargers are crap. Literally, it is in every battery manufacturer's interest to sell more batteries and sell cheap chargers that will slowly kill your NiMh. Here is a good read if you want to recognise a good charger as well as different charging techniques.

Most people ignore or forget that all NiMh batteries have the tendency to discharge by themselves, whether you use them or not. A couple of years ago, Sanyo came up with the Eneloop NiMh batteries which had the particularity to have a very low self discharge rate (keeping 70% of their charge after one year in the drawer). I personally found the Turning LSD batteries quite good (AA and AAA).-The question is how well do they compare against Eneloop?- only time will tell.

Approximating the power draw usable energy in one Alkaline AA cell

Alkaline batteries are not linear, their voltage decreases as they deliver energy. The site is a goldmine if you're looking to compare AA cell capacity as well as their discharge curve.

The perfect tool would have been the one Paul Allen is currently building but I unfortunately did not have such a powerful charger/discharger with logging capabilities at the time of this test and this article is about how one can perform such an analysis with a simple Imax B6 charger but the same technique could be done with any other device with a constant power (or current) consumption:

I got four batteries (from the same packaging) with different levels of discharge each giving us an useful indication for our analysis:

One completely dead battery (device left on until it stops working)

This battery will tell us the minimum voltage needed by the device to operate. Since the voltage of an Alkaline batteries slightly increases when the electrical load is disconnected, we will have to measure its voltage under load (i.e. connected to the device) ... and it was 1V.

This means that we know that we need to discharge the battery until it reaches 1V at which point it becomes useless (considered empty by the device).

A fresh one (never used)

This battery is used as a reference. We will discharge it until we reach 1V (see above) and see how much capacity one fresh battery provides.

In our case, the capacity under a load of 100mA with a cut-off of 1V was 1153mAh of usable energy (if you ask me, this is a little low... but I'm going off topic)

Note: In our case mWh would have been a better measurement unit but I had no way of computing it without making big assumptions so I had to stick to mAh.

One used during 24 hours

Under the same load (100mA) and cut-off (1V), this battery had a remaining capacity of 974mah. We can therefore assume the device consumed 179mAh in 24h (or a draw of 7.5mA).

One used during 48 hours

Under the same load (100mA) and cut-off (1V), this battery had a remaining capacity of 469mah. We can therefore assume the device consumed 684mAh in 48h (or a draw of 14mA, which is the double!).

Why are these measurement so imprecise? 

This variation in estimated power consumption can come from various sources:
  • A non linear power consumption from the device. This is however unlikely as it is meant to measure the heart rate and therefore has no reason to draw more power suddenly.
  • A non linear current consumption: as voltage decreases, you need more current to get the same amount of energy. 
  • Discussable time keeping: what if the 24h device was left on for 22hrs and the other one 55h? I have now way to verify.
  • Questionable hardware: the Imax B6 is not a precision metering device and could possibly induce a bias. We can however expect it to be more or less constant across all the tests above and therefore ignore it. I recommend to read my reviews of the Imax B6, this device is full of (bad) surprises.

Does it matter?

Not really: the tested device probably draws somewhere between 5 and 20mA and this means that a standard 2000mAh NiMh battery would probably last at least 100h which is more than the much needed 48h that were originally needed.


This is an empirical and (imprecise) way to compute the device power consumption and with all its pitfalls, this approach provided the needed insights:

My father should use NiMh batteries as long as he chooses good ones treats them well (using a good charger and not storing them empty). That's it.

With a multimeter and a resistor

The same approach could be used (but it would be very tedious) using a resistor and a multimeter and a resitor (and a clock):
V = R x I
If we assume V=1.2 (which is the average voltage), we set I to 0.1A (=100mA) we can use a 12 Ohm resistor to do the same trick. You just need to check regularly the battery voltage and stop when it reaches 1V (or 0.9V which is usually a better cutoff).

You can then compute the capacity with this formula:
Capacity (in mAh) = 100mA x number_of_hours
Note: this is an approximation that works better with NiMh batteries as they have a flatter voltage as they discharge.