Orange Pi Zero 2W Pinout, Datasheet, Schematic [Ultimate Guide]

In this guide, you’ll find the Orange Pi Zero 2W pinout diagram, its datasheet and schematic diagram, and every pin group explained with its default pins, the overlay that enables it. Without further ado, let’s get right into it!

The Orange Pi Zero 2W is a tiny Linux board built around the Allwinner H618 (4x Cortex-A53 at 1.5GHz), with 1GB, 1.5GB, 2GB, or 4GB of LPDDR4 RAM and Wi-Fi 5 + Bluetooth 5.0. It has the same 65 x 30mm shape and the same Pi-style 40-pin header as a Raspberry Pi Zero 2 W, but the pins behind it are Allwinner pins, so the Raspberry Pi pin numbers don’t apply.


Orange Pi Zero 2W Pinout Diagram

Here is a detailed Orange Pi Zero 2W Pinout Diagram with colored labels and legends to help you easily identify the functionalities that each pin can perform. Each pin of the 40-pin header shows its physical pin number, the Allwinner GPIO name (PI8 style), the Linux GPIO number, the wiringOP (wPi) number, and every function you can enable with Orange Pi’s overlays.

Orange Pi Zero 2W 40-pin GPIO header pinout diagram with physical pin numbers, H618 GPIO names, Linux GPIO numbers, UART, I2C, SPI and PWM pin functions
40-pin GPIO header

Read it from the grey strip in the middle: odd pins (1, 3, 5…) are the left column, which is the inner row on the board, and even pins (2, 4, 6…) are the right column, along the board edge. Pin 1 is the square pad next to the microSD slot. The small square next to a GPIO means it’s 3.3v only, the “ON BOARD” boxes show the resistors fitted on the board, and the numbered badges point to the notes at the bottom. The header ships unsoldered, so you’ll need to solder a 2×20 pin header first.

Orange Pi Zero 2W 40-Pin Header Pin Table

Click to expand the full pin table (40 pins)
PinNameLinux #wPiFunctions
13.3V––3.3v power
25V––5v power
3PI82640TWI1_SDA (I2C1)
45V––5v power
5PI72631TWI1_SCL (I2C1)
6GND––Ground
7PI132692PWM3, UART4_TX
8PH02243UART0_TX (debug console)
9GND––Ground
10PH12254UART0_RX (debug console)
11PH22265UART5_TX
12PI12576GPIO
13PH32277UART5_RX
14GND––Ground
15PI52618TWI0_SCL (I2C0), UART2_TX
16PI142709PWM4, UART4_RX
173.3V––3.3v power
18PH422810GPIO
19PH723111SPI1_MOSI
20GND––Ground
21PH823212SPI1_MISO
22PI626213TWI0_SDA (I2C0), UART2_RX
23PH623014SPI1_CLK
24PH522915SPI1_CS0
25GND––Ground
26PH923316SPI1_CS1
27PI1026617TWI2_SDA (I2C2), UART3_RX
28PI926518TWI2_SCL (I2C2), UART3_TX
29PI025619GPIO
30GND––Ground
31PI1527120GPIO
32PI1126721PWM1
33PI1226822PWM2
34GND––Ground
35PI225823GPIO
36PC127624GPIO
37PI1627225GPIO
38PI426026GPIO
39GND––Ground
40PI325927GPIO

The Orange Pi Zero 2W has a second connector too: the 24-pin FPC next to the 40-pin header carries two extra USB 2.0 ports, 100M Ethernet, audio, TV-out, an IR receiver input, and the power key, for Orange Pi’s expansion board. It has its own pinout diagram and section below.

Buy an Orange Pi Zero 2W: If you don’t have one yet, you can get the board from Amazon. The 1GB version is plenty for GPIO and sensor work; take 2GB or 4GB for a desktop or containers, and add the 24-pin expansion board if you want Ethernet and USB-A ports.

Download Orange Pi Zero 2W Pinout Diagrams (Full Resolution)

Both Orange Pi Zero 2W pinout diagrams (40-pin GPIO header and 24-pin FPC expansion connector) in full resolution (5120 px), in one ZIP file.


Orange Pi Zero 2W Datasheet

The Orange Pi Zero 2W is built around the Allwinner H618 system-on-chip. Orange Pi doesn’t publish a separate board datasheet: the user manual is the datasheet, with the specs, the 40-pin table, and the overlay list. Here are the official documents (Orange Pi hosts them on Google Drive, linked from its Orange Pi Zero 2W service and support page):

DocumentVersion / DateWhat You’ll Use It ForLink
Orange Pi Zero 2W User Manual (OrangePi_Zero2w_H618_User Manual)v1.3, 10 Oct 2024 (370 pages)Specs, the 40-pin table and gpio readall (3.17–3.18), every overlay and /dev node (3.19), the 24-pin board (1.7, 3.7), powering from the 5v pins (2.9), debug UART (2.8)PDF
Orange Pi Zero 2W Schematic (OPi_ZERO 2W_SCH)Rev 1.0, 26 Sep 2023 (7 sheets)The 40-pin and 24-pin connectors, the USB-C power path, LEDs, the SoC pin muxPDF
Orange Pi Zero 2W 24-Pin Expansion Board Schematic (ZERO_2W_24PIN_EXTEND_SCH)V1.0, 13 Jan 2025RJ45, USB-A ports, audio/TV jack, IR receiver and keys on the expansion boardPDF
Orange Pi Zero 2W Mechanical Drawing (DXF)26 Oct 2023Board outline (65 x 30mm), mounting holes and connector positions for casesRAR
Orange Pi Zero 2W Product PageLiveCurrent hardware specificationsWeb
Orange Pi Zero 2W Wiki (Orange Pi)LiveThe user manual as web pagesWeb
wiringOP / wiringOP-PythonGitHub (live)Orange Pi’s GPIO libraries and the gpio readall commandGitHub

Which document do I need? The user manual for the pin functions, the overlay names and the Linux device nodes; the schematic for the power path, the on-board resistors and the LEDs; and the expansion-board schematic if you use the 24-pin FPC. Allwinner doesn’t publish an H618 datasheet, and Orange Pi doesn’t host one either, so there’s no official chip datasheet to link. The alternate functions in this guide come from the SoC symbol in Orange Pi’s own schematic (it’s named “H616-BGA-284”; the H618 is pin compatible with the H616), checked against the manual’s tables.

Note: Board revision: the boards being sold (and the photos in this guide) are V1.1, printed as “ZERO 2W V1.1” on the silkscreen, while the only public schematic is Rev 1.0. The latest manual (v1.3) shows the same 40-pin signals as the Rev 1.0 schematic, pin for pin, so the pinout in this guide applies to both.


Orange Pi Zero 2W Schematic

Orange Pi publishes the full Orange Pi Zero 2W schematic (Rev 1.0, 7 sheets) and a one-sheet schematic for its 24-pin expansion board. The carousel below shows the parts that matter when you wire the board: the 40-pin and 24-pin connectors, the USB-C power input with the LEDs, and the expansion board. Click a page to view it full screen.

