Battery Life Calculations?

Hi everyone!

I’m trying to calculate how long (hours) my battery would last with an arduino Uno. Considering the following example of an arduino connected to a 5000 mAh Lipo battery:

During day 1 and 2:

  • wakes up, collects temperature data (uses 18 mAh) during 2 seconds
  • records the data to an SD card (uses 25 mAh) during 3 seconds
  • goes to sleep (0.14 mAh) during 500 seconds

During 3 through 5, the arduino does the following:

  • collects temperature data (uses 18 mAh) during 2 seconds
  • saves data to memory (uses 20 mAh) during 2 seconds
  • goes to sleep (0.14 mAh) during 500 seconds
  • wakes up, collects temperature data (uses 18 mAh) during 2 seconds
  • records the data to an SD card (uses 25 mAh) during 3 seconds
  • goes to sleep (0.14 mAh) during 500 seconds

My question is: how can I estimate how long will my battery last using my arduino?

Thanks for the clarifications!

Batteries are rated in mAh (milliamp-hours). Work out how many milliamp-seconds are used by your system in each cycle, convert to mAh, multiply by how many cycles occur per hour and divide by the battery capacity - then you will have your answer.

Thanks MorganS... could you give me an example on how to approach this? I'm also confused on how to account for the changes taking place in the 2nd part of the arduino behavior (e.g.: days 11 through 20)...

If you plan to do this more than a few times you should assume that the actual battery capacity is significantly lower than the sticker claim - 50% would probably be safe.

...R

You might add a small battery monitor in your sketch using a voltage divider 2x 1M -> analogRead() to see if/when the voltage drops.

the 2M resitors would give an additional current of 2.5 uA ~ 1.25 mAh in 20 days, quite neglectable
However the Arduino would run for an extra few milliseconds too

One cycle of the first days is 505sec.
2/505 is temp 18mA.
3/505 is SD 25mA.
500/505 is sleep 140uA.

(2/505 * 18) + (3/505 * 25) + (500/505 * 0.14) = 0.3584mA average curent draw * 48h = 17.2039604 mAh lost in two days .

Second cycle.
4/1008 is temp 18mA .
2/1008 is SD 20mA.
2/1008 is SD 25mA.
1000/1008 is sleep 140uA.

(4/1008 * 18) + (2/1008 * 20) + (2/1008 * 25) + (1000/1008 * 0.14) = 0.2996mA average current draw * 72 = 21.57142857 mAh lost in three days

An ideal 5000mAh battery could last another year and a half.
Not sure how you are going to get an Uno down to 140uA without mutilating it.
Leo..

An ideal 5000mAh battery could last another year and a half. Not sure how you are going to get an Uno down to 140uA without mutilating it.

familiar with this page - Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors -

Yes, I did know about Nick's pages.
An Uno has much more on the circuit board than just the Atmega chip.
A lot of hacking might be needed.
Leo..