Androsmeq
Posts: 10
Joined: Thu Nov 22, 2018 9:02 am

How long will it stay on with a external battery?

Thu Mar 28, 2019 7:54 am

Hello, i have a raspberry pi 3 b+ and i have a 20100 mah external battery. How long can i keep the raspberry pi on?

User avatar
Imperf3kt
Posts: 2554
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 8:01 am

"Depends"
The raspberry Pi isn't designed to operate from batteries. It may not operate (properly) at all depending on how you attach whatever battery you have and what the battery is, how old it is, if it's fake, what circuitry it includes, how much you use, what you have plugged into the Pi, etc.

It's not an easy to answer question.
Last edited by Imperf3kt on Thu Mar 28, 2019 8:03 am, edited 1 time in total.
55:55:44:44:4C
52:4C:52:42:41

Androsmeq
Posts: 10
Joined: Thu Nov 22, 2018 9:02 am

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 8:03 am

Imperf3kt wrote:
Thu Mar 28, 2019 8:01 am
"Depends"
The raspberry Pi isn't designed to operate from batteries. It may not operate (properly) at all.
If it is a powerfull battery?

DirkS
Posts: 9877
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 8:07 am

Androsmeq wrote:
Thu Mar 28, 2019 8:03 am
Imperf3kt wrote:
Thu Mar 28, 2019 8:01 am
"Depends"
The raspberry Pi isn't designed to operate from batteries. It may not operate (properly) at all.
If it is a powerfull battery?
Define 'powerful'...

Androsmeq
Posts: 10
Joined: Thu Nov 22, 2018 9:02 am

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 8:08 am

DirkS wrote:
Thu Mar 28, 2019 8:07 am
Androsmeq wrote:
Thu Mar 28, 2019 8:03 am
Imperf3kt wrote:
Thu Mar 28, 2019 8:01 am
"Depends"
The raspberry Pi isn't designed to operate from batteries. It may not operate (properly) at all.
If it is a powerfull battery?
Define 'powerful'...
Let’s say 5v output and 3a

User avatar
rpiMike
Posts: 836
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 8:12 am

Why don’t you just try it and let us know how long it lasts?

Heater
Posts: 12976
Joined: Tue Jul 17, 2012 3:02 pm

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 9:19 am

I don't know any batteries that output 5v. Never mind a regulated 5v.

Perhaps you mean a "power bank" as used for mobile phones. Then it rather depends on the nature of the particular power bank and what your Pi is doing.

Suggest you try an experiment and report back to us.

User avatar
B.Goode
Posts: 8059
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 9:42 am

Androsmeq wrote:
Thu Mar 28, 2019 7:54 am
Hello, i have a raspberry pi 3 b+ and i have a 20100 mah external battery. How long can i keep the raspberry pi on?


A trivial calculation is very simple, so hardly worth a question in a forum -


From: https://www.raspberrypi.org/documentati ... /#pi-power

Raspberry Pi 3 Model B+ Typical bare-board active current consumption - 500mA



20100 / 500 = 40.2 hours



But just as your battery capacity maybe be approximate and not take into account its ability to deliver a constant regulated voltage, so too your RPi might not be running as a bare board and its usage may not be 'typical.' Startup/reboot, attached devices, heavy processor use might all increase current load and decrease runtime.


40 hours is therefore a very optimistic upper limit on what you could get in real life conditions. Your experience with the battery in question and with the RPi running its anticipated workload is the only thing that matters. There is no-one to appeal to if the battery runs out prematurely. "It should work because some guy on the Internet said it would be ok... "

drgeoff
Posts: 9637
Joined: Wed Jan 25, 2012 6:39 pm

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 9:54 am

My rule of thumb is to divide the advertised mAh figure by at least 2. Then divide that by the current consumption at 5 volts to get hours.

The halving allows for:
1. The mAh figure invariably refers to the cell, not the 5 volt output.
2. The efficiency of the dc-dc converter is less than 100%.
3. The mAh figure is likely to be on the optimistic side for marketing reasons.
4. Capacity of lithium cells decreases with time from the moment they are manufactured. And inappropriate storage conditions exacerbate that.

achrn
Posts: 373
Joined: Wed Feb 13, 2013 1:22 pm

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 2:09 pm

B.Goode wrote:
Thu Mar 28, 2019 9:42 am

20100 / 500 = 40.2 hours
You're assuming this battery outputs 5V.

If it doesn't, your trivial calculation is clear, simple and wrong.

OP: We need more detail, like:
1: Do you really mean battery, or do you mean powerbank?
2: If battery, what chemistry and what voltage (or how many cells)?
3: Is it literally just a pi you want to run? (no keyboard, mouse or screen?) What is it doing?

MarkTF
Posts: 297
Joined: Tue Mar 03, 2015 4:59 pm

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 3:29 pm

achrn wrote:
Thu Mar 28, 2019 2:09 pm
B.Goode wrote:
Thu Mar 28, 2019 9:42 am

20100 / 500 = 40.2 hours
You're assuming this battery outputs 5V.

