Understanding Raspberry Pi Pinouts When we talk about Raspberry Pi pinouts, we are talking about the arrangement of the pins in the GPIO header on the PCB. These pins form the main socket that allows the Raspberry Pi to connect, communicate with and control other devices and equipment, from sensors to other smart devices and more. Knowing this layout is crucial when creating projects for the Raspberry Pi, whether as a developer or hobbyist. What is the Raspberry Pi GPIO? GPIO stands for General Purpose Input/Output, and are fully programmable pins that can be used to connect the Pi to the ‘outside world’. That is, other devices of all kinds, sensors and so on. The pins can send signals (output) and receive signals (Input), and really, are what makes a Raspberry Pi so useful in what it can do. How many Pins on a Raspberry Pi? This depends on the version of the Raspberry Pi you are looking at. The first model, the Pi 1 Model A, featured 26 pins in the GPIO, but that quickly evolved. From the Pi 1 A+ model introduced a little later, the GPIO has had 40 pins, allowing for a wider range of connections and increased versatility. The Different Types of Raspberry Pi GPIO Pinouts? Not only did the number of pins change between models, but even with those carrying that 40-pin layout, there are differences in how the pins function. Raspberry Pi 1 Model A/B: Featured a 26-pin GPIO header. Raspberry Pi 1 Model A+/B+, 2, 3, Zero (Including W/WH): Upgraded to a 40-pin GPIO header, establishing the standard for future models. Raspberry Pi 4 Model B, Zero 2 W, and Raspberry Pi 400: Continue with the 40-pin standard, offering increased functionality and compatibility with a wide range of HATs (Hardware Attached on Top) and other peripherals. Below is a table that sets out the function of each pin and the functionality that you can expect from it. Pin Number Function Description Use Case 1 3.3V Power supply Powers low-voltage components 2 5V Power supply Powers high-voltage components 3 GPIO 2 (SDA) I2C Data I2C communication 4 5V Power supply Powers high-voltage components 5 GPIO 3 (SCL) I2C Clock I2C Communication 6 Ground - Common ground 7 GPIO 4 GPIO Clock General Purpose IO 8 GPIO 14 (TXD) UART Transmit Serial data transmission 9 Ground - Common ground 10 GPIO 15 (RXD) UART Receive Serial data reception 11 GPIO 17 GPIO General Purpose IO 12 GPIO 18 PWMO Pulse Width Modulation 13 GPIO 27 GPIO General purpose IO 14 Ground - Common ground 15 GPIO 22 GPIO General purpose IO 16 GPIO 23 GPIO General purpose IO 17 3.3V Power supply Powers low-voltage components 18 GPIO 24 GPIO General purpose IO 19 GPIO 10 (MOSI) SPI Master Out Slave In SPI communication 20 Ground - Common ground 21 GPIO 9 (MISO) SPI Master in Slave Out SPI communication 22 GPIO 25 GPIO General purpose IO 23 GPIO 11 (SCLK) SPI Serial Clock SPI communication 24 GPIO 8 (CEO) SPI Chip Enable 0 SPI communication 25 Ground - Common ground 26 GPIO 7 (CE1) SPI Chip Enable 1 SPI communication 27 GPIO 0 (ID_SD) ID EEPROM Data HAT EEPROM identification 28 GPIO 1 (ID_SC) ID EERPROM Clock HAT EEPROM identification 29 GPIO 5 GPIO General purpose IO 30 Ground - Common ground 31 GPIO 6 GPIO General purpose IO 32 GPIO 12 PWM0 Pulse Width Modulation 33 GPIO 13 PWM1 Pulse Width Modulation 34 Ground - Common ground 35 GPIO 19 PWM1 Pulse Width Modulation 36 GPIO 16 GPIO General purpose IO 37 GPIO 26 GPIO General purpose IO 38 GPIO 20 GPIO General purpose IO 39 Ground - Common ground 40 GPIO 21 GPIO General purpose IO Be aware, some pins have multiple functions, and users can select which of these is applied to your project as you create it. Raspberry Pi Documentation has a more detailed look at the exact pin layout. What can RPi GPIO Pinouts do? The popularity of the Raspberry Pi Platform can in some way be explained by how versatile the GPIO pinouts are. Whether you are a hobbyist or creating commercial projects, it is so flexible that it can be adapted to almost endless functionality. Some examples are: Lighting an LED: Use Case: You can create a simple circuit to turn an LED on/off. How-To: Connect the LED's longer leg (anode) to one of the GPIO pins set as output and the shorter leg (cathode) to a ground pin through a resistor. Code Example: Use Python to control the GPIO pin, making it HIGH to turn the LED on and LOW to turn it off. How you can read a Button Press: Use Case: A circuit to inform you when a button is pressed or released. How-To: Connect one side of the button to a GPIO pin set as input and the other side to ground. Enable the internal pull-up resistor. Code Example: Monitor the GPIO pin state; when it changes to LOW, the button is pressed. AutoPi TMU CM4 for Vehicle Diagnostics: Use Case: This approach allows you to monitor vehicle health and diagnostics in real-time. How-To: Utilize the AutoPi TMU CM4, which connects to the vehicle’s OBD-II port and leverages the Raspberry Pi CM4 GPIO pins for additional peripherals like GPS modules, accelerometers, or custom sensors. Application Example: Configure the AutoPi to log data from the vehicle’s diagnostic system and use GPIO-connected sensors to enhance telematics data, enabling features like crash detection, real-time location tracking, and driver behavior analysis. From simple systems to turn a light on and off to incredibly complex solutions for mission critical operations such as AutoPi TMU CM4 automotive telematics systems, Raspberry Pi GPIO Pinouts are at the heart of one of the most flexible and capable platforms on offer today. Conclusion The Raspberry Pi has been a revolution since launch, transforming how we approach projects in both the commercial and hobbyist worlds and covering applications in almost every industry you can image. A big part of that success is the GPIO Pinouts, providing the simple yet powerful connection to other devices and technology that powers the flexibility of the platform. No matter if you are just starting out with simple projects as a hobbyist, or developing industry-shaping tech solutions such as the AutoPi device and automotive data logger, the Raspberry Pi and those GPIO pins offer endless opportunities to bring your ideas to life.