Opens in a new tab

Raspberry Pi Zero 2 W GPIO Pinout

Raspberry Pi Zero 2 W is a small 65 × 30 mm computer with a quad-core processor, Wi-Fi and Bluetooth. On its edge it has a 40-pin GPIO header with the same layout as the larger models, so HATs for the Raspberry Pi 4 and 5 fit it too.

The header isn’t populated from the factory – either solder it on yourself or buy the WH version with the header.

Specifications

  • RP3A0: BCM2710A1 (4× Cortex-A53 1 GHz) and 512 MB LPDDR2 in a single package
  • Wi-Fi 2.4 GHz, Bluetooth 4.2 and BLE
  • 40-pin GPIO header (unpopulated): UART, 2× I2C, 2× SPI, PWM, PCM
  • mini HDMI, micro USB OTG (data), micro USB PWR IN (power), CSI camera connector (22-pin)
  • 65 × 30 mm

The GPIO functions correspond to the BCM2837 chip (the same as on the Raspberry Pi 3): UART0 and UART1, I2C0 (HAT EEPROM) and I2C1, SPI0 and SPI1, PWM0/1, PCM and GPCLK. The Zero 2 W doesn’t have the additional UART2–5, I2C3–6 or SPI3–6 of the Raspberry Pi 4.

GPIO14/15 carry the mini UART – the full PL011 serves Bluetooth. The green ACT LED is on GPIO29.

Pinout and pin table

How to read the diagram: the Zero 2 W has the same functions as the Pi 3 – only the default buses. The additional UART, I2C and SPI from the Pi 4 and Pi 5 pinouts aren’t available here. GPIO14/15 carry the mini UART; the full UART serves Bluetooth. Hover over a pin in the diagram or a table row; use the filter to highlight a bus. You can download the pinout as PNG or SVG.

Raspberry Pi Zero 2 W – GPIO pinout (40 pins)Raspberry Pi Zero 2 W – GPIO pinout (40 pins)chiptron.eu · CC BY 4.0Raspberry Pi is a trademark of Raspberry Pi Ltd. 1 3V3 ← 3.3 V output – only for smaller loads (sensors) 3 GPIO2 I2C1 SDA 5 GPIO3 I2C1 SCL 7 GPIO4 GPCLK0 9 GND 11 GPIO17 SPI1 CE1 13 GPIO27 15 GPIO22 17 3V3 ← 19 GPIO10 SPI0 MOSI 21 GPIO9 SPI0 MISO 23 GPIO11 SPI0 SCLK 25 GND 27 GPIO0 ID_SD 29 GPIO5 GPCLK1 31 GPIO6 GPCLK2 33 GPIO13 PWM1 35 GPIO19 PWM1 PCM FS SPI1 MISO 37 GPIO26 39 GND 2 5V ↔ 5 V directly from the Pi's power supply – can also power the Pi (unprotected) 4 5V ↔ 6 GND 8 GPIO14 UART TX 10 GPIO15 UART RX 12 GPIO18 PWM0 PCM CLK SPI1 CE0 14 GND 16 GPIO23 18 GPIO24 20 GND 22 GPIO25 24 GPIO8 SPI0 CE0 26 GPIO7 SPI0 CE1 28 GPIO1 ID_SC 30 GND 32 GPIO12 PWM0 34 GND 36 GPIO16 SPI1 CE2 38 GPIO20 PCM DIN SPI1 MOSI 40 GPIO21 PCM DOUT SPI1 SCLK GPIO UART I2C SPI PWM I2S (PCM) Power Ground (GND)
Download:PNGSVG
Pin table – Raspberry Pi Zero 2 W (GPIO)
PinNameDirectionUARTI2CSPIPWMI2S (PCM)Note
13V3output3.3 V output – only for smaller loads (sensors)
25Vinput/output5 V directly from the Pi's power supply – can also power the Pi (unprotected)
3GPIO2input/outputI2C1 SDAI2C1 SDA, 1.8 kΩ pull-up on the board.
45Vinput/output5 V directly from the Pi's power supply – can also power the Pi (unprotected)
5GPIO3input/outputI2C1 SCLI2C1 SCL, 1.8 kΩ pull-up on the board. Shorting it to ground wakes the Raspberry Pi from shutdown (halt).
6GND–
7GPIO4input/outputGPCLK0; default 1-Wire pin (dtoverlay=w1-gpio)
8GPIO14input/outputUART TXUART TX. GPIO14/15 carry the mini UART (UART1); the full PL011 (UART0) handles Bluetooth. The console is disabled by default (enable_uart=1, which then locks the core clock at 250 MHz); after dtoverlay=disable-bt or miniuart-bt, the PL011 is on the header.
9GND–
10GPIO15input/outputUART RXUART RX – serial console
11GPIO17input/outputSPI1 CE1
12GPIO18input/outputSPI1 CE0PWM0PCM CLKPWM0; PCM CLK (I2S); SPI1 CE0
13GPIO27input/output
14GND–
15GPIO22input/output
16GPIO23input/output
173V3output3.3 V output – only for smaller loads (sensors)
18GPIO24input/output
19GPIO10input/outputSPI0 MOSI
20GND–
21GPIO9input/outputSPI0 MISO
22GPIO25input/output
23GPIO11input/outputSPI0 SCLK
24GPIO8input/outputSPI0 CE0
25GND–
26GPIO7input/outputSPI0 CE1
27GPIO0input/outputID_SDI2C0 SDA for the HAT EEPROM – do not use
28GPIO1input/outputID_SCI2C0 SCL for the HAT EEPROM – do not use
29GPIO5input/outputGPCLK1
30GND–
31GPIO6input/outputGPCLK2
32GPIO12input/outputPWM0PWM0
33GPIO13input/outputPWM1PWM1
34GND–
35GPIO19input/outputSPI1 MISOPWM1PCM FSPWM1; PCM FS (I2S); SPI1 MISO
36GPIO16input/outputSPI1 CE2
37GPIO26input/output
38GPIO20input/outputSPI1 MOSIPCM DINPCM DIN (I2S); SPI1 MOSI
39GND–
40GPIO21input/outputSPI1 SCLKPCM DOUTPCM DOUT (I2S); SPI1 SCLK

Pins used on the board

These chip pins are used by parts on the board and are not broken out:

PinFunction on the board
GPIO29Green ACT LED (lit at logic 0)
GPIO28HDMI – hot-plug detect (HPD)
GPIO30–33UART k Bluetooth
GPIO34–39Wi-Fi (SDIO)
GPIO40Konektor kamery (CAM_GPIO1)
GPIO41, 42Wi-Fi (WL_ON) and Bluetooth (BT_ON) enable
GPIO44, 45I2C konektoru kamery
GPIO46, 47I2C of the power circuit (SMPS)

What to watch out for

  • GPIO are not 5V tolerant (3.3 V logic).
  • The GPIO header isn’t populated – solder it on, or buy the Zero 2 WH.
  • Data goes only through the micro USB port labeled USB (you need an OTG adapter); power goes through PWR IN.
  • The UART console is disabled by default (enable_uart=1 in config.txt).
  • The test pads are in different places than on the Zero W – accessories with pogo pins may not fit.

More pinouts

See all pinouts on the Pinouts page.

Related Articles