If it doesn't, your trivial calculation is clear, simple and wrong.

OP: We need more detail, like:
1: Do you really mean battery, or do you mean powerbank?
2: If battery, what chemistry and what voltage (or how many cells)?
3: Is it literally just a pi you want to run? (no keyboard, mouse or screen?) What is it doing?
Even with powerbanks, the specifications are confusing. They generally specify the mAh rating at the battery voltage (typically 3.7 V) not at the device output (typically 5 V USB). If there is a Watt Hour rating that is typically at the output and one can determine an upper bound estimate of battery life by dividing that by the power consumption of the load (e.g. 5 V * 500 mA = 2.5 W). This will be optimistic so a reasonable rule of thumb is to halve that as per "drgeoff"'s post above.

https://www.anker.com/products/A1271012

User avatar
B.Goode
Posts: 8059
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 4:46 pm

"I'm playing all the right notes... not necessarily in the right order!"



I stated the basis of the calculation, using the only figures available to us. The answer is arithmetically and dimensionally correct. It may not be useful. I explained in some detail why it might be misleading.


As my late granny used to say: "Ask a silly question, get a silly answer."

Or as early computer processing practitioners used to say: "Garbage In; Garbage Out."


I thought my conclusion made this clear -
Your experience with the battery in question and with the RPi running its anticipated workload is the only thing that matters.

W. H. Heydt
Posts: 10625
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 5:03 pm

The elephant in the room that hasn't been addressed yet... If the OP's "battery" is a powerbank, which I consider to be quite likely as that is a typical rating for a relatively large one, then one must ask this: Does it have an output port rated at or close to 2.5A?

I have some that are marked for 2.4A output, which *might* be sufficient for a Pi3B+, depending on what is connected, but I've yet to get one that is rated for 2.5A output. One would think that a higher capacity unit would have a higher current output, but that is not always the case. If the outputs of his unit top out at 2A, he *might* skate by. If any given port is limited to 1A, he'd better look for a different powerbank...or a differnt model of Pi.

