The Raspberry Pi 3B+ features a 40-pin 2x20 GPIO header driven by the BCM2837B0 SoC. All GPIO pins operate at 3.3V logic with a strict 16mA maximum current draw per pin. Below is the complete physical and BCM (Broadcom) pinout reference, followed by critical hardware-specific edge cases and external wiring standards.

The Complete Raspberry Pi 3B+ Pinout Reference Table

This table maps the physical pin number (1-40) to the Broadcom GPIO number, the functional name, and practical application notes. Physical Pin 1 is the square-pad hole closest to the SD card slot.

PinBCMNameFunction & Practical Notes
1-3.3V3.3V Power Output (Max 50mA total across all 3.3V pins)
2-5V5V Power Input/Output (Direct from USB/5V rail)
32SDA1I2C Data (Includes 1.8kΩ onboard pull-up to 3.3V)
4-5V5V Power Input/Output
53SCL1I2C Clock (Includes 1.8kΩ onboard pull-up to 3.3V)
6-GNDGround
74GPIO4General Purpose / Default 1-Wire Data (w1-gpio)
814TXDUART Transmit (See mini-UART warning below)
9-GNDGround
1015RXDUART Receive (See mini-UART warning below)
1117GPIO17General Purpose
1218GPIO18Hardware PWM0 (Primary PCM/I2S clock)
1327GPIO27General Purpose
14-GNDGround
1522GPIO22General Purpose
1623GPIO23General Purpose
17-3.3V3.3V Power Output
1824GPIO24General Purpose
1910MOSISPI0 Master Out Slave In
20-GNDGround
219MISOSPI0 Master In Slave Out
2225GPIO25General Purpose
2311SCLKSPI0 Serial Clock
248CE0SPI0 Chip Select 0
25-GNDGround
267CE1SPI0 Chip Select 1
270ID_SDHAT EEPROM I2C Data (Do not use for general I2C)
281ID_SCHAT EEPROM I2C Clock (Do not use for general I2C)
295GPIO5General Purpose
30-GNDGround
316GPIO6General Purpose
3212GPIO12Hardware PWM0 (Alternate)
3313GPIO13Hardware PWM1
34-GNDGround
3519GPIO19PCM Frame Sync / SPI1 MISO
3616GPIO16General Purpose
3726GPIO26General Purpose
3820GPIO20PCM Data In / SPI1 MOSI
39-GNDGround
4021GPIO21PCM Data Out / SPI1 SCLK

Rows Makers Get Wrong (And How to Avoid Bricking Your Board)

When working with the Raspberry Pi 3B+ pinout, misinterpreting the table above leads to immediate hardware failure or silent communication bugs. Here are the specific traps inherent to the 3B+ architecture.

CRITICAL VOLTAGE WARNING: The BCM2837B0 SoC is strictly 3.3V tolerant. Sending 5V into any GPIO pin (e.g., Pin 13 / GPIO 27) will instantly punch through the silicon and permanently destroy the SoC. Always use a logic level shifter or an optocoupler when interfacing with 5V Arduino modules or 12V/24V industrial sensors.

The UART / Bluetooth Routing Trap (Pins 8 & 10)

On older Pi models, Pins 8 (GPIO 14) and 10 (GPIO 15) provided a stable hardware UART (PL011). On the Pi 3B+, the primary PL011 UART is hardwired to the onboard Bluetooth module. Pins 8 and 10 are instead routed to the mini-UART. The mini-UART lacks a dedicated baud-rate clock and relies on the core CPU clock, meaning your serial baud rate will drift and drop characters if the CPU frequency scales.

The Fix: If you need stable hardware UART for a GPS module or RS485 transceiver, add dtoverlay=disable-bt to your /boot/config.txt file. This frees the PL011 UART and maps it back to Pins 8 and 10, but disables onboard Bluetooth.

The HAT EEPROM Pins (Pins 27 & 28)

