how to calculate power of system

How to calculate power consumption of esp32 when it goes to sleep mode and when it wakes up to send data to cloud. We are using 5Ah battery, and want to know how long the battery last. The esp32 uses 5mA in deep sleep mode and approx 130mA in normal mode.

Your suugestions will be appreciated.

5Ah = 5000mAh. mAh = mA for an hour. You know how many mA it takes in each mode so when you've worked out how long it is in each mode for you've pretty much got the answer. E.g. if it was permanently in sleep mode at 5mA the battery should last about 5000 / 5 = 1000 hours.

Steve

I mean if It was 100mA for 2 mins and 5 mA for 58 mins. How do we calculate it.

Regards,

So where's the problem? Every hour you use (100 x 2 + 5 x 58) mA.minutes. Divide by 60 gives you mAh. 5000 divided by that number gives you how many hours the battery should last.

In the real world it won't last quite that long but it should be close. If your input numbers are accurate, for example initially you said 130mA not 100mA and that makes quite a difference.

Steve

1 Like