I am working on a project that needs the Raspberry Pi to work without a mains connection.
I have considered buying a 50000mAh USB power bank. Would this power a Raspberry Pi, and if so, would it power it for more than 24 hours?
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
Yes, most (but not all!) USB power banks are capable of powering a Raspberry Pi, since they usually have an output voltage of
5 V. And yes, by using a (quite large)
50 Ah power bank, you can definitely expect your Pi to run for at least
24 h. See the long answer below for reasoning and further relevant aspects.
According to actual Raspberry Pi power measurements, the Model 3B+ consumes about
520 mA when shooting 1080p video.
We first compute the electrical power of the Raspberry Pi in watts:
0.52 A * 5 V = 2.6 W
Next, we have to consider the fact that the mAh rating of a power bank refers to its nominal cell voltage (which is
3.7 V for a typical lithium-ion based power bank), and not to its output voltage of
5 V. Thus, a
50 Ah power bank has a capacity of about
50 Ah * 3.7 V = 185 Wh
The expected runtime for your Raspberry Pi therefore is
185 Wh / 2.6 W = about 71 h
The actual runtime will however highly depend on many unpredictable aspects like CPU usage, WiFi usage, connected hardware etc., so we'll just assume that the actual runtime will be at least
50 % of the expected runtime. This also gives us a safety margin.
71 h * 50 % = about 35 h
So, the actual runtime of your Raspberry Pi should be somewhere between
35 h and
71 h, depending on your setup. YMMV.
Please make sure to run sufficient tests with your power bank before actually using it in production!
As long as the power bank outputs 5V it will power the Pi.
It claims 50000mAh so it claims 2.5 amps per hour for 24 hours. Assume it will deliver half that so 1.25 amps for 24 hours.
If that is enough or not will depend on what you have connected and what the Pi is doing.
Sources on the Raspberry Pi forums say the Raspberry Pi uses approximately 500mA add in the 250mA for the camera module, and round for a safety margin equals approximately 1A. A 50,000mAh battery will run 1A for 50 hours. Even with additional safety margin that is plenty to run for 24 hours.
Something to keep in mind is that some power packs will shut themselves down if there isn't enough of a power draw. For example, I have a New Trent PowerPak+ 13500mAH power pack, which shuts itself off after a couple minutes if it's only powering an Arduino or Raspberry Pi. (Plugging in my hungry smart phone prevents this)
Any USB power pack will certainly run it, as long as it doesn't shut off. As previously suggested, you can get an inline USB power meter, and if you take a measure of your Pi's power draw, you can calculate the run time of your setup.
I expect the battery you propose would be able to run your Pi for 24 hours. Depending on the model of Pi and what other equipment you have connected e.g. a USB keyboard would also draw some power, as would the camera module. I tested a Model B+ running from a 9,000 mAh battery which was configured with a WiPi adapter, running as a web server and WiFi hotspot and it ran for over 12 hours before the battery was exhausted. I suggest you consider trying the Model B+ and the Model A+ (which consumes significantly less power, but may not meet your project's requirements in terms of connectivity, USB ports, or RAM).See http://www.raspberrypi.org/products/ for info on the different Pi models.
I use inline USB power meters to monitor the power consumption. My current favourite is http://www.portablepowersupplies.co.uk/portapow-usb-power-monitor-v2/ and I have 10 which I use for my testing of Pi's and power consumption. You might find one of these helpful in your testing. Connect it inline with the power supply to the Pi.
The Raspberry Pi FAQs also has several topics that seem relevant e.g. on the power consumption of the camera unit and on power requirments generally http://www.raspberrypi.org/help/faqs/
In answer to one of your related questions, I use various sizes of SD-Card, up to 128GB in the older full-sized Model B, and 64GB micro-SD cards in the newer A+ and B+ I use branded, high-speed and relatively expensive models e.g. from Kingston, SanDisk, etc. Ask a separate question please if you'd like to know more.
And a final suggestion for now, if you want to be able to charge the battery while powering the Pi relatively few battery packs are capable of doing so. Again, you're welcome to ask a separate question if this topic is relevant.
Check out this BattPi case on kickstarter