Conservativism in engineering suggests that powerbanks (at least the ones I've seen) should be limited to Pi2B boards or others that require less current than the Pi3B or Pi3B+.

This https://www.monoprice.com/product?c_id= ... 1&format=2 for instance is a powerbank rated almost exactly equal to the one the OP mentioned. Its higher current output is rated for 2A. By comparision this https://www.monoprice.com/product?c_id= ... 1&format=2 is a 10.4Ah unit that has a port rated at 2.4A.

User avatar
B.Goode
Posts: 8059
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 5:08 pm

If the OP's "battery" is a powerbank, which I consider to be quite likely as that is a typical rating for a relatively large one, then one must ask this: Does it have an output port rated at or close to 2.5A?


When the OP was challenged about having a 'powerful' battery they replied:
Let’s say 5v output and 3a


So that's ok then...

W. H. Heydt
Posts: 10625
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 5:27 pm

B.Goode wrote:
Thu Mar 28, 2019 5:08 pm
If the OP's "battery" is a powerbank, which I consider to be quite likely as that is a typical rating for a relatively large one, then one must ask this: Does it have an output port rated at or close to 2.5A?


When the OP was challenged about having a 'powerful' battery they replied:
Let’s say 5v output and 3a


So that's ok then...
Okay...show me a powerbank with a 3A output.

User avatar
B.Goode
Posts: 8059
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 5:48 pm

Okay...show me a powerbank with a 3A output.
I don't need to. The OP has one, or apparently knows where to get one...

Heater
Posts: 12976
Joined: Tue Jul 17, 2012 3:02 pm

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 6:04 pm

W. H. Heydt,
The elephant in the room that hasn't been addressed yet... If the OP's "battery" is a powerbank,...
I guess nobody ever reads what I write here.

You are right though, it is no doubt a "power bank". Of unknown origin and capabilities. Therefore we cannot sensibly advise.

chermis
Posts: 1
Joined: Tue Feb 19, 2019 11:11 pm
Location: Alicante, España
Contact: Website Twitter

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 6:23 pm

I usually get a duration from 35-45 hours more or less.
Depends also if you are using it all the time or your system is able to switch on/off when the power battery is not needed.

Androsmeq
Posts: 10
Joined: Thu Nov 22, 2018 9:02 am

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 7:05 pm

Thank you so much for all the help!

Andyroo
Posts: 3852
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: How long will it stay on with a external battery?

Thu Mar 28, 2019 7:49 pm

Androsmeq wrote:
Thu Mar 28, 2019 7:05 pm
Thank you so much for all the help!
:?:

No one has actually given you an answer. The calculated example is exactly that - a mathematical answer and is worth the paper it’s written on (no disrespect meant).
Need Pi spray - these things are breeding in my house...

kristaholle36
Posts: 1
Joined: Wed Feb 27, 2019 8:47 am

Re: How long will it stay on with a external battery?

Fri Mar 29, 2019 6:27 am

The external output port has a self-recovery fuse to prevent the raspberry pi from being burnt due to an external short circuit.
Two output modes, except for the regular output via USB port.
At high currents, such as for high loads above 2.5A, the voltage drop across the USB cable is a problem that cannot be ignored.
Therefore, we provide a 2.54mm header, which is welded at the Raspberry Pi GPIO 5V interface for direct power supply, to minimize the cable damaged and pressure drop.

User avatar
davidcoton
Posts: 3952
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: How long will it stay on with a external battery?

Fri Mar 29, 2019 9:59 am

kristaholle36 wrote:
Fri Mar 29, 2019 6:27 am
The external output port has a self-recovery fuse to prevent the raspberry pi from being burnt due to an external short circuit.
Two output modes, except for the regular output via USB port.
At high currents, such as for high loads above 2.5A, the voltage drop across the USB cable is a problem that cannot be ignored.
Therefore, we provide a 2.54mm header, which is welded at the Raspberry Pi GPIO 5V interface for direct power supply, to minimize the cable damaged and pressure drop.
This is only partly correct, and is generally bad advice.

The polyfuse actually only protects the Pi if power is supplied through the microUSB connector. It will then protect against 5V rail problems on the GPIO connections, through on-board shorts, and on the USB port of A models. The USB ports of B models are prtected separately, IIRC. Note that there is no polyfuse on Pi0 models. The most important protection is to reduce the possibility of fire should a fault occur, the protection of the board itself is somewhat limited since most electronic devices will blow far faster than the polyfuse. There are additional protection elements, notably a TVS, to help with incorrect supply problems (but see the note below about power applied via the GPIO header).

The polyfuse sets a limit of 2A5 for the current drawn ( actually peaks can be higher, since the trip characteristic is quite "soft"). This is for the board and all peripherals. This requires the use of thick and short supply cables -- for example, the "official" PSU uses 18AWG wires. Lower numbers are thicker. USB signal cables are often only rated for 500mA.

Applying the power to the GPIO power pins will do nothing in itself to reduce voltage drop, and will bypass the on-board polyfuse. If you must supply power this way, you should provide your own polyfuse or equivalent protection.
Signature retired

PiGraham
Posts: 3568
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How long will it stay on with a external battery?

Fri Mar 29, 2019 10:16 am

B.Goode wrote:
Thu Mar 28, 2019 9:42 am
Androsmeq wrote:
Thu Mar 28, 2019 7:54 am
Hello, i have a raspberry pi 3 b+ and i have a 20100 mah external battery. How long can i keep the raspberry pi on?


A trivial calculation is very simple, so hardly worth a question in a forum -


From: https://www.raspberrypi.org/documentati ... /#pi-power

Raspberry Pi 3 Model B+ Typical bare-board active current consumption - 500mA



20100 / 500 = 40.2 hours



But just as your battery capacity maybe be approximate and not take into account its ability to deliver a constant regulated voltage, so too your RPi might not be running as a bare board and its usage may not be 'typical.' Startup/reboot, attached devices, heavy processor use might all increase current load and decrease runtime.
The mAH figure isn't so useful there. It usually relates to the cells in the battery which have a nominal 3.7 V terminal voltage. But the Pi runs on 5V. TO relate the two we can calculate capacity in Watt Hours. Some power packs will specify capacity in WH.

2100 * 3.7V = 77.7 WH.

For a Pi drawing 500mA at 5V that is 0.5 x 5 = 2.5 W.
77.7 / 2.5 = 31 hours.

That is still optimistic :
The 5V regulator will waste some energy.
We can assume an efficiency. Let's say 85% as a realistic figure.
The quoted capacity of a battery is often not accurate to what you can get out in practice.

Cell protection circuits should cut the battery connection at a safe low voltage somewhere between 2.5 and 3V. You therefore can't draw out all the theoretical energy stored in the battery because that would damage the battery.

As batteries age and go through charge-discharge cycles they lose some capacity.

Adjusting for the assumed efficiency .85 x x31 = 26 hours.

But of course you should try it and see.

PiGraham
Posts: 3568
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How long will it stay on with a external battery?

Fri Mar 29, 2019 10:26 am

MOst power packs aren't going to warn the Pi before they shut off at minimum charge level. This could cause problems with SD corruption. To ensure clean shutdown you could use a UPS that signals before shutdown, you could use an ADC to measure battery cell voltage (not the regulated output voltage) or you could use something with a reserve power that can keep the Pi alive after the powerbank shuts off to allow enough time for the Pi to shutdown safely. Another option to consider is to configure for read-only operation. Adafruit have a tutorial and script for that. This means you can't store any permanent data to the SD card.

User avatar
B.Goode
Posts: 8059
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: How long will it stay on with a external battery?

Fri Mar 29, 2019 10:48 am

Having been directly criticized twice for my reply, can point out again that the OP only provided two "facts' as a the basis for their question:
i have a raspberry pi 3 b+ and i have a 20100 mah external battery

I tried to indicate, perhaps too gently, that a reliable reply could not be provided from those supposed 'facts'.

My tl;dr summary was
Your experience with the battery in question and with the RPi running its anticipated workload is the only thing that matters.

Return to “General discussion”