76

What is the maximum amount of current that can be pulled from a single GPIO pin?

Does the maximum current decrease if current is being pulled from multiple GPIO pins?

From my research, I've found:

spuder
  • 1,153
  • 1
  • 9
  • 14

5 Answers5

57

This answer is OBSOLETE. The Pi 3.3V rail is widely assumed to provide 50mA, but this is not officially documented for recent Pi models. The original Pi has an on-board linear regulator which was limited, but the B+ and later have a switch mode regulator which can supply more. The regulator chip (which supplies both 3.3V and 1.8V) is rated at 1A. Raspberry Pi Power Limitations

This is an interesting question because it has a not so concrete answer.

The power rails...

  • The 5 V rail appears to passed straight through from the USB and the current is therefore limited to whatever the USB port can supply minus the current being drawn by the board. (Source 1)
  • The 3.3 V rail can supply a maximum of 50 mA. (Source 1)

The GPIO...

So here it gets a little foggier. There isn't any current limiting features on the board, so if you demand a certain amount of current from a pin, it will attempt to drive it until something breaks.

Saying that, from the research I've done, the absolute maximum you should draw from a single pin is 16 mA. HOWEVER, a pin is driven by the 3.3 V rail, which can't drive more than 50 mA! So it's a balancing act. It is recommended though, that a series resistor is placed on the GPIO to limit the current and prevent damage. The board was really designed to be buffered before being connect to peripheral devices. (Source 2) (Source 3)

Source 2 and 3 link to pages that explain the operation of the Pi's driver set up on the GPIO. It's worth a read though may be a bit outside the scope of the question.

To summarise from another source, the GPIO output current is...

A maximum of 16mA per pin with the total current from all pins not exceeding 50mA[sic] (Source 4)

SLaG
  • 806
  • 5
  • 5
  • @Milliways: It seems you've made the same edit to several answers here. The OP's question was re max current for GPIO pins; your edit addresses the current capacity of the 3V3 regulator. I realize they're related, but I'm not clear on how the regulator capacity makes answers re GPIO max current obsolete??? – Seamus Oct 22 '22 at 06:41
11

This answer is OBSOLETE. The Pi 3.3V rail is widely assumed to provide 50mA, but this is not officially documented for recent Pi models. The original Pi has an on-board linear regulator which was limited, but the B+ and later have a switch mode regulator which can supply more. The regulator chip (which supplies both 3.3V and 1.8V) is rated at 1A. Raspberry Pi Power Limitations

According to this blog

When the Pi was designed, they used a figure of 3mA per GPIO pins in determining if the regulator could supply enough current.

17 pins at 3 mA each means the power regulator is only rated for 50 mA

50 mA / 17 =~ 3 mA

The author of the same blog suggest that 16 mA be the maximum pulled from any 1 pin, and that 50 mA as the maximum from all pins.

spuder
  • 1,153
  • 1
  • 9
  • 14
5

On the official Compute Module data sheet release 2 page 14:

IOL and IOH

The datasheet is applied to both CM1 and CM3, so as BCM2835 and BCM2837 when VDD_IO=3.3V. According to the table, It is safe to drive up to 18mA and sink up to 17mA by GPIO.

y s
  • 51
  • 1
  • 1
1

A Raspberry Pi pin (GPIO) gives me a 23 mA max current (3.43 V) when I set it to on (using pi4j or RPI.GPIO). I think the maximum permitted is 30 mA, otherwise your Raspberry Pi is dead.

You can check it yourself by using a multimeter connected in series.

Peter Mortensen
  • 2,004
  • 2
  • 15
  • 18
badr
  • 111
  • 1
  • 2
    that 23ma could most likely be explained by ohms law with the voltage drop on your multimeter, not the Rpi's actual capability. Current = Voltage / Resistance And no current meter has 0 ohm resistance. Just a little bit of theory for the day :) –  May 17 '15 at 02:37
  • 1
    @user30946: 23mA at 3.43V would give 149 Ohm. A current meter which such a high resistance would be useless and would burn out on any medium current. – Martin Scharrer Oct 08 '15 at 21:19
1

This answer is OBSOLETE. The Pi 3.3V rail is widely assumed to provide 50mA, but this is not officially documented for recent Pi models. The original Pi has an on-board linear regulator which was limited, but the B+ and later have a switch mode regulator which can supply more. The regulator chip (which supplies both 3.3V and 1.8V) is rated at 1A. Raspberry Pi Power Limitations


A maximum of 16mA per pin with the total current from all pins not exceeding 51mA

From the Gert himself!

So, if your project is only using 4 pins, make sure that your current settings do no exceed the 16mA per pin and all driven together don't exceed the total of 51mA. I believe that the 16mA is also configurable somewhere.

Generally, you should be using a buffer of sorts or a transistor to drive things like LEDs or relays. If you have a bit of a wiring problem or component failure, your board and or CPU may let out the magic smoke.

I know HP used to make some marvelous low current LEDs back in the day. They used to need 2mA of current and a forward voltage for their red one of around 2V, so you would need a small resistor to limit its current consumption and protect the CPU pin.

I see Vishay have a similar type device, and I suppose Kingbright do too.

To calculate the current limiting resistor:

resVal = (Vsupply - VforwardLED)/currentLimit

so... for a 3.3V RPi pin, LED spec says 2V, our limit is 2mA, we get:
resVal = (3.3 - 2)/0.002

resVal = 650 Ohms

Safely round that up to the closest E12/E24 resistor value of 680 Ohms

Here is the values table and color codes if needed.

Enjoy your RPi! Everything should have more LEDS!

Milliways
  • 59,890
  • 31
  • 101
  • 209
ldjohn
  • 21
  • 4