jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

3.3V, GPIO and GND max current

Wed Oct 29, 2014 5:04 pm

Hello,

Newbie questions.

1. I've read this webpage http://elinux.org/Rpi_Low-level_periphe ... _.28GPIO.2
where it is stated that the 3.3V should max at 50mA, but I'm getting above 250mA.
Am I measuring it incorretly?

2. I can't find information about the max current allowed for input to the GPIO pins. Anyone knows this?

3. What about the max current to the GND pins?

Thanks in advance,

JM

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

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 7:53 pm

jcrmatos wrote:Hello,

Newbie questions.

1. I've read this webpage http://elinux.org/Rpi_Low-level_periphe ... _.28GPIO.2
where it is stated that the 3.3V should max at 50mA, but I'm getting above 250mA.
Am I measuring it incorretly?

2. I can't find information about the max current allowed for input to the GPIO pins. Anyone knows this?

3. What about the max current to the GND pins?

Thanks in advance,

JM
The RPi does not control the current YOU do. If you don't you could burn the GPIO's
You are required to design your circuit(s) so that no more than 50mA total is allowed to pass into/out of the GPIO's combined. If I remember right it's no more than 16mA on any single GPIO.
All current goes back to ground so the question is irreverent.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

User avatar
joan
Posts: 15949
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 8:01 pm

Is this a model B+. The power supply circuitry has changed and the 50mA figure may no longer apply.

Probably best not to draw too much current via the gpios. I assume your 250mA figure is from the 3V3 rail.

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 8:22 pm

Hello,

Yes, it is model B+.
Yes, the 250mA was measured from the 3.3V pin.

Thanks,

JM

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 8:25 pm

Hello klricks,

In that case, I should always limit the current through some resistor (either input or output)?
That means that the GND "accepts" any voltage/current?

Thanks,

JM

User avatar
joan
Posts: 15949
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 8:28 pm

This may help http://www.mosaic-industries.com/embedd ... ifications

Note, it still uses the possibly outdated figure of 50mA in total. The numbers for individual gpios should still be relevant.

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 8:57 pm

Hello joan,

If I understood correctly both documents (mine and yours) it is stated that a max of 50mA (from all GPIO pins) and a max of 16mA (from each single GPIO pin) should be used.
In that case, I should always use a 200 Ohm resistor for every GPIO pin, no matter if it is input or output.
Is this correct?

Thanks,

JM

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

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 9:27 pm

GPIO pins configured as inputs take so little current that you can ignore it. The 16 mA applies when a GPIO is an output.
Quis custodiet ipsos custodes?

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

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 9:30 pm

jcrmatos wrote:Hello joan,

If I understood correctly both documents (mine and yours) it is stated that a max of 50mA (from all GPIO pins) and a max of 16mA (from each single GPIO pin) should be used.
In that case, I should always use a 200 Ohm resistor for every GPIO pin, no matter if it is input or output.
Is this correct?

Thanks,

JM
The resistor you use depends on your circuit.
It would be more correct to say that the equivalent resistance of a circuit connected to a single GPIO must never be less than about 200 Ohms.... Source or sink.
Of course the resistance can be more. For example if you want to draw 1mA then 3300 Ohms would be the resistance.
If you needed to use the max current of 16mA then you could only use only 3 GPIO pins. 3x16mA=48mA
Still looking for specs for the B+

Edit:
What I mean by source or sink:
Source: GPIO ------[LED]-----[Res]------ GND
Sink: 3.3V-------[LED]-----[Res]------GPIO
Last edited by klricks on Wed Oct 29, 2014 10:12 pm, edited 1 time in total.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Wed Oct 29, 2014 10:11 pm

Hello,

Ok, thanks.

JM

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 14480
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: 3.3V, GPIO and GND max current

Thu Oct 30, 2014 12:38 am

there are two issues mixed up a bit here;
  • The internal 5V to 3,3V regulator and its capabilities (on B and B+)
    and
  • The amount of current a GPIO pin can source or sink
