3

I have some basic questions, sorry, I have'nt found this.

  1. What are output levels of GPIO (Raspberry Pi) I mean the voltage ranges of low and high for input/output
  2. What is the maximum current that one GPIO output can handle
  3. Can I power LED only using GPIO output (with resistor) (with no +5V pin)?
Ghanima
  • 15,855
  • 15
  • 61
  • 119
Tomas
  • 47
  • 3

3 Answers3

4

Per the elinux wiki, the GPIO pins are configurable to source or sink from 2mA to 16mA each, 3.3V (not 5V tolerant).

They also have GPIO tutorials, one of which demonstrates driving a low power LED directly from the output with no 3.3V or 5V connection used.

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Tevo D
  • 841
  • 8
  • 13
  • Thank you and do you know the ranges of high and low for 3v3 logic then? – Tomas Jul 14 '13 at 08:06
  • I do not have an authoritative answer, but this thread http://www.raspberrypi.org/phpBB3/viewtopic.php?f=44&t=8668 indicates "16mA with an output voltage of 2.3V sourcing and 17 mA with an output voltage of 0.4V when sinking." – Tevo D Jul 14 '13 at 15:27
3

The Pi's GPIO are 3V3. There is no authoritative source for voltage levels. For the likely voltage levels see http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/gpio-pin-electrical-specifications

A GPIO can output considerably more than 16mA. Whether it is safe to do so for any length of time I don't know. I think I have measured sourcing and sinking about 40 mA from a single GPIO, but I'll need to check my figures.

Yes, you can power LEDS directly from the 3V3 GPIO. Best to use a resistor to avoid the risk of burning the LED out.

joan
  • 71,024
  • 5
  • 73
  • 106
1
  1. What is the maximum current that one GPIO output can handle

Besides the given limits per pin a total limit for all GPIO pins of 50 mA is noteworthy and should be considered. The total current sourced or sinked from all GPIO together (the sum of all pins) should not exceed the limits of the 3.3V rail. Raspberrypi.org states: The GPIO pins can draw 50mA safely, distributed across all the pins; an individual GPIO pin can only safely draw 16mA.

  1. Can I power LED only using GPIO output (with resistor) (with no +5V pin)?

Yes it is possible - since GPIO pins can both sink and source a current, a load can be switched to either VCC or GND. Just consider to connect the LED (with series resistor) to a GPIO pin and to GND. Set the pin to high (1) to turn on the LED.

Glorfindel
  • 620
  • 1
  • 8
  • 15
Ghanima
  • 15,855
  • 15
  • 61
  • 119