The original Raspberry Pi Model B utilizes a 26-pin GPIO header, distinct from the 40-pin layout introduced on the Model B+ and all subsequent generations. If you are interfacing with a legacy Model B, Pin 1 provides 3.3V power and Pin 6 is Ground. The Broadcom BCM2835 SoC operates strictly at 3.3V logic; feeding 5V into any GPIO pin will permanently destroy the silicon. Below is the definitive hardware reference for the 26-pin Rev 2 board, which represents the vast majority of Model B units in circulation.

The Complete Raspberry Pi Model B (26-Pin) GPIO Reference Table

Read this table looking down at the board with the USB ports facing you and the GPIO header on the top right. The left bank represents the odd-numbered pins, and the right bank represents the even-numbered pins.

Pin (Odd) Function / BCM GPIO Function / BCM GPIO Pin (Even)
13V3 Power5V Power2
3GPIO 2 (SDA1 / I2C)5V Power4
5GPIO 3 (SCL1 / I2C)Ground6
7GPIO 4 (GPCLK0)GPIO 14 (TXD / UART)8
9GroundGPIO 15 (RXD / UART)10
11GPIO 17GPIO 18 (PCM_CLK / PWM0)12
13GPIO 27 (Rev 2) / 21 (Rev 1)Ground14
15GPIO 22GPIO 2316
173V3 PowerGPIO 2418
19GPIO 10 (MOSI / SPI)Ground20
21GPIO 9 (MISO / SPI)GPIO 2522
23GPIO 11 (SCLK / SPI)GPIO 8 (CE0 / SPI)24
25GroundGPIO 7 (CE1 / SPI)26

Decoding the Pinout: What Each Row Means in Practice

Understanding the physical pinout is only half the battle; you must understand the electrical characteristics tied to each row.

  • Power Rails (Pins 1, 2, 4, 17): The 5V pins (2 and 4) are tied directly to the USB power input. They can supply current up to the limit of your power supply minus the Pi's own draw (typically ~500mA available). The 3.3V pins (1 and 17) are generated by the onboard linear regulator and are strictly limited to ~50mA total. Do not use the 3.3V rail to power motors or high-draw LED strips.
  • I2C Bus (Pins 3, 5): GPIO 2 (SDA) and GPIO 3 (SCL) are the primary I2C bus. Crucially, the Raspberry Pi includes onboard 1.8kΩ pull-up resistors tying these lines to the 3.3V rail. If you connect a 5V I2C device here without a level shifter, you will back-feed 5V into the 3.3V rail through the pull-ups, potentially damaging the SoC.
  • UART (Pins 8, 10): GPIO 14 (TXD) and GPIO 15 (RXD) operate at 3.3V logic. When connecting to a 5V microcontroller (like an Arduino Uno) or a legacy RS-232 device, you must use a logic level converter or a MAX3232 transceiver. Connecting RS-232 directly will instantly destroy the Pi due to the ±12V signaling of RS-232.
  • SPI Bus (Pins 19, 21, 23, 24, 26): The primary SPI bus shares these pins. Pin 24 is Chip Enable 0 (CE0) and Pin 26 is Chip Enable 1 (CE1). SPI on the BCM2835 is capable of high clock speeds, but trace capacitance on the 26-pin header limits reliable operation to roughly 10-15 MHz without signal integrity issues.

Rows People Get Wrong (And How to Avoid Fried Boards)

CRITICAL HARDWARE WARNING: The BCM2835 GPIO pins are not 5V tolerant. There are no internal clamping diodes to VDD. Applying >3.6V to any GPIO pin will cause immediate, irreversible latch-up and silicon failure.

Identifying Pin 1 When Silkscreen is Faded or Missing

On older Model B boards, the white silkscreen marker for Pin 1 often flakes off or is obscured by dust and flux residue. If you cannot read the board markings, use these two physical verification methods:

  1. The Square Pad Rule: Flip the board over. The solder pad for Pin 1 on the underside of the PCB is always square, while all other pins (2 through 26) have circular pads.
  2. Component Proximity: Looking down at the top of the board with the RCA/USB ports facing you, Pin 1 is the top-left pin of the header, physically closest to the SD card slot and the main SoC.

The Rev 1 vs. Rev 2 Trap (Pin 13)

Very early 2012 Model B boards (Rev 1) map Pin 13 to BCM GPIO 21. All later Rev 2 boards (which added the P5 header and mounting holes) map Pin 13 to BCM GPIO 27. If your code fails to toggle Pin 13, check your board revision. You can verify this in the terminal by running cat /proc/cpuinfo and checking the 'Revision' code. If the revision ends in 0002 or 0003, it is a Rev 1 board. If it ends in 0004 or higher, it is Rev 2.

Regional Wire Color Standards for GPIO Harnesses

While the silicon pinout of the Raspberry Pi is universal, the wire colors you use when crimping custom JST, Molex, or Dupont harnesses should comply with the low-voltage DC color standards of your region. Mixing regional standards in a single enclosure leads to dangerous assumptions during troubleshooting.

Function IEC 60446 (EU / UK / AU / Global) NEC / NFPA 70 (US / Canada) Legacy UK (Pre-2006)
DC Positive (+) Brown Red Red
DC Negative (-) / GND Blue Black Black
Earth / Chassis Ground Green/Yellow Stripe Green or Bare Copper Green/Yellow Stripe
Signal / Data Lines White, Grey, or Yellow White, Yellow, or Orange White or Yellow

Note: For standard off-the-shelf 40-pin rainbow ribbon cables, the industry convention is Red = 5V, Black = GND, Orange/Yellow = 3.3V, and remaining colors for signals. Always verify with a multimeter before applying power.

Decision Path: Which Interface and Level Shifter Should You Use?

Use this decision matrix to select the correct hardware interface when connecting external sensors and actuators to the Model B GPIO header. This path terminates in a concrete component selection.

Target Device / Sensor Voltage Logic Required Interface Action Concrete Component Pick
I2C Sensors (BME280, MPU6050) 3.3V Direct connect to Pins 3/5. Ensure pull-ups are disabled on the sensor module if Pi pull-ups are active. Direct Dupont wiring
5V Ultrasonic (HC-SR04) or 5V I2C 5V Step down 5V echo/SDA to 3.3V. Step up 3.3V trigger/SCL to 5V. BSS138 Bi-directional Level Shifter (e.g., Adafruit 4-channel)
12V/24V Relays or Solenoids N/A (High Voltage) Isolate GPIO from inductive kickback. Never drive coils directly from GPIO. ULN2803 Darlington Array or PC817 Optocoupler
Standard Servos (SG90, MG996R) 5V Power / 3.3V Signal Power servo from external 5V PSU (not Pi 5V rail). Connect PWM signal directly to GPIO 18. External 5V 2A Buck Converter + Direct Signal
The Default Safe Pick: If you are unsure about a sensor's voltage tolerance, or if you are mixing 3.3V and 5V modules on a custom PCB shield, default to the Texas Instruments SN74LVC8T245 or a generic BSS138 MOSFET-based level shifter. The BSS138 is slow (limit I2C to 100kHz) but virtually indestructible and cheap. The SN74LVC8T245 supports high-speed SPI and UART up to 100Mbps and provides robust 5V-to-3.3V translation with dedicated direction control.

For further hardware specifications and legacy board schematics, refer to the Raspberry Pi Official Documentation. For detailed wiring diagrams on logic level translation, consult the Adafruit Level Shifter Guide.