As for how much current the 3V3 regulator can supply (through the GPIO's or directly from the 3V3 pin), on the A and B it was a simple low drop linear regulator, meaning the difference between its input and output voltage was directly turned into heat. How much heat depends on the current drawn. It's cooling was designed to that it could deliver approximately 50mA more that the PI itself used without overheating, any more than 50mA and you risked that the regulator would overheat and shutdown itself to protect itself.

On the B+ (and in the future on the A+) the regulator is a "switching power supply" and it doesn't heat up, in fact the regulator probably can handle 500mA, but its still limited by a 2.1A polyfuse in the 5V input.

as for the GPIO, the A, B, B+ and A+ all use the same chip (SoC) and all the limitations are still the same, that is a maximum of 15mA per GPIO (sink or source), and a total limit of the sum of all GPIO's of 50mA. Drawing more current through the GPIO('s) than that may cause damage.

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Thu Oct 30, 2014 9:09 am

Hello,

Thanks for the update.

JM

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Thu Oct 30, 2014 9:24 am

Hello,

I was checking your information in all your comments and a question poped up.
The B+ (the model I have) has 26 GPIO and 2 ID_S* (ID_SD and ID_SC).
I believe tha math would be 50mA/26 GPIO = 1.923mA (near 2mA) per pin.
But in that case tha math is not taking into account those 2 ID_S* pins.
Is this correct?
Should I divide per 28 instead of 26?

Thanks,

JM

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Thu Oct 30, 2014 9:29 am

Hello,

Found the answer here
http://www.raspberrypi.org/wp-content/u ... s-gpio.png

Those 2 ID_S* pins are only for EEPROM and shouldn't count.

JM

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 14480
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: 3.3V, GPIO and GND max current

Sun Nov 02, 2014 12:29 pm

jcrmatos wrote:Hello,

I was checking your information in all your comments and a question poped up.
The B+ (the model I have) has 26 GPIO and 2 ID_S* (ID_SD and ID_SC).
I believe tha math would be 50mA/26 GPIO = 1.923mA (near 2mA) per pin.
But in that case tha math is not taking into account those 2 ID_S* pins.
Is this correct?
Should I divide per 28 instead of 26?

Thanks,

JM
There are two rules you must adhere to!, the first one says each GPIO is capable of 15mA, the second rule says that the total amount of current used for sourcing/sinking may not exceed 50mA. if you have less than for GPIO's each one can do 15mA all by itself, but a fourth one would drive the total over the 50mA limit. if you use ten GPIO's and its possible their are all sinking or sourcing current at the same time, then you have to divide the 50mA by ten, for 5mA each.

Its about the GPIO's you use as outputs. The kernel will (try to) read the HAT's EEPROM before booting up your applications, and afterwards those gPIO pins would not be used anymore, so nothing changes about the 15mA and 50mA rules, as at the time they apply the EEPROM GPIO's are out of commission.

by the way, there are some GPIO's used as outputs by the system itself (for things like driving the ACT LED, and PWM audio), but the designers were careful to almost not use any current to drive them, so the 50mA rule wasn't compromised (much).

jcrmatos
Posts: 14
Joined: Wed Oct 29, 2014 5:00 pm

Re: 3.3V, GPIO and GND max current

Sun Nov 02, 2014 4:23 pm

Thanks

Elmanhands
Posts: 9
Joined: Fri Jul 27, 2018 10:45 am

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 7:44 pm

I was reading the thread and I couldn’t find an answer to the third question, does the GND have a max “accepted” voltage?
Last edited by Elmanhands on Fri Jul 27, 2018 8:45 pm, edited 1 time in total.

Idahowalker
Posts: 628
Joined: Wed Jan 03, 2018 5:43 pm

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 8:40 pm

Elmanhands wrote:
Fri Jul 27, 2018 7:44 pm
I was reading the thread and I couldn’t find an answer to the third question, does the GND have a max voltage?
Yes.

~0 Volts.
Idaho, U.S.A.

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

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 8:44 pm

Elmanhands wrote:
Fri Jul 27, 2018 7:44 pm
I was reading the thread and I couldn’t find an answer to the third question, does the GND have a max voltage?



The third question was
3. What about the max current to the GND pins?

Elmanhands
Posts: 9
Joined: Fri Jul 27, 2018 10:45 am

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 8:48 pm

Idahowalker wrote:
Fri Jul 27, 2018 8:40 pm
Elmanhands wrote:
Fri Jul 27, 2018 7:44 pm
I was reading the thread and I couldn’t find an answer to the third question, does the GND have a max voltage?
Yes.

