Before start reading: please consider, if this article is useful to you or if you just appreciate my work on it, to support me just sharing this article with your friends by your favourite Social Network. This would be a really appreciated help. Have a nice reading!
Last Updated on
In this article I’m going to show you pinout schemas for currently available Raspberry PI models. This is useful when we plan to interface RPI with external world. A simple example is Controlling a stepper motor with Raspberry Pi Zero W.
What Are Raspberry Pi GPIO
GPIO (General Purpose Input/Output) are phisical pins which you can use to acquire states or information from external devices. GPIO can also control external devices.
From electrical point of view, each Raspberry PI has a number of PINS connected to groud (0V) and a number of pins connected to 5V power supply. All other pins can be configured both to receive or provide a tension value which can be 0V (low) or 3,3 V (high). These settings can be managed via Python programs, C/C++, Scratch or Processing3.
With Python, it is also possible to map in your terminal the pinout configuration by using GPIOZero libary. This library is already installed in Raspbian Desktop versions. In Raspbian Lite, you must install it by typing, from terminal:
sudo apt install python3-gpiozero
Once this library is available, use the command
to have a graphical map. More info can be found in https://www.raspberrypi.org/documentation/usage/gpio/.
However, during wiring preparation it is useful to see pins map.
All Raspberry PI boards have the same PIN mapping, except for very first boards. The following pictre applies to:
- Raspberry PI 4 Model B
- Raspberry PI 3 Model B/B+/ Model A+
- Raspberry PI 2 Model B
- Raspberry PI Zero / Zero W / Zero WH
Consider that Raspberry Pi Zero and Zero W have an unpopulated pin area. This means that you must solder pins element (usually inside Pi Zero kit or sold alone). Raspberry Pi Zero WH, on the other hand, has GPIO pins already present like all other models.
The only exception regards Raspberry Pi 1 Model B+ (prior 2014). These boards had a reduced GPIO. It means that their pinout map pins only from 1 to 26.