Pins 27 (ID_SD) and 28 (ID_SC) form a dedicated I2C bus reserved exclusively for reading the EEPROM on Raspberry Pi HATs (Hardware Attached on Top). While they function as I2C, they lack the standard 1.8kΩ pull-up resistors found on Pins 3 and 5. Using them for general I2C sensors will result in NACK errors and floating bus states unless you add external 4.7kΩ pull-ups to 3.3V.

Hardware vs. Software PWM

Only Pins 12 (GPIO 18), 32 (GPIO 12), and 33 (GPIO 13) support true hardware PWM. If you use the software PWM library on other pins (like Pin 7 / GPIO 4), the signal will jitter under CPU load, causing servos to twitch or LED dimmers to flicker. Always route motor control and precision dimming to the hardware PWM pins.

External Wiring Standards: IEC, NEC, and Old UK Color Codes

While the Pi's PCB silkscreen is universal, the external wiring you connect to its GPIO pins via terminal blocks, relays, or optocouplers must follow your region's electrical color codes. Miswiring a 24V industrial sensor or a mains-voltage relay module using the wrong color standard can lead to lethal shock hazards during maintenance.

According to official Raspberry Pi safety guidelines and international electrical standards, use the following color mappings for external DC and AC wiring connected to your Pi projects:

Standard / RegionDC Positive (+)DC Negative (-)AC Line (L)AC Neutral (N)Earth Ground (PE)
IEC 60446 (EU, Modern UK, AU)BrownBlueBrownBlueGreen/Yellow
NEC / NFPA 70 (US, Canada)Red (or Black)Black (or White)Black (or Red)White (or Gray)Green / Bare
Old UK (Pre-2006 Installations)RedBlackRedBlackGreen

Practical Application: If you are wiring a 5V relay module to switch a 120V AC fan using a Pi GPIO pin, the DC control side (VCC, GND, IN) should use Red/Black (US) or Brown/Blue (EU). The AC mains side of the relay must strictly use Black/White/Green (US) or Brown/Blue/Green-Yellow (EU). Never mix IEC and NEC colors in the same enclosure; if adapting an old UK project, sleeve the old Red/Black wires with modern Brown/Blue heat shrink to prevent future maintainers from assuming the black wire is a neutral when it is actually a live phase.

Safe Interpretation When Silkscreen Markings Fade

On heavily used Pi 3B+ boards, the white silkscreen text (e.g., '3V3', '5V', 'GND') often flakes off due to thermal cycling or flux residue cleaning. Plugging a 5V line into a GPIO pin because you miscounted the header rows will instantly brick the board. Here is how to safely identify pins when markings are missing.

  1. Locate the Square Pad: Flip the board over or look closely at the top of the header. Pin 1 is the only pin with a square copper solder pad. All other 39 pins have perfectly round pads.
  2. Use the SoC Shield as a Landmark: The large metal can covering the Broadcom SoC and RAM is physically located adjacent to Pins 1 through 8. Pin 1 is always the corner closest to the SD card slot and the metal shield.
  3. Verify Ground with a Multimeter: Set your multimeter to continuity mode (the diode/beep setting). Place the black probe on the metal shield of the USB ports (which is tied to system ground). Probe the suspected GND pins (6, 9, 14, 20, 25, 30, 34, 39) with the red probe. A continuous beep confirms Ground. Never use the resistance setting to test for 3.3V or 5V on a live board, as the meter's internal battery can back-feed the GPIO.
  4. Verify Voltage Under Load: Once GND is confirmed, power the Pi. Set the meter to DC Voltage. Probe Pin 2 or 4 against your confirmed GND. It should read between 4.9V and 5.2V. Probe Pin 1 or 17; it should read exactly 3.3V. If the 5V rail reads below 4.65V, your power supply is browning out, and the Pi's internal voltage regulator may be dropping the 3.3V rail, leading to SD card corruption.

By relying on physical PCB geometry and multimeter verification rather than faded ink, you eliminate the risk of catastrophic miswiring. Always document your custom wiring harnesses with heat-shrink labels at the connector end, ensuring the next person at the workbench doesn't have to guess.