For my data logger project, I used a Raspberry Pi 2 Model B to log the temperature and humidity in a room. To run the Pi, I used a 10000 mAh power bank and I wanted to test how long the Pi could operate and the current usage of the Pi. Below are my calculations after running the Pi while it's logging data until it ceased to operate.
From the log file inside my Pi, the amount of time the Pi operates is:
27.721 hours.
The power bank has a capacity of:
10 Ah * 3.7 V = 37 Wh
Power consumption of the Pi:
37 Wh / 27.721 h = 1.335 W
Current consumption:
1.335 W / 5 V = 267 mA
Is my understanding and calculation, in this case, correct?