Orange Pi Zero 2W schematic page 1: 40-pin header DP40 and 24-pin FPC J1 (OPi Zero 2W Rev 1.0)
Page 1 of 3 · 40-Pin & 24-Pin Connectors (Sheet 5)
Orange Pi Zero 2W schematic page 2: USB-C ports TYPEC1 and TYPEC2, 5v input and the LEDs (OPi Zero 2W Rev 1.0)
Page 2 of 3 · USB-C Power & LEDs (Sheet 6)
Orange Pi Zero 2W schematic page 3: 24-pin expansion board: RJ45, USB-A, audio/TV jack, IR receiver and keys (Zero 2W 24PIN EXTEND V1.0)
Page 3 of 3 · 24-Pin Expansion Board
Page 1 of 4

Official sources: the Orange Pi Zero 2W schematic (PDF), Rev 1.0, 26 September 2023, and the 24-pin expansion board schematic (PDF), V1.0, 13 January 2025. The watermark across the sheets is on Orange Pi’s own files. Here’s what to look at:

  • One 5v rail (sheet 6): the VBUS pins of both USB-C connectors (TYPEC1 = USB0 and TYPEC2 = USB1) go straight to the VCC-5V net, and so do header pins 2 and 4 and pin 9 of the 24-pin FPC (sheet 5). There’s no fuse, no series diode, and no switch between them; the only part on the line is an AZ5825 ESD/TVS diode at USB0. So whatever feeds one of them feeds all of them.
  • USB-C roles (sheet 6): USB0 has two 5.1kΩ pull-downs on CC1/CC2, which tells a charger “I’m a device, give me 5v”. USB1 has 36kΩ pull-ups to 3.3v, which is how a USB-C host port announces itself. That’s why USB0 is the power + device port and USB1 is a host port.
  • Debug resistors (sheet 5): pins 8 and 10 (UART0 TX/RX) go through two 470Ω resistors, R8 and R9, inside a box marked DEBUG. They protect the console lines; they’re no problem at 115200 baud.
  • I2C pull-ups (sheet 5): pins 3 and 5 (PI8/PI7, TWI1) have 10kΩ pull-ups, RC5 and RC4, to VDD33. No other header pin has a pull-up.
  • Power pins (sheet 5): pins 1 and 17 come from VDD33, the board’s 3.3v rail (an ETA3409/SY8089A buck converter), and pins 2/4 from VCC-5V. Every GPIO connects straight to the SoC: no level shifters, no series resistors except the two debug ones.
  • LEDs (sheet 6): the red power LED D1 is fed from VDD33 through 5.1kΩ, so it’s on whenever the 3.3v rail is up. The green status LED D2 is driven by PC13 (STATUS-LED) through 1.8kΩ, active high. Neither is on a header pin.
  • 24-pin FPC (sheet 5) and the expansion board: J1 carries the USB2/USB3 data pairs, the Ethernet pairs of the H618’s built-in 100M PHY, LRADC, PC15/PC16, PH10 (IR), PWRON, TV-OUT and line out. On the expansion board, the Ethernet pairs go to an RJ45 jack with built-in magnetics, PC15/PC16 drive its green and yellow LEDs through 510Ω, the USB pairs go to a double USB-A socket powered from 5v, KEY1 and KEY2 sit on a 10kΩ resistor ladder on LRADC, PWR_ON pulls the PMIC’s PWRON line, PH10 reads an IRM-3638 IR receiver, and TV-out and line out share a 4-pole 3.5mm jack.

Orange Pi Zero 2W Specs

Here are the Orange Pi Zero 2W specifications, with the board-level details that matter when you wire it:

Orange Pi Zero 2W single-board computer (Allwinner H618, board V1.1)

Get an Orange Pi Zero 2W: it’s the one I recommend for a small, cheap Linux board with a Pi-style header. Grab it from Amazon.

FeatureOrange Pi Zero 2W
SoCAllwinner H618, 4x Arm Cortex-A53 @ 1.5GHz (64-bit)
GPUArm Mali-G31 MP2 (OpenGL ES 1.0/2.0/3.2, OpenCL 2.0)
RAM1GB, 1.5GB, 2GB or 4GB LPDDR4 (shared with the GPU)
StoragemicroSD slot, 16MB SPI NOR flash (factory mini-Linux)
WirelessWi-Fi 5 (802.11a/b/g/n/ac) + Bluetooth 5.0, 20U5622 module, external antenna socket
VideoMini HDMI 2.0 (with audio); CVBS TV-out on the 24-pin FPC
USB2x USB-C (USB 2.0): USB0 = power + OTG (device by default), USB1 = host; 2x USB 2.0 host on the 24-pin FPC
EthernetNone on the board; 100M through the 24-pin FPC and the expansion board
GPIO header40-pin (2×20, 2.54mm), 28 GPIOs, 3.3v logic, not 5v tolerant, unsoldered
Other connector24-pin 0.5mm FPC (USB, Ethernet, audio, TV-out, IR, LRADC keys, power key)
Power management ICX-Powers AXP313A (+ a buck converter for 3.3v)
LEDs / buttonsRed power LED, green status LED (PC13); no buttons on the board
Power input5v through either USB-C port (Orange Pi asks for 5v / 2A or more), or 5v into header pins 2/4
Size / weight65 x 30 x 1.2mm, 12.5g
OSOrange Pi OS (Arch), Ubuntu, Debian, Android 12 TV, OpenWRT; Armbian and DietPi also support it

Orange Pi Zero 2W Specifications Summary

  • The Orange Pi Zero 2W has the same 40-pin header layout and the same 65 x 30mm size as a Raspberry Pi Zero 2 W, but different GPIOs: BCM pin numbers don’t apply.
  • It has 28 GPIOs on the header, all 3.3v and not 5v tolerant, wired straight to the H618.
  • Power pins: 5v on pins 2 and 4, 3.3v on pins 1 and 17, and 8 GND pins (6, 9, 14, 20, 25, 30, 34, 39).
  • The header pins 2/4 are the same 5v rail as both USB-C ports, with no fuse or diode in between.
  • Pins 8 and 10 are the Linux debug console (UART0, 115200 baud) by default.
  • UART: 4 extra UARTs (UART2, 3, 4, 5); UART5 on pins 11 (TX) and 13 (RX) is the easy one.
  • I2C: 3 buses, I2C1 on pins 3/5 (with 10kΩ pull-ups), I2C0 on pins 15/22, and I2C2 on pins 27/28.
  • SPI: SPI1 on pins 19, 21, 23 with two chip selects (CS0 pin 24, CS1 pin 26).
  • PWM: 4 channels, PWM1–PWM4 on pins 32, 33, 7, and 16.
  • There are no analog inputs on the header.
  • The 24-pin FPC adds 2x USB 2.0, 100M Ethernet, line out, TV-out, IR, and keys through the expansion board.
  • The green status LED is on PC13, and the board has no buttons.

Orange Pi Zero 2W H618 Peripherals vs the 40-Pin Header

