The Raspberry Pi 3 Model B and B+ utilize a 40-pin GPIO header (J8) operating strictly at 3.3V logic. Unlike 5V-tolerant microcontrollers such as the Arduino Uno, injecting 5V into a Raspi 3 GPIO pin will permanently destroy the BCM2837 SoC. While the Pi 5 and Pi 4 dominate new designs in 2026, the Pi 3 remains heavily deployed in industrial control panels, legacy maker projects, and retrofit sensor nodes. Below is the definitive hardware pinout reference, wiring color mappings, and physical identification tricks you need before connecting your first peripheral.

The Complete Raspberry Pi 3 GPIO Pinout Reference

The following table maps the physical header pins to their Broadcom (BCM) GPIO numbers and primary functions. Physical pin numbering starts at 1 (top-left, closest to the USB ports when the board is oriented with USB facing you) and zig-zags down to 40.

Pin LBCM LName LPin RBCM RName R
1-3.3V Power2-5V Power
32SDA1 (I2C)4-5V Power
53SCL1 (I2C)6-Ground
74GPIO 4814TXD (UART)
9-Ground1015RXD (UART)
1117GPIO 171218GPIO 18 (PWM0)
1327GPIO 2714-Ground
1522GPIO 221623GPIO 23
17-3.3V Power1824GPIO 24
1910MOSI (SPI)20-Ground
219MISO (SPI)2225GPIO 25
2311SCLK (SPI)248CE0 (SPI)
25-Ground267CE1 (SPI)
270ID_SD (I2C)281ID_SC (I2C)
295GPIO 530-Ground
316GPIO 63212GPIO 12 (PWM0)
3313GPIO 13 (PWM1)34-Ground
3519GPIO 19 (PWM1)3616GPIO 16
3726GPIO 263820GPIO 20
39-Ground4021GPIO 21

Source: Pinout.xyz and Raspberry Pi Official Documentation.

Rows People Get Wrong (And How to Avoid Bricking Your Pi)

Reading the table is easy; understanding the hidden hardware quirks of specific pins is where bench experience matters. These are the most common failure points when wiring sensors and actuators to the Pi 3.

WARNING: 5V Intolerance
The BCM2837 SoC on the Pi 3 is strictly 3.3V. Connecting a 5V Arduino sensor output directly to any BCM GPIO pin will forward-bias the internal ESD protection diodes, injecting current into the 3.3V rail and permanently destroying the silicon. Always use a logic level converter (like the BSS138 MOSFET bi-directional shifter) or a voltage divider when interfacing 5V logic.
  • Pins 1 & 17 (3.3V Power): These are tied to the onboard 3.3V linear regulator. The absolute maximum continuous draw is ~50mA. Hobbyists frequently wire 3.3V servo motors or high-current LED strips here, causing an immediate brownout that reboots the Pi or burns out the regulator. Use the 5V pins (2, 4) for high-current loads and regulate down locally if needed.
  • Pins 3 & 5 (GPIO 2 & 3 - I2C): These pins feature hardware 1.8kΩ pull-up resistors tied to the 3.3V rail on the Pi board itself. If you use these pins for generic active-low interrupts or button inputs, the 1.8k pull-up will fight your external circuit. Stick to dedicated I2C devices here.
  • Pins 8 & 10 (GPIO 14 & 15 - UART): By default, the Pi 3 routes the Linux serial console to these pins. If you connect an external UART device (like a GPS module) without disabling the serial console in /boot/config.txt (enable_uart=1 and disabling the console overlay), the Pi's boot spam will flood your peripheral and potentially cause erratic behavior.
  • Pins 27 & 28 (ID_SD & ID_SC): These are reserved exclusively for the HAT (Hardware Attached on Top) EEPROM I2C bus. The Pi uses these during boot to read HAT configuration data. Do not use them for general-purpose GPIO or standard I2C sensors.

Wiring Color Standards: IEC, US, and Legacy Conventions

When wiring external industrial sensors, optocoupler relay boards, or custom terminal blocks to your Pi 3 GPIO, you will encounter different regional wiring color standards. Misinterpreting these when adapting mains-powered control circuits to low-voltage Pi logic is a primary cause of short circuits.

Standard / RegionDC Positive (VCC)DC Negative (GND)Control / SignalApplication Context
IEC 60446 (EU / Global)BrownBlueBlackIndustrial sensors, DIN-rail terminal blocks, modern Pi HATs.
US (NEC / NFPA 79)Red or OrangeWhite or BlueBlue (DC Control)North American industrial control panels, PLC interfaces.
Old UK (Pre-2004)RedBlackYellow / GreenLegacy equipment retrofits. High hazard if mixed with IEC.
Hobbyist (Adafruit/SparkFun)RedBlackBlue/Yellow/WhiteDuPont jumper wires, JST-XH sensor pigtails, breakout boards.

The Legacy Wiring Hazard

If you are retrofitting a Pi 3 into an older UK-manufactured control panel (pre-2004 harmonization), you will likely find Red (DC+) and Black (DC-) wiring. If you connect this to a modern IEC-compliant Pi HAT terminal block where Black is expected to be the signal line and Blue is DC-, you will create a dead short or reverse-polarity condition. Always verify wire functions with a multimeter before trusting the jacket color on legacy equipment.

Hobbyist I2C Color Mapping

For standard 4-pin I2C sensors (OLEDs, BME280), the hobbyist standard is almost universal: Red (VIN/3.3V), Black (GND), Blue (SDA), and Yellow (SCL). Map Blue to Pin 3 (SDA1) and Yellow to Pin 5 (SCL1).

Identifying Pin 1 When Silkscreen Markings Fade

In harsh environments, 3D-printed enclosures, or after years of bench use, the white silkscreen pin numbers on the Pi 3 PCB can wear off or become obscured by ribbon cables. Guessing Pin 1 orientation and plugging in a 5V HAT will instantly kill the board. Use these physical and electrical verification methods to safely identify the header layout.

Visual and Physical Cues

  1. The Square Pad: Look closely at the copper pads on the PCB beneath the plastic header shroud. Pin 1 is the only pad with a square copper outline. All other pins (2 through 40) have round copper outlines.
  2. Component Proximity (Pi 3 Model B/B+): Orient the board so the USB ports and Ethernet jack are facing your chest. The GPIO header runs along the left edge. Pin 1 is the top-left pin, closest to the USB/Ethernet block. Pin 2 is top-right.

The Multimeter Continuity Trick

If the board is mounted in a case and you cannot see the square pad, use your multimeter to map the Ground pins first. The metal shielding of the USB ports and Ethernet jack is directly tied to the system ground.

  1. Set your multimeter to continuity mode (the diode/beep symbol).
  2. Place the black probe firmly against the metal shield of a USB port.
  3. Probe the header pins with the red probe. The pins that emit a continuous beep (reading < 1 ohm) are your Ground pins (Pins 6, 9, 14, 20, 25, 30, 34, and 39).
  4. Once you have mapped the Ground pins, you can mathematically deduce the rest of the header based on the standard 40-pin zig-zag layout. For example, the pin immediately to the left of the top-most Ground pin (Pin 9) on the same side is Pin 7 (GPIO 4), and the pin above it is Pin 5 (SCL1).
Bench Tip: Never use the metal mounting holes to verify ground on a Pi 3. Unlike some older microcontrollers, the Pi 3 mounting holes are not reliably bonded to the ground plane through low-impedance paths and may yield false readings on a standard multimeter. Always use the USB shielding.