GPIO Electrical Specifications
Raspberry Pi input and output pin voltage and current capability
The Raspberry Pi provides general purpose digital input/output pins (called GPIO pins) that you can use for reading digital logic signals or for outputting digital logic levels. The outputs do not have much current capability, but you can drive LEDs or other low current devices. Of course to use them effectively and safely, you need to know their voltage levels and drive capability, and unfortunately, the RPi vendors don't supply the GPIO pin specs.
It is a source of frustration to Raspberry Pi users that the electrical characteristics of the input/output pins of the Broadcom BCM2835 SoC (system-on-chip) are not adequately specified in the Raspberry Pi documentation or processor datasheet.
This page tries to address that inadequacy by piecing together information from the Raspberry Pi foundation, other sites including the eLinux Wiki, and datasheets of other processors. However, please treat any updated specifications at RaspberryPi.org as definitive.
The Broadcom BCM2835 incorporates an ARM1176 processor core. The ARM processors are low-cost yet high performance processors used in smart phones, digital TVs, eReaders and other media devices. ARM licenses the processor to other companies, like Broadcom, who combine it with various I/O modules and incorporate it into system-on-chip designs. ARM also provides the physical IP for the digital inputs and outputs (GPIO) as cell libraries.
In this document we piece together what is known of the electrical specifications for the general purpose input/output pins from the various RPi documents and from comparable SoC devices that also use the ARM1176JZFS core.
GPIO pin circuitry
The Raspberry Pi's GPIO pins are quite versatile, and you can modify many of their characteristics from software. You can turn on/off input pin hysteresis, limit output slew rate, and control source and sink current drive capability from 2 mA to 16 mA in 2 mA increments. These properties are set for the GPIO block as a whole, not on a pin-by-pin basis.
Source/sink current capability does not limit the current into or out of the pin, but only specifies the maximum current for which the output signal high/low voltage specifications will be met. If misused, output pins can be damaged by excessive current irrespective of the source/sink current programmed. After a reset, the RPi comes up with the GPIO outputs set to 8 mA drive capability.
The following diagram shows a simplified schematic of the I/O pin circuitry:
There are a few notable features of the circuit:
- The input gate detects whether the input voltage level is low or high by comparing it to a threshold voltage. Normally the voltage threshold is about 1.8V, but it isn't guaranteed; it can be anywhere between the maximum input low and minimum input high, that is, between about 0.8 and 2.0V.
- To provide noise immunity and prevent chatter on transitions, you can configure the input gate to act as a Schmitt trigger, with input hysteresis. With hysteresis there are different threshold voltages for rising and falling transitions. Broadcom doesn't specify the degree of hysteresis, but Table 1 offers some representative values from other ARM1176-based devices. For a better understanding of how it works, you can read our more detailed description of input pin hysteresis for the Freescale 9S12/HCS12 MCU.
- The output drives to either 3.3V (high) or 0V (low). Only one driver is shown in the schematic, but in actuality there are several wired in parallel, with software controlling which are enabled, so that the output drive impedance can be varied to offer 2 mA to 16 mA current capability, in 2 mA increments.
- While a pull-up/down resistor value of 50 KΩ is shown in the figure, Broadcom doesn't specify its value. It is likely to be in the 40 to 100 KΩ range, as shown in Table 1. The transistors that enable the pull-up/down resistor contribute their appreciable nonlinear resistance to it, so the effective resistance is not constant over the input pin voltage range. The pull-up behavior is somewhat of a cross between constant resistance and constant current behavior.
Input and output pin electrical specifications
In lieu of actual measurements, the following specifications are provide as good faith estimates that you may use as guidelines in your designs. These specifications are derived from the Raspberry Pi datasheets as well as datasheets of other other ARM1176-based SoCs, specifically these:
Their GPIO specs are summarized in the following table:
|GPIO input/output pin electrical characteristics|
| Output low voltage|
| < 0.40 V 1)|
< 0.66 V 2)
< 0.40 V 3)
| Output high voltage|
| > 2.40 V 4)|
> 2.64 V 5)
> 2.90 V 6)
| Input low voltage|
| < 0.80 V 7)|
< 0.54 V 8)
< 1.15 V 9)
| Input high voltage|
| > 2.00 V 10)|
> 2.31 V 11)
> 2.15 V 12)
|Hystereses|| > 0.25 V 13)|
0.66 – 2.08 V 14)
| Schmitt trigger input low threshold|
| 1.09 - 1.16 V 15) |
| Schmitt trigger input high threshold|
| 2.24 - 2.74 V 17) |
0.90 V 18)
| 40 – 65 KΩ 19)|
100 KΩ 20)
| < 50 uA 21) |
< 28 uA 22)
|Pin capacitance||5 pF 23)|
|Bus hold resistance||5-11 KΩ 24)|
RPi GPIO input voltage and output current limitations
You should keep the following limitations in mind when using the GPIO pins:
- These are 3.3 volt logic pins. A voltage near 3.3 V is interpreted as a logic one while a voltage near zero volts is a logic zero. A GPIO pin should never be connected to a voltage source greater than 3.3V or less than 0V, as prompt damage to the chip may occur as the input pin substrate diodes25) conduct. There may be times when you may need to connect them to out-of-range voltages – in those cases the input pin current must be limited by an external resistor to a value that prevents harm to the chip. I recommend that you never source or sink more than 0.5 mA into an input pin.
- To prevent excessive power dissipation in the chip, you should not source/sink more current from the pin than its programmed limit. So, if you have set the current capability to 2 mA, do not draw more than 2 mA from the pin.
- Never demand that any output pin source or sink more than 16 mA.
- Current sourced by the outputs is drawn from the 3.3 V supply, which can supply only 50 mA maximum. Consequently, the maximum you can source from all the GPIO outputs simultaneously is less than 50 mA. You may be able to draw transient currents beyond that limit as they are drawn from the bypass capacitors on the 3.3 V rail, but don't push the envelope! There isn't a similar limitation on sink current. You can sink up to 16 mA each into any number of GPIO pins simultaneously. However, transient sink currents do make demands on the board's bypass capacitors, so you may get into trouble if all outputs switch their maximum current synchronously.
- Do not drive capacitive loads. Do not place a capacitive load directly across the pin. Limit current into any capacitive load to a maximum transient current of 16 mA. For example, if you use a low pass filter on an output pin, you must provide a series resistance of at least 3.3V/16mA = 200 Ω.
GPIO power-on state
The Raspberry Pi's Broadcom SoC does its own power-on initializations of its GPIO pins. However, these initializations may be undone or modified by the kernel's startup software.
Raspberry Pi driver software for configuring and setting GPIO pins
Software for controlling the GPIO pins is readily available. You can consult the following sources:
GPIO pinout on header P1
The GPIO signals and power supplies are brought out to a 26-pin header, designated P1 on the PCB's silkscreen. P1 provides two rows of pins, odd and even. Pin 1 of header P1 is the corner pin closest to the P1 label.
The following table identifies the signal names delivered to each of the pins of P1, for Rev-1 and Rev-2 boards:
|P1: 26-pin header|
|+3.3 V||—1||2—||+5 V|
| GPIO_02 GPIO_00|
| GPIO_03 GPIO_01|
1. Signals in plain type are for Rev 2 boards,
signals for Rev 1 boards are shown in italics.
2. Primary functions for signals are shown in parentheses.
- The signal names used in the above table are the Broadcom chip signal names – these are the names to use when programming the board. The RPi board provides alternate descriptive names for the same signals, and those names are often confusing. For example,
GPIO_14at the chip is called
TXD0at the connector, a name that illustrates its primary function, but,
GPIO_17at the chip becomes
GPIO_GEN0at the connector, a renaming that can only cause confusion.
- All GPIO signals default to inputs except for GPIO_14 and GPIO_15 (on pins 8 and 10), which are configured by default as UART0_TxD and UART0_RxD respectively.
- You may draw no more than 50 mA from the +3.3 V supply.
- The board uses approximately 700 mA from the +5 V supply. You may draw current from the +5 V pins provided the sum of your current and the board's 700 mA can be provided by the supply you provide to the board.
- You may deliver power to the board through header P1 at pins 2 or 4 as well as delivering it to the microUSB socket, except that power delivered through P1 bypasses the 1.1 A PolySwitch resettable fuse.
- Pins 3 and 5 are pulled up on the board to the 3.3V supply by 1.8 KΩ resistors to enable them to be used easily as I2C communication pins.
Finding your board's revision number
To determine the revision number for your board you can execute the following command from a prompt in a terminal window,
cpuinfo number begins with
1000 then your Raspberry Pi has been over-voltaged or over-clocked (which permanently flips a write-once memory bit in the processor). Your hardware revision is simply the last 4 digits of the number (i.e. 0002 in this example).
| || Release|
|Beta||Q1 2012||B (Beta)||?||256MB||Beta Board|
|0003||Q3 2012||B||1.0/ECN0001||256MB||no fuses and D14 removed|
|0004||Q3 2012||B||2.0||256MB||Mfg by Sony|
|0005||Q4 2012||B||2.0||256MB||Mfg by Qisda|
|0006||Q4 2012||B||2.0||256MB||Mfg by Egoman|
|0007||Q1 2013||A||2.0||256MB||Mfg by Egoman|
|0008||Q1 2013||A||2.0||256MB||Mfg by Sony|
|0009||Q1 2013||A||2.0||256MB||Mfg by Qisda|
|000d||Q4 2012||B||2.0||512MB||Mfg by Egoman|
|000e||Q4 2012||B||2.0||512MB||Mfg by Sony|
|000f||Q4 2012||B||2.0||512MB||Mfg by Qisda|
For further information on the electrical specifications of the GPIO pins see:
And for more, and possibly more up-to-date information on the various hardware revisions of the boards see:
Creative Commons Attribution-ShareAlike 3.0 Unported License.