The Raspberry Pi 3 features a 40-pin GPIO header. Pin 1 is the 3.3V power pin located closest to the SD card slot and the Pi logo, identifiable by its square solder pad. The most critical rule for the pi3 gpio pinout is that all logic pins operate at 3.3V; applying 5V to any GPIO input will permanently destroy the Broadcom BCM2837 SoC.
The Complete Pi3 GPIO Pinout Reference Table
Below is the data-dense, dual-column mapping of the 40-pin header. This layout mimics the physical board with the USB ports facing you and the GPIO header on the top right. The BCM (Broadcom SOC channel) column is the numbering system used by modern Python libraries like gpiozero and RPi.GPIO when set to BCM mode.
| Pin | BCM | Name / Function | Pin | BCM | Name / Function |
|---|---|---|---|---|---|
| 1 | - | 3.3V Power | 2 | - | 5V Power |
| 3 | 2 | SDA1 (I2C) | 4 | - | 5V Power |
| 5 | 3 | SCL1 (I2C) | 6 | - | Ground |
| 7 | 4 | GPCLK0 | 8 | 14 | TXD (UART) |
| 9 | - | Ground | 10 | 15 | RXD (UART) |
| 11 | 17 | GPIO 17 | 12 | 18 | PCM_CLK / PWM0 |
| 13 | 27 | GPIO 27 | 14 | - | Ground |
| 15 | 22 | GPIO 22 | 16 | 23 | GPIO 23 |
| 17 | - | 3.3V Power | 18 | 24 | GPIO 24 |
| 19 | 10 | MOSI (SPI0) | 20 | - | Ground |
| 21 | 9 | MISO (SPI0) | 22 | 25 | GPIO 25 |
| 23 | 11 | SCLK (SPI0) | 24 | 8 | CE0 (SPI0) |
| 25 | - | Ground | 26 | 7 | CE1 (SPI0) |
| 27 | 0 | ID_SD (I2C ID) | 28 | 1 | ID_SC (I2C ID) |
| 29 | 5 | GPIO 5 | 30 | - | Ground |
| 31 | 6 | GPIO 6 | 32 | 12 | GPIO 12 / PWM0 |
| 33 | 13 | GPIO 13 / PWM1 | 34 | - | Ground |
| 35 | 19 | MISO (SPI1) | 36 | 16 | CE2 (SPI1) |
| 37 | 26 | GPIO 26 | 38 | 20 | MOSI (SPI1) |
| 39 | - | Ground | 40 | 21 | SCLK (SPI1) |
Numbering Standards and Wire Color Codes
When wiring physical circuits to the Pi3, you are bridging two different worlds: software numbering standards and physical wire color conventions. Misaligning these is the primary cause of breadboard shorts.
Software Numbering Variants
- BCM (Broadcom): The hardware-level GPIO numbers (e.g., BCM 17 for Physical Pin 11). This is the modern standard for Python and C++ development.
- Physical (BOARD): The literal pin count from 1 to 40. Best for beginners using a ribbon cable and a GPIO breakout board.
- WiringPi: A legacy numbering system created by Gordon Henderson. It maps pins sequentially (0-31) regardless of BCM numbers. Note: WiringPi was deprecated in 2019, but you will still see it in older Pi3 C/C++ tutorials. Avoid it for new projects.
DC Control Wire Color Standards (Regional Variants)
Unlike mains AC wiring, low-voltage DC control wiring does not have a single globally enforced legal code, but adhering to established standards prevents catastrophic mistakes when sharing code or hardware.
| Function | US Hobby / NEC-derived | IEC 60446 (International) | Legacy / Old UK (Pre-2004) |
|---|---|---|---|
| 5V DC Positive | Red | Brown | Red or Yellow |
| 3.3V Logic Positive | Orange or Yellow | Orange (or Brown w/ stripe) | Orange |
| Ground (DC Negative) | Black | Blue | Black or Green |
| Signal / Data Lines | Green, Blue, Purple | Black (for control wiring) | White or Grey |
Safe Interpretation: If you are working on a Pi3 project built by someone in Europe using IEC 60446 standards, their Blue wires are Ground, not 5V signals. Always verify unknown wiring with a multimeter in continuity mode against a known Ground pin (like Pin 6) before applying power.
Rows People Get Wrong and Faded Board Recovery
Even with the table above, certain pins on the Pi3 harbor hardware-specific quirks that trap experienced makers. According to Pinout.xyz and the official Raspberry Pi documentation, these are the most common failure points.
The 'Gotcha' Pins
- Pins 8 & 10 (UART TX/RX): On the Pi 3, the primary hardware UART (
ttyAMA0) is routed to the onboard Bluetooth module. Pins 8 and 10 are mapped to the secondary 'mini-UART' (serial0), which lacks a stable baud rate clock. If you need reliable serial communication (e.g., for a GPS module or Arduino bridge), you must disable Bluetooth in/boot/config.txtby addingdtoverlay=disable-btto restore the primary UART to these pins. - Pins 3 & 5 (I2C SDA/SCL): These pins have onboard 1.8kΩ pull-up resistors tied to the 3.3V rail. If you are connecting 5V I2C devices, these pull-ups will back-feed 3.3V into your 5V device, potentially causing logic errors. Use an I2C level shifter.
- Pins 27 & 28 (ID_SD / ID_SC): Reserved for the HAT (Hardware Attached on Top) identification EEPROM. Do not use these for general GPIO; doing so will prevent the Pi from auto-configuring HATs on boot.
Recovering Pin 1 on Faded or Unmarked Boards
If you are working with a cloned Pi3 board, a board with scratched silkscreen, or a custom carrier board where the 40-pin header lacks a physical shroud, do not guess Pin 1. A reversed power connection will instantly kill the board. Use these three physical verification methods:
- The Square Pad Rule: Flip the board over (or look closely at the top). Pin 1 is the only pin on the header with a square solder pad. All other pins (2 through 40) have round or oval solder pads.
- The Silkscreen Triangle: On genuine Raspberry Pi boards, there is a tiny white silkscreen triangle printed on the PCB pointing directly at Pin 1. On faded boards, use a magnifying glass and a flashlight at a low angle to catch the contrast.
- The Component Proximity Rule: Pin 1 is always located on the edge of the header closest to the SD card slot and the main SoC, and furthest from the USB/Ethernet ports. Pin 2 is directly adjacent to the USB port side.






