nick8967
Posts: 36
Joined: Fri Mar 25, 2016 11:02 pm

Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 6:31 am

Hello, my question is if I can use this https://www.xiaomitoday.com/xiaomi-mi-p ... price-tag/
powerbank with Raspberry Pi 3 B+ ? And how do I calculate if this powerbank can handle 2.5 A current? Have anyone experience to help me?

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 7:08 am

You can't predict whether this unit can supply the necessary current without definite specifications. All you know is that this unit has a capacity of 20Ah (ie if it were able to supply 2.5A, it could do so for 8 hours).

Here's how it works: if you buy something from a shop, you look at the information in the packaging to decide whether it fits the bill (in this case, does it say "maximum current" at least 2.5A). If it is not clear on the box, you say to the shop keeper "I need this to supply 2.5A, will it do that?", and the shop keeper may say "yes" in which case he has made a specific contract with you and you can take it back if it doesn't. Ditto if it doesn't do what it says on the box. But you can't return something unless it doesn't meet its stated specifications (unless the shop offers goodwill).

If buying on-line, you have the protection of the distance selling regulations (UK). These recognise that you are unable to examine the item before purchase, so have the right to return the item in original condition for any reason at all within 14 days. So as long as you don't damage it in any way and can repackage it as it arrived, you can test to see if it does what you need. However, you may still be liable for the cost of return and it often isn't worth returning cheap imports.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

nick8967
Posts: 36
Joined: Fri Mar 25, 2016 11:02 pm

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:01 am

Thank you.

And something else more general, is there a mathematical or empirical type with which I can calculate how much time I can get from the powerbank 5,1 to 5,0 Volts output (before the output minimizes to low to use it for the Raspberry)?

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:09 am

The output of the powerbank will be regulated to exactly 5V. When the charge runs out, it will drop below 5V very rapidly (and cut out).

With a 20Ah capacity, the powerbank should supply current at 5V for however long it takes to use up that capacity. 1 amp for 20 hours = 20Ah (amp-hours). 0.5A for 40 hours = 20Ah. Etc.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

User avatar
DougieLawson
Posts: 33609
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:10 am

