Skip to content

GPIO pinout

What each of J1's 40 pins is, and what the template connects it to. This table is written from the template's own schematic each time the site is built.

Pin J1 pin name Template Pin J1 pin name Template
1 3.3V +3V3 2 5V +5V
3 BCM2_SDA label GPIO2 4 5V +5V
5 BCM3_SCL label GPIO3 6 GND GND
7 BCM4_GPCLK0 label GPIO4 8 BCM14_TXD label GPIO14
9 GND GND 10 BCM15_RXD label GPIO15
11 BCM17 label GPIO17 12 BCM18_PCM_C label GPIO18
13 BCM27 label GPIO27 14 GND GND
15 BCM22 label GPIO22 16 BCM23 label GPIO23
17 3.3V +3V3 18 BCM24 label GPIO24
19 BCM10_MOSI label GPIO10 20 GND GND
21 BCM9_MISO label GPIO9 22 BCM25 label GPIO25
23 BCM11_SCLK label GPIO11 24 BCM8_CE0 label GPIO8
25 GND GND 26 BCM7_CE1 label GPIO7
27 BCM0_ID_SD EEPROM ID_SD 28 BCM1_ID_SC EEPROM ID_SC
29 BCM5 label GPIO5 30 GND GND
31 BCM6 label GPIO6 32 BCM12_PWM0 label GPIO12
33 BCM13_PWM1 label GPIO13 34 GND GND
35 BCM19_MISO_PCM_FS label GPIO19 36 BCM16 label GPIO16
37 BCM26 label GPIO26 38 BCM20_MOSI_PCM_DI label GPIO20
39 GND GND 40 BCM21_SCLK_PCM_DO label GPIO21

The J1 pin names are BCM GPIO numbers with a common alternate function (BCM2_SDA); which functions a pin actually has depends on the Device Tree overlay your design uses. pinout.xyz shows them all.

Using a pin

Each free GPIO pin carries a global label named for its BCM number. To use a pin, place a global label of the same name, such as GPIO17, on the part it connects to, in any sheet. The J1 sheet itself never needs editing.

  • A global label joins every label of that name in the design, so do not reuse GPIO2 to GPIO27 for anything else.
  • Until a label is used elsewhere, ERC reports it as isolated_pin_label, a warning. Each warning disappears as its pin is used.
  • Rename a label, if you prefer a functional name, on J1's sheet; keep the pin it sits on.

Pins to know about

  • ID_SD and ID_SC (pins 27 and 28) are the ID EEPROM's and nothing else's.
  • GPIO2 and GPIO3 (pins 3 and 5) have about 2 kΩ pull-ups to 3.3 V on the Pi itself, so they idle high.
  • GPIO6, GPIO14 and GPIO16 may be driven as outputs at boot by very old firmware that mistakes a newer Pi for a Model B. Raspberry Pi's design guide asks boards that also drive these pins to protect against it, for example with a series resistor.