LJ_FIN
Posts: 4
Joined: Tue Dec 31, 2019 9:53 am

what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 10:29 am

sorry if I say something dumb I'm a noob. I understand that I may have to have multiple batteries of lower voltage in a series to get the correct voltage but in this thread I'm about how many amps the pi draws. Is there a risk of to many amps being fed into the pi and it shorting can someone explain:

What determines how many amps the pi draws when wired to a battery with no fixed current
Why it doesn't draw a fixed amount of amps
Are there extra procedures to prevent the pi from shorting
Is there a max current that the pi takes
And does increasing the current the pi draws make it faster

gordon77
Posts: 5279
Joined: Sun Aug 05, 2012 3:12 pm

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 10:46 am

The pi will draw the current it needs. For a pi 3 upto 2.5A, for a pi 4 upto 3A.

The current will depend on processes running and additional items eg usb devices.

You can't make it take more current than it needs and you can't make it go faster with current.

plugwash
Forum Moderator
Forum Moderator
Posts: 3701
Joined: Wed Dec 28, 2011 11:45 pm

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 10:51 am

The Pi will only draw the current it needs, but the voltage needs to be kept within a fairly narrow band (±5% is recommended) of the nominal 5V. Too high and there is a risk of damage, too low and the system may flake out. When undervoltage is detected the system will reduce the CPU speed (and hence reduce the input current) to try and stop the power rail completely collapsing.

The narrow range of acceptable voltages and the high input current makes supplying the pi directly off batteries troublesome.

Firstly batteries don't come in arbitary voltages. The nominal voltage of a cell depends mostly on the chemistry and you can only have an integer number of cells.

Secondly with most battery chemistries the voltage varies considerablly from the nominal over the discharge cycle and also with smaller batteries the voltage can vary considerably with load.

You might get away with using 4x NIMH cells when they are freshly charged, but I would expect you to get nothing like the full lifetime out of them before the system gets flaky.

LJ_FIN
Posts: 4
Joined: Tue Dec 31, 2019 9:53 am

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 11:32 am

plugwash wrote:
Tue Dec 31, 2019 10:51 am
thank you very much this was very help full

user12345
Posts: 122
Joined: Mon Dec 22, 2014 7:06 pm

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 12:13 pm

LJ_FIN wrote:
Tue Dec 31, 2019 10:29 am
Are there extra procedures to prevent the pi from shorting
You can use a Fuse or a Polyfuse for protection if you feed Power into GPIO.
This need a Step-Down or a Step-Up Converter cause the floating voltage of batterys.
You can for example use 6x 1.2V and feed this into XL4015 then into the Raspberry. There are ready Modules but you should add an additonal capicator at the Output and a (Poly)fuse, the XL4015 only limit shorting to 7A.
And dont forget to care about lowest discarge if you use rechargeable batterys.

LTolledo
Posts: 4163
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 12:53 pm

without connecting the negative side of the 5v battery to ground [example: pin6].... only the 5v side to the 5v [pin2 or pin4]
.... the RPi will not turn on....
.....therefore there will be no current flow :mrgreen:
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

LJ_FIN
Posts: 4
Joined: Tue Dec 31, 2019 9:53 am

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 4:13 pm

LTolledo wrote:
Tue Dec 31, 2019 12:53 pm
without connecting the negative side of the 5v battery to ground [example: pin6].... only the 5v side to the 5v [pin2 or pin4]
.... the RPi will not turn on....
.....therefore there will be no current flow :mrgreen:

I'm new to electronics how exactly do I ground the battery

gordon77
Posts: 5279
Joined: Sun Aug 05, 2012 3:12 pm

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 4:16 pm

Connect the battery -ve to a 'gnd' pin on the pi, eg pin 6

sparkyhall
Posts: 168
Joined: Mon Aug 27, 2012 9:14 am

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 4:28 pm

user12345 wrote:
Tue Dec 31, 2019 12:13 pm
LJ_FIN wrote:
Tue Dec 31, 2019 10:29 am
Are there extra procedures to prevent the pi from shorting
You can use a Fuse or a Polyfuse for protection if you feed Power into GPIO.
This need a Step-Down or a Step-Up Converter cause the floating voltage of batterys.
You can for example use 6x 1.2V and feed this into XL4015 then into the Raspberry. There are ready Modules but you should add an additonal capicator at the Output and a (Poly)fuse, the XL4015 only limit shorting to 7A.
And dont forget to care about lowest discarge if you use rechargeable batterys.
The datasheet for the XL4015 states that the minimum input voltage is 8V, you therefore need at least 8x 1.2V cells for reliable operation, that's assuming you discharge to 1V per cell.

LJ_FIN
Posts: 4
Joined: Tue Dec 31, 2019 9:53 am

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 4:37 pm

thank you very much everyone who replied this is my plan will it work:

4X1.2V (preferably NiMH because it's rechargeable) batteries in parallel with the positive wired to GPIO 2 and the negative wired to GPIO 6

klricks
Posts: 7300
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 4:47 pm

LJ_FIN wrote:
Tue Dec 31, 2019 4:37 pm
thank you very much everyone who replied this is my plan will it work:

4X1.2V (preferably NiMH because it's rechargeable) batteries in parallel with the positive wired to GPIO 2 and the negative wired to GPIO 6
No. The 4 batteries in parallel will only produce 1.2V not enough to run a RPi.
I know this has already been said.... but there is no combination of 'raw' batteries that can provide useful voltage and run time for a RPi.
You need to use a step up or step down converter in addition to the batteries.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

LTolledo
Posts: 4163
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Tue Dec 31, 2019 10:59 pm

better use a mobile battery pack rated 5v, at least 10,000mAh.

with those 1.2v NiMH batteries, you'll need to wire those in series-parallel
example 4 x 1.2v (at 2200mAh each) in parallel getting about 8500mAh total (value reduced intentionally), then 6 x (parallel 1.2v batteries) in series giving you 7.2v. then use a buck converter to step it down to 5.1v

this setup will be bigger, more complex, more expensive, and more troublesome, that the mobile battery mentioned above.

but if you like doing it this way.... then nobody can stop you... the choice is yours! ;)


or you can get a 12v motor cycle battery and use a 3A rated buck converter to step down the voltage from 12v to 5.1v.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

user12345
Posts: 122
Joined: Mon Dec 22, 2014 7:06 pm

Re: what would happen if wire a 5V battery to the 5VDC gpio pins of a rasbary pi 4

Wed Jan 01, 2020 11:19 am

sparkyhall wrote:
Tue Dec 31, 2019 4:28 pm
The datasheet for the XL4015 states that the minimum input voltage is 8V, you therefore need at least 8x 1.2V cells for reliable operation, that's assuming you discharge to 1V per cell.
Thats right better 8 Cells, but its for reaching the full 5 Ampere continously output. The 8V just required for the output PMOS, if you only power a raspberry it works with a lower Voltage. I power for example a little vacuum cleaner with it and 2 Li-Ion Cells(5V-8.3V).

Return to “Troubleshooting”