PeripheralOn the HeaderOverlay (Orange Pi OS)Linux Device / Notes
GPIO28 pinsAlways available/dev/gpiochip0 (libgpiod), wiringOP
UARTUART0 (console), UART2, UART3, UART4, UART5pi-uart2, pi-uart3, pi-uart4, ph-uart5/dev/ttyS2–ttyS5; UART1 drives the Bluetooth module
I2C (TWI)3: I2C0, I2C1, I2C2pi-i2c0, pi-i2c1, pi-i2c2/dev/i2c-N, but N doesn’t match the bus number (see the I2C section)
SPI1: SPI1 (CS0 + CS1)spi1-cs0-spidev, spi1-cs1-spidev, spi1-cs0-cs1-spidev/dev/spidev1.0, /dev/spidev1.1; SPI0 runs the on-board flash
PWM4: PWM1–PWM4pi-pwm1 … pi-pwm4/sys/class/pwm/pwmchip0, channels 1–4
I2S / DMIC / SPDIFIn the SoC mux (I2S0, I2S3)None from Orange PiNeeds your own device-tree overlay
ADCNone–Only the LRADC key input on the 24-pin FPC
USB / EthernetNone on the header–USB-C ports and the 24-pin FPC

Orange Pi Zero 2W Quick Pin Selection Guide

Use CaseRecommended PinsWhy
Serial port / UARTPin 11 (UART5 TX), pin 13 (UART5 RX)Pins 8/10 are the Linux console; UART5 is free, /dev/ttyS5
Linux console loginPins 6 (GND), 8 (TX), 10 (RX)UART0 at 115200 8N1 with a 3.3v USB-UART adapter
I2C sensors and displaysPins 3 (SDA) / 5 (SCL), I2C110kΩ pull-ups already on the board, Pi-style position
A second I2C busPins 22/15 (I2C0) or 27/28 (I2C2)Add 2.2kΩ–10kΩ pull-ups if the module has none
SPI devicePins 19, 21, 23 + CS0 pin 24 (or CS1 pin 26)The only SPI bus on the header
Hardware PWMPin 32 (PWM1) or pin 33 (PWM2)They don’t share pins with a UART
Plain GPIO (LED, button)Pins 12, 18, 29, 31, 35, 36, 37, 38, 40No overlay and no on-board part ever claims them
Relays, motors, LED stripsAny GPIO through a transistor or driver boardGPIOs only switch logic levels
Analog inputNone on the boardAdd an I2C ADC (ADS1115) on pins 3/5
Ethernet, more USB, audioThe 24-pin FPCUse Orange Pi’s expansion board

Orange Pi Zero 2W Pins to Use With Caution

PinReasonWhat to Do
Pins 8, 10 (PH0, PH1)Linux debug console (UART0) by default, 470Ω series resistorsUse them for the console, or free them with the disable-uart0 overlay
Pins 3, 5 (PI8, PI7)10kΩ pull-ups to 3.3v on the boardGreat for I2C; as GPIO inputs they idle high
Pins 15/22, 27/28, 7/16Shared pairs: I2C0 or UART2, I2C2 or UART3, PWM3/PWM4 or UART4Enable only one overlay per pair
Pins 2, 4 (5v)Same rail as both USB-C VBUS pins, no fuse or diodeNever feed them while a USB-C supply is plugged in
Pins 1, 17 (3.3v)No current rating publishedLight loads only
Any GPIONot 5v tolerant, wired straight to the SoCLevel-shift 5v signals

Orange Pi Zero 2W Pins Functions

Only 28 of the 40 pins of the Orange Pi Zero 2W header are GPIO pins; the rest are power and ground. The 40 pins are divided into the following groups based on the hardware functionality they’re used for.

Most bus pins can do two jobs, and each job is turned on with its own overlay. Pick the overlays first, so no two of them claim the same pin. We’ll discuss each pin group in the following sections one by one in more detail.


Orange Pi Zero 2W Power Pins

The Orange Pi Zero 2W header has two 5v pins (2 and 4), two 3.3v pins (1 and 17) and eight GND pins (6, 9, 14, 20, 25, 30, 34 and 39). They’re highlighted in red and black in the pinout diagram.

Orange Pi Zero 2W power pins (5v pins 2 and 4, 3.3v pins 1 and 17, GND pins 6, 9, 14, 20, 25, 30, 34, 39)

PinNameFunctionNotes
1, 173.3V3.3v outputVDD33 rail; no current rating published
2, 45V5v output or inputThe board’s 5v rail (VCC-5V), the same net as both USB-C VBUS pins
6, 9, 14, 20, 25, 30, 34, 39GNDGroundCommon ground for everything you connect

5V pins: when you power the Orange Pi Zero 2W over USB-C, these pins give you that same 5v, so you can power modules from them. They work the other way too: the user manual (section 2.9) shows how to power the board through pins 2/4 and GND with a 5v / 2A or 3A supply, and warns not to connect it the wrong way round. Orange Pi still recommends the USB-C input, because the schematic shows nothing between the header and the USB-C VBUS pins: no fuse, no series diode, no reverse-polarity protection.

3.3V pins: a 3.3v output from the board’s buck converter, for sensors and logic chips. Orange Pi doesn’t publish a current limit for them, so give motors, LED strips, and other heavy loads their own supply.

Power supply: the Orange Pi Zero 2W runs from 5v through either USB-C port. Orange Pi asks for 5v / 2A, but give it some headroom: users report that a weak 5v / 2A adapter made USB networking crawl below 1Mbps, while a better supply gave the full 95Mbps, and many “flaky Wi-Fi” complaints on this board come down to the power supply. A 5v / 3A supply with a short cable is a safe choice, and a small heatsink helps under sustained load.

Note: Never connect a supply to the 5v pins while a USB-C power cable is plugged in, and never power the board from both USB-C ports at once. All of them are the same 5v net, so two supplies fight each other with nothing in between. Use one input only.

Never forget to connect the ground of every circuit to the Orange Pi Zero 2W’s GND (common ground). External sensors and modules need the same ground line as the board to communicate with it properly.


Orange Pi Zero 2W GPIO Pins

The Orange Pi Zero 2W has 28 GPIO pins on its 40-pin header, and every one of them is a 3.3v pin that is not 5v tolerant. Each one can be an input or an output, or be switched to an alternate function (UART, I2C, SPI, or PWM) with an overlay. 27 of them are on banks PH and PI of the H618, and pin 36 is PC12.

Orange Pi Zero 2W GPIO pins (28 GPIOs on the 40-pin header, PI8 on pin 3 to PI3 on pin 40)

ParameterOrange Pi Zero 2W GPIO
Logic level3.3v (the H618’s PH, PI and PC banks run at 3.3v on this board)
5v tolerantNo, on every pin
Wiring to the SoCDirect, except pins 8/10 (470Ω) and pull-ups on pins 3/5 (10kΩ)
Pull-up / pull-downInternal pulls on every GPIO (e.g. gpio mode <wPi> up, or libgpiod bias)
Current per pinNot published (no public H618 datasheet): keep it to a few mA
InterruptsEvery header GPIO is an EINT pin: edge events through libgpiod, or wiringOP’s wiringPiISR()
Free out of the boxEvery GPIO except pins 8/10 (debug console)

Orange Pi Zero 2W GPIO Numbering: Physical vs H618 vs Linux vs wiringOP

Every GPIO on the Orange Pi Zero 2W has four names, and each tool wants a different one. Take physical pin 7 as an example:

