# Calculating battery life of Arduino + XBee Project

How do I calculate battery life of Arduino and XBee project? Here's my information:

1. Battery's voltage: 3.6, capacity: 780 mAH
2. Current draw of Arduino + XBee when sleeping = 28,5 mA
3. Current draw of Arduino + XBee when wake up + transmitting data = 66,6 mA
4. I have sleep cycle 7.5 seconds, so every 7.5 seconds will wake and polling data for 100 milliseconds

How can I predict my battery's life?

The device is not sleeping 1.3% of the time. $66 \times 0.013 + 28.5 \times 0.986 = 28.9mA$ average load. $\dfrac{780mAh}{28.9mA} = 27 \; hours$, assuming you get every ounce of the 780mAh out of your battery. You should probably derate that number by at least 20%.
• @cakil - it's the ratio of awake time to sleep time. The MCU is awake for 100 ms, and sleeps for 7500ms : $\frac{100}{7500} = 0.013333...$, Then, $1-0.01333... = 0.98666666...$. Note that there is a minor math error, 0.983 should be 0.986. – Connor Wolf Jun 6 '13 at 3:13