The Raspberry Pi 3 (Model B and B+) utilizes a standardized 40-pin GPIO header. Pin 1 provides 3.3V power, Pin 2 provides 5V power, and the board features 26 usable general-purpose I/O pins mapped to the Broadcom BCM2837 SoC. Whether you are debugging a legacy industrial deployment or wiring a new sensor array, understanding the exact physical-to-BCM mapping is critical to avoid frying the 3.3V logic gates.
The Complete Raspberry Pi 3 Pinout Reference Table
The table below mirrors the physical layout of the 40-pin header. The left column represents the row closest to the SD card slot (odd pins), and the right column represents the outer row (even pins). This layout is identical across the Pi 1 B+, Pi 2, Pi 3, and Pi 4.
| Pin | Function | BCM | Pin | Function | BCM |
|---|---|---|---|---|---|
| 1 | 3.3V Power | - | 2 | 5V Power | - |
| 3 | I2C SDA1 | 2 | 4 | 5V Power | - |
| 5 | I2C SCL1 | 3 | 6 | Ground | - |
| 7 | GPIO | 4 | 8 | UART TXD | 14 |
| 9 | Ground | - | 10 | UART RXD | 15 |
| 11 | GPIO | 17 | 12 | PWM0 | 18 |
| 13 | GPIO | 27 | 14 | Ground | - |
| 15 | GPIO | 22 | 16 | GPIO | 23 |
| 17 | 3.3V Power | - | 18 | GPIO | 24 |
| 19 | SPI MOSI | 10 | 20 | Ground | - |
| 21 | SPI MISO | 9 | 22 | GPIO | 25 |
| 23 | SPI SCLK | 11 | 24 | SPI CE0 | 8 |
| 25 | Ground | - | 26 | SPI CE1 | 7 |
| 27 | HAT ID_SD | 0 | 28 | HAT ID_SC | 1 |
| 29 | GPIO | 5 | 30 | Ground | - |
| 31 | GPIO | 6 | 32 | PWM0 | 12 |
| 33 | PWM1 | 13 | 34 | Ground | - |
| 35 | SPI MISO | 19 | 36 | SPI CE2 | 16 |
| 37 | GPIO | 26 | 38 | SPI MOSI | 20 |
| 39 | Ground | - | 40 | SPI SCLK | 21 |
Source: Official Raspberry Pi GPIO Documentation and the community-maintained Pinout.xyz reference.
Wire Color Standards and Faded Marking Protocols
Unlike mains AC wiring governed strictly by the NEC or IEC, low-voltage DC GPIO harnesses suffer from a fragmented landscape of color conventions. When building custom cable harnesses for your Raspberry Pi 3 pinout, you must align your wire colors with the standard expected by your region or industry to prevent catastrophic miswiring during maintenance.
| Standard / Region | Positive (VCC) | Negative (GND) | Signal / Data | Where it Applies |
|---|---|---|---|---|
| IEC 60445 (Global DC) | Brown | Blue | Black / Grey | Industrial control panels, EU DC wiring |
| US Sensor / Hobbyist | Red | Black | White / Yellow / Green | Adafruit/SparkFun kits, Arduino/Pi hobby projects |
| Old UK (Pre-2004) | Red | Black | Green / Yellow | Legacy UK equipment (Note: Green/Yellow was earth, now strictly PE) |
| PC / ATX Internal | Red (5V) / Orange (3.3V) | Black | Yellow / Blue | When repurposing PC power supply cables for Pi power |
Rows Makers Get Wrong (and How to Avoid Bricking Your Board)
The Broadcom BCM2837 SoC on the Pi 3 operates strictly at 3.3V logic. Unlike the ATmega328P on an Arduino Uno, which tolerates 5V, feeding 5V into a Pi 3 BCM GPIO pin will instantly destroy the silicon. Here are the specific rows and configurations that cause the most field failures.
1. The 5V vs 3.3V Power Rail Confusion (Pins 1 & 2)
Pin 1 outputs 3.3V (max draw ~50mA total across all 3.3V pins). Pin 2 outputs 5V, fed directly from the USB micro-B input through a resettable polyfuse (PTC). Makers frequently wire 5V sensors (like the HC-SR04 ultrasonic module) directly to BCM GPIO pins. The HC-SR04 echo pin outputs 5V. You must use a voltage divider (e.g., 1kΩ and 2kΩ resistors) or a logic level shifter to step the 5V echo signal down to 3.3V before it hits the Pi 3 GPIO.
2. The HAT EEPROM I2C Pins (Pins 27 & 28)
Physical pins 27 (ID_SD) and 28 (ID_SC) map to BCM 0 and BCM 1. These are reserved exclusively for reading the EEPROM on Raspberry Pi HATs (Hardware Attached on Top). Do not use these for your general I2C sensors. If you wire a standard I2C temperature sensor here, it will conflict with the HAT identification bus, causing boot delays or I2C bus lockups. Use physical pins 3 and 5 (BCM 2 and 3) for standard I2C.
3. The UART Bluetooth Conflict (Pins 8 & 10)
Physical pins 8 (TXD) and 10 (RXD) map to BCM 14 and 15. On the Pi 3, the primary hardware UART (PL011) was routed to the onboard Bluetooth module, leaving the 'mini UART' mapped to the GPIO header. The mini UART lacks a stable baud rate clock, leading to garbage data when communicating with GPS modules or Arduino boards.
The Fix: You must disable Bluetooth in your /boot/config.txt (or /boot/firmware/config.txt on newer Pi OS versions) to restore the hardware UART to the GPIO pins. Add this line:
dtoverlay=disable-bt
Remember to also cross your wires: Pi TX (Pin 8) must connect to the external device's RX, and Pi RX (Pin 10) must connect to the external device's TX.
Frequently Asked Questions
Is the Raspberry Pi 3 pinout identical to the Pi 4 and Pi 5?
Yes, the physical 40-pin layout and BCM mappings for the standard GPIO, I2C, SPI, and UART pins are 100% backward compatible across the Pi 1 B+, Pi 2, Pi 3, Pi 4, and Pi 5. However, the Pi 5 introduces a dedicated JST connector for PCIe and changes the power delivery architecture (using an RP1 I/O controller chip instead of the Broadcom SoC for GPIO). While your Pi 3 wiring harnesses will physically fit and function on a Pi 4 or 5, always verify the 5V current draw, as the Pi 4 and 5 have stricter USB-C PD requirements.
What are the default I2C pins on the Raspberry Pi 3 pinout?
The default, hardware-enabled I2C bus (i2c-1) is located on Physical Pin 3 (SDA / BCM 2) and Physical Pin 5 (SCL / BCM 3). These pins feature onboard 1.8kΩ pull-up resistors tied to the 3.3V rail. If you are connecting multiple I2C devices, ensure the total bus capacitance does not exceed 400pF, or you will need to lower the I2C clock speed in your /boot/config.txt using dtparam=i2c_baudrate=50000.
Can I draw 5V from the Raspberry Pi 3 GPIO pins to power a motor?
No. The 5V pins (Physical 2 and 4) are fed directly from the micro-USB power input through a polyfuse rated for roughly 2A to 2.5A total (including the Pi's own consumption, which draws 500mA to 1.2A depending on load). If you attempt to power a 12V motor or a high-draw 5V servo directly from the GPIO header, you will trip the polyfuse, causing the Pi to brownout and reboot. Always use a dedicated buck converter or a separate power supply for motors, ensuring you tie the grounds together.