NumberingPin 7 IsUsed By
Physical7Counting pins on the header (1–40)
Allwinner (H618) namePI13The schematic, the manual, the device tree (port I, pin 13)
Linux GPIO number269sysfs (/sys/class/gpio), and the line offset on gpiochip0 in libgpiod
wiringOP (wPi)2wiringOP C/Python functions and gpio readall

The Linux number is built from the port name: bank × 32 + pin, where port A = 0, B = 1, C = 2 … H = 7 and I = 8. PI13 is 8 × 32 + 13 = 269, PH2 (pin 11) is 7 × 32 + 2 = 226, and PC12 (pin 36) is 2 × 32 + 12 = 76. The H618’s main pin controller is a single chip in libgpiod ( gpiochip0, labelled 300b000.pinctrl), so the Linux number is also the line offset: pin 7 is gpiochip0 line 269. Run gpiodetect once to confirm the chip on your image.

Raspberry Pi BCM numbers don’t work here. The header has the same shape and the same power and ground pins as a Pi, and I2C, SPI and UART sit in roughly the same places, but the GPIOs are Allwinner pins. “GPIO17” on a Pi tutorial is physical pin 11, which on the Orange Pi Zero 2W is PH2, Linux 226, wPi 5. Translate every Pi tutorial by physical pin, and libraries like RPi.GPIO or gpiozero’s Pi pin factory won’t work. wiringOP’s gpio readall prints the physical, wPi and port names side by side.

Orange Pi Zero 2W GPIO Code Example (C/C++ and Python)

Here’s the same job in both languages: blink an LED on pin 7 (PI13). Wire the LED’s anode to pin 7 through a 330Ω resistor, and its cathode to GND on pin 9. Both use the libgpiod v2 API (gpiochip0, line 269): install libgpiod-dev on a release that packages v2 (Debian 13, Ubuntu 24.04) or build it from source, and pip install gpiod for the Python bindings. Images that ship libgpiod v1.6 need the older API.

C/C++ (libgpiod v2)

Python (gpiod v2)

With wiringOP (preinstalled on Orange Pi OS) the same LED is gpio mode 2 out and gpio write 2 1 in the terminal, because pin 7 is wPi 2. In C, that’s pinMode(2, OUTPUT) and digitalWrite(2, HIGH) after wiringPiSetup(). The source is in Orange Pi’s wiringOP and wiringOP-Python repositories.

Note: The Orange Pi Zero 2W’s GPIOs are not 5v tolerant, and there’s no level shifter or series resistor between the header and the H618 (except on pins 8/10). 5v on a GPIO can damage the SoC. To connect 5v logic (an Arduino’s TX pin, a 5v sensor output), use a level shifter or a resistor divider.


Orange Pi Zero 2W Analog Input Pins (ADC)

The Orange Pi Zero 2W has no analog input pins on its 40-pin header. The H618’s only ADC-like input on the board is the LRADC on pin 13 of the 24-pin FPC, and it’s meant for reading keys on a resistor ladder (KEY1/KEY2 on the expansion board), not sensors. To read a potentiometer or an analog sensor, add an external ADC such as an ADS1115 (16-bit, I2C) on pins 3/5, or an MCP3008 (10-bit, SPI) on SPI1. Power it from 3.3v, so its digital lines stay at the board’s logic level.


Orange Pi Zero 2W UART Pins

The Orange Pi Zero 2W has 5 UARTs on its header: UART0 on pins 8/10 is the Linux debug console, and UART2, UART3, UART4 and UART5 are free for your devices once you enable their overlay. UART5 on pin 11 (TX) and pin 13 (RX) is the one to pick first, because it shares its pins with nothing else that Orange Pi enables.

Orange Pi Zero 2W Default UART Pins: PH0 (UART0 TX, pin 8) and PH1 (UART0 RX, pin 10), used by the Linux console.

Orange Pi Zero 2W UART pins (UART0 console on pins 8 and 10, UART5 on 11 and 13, UART2 on 15 and 22, UART3 on 28 and 27, UART4 on 7 and 16)

UARTTXRXOverlay (Orange Pi OS)Linux DeviceShares Pins With
UART0Pin 8 (PH0)Pin 10 (PH1)On by default (console)/dev/ttyS0–
UART2Pin 15 (PI5)Pin 22 (PI6)pi-uart2/dev/ttyS2I2C0
UART3Pin 28 (PI9)Pin 27 (PI10)pi-uart3/dev/ttyS3I2C2
UART4Pin 7 (PI13)Pin 16 (PI14)pi-uart4/dev/ttyS4PWM3, PWM4
UART5Pin 11 (PH2)Pin 13 (PH3)ph-uart5/dev/ttyS5–

UART3 also has RTS/CTS on pins 32/33 and UART4 on pins 31/37 in the SoC mux, but Orange Pi’s overlays only set up TX and RX. UART1 isn’t on the header: it drives the Bluetooth part of the Wi-Fi module. After a reboot, check which /dev/ttyS* nodes appeared.

Orange Pi Zero 2W Debug Console on Pins 8 and 10

Pins 8 (TX) and 10 (RX) carry the Orange Pi Zero 2W’s serial console: U-Boot and the Linux kernel print to it, and you get a login prompt on it ( ttyS0, 115200 8N1). Connect a 3.3v USB-UART adapter: adapter GND to pin 6, adapter RX to pin 8, and adapter TX to pin 10 (manual section 2.8). It’s the fastest way to see why a board won’t boot or why an overlay failed. To use pins 8/10 for your own device instead, add the disable-uart0 overlay.

Note: Klipper and other projects that wire a controller board to pins 8/10 run into the console: Linux prints boot messages to it and runs a login on it. Use UART5 (pins 11/13) for your device, or free pins 8/10 with disable-uart0. Cross the lines (board TX to device RX), connect GND, and keep the device at 3.3v levels.

There are so many modules that we can interface with the Orange Pi Zero 2W using the UART, which include: GPS receivers, USB-to-serial adapters, 3D printer controller boards, RS-485 transceivers (Modbus), LoRa and cellular modems, fingerprint sensors, microcontroller boards, and much more.


Orange Pi Zero 2W I2C Pins

The Orange Pi Zero 2W has 3 I2C buses on its header (Allwinner calls them TWI): I2C1 on pin 3 (SDA) and pin 5 (SCL), I2C0 on pins 22/15, and I2C2 on pins 27/28. I2C0 is not on pins 3/5, and only I2C1 has pull-up resistors on the board.

Orange Pi Zero 2W Default I2C Pins: PI8 (I2C1 SDA, pin 3) and PI7 (I2C1 SCL, pin 5), the same position as the main I2C bus on a Raspberry Pi, with 10kΩ pull-ups to 3.3v.

Orange Pi Zero 2W I2C pins (I2C1 on pins 3 and 5, I2C0 on 22 and 15, I2C2 on 27 and 28)

I2C BusSDASCLOrange Pi OS OverlayArmbian OverlayPull-Ups on Board
I2C1 (TWI1)Pin 3 (PI8)Pin 5 (PI7)pi-i2c1i2c1-pi10kΩ
I2C0 (TWI0)Pin 22 (PI6)Pin 15 (PI5)pi-i2c0i2c0-piNone
I2C2 (TWI2)Pin 27 (PI10)Pin 28 (PI9)pi-i2c2i2c2-piNone