~0 Volts.
Sorry does it have a max accepted voltage, I know the board is supposed to on have 5V for power, so does that mean if I send more than 5V to the ground it will blow?

User avatar
DougieLawson
Posts: 42155
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 9:19 pm

If you send 5V to the GND you're very likely to let the magic blue smoke escape.

GND == 0V, nothing more, nothing less (reversed power will kill it).
The max voltage on the 5V side is the board is 5.25V.
The max on the 3V3 side is 3.3V.
Powering through the GPIO header pins bypasses all protection circuits.

The max current on a GPIO is about 4mA with 20mA spread across a bank of GPIOs. (The 26 & 40 pin Raspberries only have one bank of GPIOs, the compute moduless (CM1/CM3/CM3L) have two banks.)
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Elmanhands
Posts: 9
Joined: Fri Jul 27, 2018 10:45 am

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 9:24 pm

DougieLawson wrote:
Fri Jul 27, 2018 9:19 pm
If you send 5V to the GND you're very likely to let the magic blue smoke escape.

GND == 0V, nothing more, nothing less (reversed power will kill it).
The max voltage on the 5V side is the board is 5.25V.
The max on the 3V3 side is 3.3V.
Powering through the GPIO header pins bypasses all protection circuits.

The max current on a GPIO is about 4mA with 20mA spread across a bank of GPIOs. (The 26 & 40 pin Raspberries only have one bank of GPIOs, the compute moduless (CM1/CM3/CM3L) have two banks.)
Ok, so I have a 11.1 V battery hooked up to a L298N motor controller that’s connected to 4 servo motors, and the ground on the motor drive connects to the rpi, and I think that blew out the pi is this a plausible cause that the voltage is too high or something?

Idahowalker
Posts: 628
Joined: Wed Jan 03, 2018 5:43 pm

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 9:39 pm

Elmanhands wrote:
Fri Jul 27, 2018 8:48 pm
Idahowalker wrote:
Fri Jul 27, 2018 8:40 pm
Elmanhands wrote:
Fri Jul 27, 2018 7:44 pm
I was reading the thread and I couldn’t find an answer to the third question, does the GND have a max voltage?
Yes.

~0 Volts.
Sorry does it have a max accepted voltage, I know the board is supposed to on have 5V for power, so does that mean if I send more than 5V to the ground it will blow?
It may be possible to put the common reference (GND) of the Pi at say 50V, then the +5 Volt will be +55V but without a component spec sheet for the PI...

Why would you want to put a voltage on the GND of the Pi other than 0 Volts or common reference?
Idaho, U.S.A.

Elmanhands
Posts: 9
Joined: Fri Jul 27, 2018 10:45 am

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 9:42 pm

Idahowalker wrote:
Fri Jul 27, 2018 9:39 pm
Elmanhands wrote:
Fri Jul 27, 2018 8:48 pm
Idahowalker wrote:
Fri Jul 27, 2018 8:40 pm


Yes.

~0 Volts.
Sorry does it have a max accepted voltage, I know the board is supposed to on have 5V for power, so does that mean if I send more than 5V to the ground it will blow?
It may be possible to put the common reference (GND) of the Pi at say 50V, then the +5 Volt will be +55V but without a component spec sheet for the PI...

Why would you want to put a voltage on the GND of the Pi other than 0 Volts or common reference?
Well I’m not certain if the servo motors use the full voltage, and if they don’t would that have blown out my rpi board

Idahowalker
Posts: 628
Joined: Wed Jan 03, 2018 5:43 pm

Re: 3.3V, GPIO and GND max current

Fri Jul 27, 2018 9:46 pm

Elmanhands wrote:
Fri Jul 27, 2018 9:24 pm

Ok, so I have a 11.1 V battery hooked up to a L298N motor controller that’s connected to 4 servo motors, and the ground on the motor drive connects to the rpi, and I think that blew out the pi is this a plausible cause that the voltage is too high or something?
If you connected the GND or common reference point of the battery to the GND or common reference point of the PI, all should be well at that point. However, how you make the other connections from the battery to the Pi could be a problem.

Did you connect the control line of a servo to the Pi?

Did you use 5V servos?

In what capacity did you use the 11.1V battery in relation to the RPi?
Idaho, U.S.A.

Return to “Beginners”