I need to calculate the battery lifetime of a system.
Usually I measure the average current and duration of each of the system's individual actions and from there calculate an average current projecting all the different actions to a 1 hour period. Afterwards, sum all the individual averages to get the system's average and then divide the battery capacity (in mAh) by the obtained average current to get the number of hours.
Formula: ((Duration * Current)/3600) * Frequency
For example, if 1 action takes 30 seconds with an average current of 44000uA and this happens 1 every 12 hours, the calculation would be: (30*44000/3600) *(1/12).
Example scenario:
Action | Duration (s) | Average current (uA) | Frequency | Average current projected to 1 hour (uA) |
---|---|---|---|---|
Idle | - | 30 | - | 30 |
1 | 30 | 44000 | 1 every 12 hours | 30.56 |
2 | 1.75 | 200 | 360 1 hour | 35 |
3 | 2 | 3700 | 1 per hour | 2.06 |
4 | 1.3 | 5000 | 1 per hour | 1.81 |
5 | 11 | 40000 | 1 every 12 hours | 10.19 |
The average current in 1 hour by adding all the different actions is 114.38uA
This time, I decided to let the system run for 24 hours and use the markers from the measuring software to get the average and from there go back to the calculation.
The average current of the 24 hour run was 98uA which is close to the 114uA considering the fact that some actions won't always take the same time.
Before looking at the results from the 24 hour measurement, I thought I would have to divide the 24 hour average by 24 to obtain the hourly average but that doesn't seem right based on the results from the other calculation.
My question is, why is this daily average "equal" to the hour average I calculated before, is it because 24 hours corresponds to 2 cycles for the largest action, so it "spreads" evenly?