# Calculation of current consumption of a Raspberry Pi 2 Model B

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?

• In my experience the reality WRT to Pis and powerbanks is disappointing -- you'll probably find it will not last half as long as your calculations predict. I think part of the issue is that powerbanks are intended for recharging, which is a scenario opposite that of actively powering something in terms of responding to rapid fluctuations in current draw. Once the battery gets down to a certain point it will not respond well enough and the pi will die. This is significant enough that people have reported undervoltage warnings using the (greedier) Pi 3, even with the battery fully charged. Jun 19, 2017 at 14:56