Orange Pi Zero GPIO Pins

The 26-pin expansion port of the Orange Pi Zero is placed on the opposite side of the board compared to Raspberry Pi while the pinout is exactly the same:

Orange Pi Zero Expansion Board Location vs Raspberry Pi

OSH Lab created a nice illustration of the Orange Pi Zero expansion port.

Orange Pi Zero GPIO Pins

It took me a while to discover that the General Purpose Input/Output (GPIO) numbering on the Orange Pi Zero with Armbian Legacy 3.4.113 is different from the Raspberry Pi and Raspbian. Here is how Allwinner SoC port names (such as PB12) are mapped to their GPIO pin numbers in the Linux kernel:

(Position of letter in alphabet - 1) * 32 + Pin number

For example, port PB12 would map to GPIO 44:

(2 - 1) * 32 + 12 = 44

Here is an online tool that does the GPIO mapping which I used when creating this illustration of the Orange Pi Zero GPIO pins:

Orange Pi Zero GPIO Pins

Orange Pi Zero GPIO Pins.

Using the GPIOs

Knowing the GPIO pin numbers is important for building all the Raspberry Pi based projects since their GPIOs are numbered differently (not sure how they do it, probably map to the datasheet?). In the follow-up post I show how to add an LCD monitor to the Orange Pi Zero via the SPI bus.

Never lose a single business lead or enquiry again! Get my latest plugin Storage for Contact Form 7 now!

Buy now for only $19 →


  1. Mark Birss says:

    Very nice, thank you for sharing

  2. fabien says:

    I had a hard time using my gpio’s on my orange pi zero.
    I use the functionality to control a little fan

  3. Mushfiq says:

    For which OS it can obtain maximum GPIO speed

Leave a Reply