The /dev/i2c-N number isn’t the bus number. Linux numbers the I2C adapters in the order they probe, and the kernel also registers buses you never see (HDMI DDC, the power management IC, and on Orange Pi’s kernel the internal Ethernet PHY’s I2C3). Orange Pi’s own manual shows I2C1 as /dev/i2c-3 and I2C2 as /dev/i2c-4, and users report the same /dev/i2c-3 for pins 3/5 on Armbian. So list the buses first, and match them by register address: 5002000 is I2C0, 5002400 is I2C1, and 5002800 is I2C2.

Note: Many I2C modules sold for Arduino pull SDA and SCL up to 5v. That puts 5v straight on the H618’s pins. Power such a module from 3.3v if it supports it, remove its 5v pull-ups, or put a bidirectional I2C level shifter between them. On I2C0 and I2C2, make sure some module on the bus has pull-ups (2.2kΩ–10kΩ to 3.3v), because the board has none there.

There are so many modules and sensors that we can interface with the Orange Pi Zero 2W using the I2C bus, which include: RTC clocks (DS3231), OLED displays (SSD1306), temperature and humidity sensors (BME280, SHT31), IMUs (MPU6050), ADCs (ADS1115) for analog inputs, GPIO expanders (MCP23017), PWM drivers (PCA9685), and much more.


Orange Pi Zero 2W SPI Pins

The Orange Pi Zero 2W has 1 SPI bus on its header: SPI1 on pins 19 (MOSI), 21 (MISO) and 23 (CLK), with two chip selects, CS0 on pin 24 and CS1 on pin 26. Turn it on with an spi1-…-spidev overlay and it appears as /dev/spidev1.0 and/or /dev/spidev1.1. SPI0 isn’t on the header: it drives the on-board 16MB SPI flash.

Orange Pi Zero 2W Default SPI1 Pins: PH7 (MOSI, pin 19), PH8 (MISO, pin 21), PH6 (CLK, pin 23), PH5 (CS0, pin 24) and PH9 (CS1, pin 26).

Orange Pi Zero 2W SPI pins (SPI1 MOSI pin 19, MISO pin 21, CLK pin 23, CS0 pin 24, CS1 pin 26)

SignalPinGPIOLinux #wPi
SPI1_MOSI19PH723111
SPI1_MISO21PH823212
SPI1_CLK23PH623014
SPI1_CS024PH522915
SPI1_CS126PH923316
Overlay (Orange Pi OS)Chip SelectsLinux Devices
spi1-cs0-spidevCS0 (pin 24)/dev/spidev1.0
spi1-cs1-spidevCS1 (pin 26)/dev/spidev1.1
spi1-cs0-cs1-spidevCS0 + CS1/dev/spidev1.0, /dev/spidev1.1

Test the bus with a jumper from pin 19 to pin 21, and the manual’s loopback test sudo spidev_test -v -D /dev/spidev1.0: whatever it sends comes back. One display to avoid: Orange Pi says the common 3.5-inch “RPi display” SPI LCD isn’t supported on this board, even though it plugs onto the header.

There are so many modules that we can interface with the Orange Pi Zero 2W using the SPI bus, which include: TFT and e-paper displays, MCP3008 ADCs, MCP2515 CAN controllers, LoRa radios (SX127x), RFID readers (RC522), W5500 Ethernet modules, and much more.


Orange Pi Zero 2W PWM Pins

The Orange Pi Zero 2W has 4 hardware PWM channels on its header: PWM1 on pin 32, PWM2 on pin 33, PWM3 on pin 7, and PWM4 on pin 16. PWM3 and PWM4 share their pins with UART4, so if you need all four PWM channels, leave UART4 off.

Orange Pi Zero 2W PWM pins (PWM1 pin 32, PWM2 pin 33, PWM3 pin 7, PWM4 pin 16)

ChannelPinGPIOOverlay (Orange Pi OS)sysfs (Orange Pi OS)
PWM132PI11pi-pwm1pwmchip0/pwm1
PWM233PI12pi-pwm2pwmchip0/pwm2
PWM37PI13pi-pwm3pwmchip0/pwm3
PWM416PI14pi-pwm4pwmchip0/pwm4

On Orange Pi OS, all four channels sit on one pwmchip0, and the channel number is the PWM number (the manual’s own example). A 50Hz signal with a 1ms pulse on PWM1 is:

On Armbian and DietPi, PWM on the H618 only arrived with the sunxi PWM driver in newer kernels (6.10 and later), so older images have no working PWM on these pins. The SoC mux also lists PWM1–PWM4 on PH0–PH3 (pins 8, 10, 11, 13), but Orange Pi only provides overlays for the PI pins.

Note: Never power a fan, a motor, or a buzzer straight from a PWM pin. A GPIO can only switch a logic signal. Drive the load through a MOSFET or a motor driver, and power it from the 5v pins or its own supply.

There are so many things that we can control with the Orange Pi Zero 2W PWM pins, which include: LED dimming (through a transistor), DC motor speed (through a driver), servo motors, fan speed on a 4-pin PWM fan, buzzers and tone generation, and much more.


Orange Pi Zero 2W I2S, SPDIF and Other Pin Functions

The Orange Pi Zero 2W has I2S audio pins in the H618 pin mux, but no ready-made overlay from Orange Pi for them, so they’re plain GPIOs until you write your own device-tree overlay. They’re shown in the “OTHER” column of the pinout diagram.

FunctionPinsNotes
I2S0 (+ DMIC)Pins 29 (MCLK), 12 (BCLK), 35 (LRCK), 40 (DOUT0), 38 (DIN0)PI0–PI4; the same pins can be DMIC (digital microphone) inputs
I2S3Pins 24 (MCLK), 23 (BCLK), 19 (LRCK), 21 (DOUT0), 26 (DIN0)PH5–PH9, the same pins as SPI1
SPDIFPins 11 (CLK), 13 (IN), 18 (OUT)PH2–PH4
Clock outputPins 31 (CLK_FANOUT0), 37 (CLK_FANOUT1)PI15, PI16

The H618 symbol also lists CAN on pins 8/10 and extra TWI3/TWI4 and UART2 options on bank PH, but Orange Pi documents no driver or overlay for them on this board, so this guide doesn’t count them. For audio without any of this, use HDMI or the line out on the 24-pin expansion board.


Orange Pi Zero 2W USB-C Ports (USB0 and USB1)

The Orange Pi Zero 2W has two USB-C ports, both USB 2.0, and either one can power the board with 5v. USB0 (the one next to the antenna socket) is the power + OTG port and runs in device mode by default; USB1 is a host-only port for your USB devices.

Port (Silkscreen)PositionRolePower InNotes
USB0Next to the ANT socketUSB 2.0 OTG, device mode by defaultYesHost mode needs the usb0-host overlay (see below)
USB1Next to USB0USB 2.0 host onlyYesPlug keyboards, USB drives, or a USB hub here

Orange Pi recommends powering the board through USB0, which leaves USB1 free for a device (manual section 3.13). You can switch USB0 to host mode with the usb0-host overlay (orangepi-config → System → Hardware), but its CC pins are wired as a power sink, and both device trees fix it as a device port for that reason. Orange Pi’s own kernel source says USB0 can only work as a host when the board is powered from the 40-pin 5v pins, with a cable or adapter that ignores the CC pins.

Note: On the official Ubuntu image, users report a “phantom” USB device that floods the kernel log with device descriptor read/64, error -62 even with nothing plugged in, until the small /var/log fills up and the board hangs. The workaround reported is to unbind the idle controller ( 5200400.usb) at boot, or use a newer image.


Orange Pi Zero 2W 24-Pin FPC Pinout (Expansion Connector)

The Orange Pi Zero 2W’s 24-pin FPC connector (J1, 0.5mm pitch) carries everything that doesn’t fit on the tiny board: 2x USB 2.0 host ports (USB2, USB3), 100M Ethernet from the H618’s built-in PHY, line out L/R, TV-out (CVBS), an IR receiver input, the LRADC key input, and the power key. Pin 1 is the end next to the antenna socket.

Orange Pi Zero 2W 24-pin FPC expansion connector pinout diagram with USB, Ethernet, audio, TV-out, IR, LRADC and power-key signals
24-pin FPC expansion connector

Click to expand the full pin table (24 pins)
PinSignalH618 FunctionOn the Expansion BoardExpansion-Board Pin
1GND––24
2USB3-DMUSB3 D−USB-A port (USB3 host)23
3USB3-DPUSB3 D+USB-A port (USB3 host)22
4USB2-DMUSB2 D−USB-A port (USB2 host)21
5USB2-DPUSB2 D+USB-A port (USB2 host)20
6GND––19
7EPHY-RXNEthernet RX−RJ4518
8EPHY-RXPEthernet RX+RJ4517
95V5v rail (same as the USB-C VBUS)USB-A VBUS, power LED16
10EPHY-TXNEthernet TX−RJ4515
11EPHY-TXPEthernet TX+RJ4514
12GND––13
13LRADCKey ADC inputKEY1 / KEY2 (resistor ladder)12
143.3V3.3v railIR receiver supply11
15PC15GPIO (Linux 79)RJ45 green LED (510Ω)10
16PC16GPIO (Linux 80)RJ45 yellow LED (510Ω)9
17PH10IR_RX (Linux 234)IR receiver (IRM-3638)8
18PWRONAXP313A power keyPWR_ON key7
19GND––6
20TV-OUTCVBS video out3.5mm jack (video)5
21GND––4
22LINEOUTLLine out left3.5mm jack (left)3
23LINEOUTRLine out right3.5mm jack (right)2
24GND––1

The official expansion board (Orange Pi Zero 2W 24PIN EXTEND V1.0) plugs in with a short flat cable and turns these signals into real connectors: an RJ45 jack with magnetics and link LEDs, a double USB-A socket, a 4-pole 3.5mm audio/video jack, an IR receiver, and three keys (PWR_ON, KEY1, KEY2). The flat cable flips the numbering, so pin n on the Orange Pi Zero 2W is pin 25 − n on the expansion board, which is why the last column runs backwards.

  • Cable orientation: the manual warns not to plug the cable in backwards. Check the blue stiffener side and pin 1 before you close the latches.
  • USB2/USB3 are host-only data pairs; their 5v comes from FPC pin 9, the same rail as the USB-C ports.
  • Ethernet pairs need magnetics (an RJ45 with a transformer), as on the expansion board. The internal PHY also needs board-specific kernel support: Orange Pi’s images have it, Armbian added it in 2024, and an Armbian/DietPi 6.18 kernel (2026) lost Ethernet, the USB-A ports and the audio jack until the fixed build 6.18.41.
  • KEY1/KEY2 are read through LRADC (enable the lradc-keys overlay, manual section 3.8), and PWR_ON powers the board on or off through the PMIC.
  • Line out is an unbuffered codec output: use it with headphones or a line-in, not a speaker.

Orange Pi Zero 2W On-Board Features

Besides the two connectors, the Orange Pi Zero 2W has a few on-board features you’ll meet when you wire and debug it. None of them is on a 40-pin header pin.

FeatureWhereWhat It Does
Red power LED (D1)On the boardOn whenever the 3.3v rail is up; not software controlled.
Green status LED (D2)Driven by PC13 (Linux 77), active highOff in U-Boot, then a heartbeat in Linux; control it from /sys/class/leds/green_led (trigger: none, default-on, heartbeat).
16MB SPI NOR flashBottom side, on SPI0Ships with a small factory Linux, which is why the green LED blinks even with no microSD card.
microSD slotNext to pin 1The normal boot device; the board boots from it first, then from the SPI flash.
Antenna socket (ANT)Next to USB0External antenna for the Wi-Fi 5 / Bluetooth 5.0 module (20U5622).
Mini HDMIBoard edgeHDMI 2.0 video with audio.
ButtonsNone on the boardPWR_ON, KEY1 and KEY2 are on the 24-pin expansion board.

To turn the status LED into an “I’m alive” light for your own program, set its trigger to none and write 1 or 0 to /sys/class/leds/green_led/brightness. If the green LED blinks but nothing appears on HDMI, the board is running the factory Linux from the SPI flash: re-check your microSD card.


Getting Started With Orange Pi Zero 2W GPIO

Getting the Orange Pi Zero 2W’s pins working takes three steps: install an OS, enable the overlays you need, and pick a GPIO library.

  1. Install an OS: flash Orange Pi OS (Debian or Ubuntu based), Armbian, or DietPi to a microSD card. Orange Pi’s own images ship wiringOP and gpio readall, so they’re the easiest start for GPIO work.
  2. Enable the interfaces: add the overlay names to the single overlays= line of the boot environment file (the file name and the names differ per OS, see the table), then reboot.
  3. Pick a library: libgpiod for C/C++ and Python (gpiochip0 + Linux number), wiringOP for Arduino-style C code and gpio readall, or wiringOP-Python. Use the Linux device nodes ( /dev/ttyS*, /dev/i2c-*, /dev/spidev1.*, /sys/class/pwm) for the buses.
Orange Pi OS (Orange Pi’s images)Armbian and DietPi
Boot file/boot/orangepiEnv.txt/boot/armbianEnv.txt (DietPi: /boot/dietpiEnv.txt)
Overlay lineoverlays=pi-i2c1 ph-uart5overlay_prefix=sun50i-h616 + overlays=i2c1-pi uart5-ph
Name patternport first: pi-i2c0/1/2, pi-uart2/3/4, ph-uart5, pi-pwm1…4, spi1-cs0-spidevbus first: i2c1-pi, uart5-ph… (list the folder below to see yours)
Overlay filessun50i-h616-*.dtbo in /boot/dtb/allwinner/overlay/sun50i-h616-*.dtbo in /boot/dtb/allwinner/overlay/
wiringOP / gpio readallPreinstalledNot included (build it from GitHub, or use libgpiod)
Menu toolorangepi-configarmbian-config / dietpi-config

Two things trip people up here. First, the overlay files are named sun50i-h616, even though the board is an H618: overlay_prefix=sun50i-h618 finds nothing. Second, users report that armbian-config can write the prefix into the overlay name as well ( overlays=sun50i-h616-i2c1-pi), and the overlay then silently doesn’t load: fix the line by hand to overlays=i2c1-pi. Run ls /boot/dtb/allwinner/overlay/ to see the exact names on your image.


Orange Pi Zero 2W Common Problems & Fixes

My I2C or UART overlay doesn’t load. Why? Check that you used the right names for your OS (pi-i2c1 on Orange Pi OS, i2c1-pi with overlay_prefix=sun50i-h616 on Armbian and DietPi), that the prefix isn’t repeated inside the name, that two overlays don’t claim the same pin pair, and reboot. The debug console on pins 8/10 shows overlay errors during boot.

i2cdetect shows nothing on bus 1. Where is my I2C1? The /dev/i2c-N number doesn’t match the bus number: I2C1 on pins 3/5 is often /dev/i2c-3. Run i2cdetect -l and match the 5002400 address to I2C1.

I enabled I2C0 but nothing answers on pins 3/5. Why? I2C0 is on pins 15/22. Pins 3/5 are I2C1. Use pi-i2c1 (i2c1-pi on Armbian) for pins 3/5.

My Raspberry Pi code or pin chart doesn’t work. Why? The header is shaped like a Pi’s, but the GPIOs aren’t BCM pins, and some third-party charts for this board are simply wrong (users have shared charts that put PI5 on pin 24 or PI16 on pin 36; they’re PH5 and PC12). Trust Orange Pi’s manual table, this guide, or gpio readall.

My blinky doesn’t work out of the box on Armbian. Why? Armbian doesn’t ship wiringOP, and the old sysfs GPIO interface is deprecated. Use libgpiod on gpiochip0 with the Linux number (pin 7 = line 269), as in the code example above.

My serial device on pins 8/10 gets garbage or a login prompt. Why? Pins 8/10 are the Linux console. Move the device to UART5 (pins 11/13, ph-uart5), or add the disable-uart0 overlay.

wiringOP’s pwmWrite() or gpio pwm kills my network. Why? Users report that older wiringOP wrote a PWM register that also affects the clock the internal Ethernet PHY uses on Orange Pi’s kernel. Use the kernel PWM interface ( /sys/class/pwm) instead, or a fixed wiringOP build.

wiringPiISR() doesn’t fire, or wiringOP-Python won’t import. Why? Older wiringOP limited interrupts to GPIO numbers 0–63, while the Zero 2W’s pins are 224–272; that’s fixed upstream since March 2025, so rebuild wiringOP from Orange Pi’s GitHub. For the Python import error undefined symbol: sunxi_pwm_set_clk, users rename the function to sunxi_pwm_set_clk_v2 in bindings.i and rebuild. libgpiod edge events are a simpler route for interrupts.

Ethernet or the USB-A ports on the expansion board don’t work. Why? They need the board’s kernel support. On DietPi/Armbian kernel 6.18 they disappeared, and the 6.18.41 build fixed them. Update the kernel, and check that the flat cable isn’t reversed.

The board is slow on the network or reboots under load. Why? Users trace many of these to a weak supply. Use a good 5v / 3A supply on one USB-C port only.


Orange Pi Zero 2W vs Raspberry Pi Zero 2 W, Orange Pi Zero 3 and Orange Pi Zero

The Orange Pi Zero 2W is Orange Pi’s answer to the Raspberry Pi Zero 2 W: the same size and header layout, with a faster H618, much more RAM, and Wi-Fi 5. The Orange Pi Zero 3 uses the same H618 on a square board with Gigabit Ethernet but a 26-pin header, and the original Orange Pi Zero is the older, slower H2+ board.

FeatureOrange Pi Zero 2WRaspberry Pi Zero 2 WOrange Pi Zero 3Orange Pi Zero
SoC / CPUAllwinner H618, 4x A53 @ 1.5GHzRP3A0 (BCM2710A1), 4x A53 @ 1GHzAllwinner H618, 4x A53 @ 1.5GHzAllwinner H2+ (or H3), 4x A7 @ up to 1.2GHz
RAM1/1.5/2/4GB LPDDR4512MB LPDDR21/1.5/2/4GB LPDDR4256/512MB DDR3
GPIO header40-pin (Pi layout), 28 GPIOs40-pin, 28 GPIOs26-pin + 13-pin26-pin + 13-pin
GPIO numberingH618 port names, Linux = bank × 32 + pinBCM numbersH618 port namesH2+ port names
Ethernet100M through the 24-pin FPCNoneGigabit on board100M on board
WirelessWi-Fi 5 + Bluetooth 5.0Wi-Fi 4 (2.4GHz) + Bluetooth 4.2Wi-Fi 5 + Bluetooth 5.0Wi-Fi 4 (XR819)
VideoMini HDMIMini HDMIMicro HDMINone (TV-out on the 13-pin)
USB2x USB-C + 2x USB 2.0 on the FPC1x micro-USB OTG + micro-USB power1x USB-A + USB-C power + 2x on the 13-pin1x USB-A + micro-USB power/OTG
Camera connectorNoneCSI camera connectorNoneNone
Size65 x 30mm65 x 30mm50 x 55mm48 x 46mm

Pick the Orange Pi Zero 2W when you want a Pi Zero-sized board with more RAM and speed, and you’re happy to wire by physical pin. Pick the Raspberry Pi Zero 2 W for the camera connector, BCM-numbered tutorials, and the best software support. Pick the Orange Pi Zero 3 when you need wired Gigabit Ethernet on the board, and the original Orange Pi Zero only for an existing project built around it.


Orange Pi Zero 2W Pin Details

Here is every pin of the Orange Pi Zero 2W 40-pin header in physical order, with its H618 name, Linux GPIO number, wiringOP number, the functions Orange Pi’s overlays enable, the full H618 pin mux, and the circuit on the board. Pin 1 is the square pad next to the microSD slot; odd pins are on the inner row, and even pins are on the board edge.

Click to expand the full pin table (40 pins)
PinNameLinux #wPiFunctionsOverlay (Orange Pi OS)All H618 Mux FunctionsOn-Board CircuitDescription
13.3V––3.3v power––VDD33 rail3.3v output from the board’s 3.3v regulator; light loads only (sensors, logic chips).
25V––5v power––5v rail (both USB-C VBUS)The board’s 5v rail: the same net as both USB-C VBUS pins, with no fuse or series diode.
3PI82640TWI1_SDA (I2C1)pi-i2c1RGMII_TXD2, UART2_CTS, TS0_DVLD, TWI1_SDA, PI_EINT810kΩ pull-up to 3.3vI2C1 data, with a 10kΩ pull-up on the board; reads high when nothing drives it.
45V––5v power––5v rail (both USB-C VBUS)Second 5v pin, the same net as pin 2.
5PI72631TWI1_SCL (I2C1)pi-i2c1RGMII_TXD3, UART2_RTS, TS0_SYNC, TWI1_SCK, PI_EINT710kΩ pull-up to 3.3vI2C1 clock, with a 10kΩ pull-up on the board.
6GND––Ground––GNDGround.
7PI132692PWM3, UART4_TXpi-pwm3, pi-uart4RGMII_CLKIN, UART4_TX, TS0_D4, PWM3, PI_EINT13–A free GPIO by default; hardware PWM3 or UART4 transmit with an overlay.
8PH02243UART0_TX (debug console)disable-uart0 frees itUART0_TX, CAN_TX, PWM3, TWI1_SCK, PH_EINT0470Ω series resistor (debug)The Linux debug console transmit pin (ttyS0, 115200 baud) by default.
9GND––Ground––GNDGround.
10PH12254UART0_RX (debug console)disable-uart0 frees itUART0_RX, CAN_RX, PWM4, TWI1_SDA, PH_EINT1470Ω series resistor (debug)The Linux debug console receive pin by default.
11PH22265UART5_TXph-uart5UART5_TX, SPDIF_CLK, PWM2, TWI2_SCK, PH_EINT2–A free GPIO; UART5 transmit with the ph-uart5 overlay, the usual second serial port.
12PI12576GPIO–RGMII_RXD2, DMIC_DATA0, I2S0_BCLK, HDMI_SDA, PI_EINT1–A plain GPIO (I2S0 bit clock in the SoC mux, with no Orange Pi overlay).
13PH32277UART5_RXph-uart5UART5_RX, SPDIF_IN, PWM1, TWI2_SDA, PH_EINT3–A free GPIO; UART5 receive with the ph-uart5 overlay.
14GND––Ground––GNDGround.
15PI52618TWI0_SCL (I2C0), UART2_TXpi-i2c0 or pi-uart2RGMII_RXCTL, RMII_CRS_DV, UART2_TX, TS0_CLK, TWI0_SCK, PI_EINT5–I2C0 clock or UART2 transmit (one overlay for the pair 15/22).
16PI142709PWM4, UART4_RXpi-pwm4, pi-uart4MDC, UART4_RX, TS0_D5, PWM4, PI_EINT14–A free GPIO; hardware PWM4 or UART4 receive with an overlay.
173.3V––3.3v power––VDD33 railSecond 3.3v output, the same rail as pin 1.
18PH422810GPIO–SPDIF_OUT, TWI3_SCK, PH_EINT4–A plain GPIO, free in every Orange Pi image.
19PH723111SPI1_MOSIspi1-cs0-spidevUART2_RTS, I2S3_LRCK, SPI1_MOSI, TWI4_SDA, PH_EINT7–SPI1 MOSI (data out of the board).
20GND––Ground––GNDGround.
21PH823212SPI1_MISOspi1-cs0-spidevUART2_CTS, I2S3_DOUT0, SPI1_MISO, I2S3_DIN1, PH_EINT8–SPI1 MISO (data into the board).
22PI626213TWI0_SDA (I2C0), UART2_RXpi-i2c0 or pi-uart2RMII_RXER, UART2_RX, TS0_ERR, TWI0_SDA, PI_EINT6–I2C0 data or UART2 receive (one overlay for the pair 15/22).
23PH623014SPI1_CLKspi1-cs0-spidevUART2_RX, I2S3_BCLK, SPI1_CLK, TWI4_SCK, PH_EINT6–SPI1 clock.
24PH522915SPI1_CS0spi1-cs0-spidevUART2_TX, I2S3_MCLK, SPI1_CS0, TWI3_SDA, PH_EINT5–SPI1 chip select 0 (/dev/spidev1.0).
25GND––Ground––GNDGround.
26PH923316SPI1_CS1spi1-cs1-spidevI2S3_DIN0, SPI1_CS1, I2S3_DOUT1, PH_EINT9–SPI1 chip select 1 (/dev/spidev1.1).
27PI1026617TWI2_SDA (I2C2), UART3_RXpi-i2c2 or pi-uart3RGMII_TXD0, RMII_TXD0, UART3_RX, TS0_D1, TWI2_SDA, PI_EINT10–I2C2 data or UART3 receive (one overlay for the pair 27/28).
28PI926518TWI2_SCL (I2C2), UART3_TXpi-i2c2 or pi-uart3RGMII_TXD1, RMII_TXD1, UART3_TX, TS0_D0, TWI2_SCK, PI_EINT9–I2C2 clock or UART3 transmit (one overlay for the pair 27/28).
29PI025619GPIO–RGMII_RXD3, DMIC_CLK, I2S0_MCLK, HDMI_SCL, PI_EINT0–A plain GPIO.
30GND––Ground––GNDGround.
31PI1527120GPIO–MDIO, UART4_RTS, TS0_D6, CLK_FANOUT0, PI_EINT15–A plain GPIO.
32PI1126721PWM1pi-pwm1RGMII_TXCK, RMII_TXCK, UART3_RTS, TS0_D2, PWM1, PI_EINT11–Hardware PWM1, free of the bus pins.
33PI1226822PWM2pi-pwm2RGMII_TXCTL, RMII_TXEN, UART3_CTS, TS0_D3, PWM2, PI_EINT12–Hardware PWM2, free of the bus pins.
34GND––Ground––GNDGround.
35PI225823GPIO–RGMII_RXD1, RMII_RXD1, DMIC_DATA1, I2S0_LRCK, HDMI_CEC, PI_EINT2–A plain GPIO.
36PC127624GPIO–NAND_DQS, PC_EINT12–A plain GPIO on bank C (the manual’s readall example shows it as an output, but no device tree claims it).
37PI1627225GPIO–EPHY_25M, UART4_CTS, TS0_D7, CLK_FANOUT1, PI_EINT16–A plain GPIO.
38PI426026GPIO–RGMII_RXCK, DMIC_DATA3, I2S0_DIN0, I2S0_DOUT1, PI_EINT4–A plain GPIO.
39GND––Ground––GNDGround.
40PI325927GPIO–RGMII_RXD0, RMII_RXD0, DMIC_DATA2, I2S0_DOUT0, I2S0_DIN1, PI_EINT3–A plain GPIO.

Wrap Up

To conclude this guide article, the Orange Pi Zero 2W is a very solid little Linux board when you want a Raspberry Pi Zero 2 W footprint with a faster H618, up to 4GB of RAM, and Wi-Fi 5. Its 40-pin header gives you 28 GPIOs, four extra UARTs, three I2C buses, SPI1 with two chip selects, and four PWM channels, and the 24-pin FPC adds Ethernet, USB, and audio. Just remember the gotchas: wire by physical pin (not BCM), every pin is 3.3v only, pins 8/10 are the debug console, the /dev/i2c number isn’t the bus number, and the 5v pins are the same rail as both USB-C ports.

I hope you’ve found this guide helpful for your Orange Pi Zero 2W project. For more boards, check out the Pinouts, Datasheets & Schematic Diagrams Library.

Share This Page With Your Network!
Join Our +25,000 Newsletter Subscribers!

Stay Updated With All New Content Releases. You Also Get Occasional FREE Coupon Codes For Courses & Other Stuff!

Photo of author
Author
Embedded systems engineer with several years of experience in embedded software and hardware design. I work as an embedded SW engineer in the Automotive & e-Mobility industry. However, I still do Hardware design and SW development for DSP, Control Systems, Robotics, AI/ML, and other fields I'm passionate about.
I love reading, writing, creating projects, and teaching. A reader by day and a writer by night, it's my lifestyle. I believe that the combination of brilliant minds, bold ideas, and a complete disregard for what is possible, can and will change the world! I will be there when it happens, will you?

Leave a Comment