The variable you're missing is the processor load. If the processor is running 20% busy it uses less power than if it's running flat out at 100% (note: I'm carefully ignoring things like HDMI, ethernet, WiFi and USB). That makes the maths just about as impossible as Slatibartfast's "Bistro Math". It's much the same reason why your mobile phone goes flat when you need to make an important phone call.

Running a series of empirical fully charged to fully discharged test cycles with a realistic workload is probably your only way of discovering whether your powerbank can run your RPi for your desired runtime.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:15 am

Agreed. I was explaining in terms of a steady current because it makes the maths easy, but how long 20Ah lasts is very dependent on the actual current demand from the RPi in the application.

The point from the first post is that the RPi will have a peak current demand during boot and other intensive processing, and if the powerbank is unable to supply the peak current it won't do the job - however much capacity it has. Chargers and powerbanks designed for topping up mobile phones typically have a rating of 1A, for iPads and iPhones typically 2A.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

nick8967
Posts: 36
Joined: Fri Mar 25, 2016 11:02 pm

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:31 am

So If have understand correctly, If I have the science fiction scenario of demanding 5A, this Powerbank can give this (because it is 20000mAh) for 4 hours and then it stops? Right?

User avatar
DougieLawson
Posts: 33609
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:34 am

It'll be less than four hours because you can't drain a powerbank flat, it's not 100% efficient and the voltage will drop below 5V as the cells are depleted. But your basic theory is correct.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:39 am

...but it's unlikely the powerbank would be able to supply 5A in the first place.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

nick8967
Posts: 36
Joined: Fri Mar 25, 2016 11:02 pm

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 9:51 am

That's why I am asking. How I find what current can a powerbank or battery in general (Lead Acid for example) can provide without destroying it? I cannot believe I can use 20 A for an hour, from a 20000mAh powerbank, there must be some limit...Right?

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

Re: Raspberry pi 3 b+ with powerbank

Fri May 25, 2018 10:43 am

It is almost always the case that the specs of powerbanks give the claimed ampere-hour capacity of the internal cell. The average voltage of the cell is only about 3.7 volts. So even if the capacity figure is accurate and the conversion efficiency were 100%, the run time would only be about 74% of the time calculated by dividing the Ah figure by the current consumption.

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

Re: Raspberry pi 3 b+ with powerbank

Sat May 26, 2018 4:28 am

Z80 Refugee wrote:
Fri May 25, 2018 9:09 am
The output of the powerbank will be regulated to exactly 5V. When the charge runs out, it will drop below 5V very rapidly (and cut out).

With a 20Ah capacity, the powerbank should supply current at 5V for however long it takes to use up that capacity. 1 amp for 20 hours = 20Ah (amp-hours). 0.5A for 40 hours = 20Ah. Etc.
There's a fly in your ointment. The Ampere -hour ratings for powerbanks are at the nominal cell voltage of 3.7v. So a 20Ah unit will supply 20Ah*3.7v= 74Wh. A Pi3B+ at full load will draw 2.5A*5v=12.5W. So rounding up slightly, a 75Wh source will provide 75Wh/12.5W= 6 hours.

Doing the ratings this way has obvious marketing advantages as it makes the batteries appear to have more capacity than they actually do.

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

Re: Raspberry pi 3 b+ with powerbank

Sat May 26, 2018 4:37 am

nick8967 wrote:
Fri May 25, 2018 9:31 am
So If have understand correctly, If I have the science fiction scenario of demanding 5A, this Powerbank can give this (because it is 20000mAh) for 4 hours and then it stops? Right?
No, for several reasons. The first being that the step-up converter built into the powerbank (the actual battery cell only provides 3.7v) is very unlikely to be rated to provide 5A. The highest rating I've seen so far is 2.4A and many powerbanks are only rated to deliver 1A. The other issue here is that no system is perfect. There will be losses. A really good system may convert 90% or more of the battery power to usable 5v current. But it might be as low as 70% efficient. And, as already noted, you can't draw a battery down to zero charge. At least not more than once. Plus, if you try to drain most batteries too fast, they heat up and their internal resistance (and losses) increase. Rather specifically, you don't want a Lithium-based battery to heat up...because it may continue to do so until it spontaneously combusts.

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

Re: Raspberry pi 3 b+ with powerbank

Sat May 26, 2018 4:48 am

nick8967 wrote:
Fri May 25, 2018 9:51 am
That's why I am asking. How I find what current can a powerbank or battery in general (Lead Acid for example) can provide without destroying it? I cannot believe I can use 20 A for an hour, from a 20000mAh powerbank, there must be some limit...Right?
Well... A Lead-Acid or NiCad battery can supply a *lot* of current for a relateively short time. In commerically available cases, over 500A. That's one of the reason why Lead-Acid batteries are used in automobiles to start the engine. Basically, the battery is shorted through the starter motor. NiCad can do that too--and better than Lead-Acid, but they are far more expensive. The problem is that the output voltage of the battery drops. For a 12v Lead-Acid, it drops to about 7v under that kind of load, but starter motors (and ignition systems) are designed knowing that that happens. A 12v NiCad will still deliver about 10v under those conditions. On the other hand, the NiFe Edison cell will only deliver about 1.2v from a 12v battery when given that kind of load, which is a big reason why we *don't* use Edison cells to start cars.

With the LiIon/LiPo systems, shorting the battery tends to cause fires and explosions. So, yes, there are limits. In addtion, powerbanks are intended to deliver 5v even though the nominal cell voltage is 3.7v. The other aspect of the current limit, then, is how much current the components of the step-up voltage converter handle--a problem you don't have in 12v automotive systems.

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Raspberry pi 3 b+ with powerbank

Sat May 26, 2018 7:59 am

nick8967 wrote:
Fri May 25, 2018 9:51 am
That's why I am asking. How I find what current can a powerbank or battery in general (Lead Acid for example) can provide without destroying it? I cannot believe I can use 20 A for an hour, from a 20000mAh powerbank, there must be some limit...Right?
Correct, and unless you can find a specification telling you exactly what current the unit can provide - don't buy. That's the essence of my first reply.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

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

Re: Raspberry pi 3 b+ with powerbank

Sat May 26, 2018 8:56 am

You'll also find that the USB sockets on these things are limiting as well - typically 2.4A maximum, but a lot of them are actually only 1A or sometimes even 0.5A so even if the powerbank's boost circuit could provide 5A, it'll still be limited by the usb ports.

I just tested this the other night on a 5A rated power supply (not a charger, but an actual power supply) I have.
Using the USB ports (with a very expensive cable rated for 2.4A) I was getting voltage drops oon the Pi.
I soldered wires directly to the power supply (not recommended for beginners, You could electrocute yourself even if it is unplugged!) and tried again. The Pi happily chugged along with absolutely no voltage drops whatsoever.
User experiencing technical difficulties.

User avatar
bensimmo
Posts: 3113
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Raspberry pi 3 b+ with powerbank

Sat May 26, 2018 11:46 am

And of course, as far as I know, there is no standard for reporting powerbank specs (don't think of them as cells/batteries).
A powerbank as they seem to be called has a voltage regulator (or buck convertor) give a desiered stable voltage out. 5/5.1V for a RaspberryPi, which happens to be the USB normal voltage.

The Ah rating could be actual rating for the bank as they test them and work it out, some may use the imaginary cell rating added up, some will still use that for two cells in series but shouldn't. Hence you may actually get half.

A proper make, respected brand should give you the actual usable Ah, not the total of the cells. I.e. you should get 10Ah out of the 'bank' as used at the 5V.
Most large capacity are 2A+ now, the old lipstick/cyclinder style or old stock may be 1A. Mainly as most phones and tablets for over 5years charge at 2A+.

When a powerbank runs out is when the cells can no longer provide 5V, it will just stop. Voltage should not drop as the regulator will output at 5V.
A battery is different, it's output is not regulated, so it voltage drops over time, NiMh have a flat curve with a steep drop near the end.
Alkaline have a continuous drop, but you don't get a sudden drop like you do with NiMh.

Of course most powerbank use Li-Ion or Li-Po cells.
The high capacity 10/20Ah tend to be two Li-Po flat rectangular cells.

Sounds complicated, but it actually isn't.

nick8967
Posts: 36
Joined: Fri Mar 25, 2016 11:02 pm

Re: Raspberry pi 3 b+ with powerbank

Tue May 29, 2018 11:18 am

As far as this is concerned:
https://www.xiaomitoday.com/xiaomi-mi-p ... price-tag/

as I can figure out, inside the case there are 2 separate batteries, right? So I can use the one battery to supply the Raspberry and a few sensors, and the other battery to supply the other sensors, right?

Because as I have calculated, for the Raspberry and the other sensors, I need more than 2.5 Amperes, so I will need two powerbanks.

Also If I have a load that needs 12 Volts, I just plug it to the usb input of the powerbank, and the powerbank detects it, right?

User avatar
Z80 Refugee
Posts: 358
Joined: Sun Feb 09, 2014 1:53 pm

Re: Raspberry pi 3 b+ with powerbank

Tue May 29, 2018 12:59 pm

nick8967 wrote:
Tue May 29, 2018 11:18 am
as I can figure out, inside the case there are 2 separate batteries, right?
Yes. So what? They are not used separately by the power bank.
nick8967 wrote:
Tue May 29, 2018 11:18 am
So I can use the one battery to supply the Raspberry and a few sensors, and the other battery to supply the other sensors, right?
What gives you that idea? The two batteries are used inside the power bank to operate it. There are some control electronics which take a 5V input to charge them, and some more electronics which take their output to supply the 5V outputs. If you want to use the batteries separately, you will have to open up the power bank and remove the batteries, and then provide your own control electronics to charge them etc etc. Wouldn't it be easier just to buy some batteries?
nick8967 wrote:
Tue May 29, 2018 11:18 am
Because as I have calculated, for the Raspberry and the other sensors, I need more than 2.5 Amperes, so I will need two powerbanks.
Two separate power banks, yes.
nick8967 wrote:
Tue May 29, 2018 11:18 am
Also If I have a load that needs 12 Volts, I just plug it to the usb input of the powerbank, and the powerbank detects it, right?
That is very specialised. If your "load" communicates with the USB port that it can accept the higher voltage before the 12V is made available. It would be dangerous to do so unless the load was 12V-capable. I don't know what the communication mechanism is (sometimes signalled by a specified resistance between the data lines), but it would have to be pretty foolproof and may vary manufacturer to manufacturer (you can be sure Apple don't want you plugging in a Samsung).

If you think you could just wire up a 12V fan to a USB plug, plug it in and it will be run from 12V - you're wrong. I would ignore the 12V possibility if I were you.
Military and Automotive Electronics Design Engineer (retired)

For the best service: make your thread title properly descriptive, and put all relevant details in the first post (including links - don't make us search)!

User avatar
bensimmo
Posts: 3113
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Raspberry pi 3 b+ with powerbank

Tue May 29, 2018 1:54 pm

nick8967 wrote:
Tue May 29, 2018 11:18 am
As far as this is concerned:
https://www.xiaomitoday.com/xiaomi-mi-p ... price-tag/

as I can figure out, inside the case there are 2 separate batteries, right? So I can use the one battery to supply the Raspberry and a few sensors, and the other battery to supply the other sensors, right?

Because as I have calculated, for the Raspberry and the other sensors, I need more than 2.5 Amperes, so I will need two powerbanks.

Also If I have a load that needs 12 Volts, I just plug it to the usb input of the powerbank, and the powerbank detects it, right?
Two cells acting as one battery.
Ignore what is inside.

You have two outputs both giving 5.1V at a max of 2.4A.
You capacity is 13Ah at 5.1V at least it tells you :-).

Yes one connection will run a Pi3 and the other to run other 5V things off if needed.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 57 guests