# Battery consumption in datasheet

• Hello!

New to pycom.

Looking to design a battery that will last approximately two days on power loss.
Looking at the datasheet there is not much information given on power consumption, just instantaneous values.

Is there a way of calculating how long a battery will last based on usage?

I found a post here explaining the math behind it however the post wasn't very descriptive on what the values should be or mean throughout the equation (seconds, milliseconds etc) and i'm having a tough time applying what I've calculated.

Looking to have the device communicate 2-3 times an hour on LTE or Lora.

• @lukesaber To compute your power requirements, if you are running a "wake up, send data, go back to sleep" pattern:

• define T as the duration in seconds of reference period of your choice (1 hour = 3600, 1 day = 86400...)
• define N as the number of times your device will wake up in that period
• define D as how long your device will we awake each time it wakes up (in seconds)
• define IA as the power consumption when awake (in mA, but you can use any unit as long as it's the same for IS and the result)
• define IS as the power consumption when sleeping (ditto)

Then the average power consumption is:

``````(N * D * IA + (T - N * D) * IS) / T
``````

Example:

• T = 3600 (1 hour)
• N = 3 (wakes up 3 times an hour)
• D = 10 (stays awake for 10 seconds)
• IA = 100 mA (average power consumption while awake)
• IS = 0.010 mA (10 µA, average power consumption while sleeping)

Then the average power consumption is:

``````(3 * 10 * 100 + (3600 - 3 * 10) * 0.010) / 3600 = 0.84325 mA
``````

If you want to have enough power for 2 days, then you need a battery with a 40 mAh capacity (0.84325 * 24 * 2). I think nearly any battery will do.

Now, the exact figures for D, IA and IS can vary a lot, based on:

• what sensors/peripherals you may have that you need to power, and whether you power them all the time or only when you are awake
• what you need to do while awake
• how you send (LoRa, SigFox, LTE, Wi-Fi, BLE...), at what power level, at what data rate
• how long it takes for handshakes, ACKs, receive windows, etc.
• and probably a lot more things.

Ignoring any sensors or other peripherals, while awake, the power consumption is usually somewhere between 50 mA (module active, not sending or receiving) and 200 mA (when sending). How long you stay awake will usually range between 3 and 10 seconds. Power consumption during deep sleep should be somewhere between 10 and 20 µA depending on the exact setup.

So with 3 wake-ups per hour, for 2 days of battery life, your worst case scenario, not counting any sensors or peripherals, (200 mA when active, 10 seconds active, 20 µA in deep sleep) is about 80 mAh.

You need to add the requirements for your sensors/peripherals on top of that.

If you don't go to deep sleep for whatever reason, then the figures are drastically different, but you can keep the same logic. Just replace IS with the power consumption while idling.