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: 4763
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

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.
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

User avatar
joan
Posts: 12746
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: 12746
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: 7346
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.

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

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.
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

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: 9565
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: 9565
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

Return to “Beginners”

Who is online

Users browsing this forum: apoldion, Baidu [Spider] and 23 guests