Author Topic: How to calculate battery life for a circuit?  (Read 5744 times)

0 Members and 1 Guest are viewing this topic.

Offline jmashburnTopic starter

  • Contributor
  • Posts: 11
How to calculate battery life for a circuit?
« on: June 05, 2014, 05:17:33 pm »
I'm in the process of adding an external power source to my circuit (Arduino Nano + Bluetooth) and I'm trying to determine what kind of batteries I can get away with on it? I need the device to ultimately be light and small, but also don't want to trade out batteries every week, so each type of battery has its drawbacks.

There's AA, AAA, Coin, and Li-Ion that i've been considering. I'd like to go down the road of AAA because they're common, interchangeable, and small. But how can I roughly estimate the life of the batteries based on my circuit?

My circuit briefly communicates with a computer via Bluetooth once or twice every half hour. I'm unclear on what factors I need to factor in for this formula. If my circuit can survive on AAAs for several weeks like a remote control.. that'd be great! If it only lasts a few days, then it's just not worth it.

My keyboard has two AA batteries and lasts a very long time even while using Bluetooth. I don't remember the last time I changed these out.

Thanks guys! This is one of the most helpful forums.

 :-BROKE
 

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 857
  • Country: us
    • AG6QR Blog
Re: How to calculate battery life for a circuit?
« Reply #1 on: June 05, 2014, 05:33:24 pm »
Every battery has a specification for its amp-hour rating.  In the case of small batteries, it's probably specified as milliamp-hours, or mAh.

As a first approximation, assuming fairly constant current draw, the amp-hour rating divided by the current draw of the circuit gives the battery life.  If you have a 1200mAh battery, powering a circuit that draws 100 mA, you'd expect it to run for about 12 hours.

If the current draw isn't constant, then the total amp-hour figure represents the integral of current over time.  If the current draw IS constant, the amp-hour figure still represents the integral, but the integration is trivial, and you can get the answer by just multiplying current draw times time.

If your circuit has one quiescent current draw, and another current draw when the radio is turned on, then the total amp-hours drawn is the quiescent rate times the amount of time it spends in the quiescent state, plus the "radio on" rate times the amount of time spent in the "radio on" state.

There are more subtleties, involving self-discharge rates, Peukert's law, and other things which you can Google, but the first approximation is probably enough to get you into the ballpark, at least to select a battery type.  Battery capacity estimation is not an exact science.
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5029
  • Country: ro
  • .
Re: How to calculate battery life for a circuit?
« Reply #2 on: June 05, 2014, 06:39:37 pm »
The issue is actually a bit more complex.

Batteries have a particular rating, let's say 2500mAh for a very good 1.5v AA alkaline battery (AAA are usually around 800-1000mAh).  However, as the battery discharges, so does the voltage decrease - a new battery will show about 1.65v and the battery voltage will slowly go down up to as little as 0.8v-1v.

For example, let's have a look at this Energizer alkaline battery (just one of the first Google results, not chosen for any reason): http://data.energizer.com/PDFs/E91.pdf

On the first page, you have on the right a chart, which shows you the capacity depending on how much current the device connected to the battery takes out continuously.  Notice that at 25mA the capacity is 2500mAh  but also pay attention to the note above saying discharge to 0.8v ... not all devices will continue to run at such low battery voltages.

If you go on page 2, you see on the right another graph where you have on the x axis the current consumption of your device and on the y axis, you have the number of hours. Assuming your device can run with any voltage between 1.2v and maximum voltage of the battery and uses 20mA all the time no matter the voltage, then the battery will power your device for 100 hours ( you look where the line for 100 and line for 20 cross the blue line for 1.2v.

A keyboard can last quite a lot of time because as soon as you stop pressing keys, the brains inside the keyboard puts everything to sleep, where the keyboard uses microamps (uA) or even less current.  Even when sending keys to PC, it may use a few mA but only for a few seconds and then goes back to sleep.

So first of all, you have to determine how much current your product uses within a certain period of time - a good logging multimeter is very good for that.
Then, you have to figure out what's the lowest voltage your product will run at... for example, a microcontroller may work with as little as 1.8v (which would mean as little as 0.9v for each battery if you have the batteries in series) but your bluetooth may stop working at around 2.5v (I'm just saying it as an example, I don't know the actual minimum voltage).
Equipped with this information, you can look at various batteries and estimate how much your product will use. 
Programming your device to go to sleep when unused, or to reduce the microcontroller frequency if there's no need to run so fast, turning off the bluetooth when it's not needed, all these can improve the battery life.

Other thing you have to keep in mind.. if your microcontroller or bluetooth (or both) absolutely need at least 3v or a voltage that would mean you'd be left with a lot of energy unused in the batteries, you may want to have a look at boost or SEPIC dc-dc regulators. There are regulators which can work with as low as 0.7v and boost this voltage to the higher voltage your product needs. A SEPIC regulator works both ways, it can take lower or higher voltage and output a voltage in between.
If you use something like this, the battery life is harder to measure, because of this regulator's efficiency in converting energy.

For example, let's say your product uses 20mA and needs 2.5v to run (so 2.5v x 0.02A = 0.05w) and you use 2 AA batteries (so 1.65v x 2 = 3.3v initially).
With a SEPIC converter, until the battery voltage goes down to 2.5v (so 1.25v per battery), the regulator will produce that 2.5v with about 90-95% efficiency. At 3v for example, it will draw about 0.0505w / 3v = 0.01683A  (16.83mA) from battery.
When battery goes down below 2.5v, the regulator will have to boost the voltage to 2.5v... at 2v (so 1v per battery), the regulator will have about 80-85% efficiency so it will draw 0.0575w / 2 = 0.02875 or about 28.75mA
So you can see that while your product will always get 2.5v and use 20mA, with a SEPIC regulator the current drawn is less than 20mA while battery voltage is more than 2.5v and after that the regulator will pull more current from batteries in order to maintain that 2.5v, which means the battery discharge rate will gradually increase (important to know when designing a "battery level" indicator for example)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf