Orange Pi 5 Pinout, Datasheet, Schematic [Ultimate Guide]

In this guide, you’ll find the Orange Pi 5 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 5 is a single-board Linux computer built around the Rockchip RK3588S (4x Cortex-A76 at 2.4GHz + 4x Cortex-A55 at 1.8GHz), with 4GB, 8GB, or 16GB of LPDDR4/4X RAM and an M.2 slot for an NVMe SSD. Its header has 26 pins, not 40 like a Raspberry Pi, with 17 GPIOs at 3.3v, and 13 of them sit behind level shifters. That’s the part most pinout pages never mention.


Orange Pi 5 Pinout Diagram

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

Orange Pi 5 26-pin header pinout diagram with GPIO, Linux GPIO numbers, wiringOP, PWM, UART, SPI, I2C and CAN pin functions
26-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, the row along the board edge. Pin 1 is the corner next to the microSD slot. The small square next to a GPIO means it’s 3.3v only, the “1V8↔3V3 SHIFTER” boxes mark the pins that go through a level shifter, and the numbered badges point to the notes at the bottom of the diagram.

Orange Pi 5 26-Pin Header Pin Table

Click to expand the full pin table (26 pins)
PinNameLinux #wPiFunctions
13.3V––3.3v power
25V––5v power
3GPIO1_B7470I2C5_SDA_M3, UART1_RX_M1, PWM13_M2
45V––5v power
5GPIO1_B6461I2C5_SCL_M3, UART1_TX_M1
6GND––Ground
7GPIO1_C6542PWM15_IR_M2
8GPIO4_A31313UART0_TX_M2
9GND––Ground
10GPIO4_A41324UART0_RX_M2
11GPIO4_B21385CAN1_RX_M1, PWM14_M1
12GPIO0_D5296CAN2_TX_M1, I2C1_SDA_M2
13GPIO4_B31397CAN1_TX_M1
14GND––Ground
15GPIO0_D4288CAN2_RX_M1, I2C1_SCL_M2, PWM3_IR_M0
16GPIO1_D3599UART4_RX_M0, I2C1_SDA_M4, PWM1_M1
173.3V––3.3v power
18GPIO1_D25810UART4_TX_M0, I2C1_SCL_M4, PWM0_M1
19GPIO1_C14911SPI4_MOSI_M0, UART3_TX_M0, I2C3_SCL_M0
20GND––Ground
21GPIO1_C04812SPI4_MISO_M0, UART3_RX_M0, I2C3_SDA_M0
22GPIO2_D49213GPIO only
23GPIO1_C25014SPI4_CLK_M0, PWM3_IR_M2
24GPIO1_C45215SPI4_CS1_M0
25GND––Ground
26GPIO1_A33516PWM1_M2

Buy an Orange Pi 5: If you don’t have one yet, you can get the official board from Amazon or AliExpress. Pick the RAM size that fits your project: 4GB is plenty for GPIO and sensor work, and 8GB or 16GB for a desktop, containers, or the NPU.

Download Orange Pi 5 Pinout Diagrams (Full Resolution)

The Orange Pi 5 26-pin header pinout diagram in full resolution (5120 px), in one ZIP file.


Orange Pi 5 Datasheet

The Orange Pi 5 is built around the Rockchip RK3588S system-on-chip. Orange Pi doesn’t publish a separate board datasheet: the user manual is the datasheet, and it holds the specs, the 26-pin table, and the overlay list. Here are the official documents (Orange Pi hosts them on Google Drive, linked from its Orange Pi 5 service and support page):

DocumentVersion / DateWhat You’ll Use It ForLink
Orange Pi 5 User Manual (OrangePi_5_RK3588S_User Manual)v2.4 (681 pages)Specs, the 26-pin table (3.16), gpio readall (3.17), every overlay and /dev node (3.18), pull resistors (3.18.2), debug UART (2.18), powering from the 5v pins (2.19)PDF
Orange Pi 5 Schematic (OPi5_v12_20221108)Rev 1.2, 8 Nov 2022 (36 sheets)Power input, the EXT I/O sheet with the level shifters, keys, LEDs, debug UART, SPI flashPDF
Orange Pi 5 Mechanical Drawing–Board outline (100 x 62mm), mounting holes, and connector positions for casesPDF
Orange Pi 5 Product PageLiveCurrent hardware specifications and the V1.3.2 pin definition imageWeb
26 Pin Interface Pin Description (Orange Pi wiki)LiveOrange Pi’s own pin table image with the PWM register base addressesWeb
wiringOPGitHub (live)Orange Pi’s GPIO library 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 level shifters and the keys; and the mechanical drawing for a case or a mount. Rockchip doesn’t publish the RK3588S datasheet openly, so there’s no official chip datasheet to link: the user manual’s tables are the reference for the header.

Note: Board revision: the board in the photos is V1.3.2 (the current one, printed next to the Orange Pi logo), while the newest public schematic is Rev 1.2. The latest manual (v2.4) shows the same 26-pin header signals as the Rev 1.2 schematic, net for net, so the pinout in this guide applies to both. One known V1.3.2 change is elsewhere on the board: the M.2 slot’s power-enable pin moved (see the Common Problems section).


Orange Pi 5 Schematic

Orange Pi publishes the full Orange Pi 5 schematic (Rev 1.2, 36 sheets). The carousel below shows the three sheets that matter when you wire the header: the USB-C power input, the EXT I/O sheet with the 26-pin header and its level shifters, and the keys, LEDs, and debug UART. Click a page to view it full screen.

Orange Pi 5 schematic page 1: Power_Type-C: USB-C power input, Type-C port and CC controller (OPi5 Rev 1.2)
Page 1 of 3 · Power & USB-C Input (Sheet 20)
Orange Pi 5 schematic page 2: EXT I/O: 26-pin header CON4, SGM4553 level shifters and the FET shifter on GPIO2_D4 (OPi5 Rev 1.2)
Page 2 of 3 · EXT I/O & 26-Pin Header (Sheet 34)
Orange Pi 5 schematic page 3: KEY: MASKROM, RECOVERY and POWER keys, debug UART and the LEDs (OPi5 Rev 1.2)
Page 3 of 3 · Keys, LEDs & Debug UART (Sheet 35)
Page 1 of 4

Official source: the Orange Pi 5 schematic (PDF), OPi5_v12_20221108, Rev 1.2, 8 November 2022. The watermark across the sheets is on Orange Pi’s own file. Here’s what to look at:

  • Power input (sheet 20): the USB-C power connector’s VBUS goes straight to the VCC5V0_SYS net, which is tied to VCC_5V0. The only part on that line is an AZ5825-01F TVS diode: there’s no fuse and no series diode. Two 5.1kΩ resistors on CC1/CC2 tell the charger the board is a plain 5v sink, so it takes 5v only (Orange Pi asks for 5v / 4A).
  • 26-pin header CON4 (sheet 34): the RK3588S runs most of the header GPIOs at 1.8v, so six SGM4553 dual-bit, auto-direction translators (UU5 to UU10) bring 12 pins up to 3.3v (pin 22 has its own FET shifter, so 13 of the 17 GPIOs are shifted). Pins 8 and 10 (UART0) only have 100Ω series resistors, and pins 11 and 13 (CAN1) 22Ω, because those GPIOs are already 3.3v.
  • Pin 22 (GPIO2_D4): a 2SK3018 FET with 10kΩ pull-ups on both sides (R42 to 1.8v, R45 to 3.3v) does the level shift. That’s why pin 22 always idles high.
  • Power pins: pins 2 and 4 are wired to VCC_5V0, the same net as the USB-C input, and pins 1 and 17 to VCC_3V3_S3. A POWER KEY link to the header area (R90664) is marked NC, so it isn’t fitted.
  • Keys (sheet 35): MASKROM pulls the boot line to force USB download mode, RECOVERY pulls the SARADC_VIN1 key line to enter loader mode, and SW2 is the ON/OFF key of the RK806 power management IC.
  • Debug UART (sheet 35): UART2_M0 TX/RX go through two 2SK3018 FET level shifters (1.8v to 3.3v) to the 3-pin UART header, with ESD diodes on both lines.
  • LEDs (sheet 35): the green RUN LED is fed from 5v through 1kΩ and switched by a 2SK3018 FET from the SoC’s PWM0_LED line (GPIO1_A2). The red PWR LED is fed from 3.3v through 1kΩ, so it’s on whenever the 3.3v rail is up. Neither LED is on a header pin.

Orange Pi 5 Specs

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

Orange Pi 5 single-board computer (RK3588S, board V1.3.2)

Get an Orange Pi 5: the official Orange Pi board is the one I recommend. Grab it from Amazon or AliExpress.

FeatureOrange Pi 5
SoCRockchip RK3588S (8nm), 4x Cortex-A76 @ 2.4GHz + 4x Cortex-A55 @ 1.8GHz
GPU / NPUArm Mali-G610 MP4; NPU (neural-network accelerator) rated at 6 TOPS, INT4/INT8/INT16
Power management ICRockchip RK806-1
RAM4GB, 8GB or 16GB LPDDR4/4X
Storage16MB QSPI NOR flash (bootloader), microSD slot, M.2 M-key 2242 slot (PCIe 2.0 NVMe SSD)
EthernetGigabit Ethernet (YT8531C PHY)
WirelessNone on the board (optional M.2 Wi-Fi 6 + Bluetooth module)
USB1x USB 3.0 + 2x USB 2.0 Type-A, 1x USB-C (USB 3.1 + DisplayPort 1.4)
Video / cameraHDMI 2.1 (up to 8K@60Hz), DP 1.4 over USB-C, 2x MIPI DSI, 3 camera connectors
AudioES8388 codec, 3.5mm headphone jack, on-board microphone
GPIO header26-pin (2×13, 2.54mm), 17 GPIOs, 3.3v logic, not 5v tolerant
Other headers3-pin debug UART (1,500,000 baud), 2-pin 5v fan header
Keys / LEDsMASKROM, RECOVERY, ON/OFF keys; red power LED, green status LED
Power input5v / 4A through the USB-C power port (or 5v into header pins 2/4)
Size / weight100 x 62mm, 46g

Orange Pi 5 Specifications Summary

  • The Orange Pi 5 has a 26-pin header (not 40 pins), so Raspberry Pi HATs don’t fit it.
  • It has 17 GPIOs on the header, all 3.3v and not 5v tolerant.
  • 13 of the 17 GPIOs are level-shifted from 1.8v: 12 through SGM4553 auto-direction translators and pin 22 through a FET. Fine for logic signals, too weak for LEDs or relays.
  • Only pins 8, 10, 11 and 13 accept software pull-up/pull-down; the shifted pins idle high.
  • Power pins: 5v on pins 2 and 4, 3.3v on pins 1 and 17, and 5 GND pins (6, 9, 14, 20, 25).
  • There are no analog inputs on the header: add an external I2C or SPI ADC.
  • UART: 4 on the header (UART0, 1, 3, 4). UART0 is on pin 8 (TX) and pin 10 (RX).
  • I2C: 3 buses, I2C1 (pins 12/15 or 16/18), I2C3 (pins 21/19) and I2C5 (pins 3/5).
  • SPI: SPI4 on pins 19, 21 and 23 with one chip select (CS1, pin 24) → /dev/spidev4.1.
  • PWM: 6 channels (PWM0, 1, 3, 13, 14, 15) on 8 pins.
  • CAN: CAN1 (pins 11/13) and CAN2 (pins 15/12); both need a 3.3v CAN transceiver.
  • Debug console: a separate 3-pin UART header at 1,500,000 baud.

Orange Pi 5 RK3588S Peripherals vs the 26-Pin Header

PeripheralOn the HeaderOverlay (Orange Pi OS)Linux Device / Notes
GPIO17 pinsAlways available/dev/gpiochip0–4 (libgpiod), wiringOP
UART4: UART0, UART1, UART3, UART4uart0-m2, uart1-m1, uart3-m0, uart4-m0/dev/ttyS0, ttyS1, ttyS3, ttyS4; no RTS/CTS on the header
I2C3: I2C1 (two pin pairs), I2C3, I2C5i2c1-m2 or i2c1-m4, i2c3-m0, i2c5-m3/dev/i2c-1, /dev/i2c-3, /dev/i2c-5
SPI1: SPI4 (CS1 only)spi4-m0-cs1-spidev/dev/spidev4.1
PWM6 channels on 8 pinspwm0-m1, pwm1-m1/-m2, pwm3-m0/-m2, pwm13-m2, pwm14-m1, pwm15-m2/sys/class/pwm/pwmchipN
CAN2: CAN1, CAN2can1-m1, can2-m1SocketCAN network interfaces (can0, can1)
ADCNone–The SoC’s SARADC is used for the keys, not the header
I2S / SPDIFNone–Audio goes through the on-board ES8388 codec
USBNone on the header–Use the Type-A and USB-C ports

Orange Pi 5 Quick Pin Selection Guide

Use CaseRecommended PinsWhy
Serial port / UARTPin 8 (UART0 TX), pin 10 (UART0 RX)Direct 3.3v pins (no shifter), /dev/ttyS0
A second UARTPins 18/16 (UART4) or pins 19/21 (UART3)Leave pins 3/5 free for I2C5
I2C sensors and displaysPins 3 (SDA) / 5 (SCL), I2C5/dev/i2c-5, same position as a Raspberry Pi’s I2C1
A second I2C busPins 12/15 (I2C1 M2) or pins 21/19 (I2C3)I2C1 M4 (16/18) conflicts with UART4
SPI devicePins 19, 21, 23 + CS1 pin 24The only SPI bus on the header
Hardware PWMPin 7 (PWM15) or pin 26 (PWM1)Free of the bus pins
CAN busPins 11/13 (CAN1) + a 3.3v transceiverDirect 3.3v pins, SocketCAN
Buttons and inputs that need a pullPins 8, 10, 11, 13The only pins whose pull-up/down works
LED (with a resistor)Pin 13 (GPIO4_B3) or pin 11Direct pins; the shifted pins can’t drive LEDs well
Relays, motors, fansAny GPIO through a transistor or driver boardGPIOs only switch logic levels
Analog inputNone on the boardAdd an I2C or SPI ADC

Orange Pi 5 Pins to Use With Caution

PinReasonWhat to Do
Pins 3, 5, 7, 12, 15, 16, 18, 19, 21, 23, 24, 26 (SGM4553)Auto-direction level shifters with weak driveLogic signals only; buffer LEDs, relays and long wires
Shifted pins as inputsPull-down settings are ignored; they idle highUse pins 8/10/11/13, or a strong external pull-down (a few kΩ)
Pin 22 (GPIO2_D4)FET shifter with 10kΩ pull-upsTreat it as active-low or open-drain; it reads high when idle
Pins 8, 10gpio readall labels them the wrong way roundPin 8 is UART0 TX, pin 10 is RX
Pins 12/15 and 16/18Both pairs can be I2C1Enable only one of i2c1-m2 or i2c1-m4
Pins 2, 4 (5v)Board 5v rail, same net as USB-C, no fuseNever feed them while USB-C is plugged in
Pins 1, 17 (3.3v)No current rating publishedLight loads only
Any GPIONot 5v tolerantLevel-shift 5v signals

Orange Pi 5 Pins Functions

Only 17 of the 26 pins of the Orange Pi 5 header are GPIO pins; the rest are power and ground. The 26 pins are divided into the following groups based on the hardware functionality they’re used for.

Most pins can do two or three jobs, and each job is turned on with its own overlay in /boot/orangepiEnv.txt. 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 5 Power Pins

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

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

PinNameFunctionNotes
1, 173.3V3.3v outputVCC_3V3_S3 rail; no current rating published
2, 45V5v output or inputBoard 5v rail (VCC_5V0), the same net as the USB-C power input
6, 9, 14, 20, 25GNDGroundCommon ground for everything you connect

5V pins: when you power the Orange Pi 5 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.19) shows how to power the board through pins 2/4 and GND with a 5v / 4A supply. The schematic shows nothing between these pins and the USB-C input except a TVS diode: no fuse, no reverse-polarity or back-feed protection.

3.3V pins: a 3.3v output 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 5 wants a good 5v / 4A USB-C supply into the port marked “PWR IN” (the other USB-C port is for data and DisplayPort). It takes 5v only, so a USB-C PD charger that tries to negotiate 9v or 12v simply stays at 5v. A weak supply or a thin cable shows up as random reboots, often when an NVMe SSD spins up.

Note: Never connect a supply to the 5v pins while the USB-C power cable is plugged in. They’re the same net, so the two supplies fight each other with nothing in between. Use one or the other, and if you power the board from the header, use a regulated 5v supply rated for at least 4A, with short, thick wires.

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


Orange Pi 5 GPIO Pins

The Orange Pi 5 has 17 GPIO pins on its 26-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, PWM or CAN) with an overlay.

Orange Pi 5 GPIO pins (17 GPIOs on the 26-pin header, from GPIO1_B7 on pin 3 to GPIO1_A3 on pin 26)

ParameterOrange Pi 5 GPIO
Logic level3.3v at the header
5v tolerantNo, on every pin
Direct pins (no shifter)4: pins 8, 10 (100Ω series) and pins 11, 13 (22Ω series)
Level-shifted pins13: twelve through SGM4553 auto-direction translators, pin 22 through a 2SK3018 FET
Pull-up / pull-downWorks only on pins 8, 10, 11 and 13 (manual section 3.18.2)
Current per pinNot published by Orange Pi; the shifted pins have weak drive
InterruptsEdge events on any GPIO through libgpiod; wiringOP’s wiringPiISR()

Orange Pi 5 Level Shifters and Pull Resistors

This is the Orange Pi 5’s biggest gotcha. Most of the header GPIOs come from RK3588S I/O banks that run at 1.8v, so the board puts SGM4553 auto-direction level translators between them and the header. An auto-direction translator senses which side is driving and follows it, which is great for I2C or UART, but it has two side effects:

  • Weak drive: the translator’s output can’t source much current. Drive an LED, a relay module, or a long cable straight from a shifted pin and the level sags. Use these pins for logic signals only, and put a transistor or a buffer in front of anything that draws current.
  • Pull-down doesn’t work: the SoC’s internal pull-down is on the 1.8v side of the translator, so it can’t pull the 3.3v header pin low. The shifted pins read high when nothing drives them. Users report this as “every input reads 1” (wiringOP issue #80). Only pins 8, 10, 11 and 13 respond to gpio mode <wPi> up/down.

So for a push button, use pin 8, 10, 11, or 13 with the internal pull, or wire the button between a shifted pin and GND with the pin idling high (active-low). If you really need a pull-down on a shifted pin, a strong external resistor (a few kΩ) can win against the translator, but an active-low design is cleaner.

Orange Pi 5 GPIO Numbering: Physical vs Rockchip vs Linux vs wiringOP

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

NumberingPin 3 IsUsed By
Physical3Counting pins on the header (1–26)
Rockchip nameGPIO1_B7The schematic, the manual, the device tree (bank 1, group B, pin 7)
Linux GPIO number47sysfs (/sys/class/gpio), and as chip + offset in libgpiod: gpiochip1, line 15
wiringOP (wPi)0wiringOP C/Python functions and gpio readall

The Linux number is built from the Rockchip name: bank × 32 + group × 8 + pin, where group A = 0, B = 1, C = 2 and D = 3. GPIO1_B7 is 1 × 32 + 1 × 8 + 7 = 47, and GPIO4_B3 (pin 13) is 4 × 32 + 1 × 8 + 3 = 139. In libgpiod, each bank is its own chip: the bank number is the gpiochip and group × 8 + pin is the line offset, so GPIO4_B3 is gpiochip4 line 11.

On Orange Pi OS the libgpiod lines carry no names, and users report the same on Armbian, so gpioinfo lists them as “unnamed” and you can’t ask for a pin by name. Address them by chip and offset as above. wiringOP is the opposite: it only knows the wPi numbers, and gpio readall prints all of them next to the physical pins.

Orange Pi 5 GPIO Code Example (C/C++ and Python)

Here’s the same job in both languages: blink an LED on pin 13 (GPIO4_B3), one of the four direct pins that can drive an LED. Wire the LED’s anode to pin 13 through a 330Ω resistor, and its cathode to GND on pin 14. Both use the libgpiod v2 API (chip 4, line 11): 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 7 out and gpio write 7 1 in the terminal, because pin 13 is wPi 7. In C, that’s pinMode(7, OUTPUT) and digitalWrite(7, HIGH) after wiringPiSetup(). Its official GitHub repository has the source and the Python version.

Note: The Orange Pi 5’s GPIOs are not 5v tolerant. The level shifters translate between 1.8v and 3.3v only, so 5v on a header pin can damage the translator and the SoC behind it. To connect 5v logic (an Arduino’s TX pin, a 5v sensor output), use a level shifter or a resistor divider.


Orange Pi 5 Analog Input Pins (ADC)

The Orange Pi 5 has no analog input pins on its 26-pin header. The RK3588S does have a SARADC, but the board uses its channels for the MASKROM and RECOVERY keys and the headphone detect, not for the header. 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 SPI4. Power the ADC from 3.3v, so its digital lines stay at the board’s logic level.


Orange Pi 5 UART Pins

The Orange Pi 5 has 4 UARTs on its header: UART0 on pin 8 (TX) and pin 10 (RX), plus UART1, UART3, and UART4 on other pins. Each one is off by default and is turned on with its overlay in /boot/orangepiEnv.txt.

Orange Pi 5 Default UART Pins: GPIO4_A3 (UART0 TX, pin 8) and GPIO4_A4 (UART0 RX, pin 10).

Orange Pi 5 UART pins (UART0 on pins 8 and 10, UART1 on 5 and 3, UART3 on 19 and 21, UART4 on 18 and 16)

UARTTXRXOverlayLinux Device
UART0Pin 8 (GPIO4_A3)Pin 10 (GPIO4_A4)uart0-m2/dev/ttyS0
UART1Pin 5 (GPIO1_B6)Pin 3 (GPIO1_B7)uart1-m1/dev/ttyS1
UART3Pin 19 (GPIO1_C1)Pin 21 (GPIO1_C0)uart3-m0/dev/ttyS3
UART4Pin 18 (GPIO1_D2)Pin 16 (GPIO1_D3)uart4-m0/dev/ttyS4

UART0 is the cleanest one: its pins skip the level shifters. UART1 shares pins 3/5 with I2C5, UART3 shares pins 19/21 with SPI4 and I2C3, and UART4 shares pins 16/18 with I2C1 M4 and two PWM channels, so plan which bus gets which pins. None of them has RTS/CTS on the header. The debug console is a separate UART (UART2) on its own 3-pin header, covered below.

Note: gpio readall labels pin 8 as “RXD.0” and pin 10 as “TXD.0”, but that’s backwards. The manual’s pin table, its own UART test, and the schematic (net UART0_TX_M2 on pin 8) all agree: pin 8 is TX and pin 10 is RX. Cross the lines to your device (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 5 using the UART, which include: GPS receivers, USB-to-serial adapters, RS-485 transceivers (Modbus), LoRa and cellular modems, fingerprint sensors, microcontroller boards, and much more.


Orange Pi 5 I2C Pins

The Orange Pi 5 has 3 I2C buses on its header: I2C5 on pin 3 (SDA) and pin 5 (SCL), I2C3 on pins 21/19, and I2C1 on either pins 12/15 or pins 16/18. Each appears as /dev/i2c-N once its overlay is on.

Orange Pi 5 Default I2C Pins: GPIO1_B7 (I2C5 SDA, pin 3) and GPIO1_B6 (I2C5 SCL, pin 5), the same position as the main I2C bus on a Raspberry Pi.

Orange Pi 5 I2C pins (I2C5 on pins 3 and 5, I2C3 on 21 and 19, I2C1 on 12 and 15 or 16 and 18)

I2C BusSDASCLOverlayLinux Device
I2C5Pin 3 (GPIO1_B7)Pin 5 (GPIO1_B6)i2c5-m3/dev/i2c-5
I2C3Pin 21 (GPIO1_C0)Pin 19 (GPIO1_C1)i2c3-m0/dev/i2c-3
I2C1 (pair 1)Pin 12 (GPIO0_D5)Pin 15 (GPIO0_D4)i2c1-m2/dev/i2c-1
I2C1 (pair 2)Pin 16 (GPIO1_D3)Pin 18 (GPIO1_D2)i2c1-m4/dev/i2c-1

I2C1 can come out on two pin pairs, but it’s the same controller, so enable only one of i2c1-m2 and i2c1-m4. Every I2C pin on the header goes through an SGM4553 translator, which handles I2C’s open-drain signals in both directions. Most sensor modules already carry their own pull-up resistors; if yours doesn’t, add 2.2kΩ–4.7kΩ pull-ups to 3.3v. Scan a bus with sudo i2cdetect -y 5 (change the number for the other buses).

Note: Many I2C modules sold for Arduino pull SDA and SCL up to 5v. That puts 5v on the header pins, which the board isn’t built for. 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.

There are so many modules and sensors that we can interface with the Orange Pi 5 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 5 SPI Pins

The Orange Pi 5 has 1 SPI bus on its header: SPI4 on pins 19 (MOSI), 21 (MISO) and 23 (CLK), with a single chip select on pin 24 (CS1). Turn it on with the spi4-m0-cs1-spidev overlay and it appears as /dev/spidev4.1.

Orange Pi 5 Default SPI4 Pins: GPIO1_C1 (MOSI, pin 19), GPIO1_C0 (MISO, pin 21), GPIO1_C2 (CLK, pin 23) and GPIO1_C4 (CS1, pin 24).

Orange Pi 5 SPI pins (SPI4 MOSI pin 19, MISO pin 21, CLK pin 23, CS1 pin 24)

SignalPinGPIOLinux #wPi
SPI4_MOSI_M019GPIO1_C14911
SPI4_MISO_M021GPIO1_C04812
SPI4_CLK_M023GPIO1_C25014
SPI4_CS1_M024GPIO1_C45215

Chip select 0 isn’t wired to the header, which is why the device node is spidev4.1 and not spidev4.0. For a second SPI device, use any free GPIO as a chip select: either toggle it yourself, or add it to the bus with cs-gpios in your own overlay. Test the bus with a jumper from pin 19 to pin 21 and the manual’s spidev_test -v -D /dev/spidev4.1 loopback.

There are so many modules that we can interface with the Orange Pi 5 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 5 PWM Pins

The Orange Pi 5 has 6 hardware PWM channels on 8 header pins: PWM0, PWM1, PWM3, PWM13, PWM14, and PWM15. PWM1 and PWM3 each have two possible pins, and only one of the two can be used at a time.

Orange Pi 5 PWM pins (PWM13 pin 3, PWM15 pin 7, PWM14 pin 11, PWM3 pins 15 and 23, PWM1 pins 16 and 26, PWM0 pin 18)

ChannelPinGPIOOverlayRegister Base
PWM018GPIO1_D2pwm0-m1fd8b0000
PWM116GPIO1_D3pwm1-m1fd8b0010
PWM126GPIO1_A3pwm1-m2fd8b0010
PWM315GPIO0_D4pwm3-m0fd8b0030
PWM323GPIO1_C2pwm3-m2fd8b0030
PWM133GPIO1_B7pwm13-m2febf0010
PWM1411GPIO4_B2pwm14-m1febf0020
PWM157GPIO1_C6pwm15-m2febf0030

Each enabled channel shows up as its own /sys/class/pwm/pwmchipN, and the chip number depends on which overlays you load, not on the PWM number. To find yours, run ls -l /sys/class/pwm/ and match the address in each link to the register base in the table. Then export channel 0 of that chip. For example, with PWM15 on pwmchip2, a 50Hz signal with a 1ms pulse is:

Note: Never power a fan, a motor, or a buzzer straight from a PWM pin. A GPIO can only switch a logic signal, and on the Orange Pi 5 the PWM pins sit behind weak level shifters (all but pin 11). Users report killing GPIOs by hanging a 2-pin fan on pin 26. Use the board’s 5v fan header, or drive the load through a MOSFET or a motor driver.

There are so many things that we can control with the Orange Pi 5 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 5 CAN Pins

The Orange Pi 5 has 2 CAN buses on its header: CAN1 on pin 11 (RX) and pin 13 (TX), and CAN2 on pin 15 (RX) and pin 12 (TX). These are the RK3588S’s CAN controller pins, not a CAN bus: you need a 3.3v CAN transceiver between them and the CANH/CANL wires.

Orange Pi 5 Default CAN Pins: GPIO4_B2 (CAN1 RX, pin 11) and GPIO4_B3 (CAN1 TX, pin 13).

Orange Pi 5 CAN pins (CAN1 RX pin 11, CAN1 TX pin 13, CAN2 RX pin 15, CAN2 TX pin 12)

CAN BusTXRXOverlayNotes
CAN1Pin 13 (GPIO4_B3)Pin 11 (GPIO4_B2)can1-m1Direct 3.3v pins (22Ω series)
CAN2Pin 12 (GPIO0_D5)Pin 15 (GPIO0_D4)can2-m1Behind a level shifter; shares pins with I2C1 M2

Pick a transceiver that runs from 3.3v (SN65HVD230, TJA1051T/3, or MCP2562 with its VIO pin on 3.3v), so its RX output doesn’t put 5v on the header. CAN works through Linux SocketCAN, not wiringOP (Orange Pi says wiringOP doesn’t support CAN). After a reboot with the overlay, the controller shows up as a network interface:

There are so many things that we can connect to the Orange Pi 5 using the CAN bus, which include: car OBD-II diagnostics (with the right adapter), motor controllers and ODrive boards, CANopen industrial devices, battery management systems, robot joints, and much more.


Orange Pi 5 Debug UART Pins

The Orange Pi 5’s Linux console is on a separate 3-pin debug UART header next to pin 26 of the main header, labelled TX RX GND on the board. It’s the RK3588S’s UART2_M0, level-shifted to 3.3v, and it runs at 1,500,000 baud, 8N1.

Debug PinSignalSoC PinConnect To
GNDGround–Adapter GND
RXUART2 RX (board input)GPIO0_B6Adapter TX
TXUART2 TX (board output)GPIO0_B5Adapter RX

1.5Mbaud is the catch. Many cheap USB-UART adapters (older CH340 and PL2303 chips) can’t do it, and you’ll see garbage or nothing at all. A CP2102N or FT232R adapter at 3.3v works. Open it with picocom -b 1500000 /dev/ttyUSB0 on Linux, or PuTTY/MobaXterm at 1500000 on Windows. It shows the bootloader and kernel messages, which is the fastest way to see why an overlay failed or why the board won’t boot.


Orange Pi 5 On-Board Features

Besides the 26-pin header, the Orange Pi 5 has a few on-board features you’ll meet when you wire and debug it. None of them is on a header pin.

FeatureWhereWhat It Does
Red power LEDOn the boardOn whenever the 3.3v rail is up; not software controlled.
Green status LEDDriven by GPIO1_A2 (Linux 34) through a FETBlinks a heartbeat in Linux; control it from /sys/class/leds/status_led (trigger: none, default-on, heartbeat…).
MASKROM keyBottom-left, beside the audio jackHold it while powering on to enter USB download (Maskrom) mode, so RKDevTool can flash the SPI flash or an NVMe SSD over the USB-C port.
RECOVERY keyLeft side, below the microSD slotHold it while powering on to enter loader mode.
ON/OFF keyBottom-left corner (PWR ON)The RK806 power key: press to power on or off.
Debug UART3 pins next to pin 26Linux console at 1,500,000 baud (see above).
Fan header2-pin, 5v, beside the USB 2.0 portPowers a 5v fan; use it instead of a GPIO.
M.2 M-key slotBottom of the board2242 NVMe SSD over PCIe 2.0 (x1), or an Orange Pi Wi-Fi 6 module.
SPI flashOn the boardHolds the bootloader, so the board can boot from an NVMe SSD.

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/status_led/brightness. The keys can’t be read as GPIOs from Linux: MASKROM and RECOVERY are read by the boot code, and ON/OFF by the power management IC.


Getting Started With Orange Pi 5 GPIO

Getting the Orange Pi 5’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 (Ubuntu or Debian based), Armbian, or another image to a microSD card. Orange Pi’s own images ship wiringOP and the overlays used in this guide, so they’re the easiest start for GPIO work.
  2. Enable the interfaces: add the overlay names to the overlays= line of /boot/orangepiEnv.txt (one line, separated by spaces), then reboot.
  3. Pick a library: libgpiod for C/C++ and Python (chip + line offset), wiringOP for Arduino-style C code and gpio readall, or wiringOP-Python. Use the Linux device nodes ( /dev/ttyS*, /dev/i2c-*, /dev/spidev4.1, SocketCAN) for the buses.
InterfaceOverlay (orangepiEnv.txt)Linux Device / Tool
GPIO– (always on)/dev/gpiochip0–4 (libgpiod), gpio readall (wiringOP)
UART0 (pins 8/10)uart0-m2/dev/ttyS0
UART1, UART3, UART4uart1-m1, uart3-m0, uart4-m0/dev/ttyS1, ttyS3, ttyS4
I2C5 (pins 3/5)i2c5-m3/dev/i2c-5 (i2cdetect -y 5)
I2C1, I2C3i2c1-m2 or i2c1-m4, i2c3-m0/dev/i2c-1, /dev/i2c-3
SPI4spi4-m0-cs1-spidev/dev/spidev4.1
PWMpwm0-m1, pwm1-m1/-m2, pwm3-m0/-m2, pwm13-m2, pwm14-m1, pwm15-m2/sys/class/pwm/pwmchipN
CANcan1-m1, can2-m1can0 / can1 (ip link, can-utils)

On Armbian: users report that Armbian stopped shipping these Orange Pi 5 header overlays in 2023, so the names above don’t work there as they are. The fix is to take the overlay’s .dts source from Orange Pi’s kernel repository (the rk3588-… files in its overlay folder) and install it with sudo armbian-add-overlay <file>.dts. Users also report that PWM and I2C overlays are missing on Armbian’s kernel 6.12 builds; the vendor 6.1 kernel or a newer edge kernel has them.


Orange Pi 5 Common Problems & Fixes

Why does every input read high, even with the pull-down set? The pin sits behind an SGM4553 level shifter, and the SoC’s pull-down can’t reach through it. Only pins 8, 10, 11, and 13 take pull settings. Use one of them, wire the input active-low, or fit a strong external pull-down.

My overlay doesn’t show up in /dev. Why? Check the spelling on the single overlays= line of /boot/orangepiEnv.txt, that two overlays don’t claim the same pin (i2c1-m2 and can2-m1, for example), and reboot. The debug UART at 1,500,000 baud shows the overlay errors during boot. On Armbian, see the note in the Getting Started section.

Why does gpio readall show only a few pins or “Unable to determine board revision”? wiringOP picked the wrong board. Users fix it by building wiringOP from Orange Pi’s GitHub (the next branch), removing old libwiringPi files, and, on Armbian, adding BOARD=orangepi5 to /etc/orangepi-release. An “mmap (PWM) failed” error means it needs root.

My UART device doesn’t answer. What’s wrong? Check the TX/RX crossing first: pin 8 is UART0 TX, even though gpio readall calls it RXD. Then check that the device runs at 3.3v and shares GND with the board.

Why doesn’t wiringPiISR() fire on my pin? wiringPiISR() takes the wPi number, not the Linux GPIO number: pin 22 is wPi 13, not 92. Users also report ISR bugs in some wiringOP versions, so libgpiod edge events are the safer route for interrupts.

How do I use CAN with wiringOP? You don’t: wiringOP doesn’t support CAN. Enable can1-m1 or can2-m1, add a 3.3v transceiver, and use SocketCAN ( ip link, candump, cansend).

My NVMe SSD isn’t detected on a new board. Why? Users report that the V1.3.2 board moved the GPIO that switches the M.2 slot’s power, so older images with the V1.2 device tree don’t power the SSD. Flash a current Orange Pi OS or Armbian image, which knows the newer board.

There’s nothing on the debug UART, or only garbage. Why? The console runs at 1,500,000 baud. Most CH340 and PL2303 adapters can’t reach it; use a CP2102N or FT232R adapter at 3.3v, and cross TX/RX.


Orange Pi 5 vs Orange Pi 5 Plus, Orange Pi 5 Pro and Raspberry Pi 5

The Orange Pi 5’s siblings and the Raspberry Pi 5 all have a 40-pin header, so the Orange Pi 5 is the odd one out with 26 pins. The Orange Pi 5 Plus moves to the full RK3588, while the 5 Pro keeps the RK3588S in a Raspberry Pi-sized board with Wi-Fi.

FeatureOrange Pi 5Orange Pi 5 PlusOrange Pi 5 ProRaspberry Pi 5
SoC / CPURK3588S, 4x A76 @ 2.4GHz + 4x A55RK3588, 4x A76 @ 2.4GHz + 4x A55RK3588S, 4x A76 @ 2.4GHz + 4x A55BCM2712, 4x A76 @ 2.4GHz
RAM4/8/16GB LPDDR4/4X4/8/16/32GB LPDDR4/4X4/8/16GB LPDDR51GB–16GB LPDDR4X
GPIO header26-pin, 17 GPIOs40-pin, 28 GPIOs40-pin40-pin, 28 GPIOs (RP1 I/O chip)
NVMeM.2 M-key, PCIe 2.0 x1M.2 M-key, PCIe 3.0 x4M.2 M-key (NVMe or SATA)PCIe 2.0 x1 FPC (needs a HAT)
EthernetGigabit2x 2.5GbpsGigabit (PoE+ with a HAT)Gigabit
WirelessNone (M.2 module option)M.2 E-key Wi-Fi 6 module optionWi-Fi 5 + Bluetooth 5.0Wi-Fi 5 + Bluetooth 5.0
Power input5v / 4A USB-C5v / 4A USB-C5v / 5A USB-C5v / 5A USB-C (Power Delivery)
Size100 x 62mm100 x 75mm89 x 56mm85 x 56mm

Pick the Orange Pi 5 when you want RK3588S speed and an NVMe slot at the lowest price, and 17 GPIOs are enough. Pick the Orange Pi 5 Plus for the fastest NVMe and dual 2.5G Ethernet, the Orange Pi 5 Pro for built-in Wi-Fi and a 40-pin header, and the Raspberry Pi 5 for the best software support and HAT ecosystem.


Orange Pi 5 Pin Details

Here is every pin of the Orange Pi 5 26-pin header in physical order, with its Rockchip name, Linux GPIO number, wiringOP number, functions, overlays, and the circuit between the pin and the SoC. Pin 1 is the corner 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 (26 pins)
PinNameLinux #wPiFunctionsOverlaysOn-Board CircuitDescription
13.3V––3.3v power–VCC_3V3_S33.3v output from the board’s 3.3v rail; light loads only (sensors, logic chips).
25V––5v power–VCC_5V0 (board 5v rail)The board’s 5v rail: a 5v output, or a 5v input to power the board, with no fuse or protection.
3GPIO1_B7470I2C5_SDA_M3, UART1_RX_M1, PWM13_M2i2c5-m3, uart1-m1, pwm13-m2SGM4553 1.8v↔3.3v level shifterI2C5 data, UART1 receive, or PWM13; it sits behind a level shifter, so it’s for logic signals only.
45V––5v power–VCC_5V0 (board 5v rail)Second 5v pin, the same net as pin 2.
5GPIO1_B6461I2C5_SCL_M3, UART1_TX_M1i2c5-m3, uart1-m1SGM4553 1.8v↔3.3v level shifterI2C5 clock or UART1 transmit, behind a level shifter.
6GND––Ground–GNDGround.
7GPIO1_C6542PWM15_IR_M2pwm15-m2SGM4553 1.8v↔3.3v level shifterPWM15 output or a general-purpose pin, behind a level shifter.
8GPIO4_A31313UART0_TX_M2uart0-m2100Ω series resistorUART0 transmit (/dev/ttyS0); a direct 3.3v pin that takes pull-up/down settings.
9GND––Ground–GNDGround.
10GPIO4_A41324UART0_RX_M2uart0-m2100Ω series resistorUART0 receive; a direct 3.3v pin that takes pull-up/down settings.
11GPIO4_B21385CAN1_RX_M1, PWM14_M1can1-m1, pwm14-m122Ω series resistorCAN1 receive or PWM14; a direct 3.3v pin, the best choice for inputs that need a pull-down.
12GPIO0_D5296CAN2_TX_M1, I2C1_SDA_M2can2-m1, i2c1-m2SGM4553 1.8v↔3.3v level shifterCAN2 transmit or I2C1 data (first pin pair), behind a level shifter.
13GPIO4_B31397CAN1_TX_M1can1-m122Ω series resistorCAN1 transmit; a direct 3.3v pin, the best general-purpose output for an LED.
14GND––Ground–GNDGround.
15GPIO0_D4288CAN2_RX_M1, I2C1_SCL_M2, PWM3_IR_M0can2-m1, i2c1-m2, pwm3-m0SGM4553 1.8v↔3.3v level shifterCAN2 receive, I2C1 clock (first pin pair), or PWM3, behind a level shifter.
16GPIO1_D3599UART4_RX_M0, I2C1_SDA_M4, PWM1_M1uart4-m0, i2c1-m4, pwm1-m1SGM4553 1.8v↔3.3v level shifterUART4 receive, I2C1 data (second pin pair), or PWM1, behind a level shifter.
173.3V––3.3v power–VCC_3V3_S3Second 3.3v output, the same rail as pin 1.
18GPIO1_D25810UART4_TX_M0, I2C1_SCL_M4, PWM0_M1uart4-m0, i2c1-m4, pwm0-m1SGM4553 1.8v↔3.3v level shifterUART4 transmit, I2C1 clock (second pin pair), or PWM0, behind a level shifter.
19GPIO1_C14911SPI4_MOSI_M0, UART3_TX_M0, I2C3_SCL_M0spi4-m0-cs1-spidev, uart3-m0, i2c3-m0SGM4553 1.8v↔3.3v level shifterSPI4 MOSI, UART3 transmit, or I2C3 clock, behind a level shifter.
20GND––Ground–GNDGround.
21GPIO1_C04812SPI4_MISO_M0, UART3_RX_M0, I2C3_SDA_M0spi4-m0-cs1-spidev, uart3-m0, i2c3-m0SGM4553 1.8v↔3.3v level shifterSPI4 MISO, UART3 receive, or I2C3 data, behind a level shifter.
22GPIO2_D49213GPIO only–2SK3018 FET shifter, 10kΩ pull-upsA plain GPIO behind a FET level shifter with 10kΩ pull-ups, so it idles high.
23GPIO1_C25014SPI4_CLK_M0, PWM3_IR_M2spi4-m0-cs1-spidev, pwm3-m2SGM4553 1.8v↔3.3v level shifterSPI4 clock or PWM3, behind a level shifter.
24GPIO1_C45215SPI4_CS1_M0spi4-m0-cs1-spidevSGM4553 1.8v↔3.3v level shifterSPI4 chip select 1 (/dev/spidev4.1), the only SPI chip select on the header.
25GND––Ground–GNDGround.
26GPIO1_A33516PWM1_M2pwm1-m2SGM4553 1.8v↔3.3v level shifterPWM1 (alternative pin) or a general-purpose pin, behind a level shifter.

Wrap Up

To conclude this guide article, the Orange Pi 5 is a very solid single-board computer when you need RK3588S performance and an NVMe slot, with a compact 26-pin header for your hardware: 17 GPIOs, four UARTs, three I2C buses, SPI4, six PWM channels, and two CAN buses. Just remember the gotchas: every pin is 3.3v only, 13 pins sit behind level shifters that ignore pull-downs and can’t drive loads, gpio readall swaps the names of pins 8 and 10, and the debug console runs at 1,500,000 baud.

I hope you’ve found this guide helpful for your Orange Pi 5 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