Close this search box.


Raspberry Pi 4 Pinout | Raspberry Pi GPIO Pins for Pi 3 & Pi 4

Ah! The Raspberry Pi. King of Single Board Computers. Even though there are several other SBCs out there, some being more powerful and capable than Raspberry Pi, the love for Pi has not changed since its launch. In fact, the demand for the latest revision, Raspberry Pi 4 is so high that the Raspberry Pi Foundation couldn’t supply enough boards (there are also other factors for this, chip shortage being the main one). If you are one of the few who got their hand-on the new Raspberry Pi 4, then this guide on the Raspberry Pi 4 Pinout is just for you.

Even if you don’t have the Raspberry Pi 4 right now, read along this article to find some interesting details and facts about Raspberry Pi 4 and Raspberry Pi Boards in General.

A Brief Note on Raspberry Pi

It all started in 2012, when Raspberry Pi Foundation, the company responsible for designing, developing and producing Raspberry Pi Boards, launched its first product: the Raspberry Pi Model B, a tiny credit card sized computer.

Since its launch, the Raspberry Pi SBCs have seen a tremendous response from the maker, hobbyist and electronics communities (although the main intent for developing Raspberry Pi Boards in the first place was to build low-cost computers and encourage programming in developing nations).

With growing demand and success, the Raspberry Pi Foundation also started updating the boards with new processors and features while keeping the same form factor and price. The latest revision of Raspberry Pi Boards is the Raspberry Pi 4 released back in 2019.

What’s New with Raspberry Pi 4?

The Raspberry Pi Foundation regularly updates its Raspberry Pi Boards to keep up with the market. If you look back at the Raspberry Pi line-up, the original Raspberry Pi Model B featured a single core ARM11 CPU from Broadcom, the BCM2835, that had a clock frequency of 700MHz.

Now compare this with the best-selling Raspberry Pi of all time, the Raspberry Pi 3 Model B. It had a quad ARM A-53 core Broadcom BCM2837 CPU with a clock frequency of 1.2GHz.

With Raspberry Pi 4, the Raspberry Pi Foundation added significant changes in terms of the CPU, supporting on-board hardware and also RAM. First, the CPU. The Raspberry Pi 4 has a significantly powerful quad ARM A-72 Core CPU from Broadcom, the BCM2711, with a clock frequency of 1.5GHz.

Raspberry Pi 4 is also available with multiple RAM capacities: 1GB, 2GB, 4GB and 8GB, although Raspberry Pi Foundation scrapped the 1GB variant and reduced the price of the 2GB variant.

Coming to connectivity, the Raspberry Pi 4 has on-board Bluetooth (version 5.0) and Wi-Fi (both 2.4GHz and 5GHz) and a full-bandwidth Gigabit Ethernet port. Even though Raspberry Pi 3 Model B+ had Gigabit Ethernet, it was limited to a maximum speed of 300Mbps (as the internal connection was over USB2.0).

There four USB Ports (two USB 2.0 and two USB3.0), two micro-HDMI ports, a USB Type-C Power port, and many other. Importantly, the Raspberry Pi 4 retained the famous 40-pin GPIO.

Raspberry Pi 4 Pinout

While all Raspberry Pi Boards are essentially computers that can run full Linux based operating system, what makes the Raspberry Pi special to the electronics and maker community is its 40-pin GPIO.

GPIO or General-Purpose Input/Output Pins of a processor allow you to connect various external peripherals such as LEDs, Motors, Cooling Fans, Sensors, LCDs and many more. This is similar to what we normally do with a typical microcontroller board such as Arduino.

Speaking of Arduino, here is a guide comparing Arduino and Raspberry. So, if you are new to these environments, then do check-out the comparison guide.

Coming back to the GPIO of Raspberry Pi, it has 40 pins. So, it is very difficult to remember the layout and functions of all the pins. Hence, we usually take help of detailed Raspberry Pi 4 Pinout guides.

A Raspberry Pi 4 Pinout will describe all the pins of the Raspberry Pi 4 GPIO in the exact layout so that you can easily use it as a quick reference and start using the pins.

In the following table, we listed out the Raspberry Pi 4 Pinout as seen from top view of the board with pins on top and connectors on the bottom.

GPIO Number (GPIO#) Alternate Function (2nd Function) Pin Number (Pin#) Pin Number (Pin#) Alternate Function (2nd Function) GPIO Number (GPIO#)
+3.3V 1 2 +5V
GPIO2 SDA1 (I2C1) 3 4 +5V
GPIO3 SCL1 (I2C1) 5 6 GND
+3.3V 17 18 GPIO_GEN5 GPIO24
GPIO10 MOSI (SPI0) 19 20 GND
GPIO11 SCLK (SPI0) 23 24 CE0_N (SPI0) GPIO8
GND 25 26 CE1_N (SPI0) GPIO7
GPIO5 N/A 29 30 GND
GPIO6 N/A 31 32 N/A GPIO12
GPIO13 N/A 33 34 GND
GPIO19 MISO (SPI1) 35 36 N/A GPIO16
GPIO26 N/A 37 38 PCM_IN (Digital IN) or MOSI (SPI1) GPIO20
GND 39 40 PCM_OUT (Digital OUT) or SCLK (SPI1) GPIO21

Here, the Pin Number (Pin#) corresponds to the physical pin numbering on the Raspberry Pi 4 Board. The GPIO Number (GPIO#) indicates the pin numbers associated with respect to the BCM2711 CPU (sometimes known as BCM Numbers BCM#). While programming, you have to choose only one numbering system. Also, the Raspberry Pi 4 Pinout is identical to other models as well.

The following image shows a clear layout of Raspberry Pi 4 Pinout.


You can use this image as reference for Raspberry Pi 4 as well as Raspberry 3 Models.


The latest iteration of the Raspberry Pi Boards, the Raspberry Pi 4 has significant upgrades I terms of processing power, RAM Capacity and connectivity (finally a full Gigabit Ethernet and a USB Type-C Power). While hardware has several changes, what remains consistent over several generations of Raspberry Pi Boards is the GPIO Pins. Here, we saw the Raspberry Pi 4 Pinout for GPIO Pins as well as a detailed pinout diagram.

Leave a Reply

Your email address will not be published. Required fields are marked *