The original Raspberry Pi Model A shipped with a 26-pin header, but every subsequent A-series board (Model A+, Pi 3 A+, and modern equivalents) uses the standard 40-pin GPIO layout. If you are wiring sensors, relays, or HATs, you need the exact Broadcom (BCM) mappings, not just the physical pin numbers. Below is the master reference for the 40-pin header, followed by the wiring standards and trapdoors that routinely brick beginner setups.
The Complete Raspberry Pi A Pinout Reference Table
This table maps the physical header pins (looking down at the Pi with the USB ports facing you, header on the top right) to the BCM GPIO numbers used in Python/C code. Assumption: This applies to all Rev 2 and later 40-pin boards. If you have a rare, original 26-pin Model A (Rev 1), pins 27-40 do not exist, and physical pins 3 and 5 map to BCM 0 and 1 instead of 2 and 3.
| Phys | BCM | Name | Function / Notes | Phys | BCM | Name | Function / Notes |
|---|---|---|---|---|---|---|---|
| 1 | - | 3V3 | 3.3V Power (Max 50mA draw) | 2 | - | 5V | 5V Power (Direct from USB-C/Micro) |
| 3 | 2 | SDA1 | I2C Data (Has 1.8k pull-up) | 4 | - | 5V | 5V Power |
| 5 | 3 | SCL1 | I2C Clock (Has 1.8k pull-up) | 6 | - | GND | Ground |
| 7 | 4 | GPCLK0 | General Purpose / GPIO4 | 8 | 14 | TXD | UART Transmit (Alt0) |
| 9 | - | GND | Ground | 10 | 15 | RXD | UART Receive (Alt0) |
| 11 | 17 | GPIO17 | General Purpose | 12 | 18 | PWM0 | Hardware PWM0 / GPIO18 |
| 13 | 27 | GPIO27 | General Purpose | 14 | - | GND | Ground |
| 15 | 22 | GPIO22 | General Purpose | 16 | 23 | GPIO23 | General Purpose |
| 17 | - | 3V3 | 3.3V Power | 18 | 24 | GPIO24 | General Purpose |
| 19 | 10 | MOSI | SPI0 MOSI (Alt0) | 20 | - | GND | Ground |
| 21 | 9 | MISO | SPI0 MISO (Alt0) | 22 | 25 | GPIO25 | General Purpose |
| 23 | 11 | SCLK | SPI0 SCLK (Alt0) | 24 | 8 | CE0 | SPI0 Chip Select 0 |
| 25 | - | GND | Ground | 26 | 7 | CE1 | SPI0 Chip Select 1 |
| 27 | 0 | ID_SD | I2C ID Data (HAT comms) | 28 | 1 | ID_SC | I2C ID Clock (HAT comms) |
| 29 | 5 | GPIO5 | General Purpose | 30 | - | GND | Ground |
| 31 | 6 | GPIO6 | General Purpose | 32 | 12 | PWM0 | Hardware PWM0 / GPIO12 |
| 33 | 13 | PWM1 | Hardware PWM1 / GPIO13 | 34 | - | GND | Ground |
| 35 | 19 | MISO | SPI1 MISO / PCM FS | 36 | 16 | CE2 | SPI1 Chip Select 2 |
| 37 | 26 | GPIO26 | General Purpose | 38 | 20 | MOSI | SPI1 MOSI / PCM DIN |
| 39 | - | GND | Ground | 40 | 21 | SCLK | SPI1 SCLK / PCM DOUT |
Source mappings verified via the Pinout.xyz interactive database and the official Raspberry Pi hardware documentation.
Wire Color Standards and Faded Pin Identification
Unlike AC mains wiring, which is strictly governed by regional codes (NEC in the US, IEC 60446 in Europe/UK), low-voltage DC logic does not have a legally enforced color standard. However, mixing up AC color conventions with DC logic is a common way beginners destroy microcontrollers.
DC Logic Color Conventions (HAT & Maker Standard)
When wiring your Raspberry Pi A+ to breadboards or custom HATs, follow the established industry conventions used by Adafruit, SparkFun, and Pololu:
- Red: 5V Power (Pins 2, 4)
- Black: Ground (GND)
- Orange or Yellow: 3.3V Logic/Power (Pins 1, 17)
- Blue: I2C SDA (Pin 3)
- Green: I2C SCL (Pin 5)
- White/Grey: UART TX/RX
In IEC 60446 (standard for AC mains in the EU/UK), Brown is Line (Hot) and Blue is Neutral. If you use brown wire for your 5V rail and blue for ground out of habit from AC wiring, you will confuse yourself and anyone who troubleshoots your bench later. Stick to the DC maker standard above.
Safe Interpretation When Markings Are Faded or Missing
If your Pi's silkscreen is scratched off, or you are working with a cloned board with missing markings, you can safely identify Pin 1 using three physical indicators:
- The Square Pad: Turn the board over. The through-hole pad for Pin 1 is always square, while all other pads are round.
- Silkscreen Arrow: Most official boards have a tiny white arrow or triangle printed on the top silkscreen pointing directly at Pin 1.
- Component Proximity: With the USB ports facing you and the GPIO header on the top right, Pin 1 is the top-left pin of the header, closest to the SD card slot and the voltage regulator circuitry.
The Rows People Get Wrong (And How to Avoid Bricking Your Pi)
The BCM2711 and BCM2712 chips inside modern Raspberry Pis are strictly 3.3V logic devices. Feeding 5V into any GPIO pin (other than the dedicated 5V power pins) will instantly destroy the silicon. Here are the specific rows from the table above that cause the most hardware casualties.
1. The 5V vs 3.3V Trap (Pins 2/4 vs Pins 1/17)
Pins 2 and 4 output 5V directly from the USB power supply. Pins 1 and 17 output 3.3V from the onboard regulator. If you are powering a 5V sensor (like an HC-SR04 ultrasonic module), you must use Pin 2 or 4 for VCC. However, the data out pin from that sensor will output 5V. You must run that data line through a logic level converter (like a BSS138 MOSFET or TXB0108 chip) before it hits the Pi's GPIO. Plugging a 5V echo pin directly into BCM 23 will fry the pin permanently.
2. The I2C Pull-Up Reality (Pins 3 and 5)
Physical pins 3 (SDA) and 5 (SCL) already have 1.8kΩ pull-up resistors tied to the 3.3V rail on the Raspberry Pi PCB. If your I2C sensor breakout board also has pull-up resistors tied to 5V, you are creating a voltage divider that will push >3.3V back into the Pi's I2C pins. Always check your sensor's schematic and cut the pull-up jumper traces on the sensor board if it operates at 5V.
3. UART Crossover (Pins 8 and 10)
Pin 8 is TXD (Transmit) and Pin 10 is RXD (Receive). The most common mistake is wiring TX to TX and RX to RX. Transmit must always connect to Receive. Furthermore, by default, the Pi's UART is mapped to the Linux serial console. If you are trying to read GPS data on Pins 8/10, you must first disable the serial console in raspi-config (Interface Options -> Serial Port -> Login shell: No, Serial hardware: Yes).
Raspberry Pi A Pinout FAQ
Does the original Raspberry Pi Model A have the same pinout as the A+?
No. The original 2012 Model A featured a 26-pin header. Pins 27 through 40 did not exist. Furthermore, on the very first Rev 1 boards, physical pins 3 and 5 mapped to BCM GPIO 0 and 1. When the Rev 2 board (and subsequently the Model A+) was released, those pins were remapped to BCM GPIO 2 and 3 to align with the I2C1 bus. If you are writing Python code for an original Rev 1 Model A, you must use GPIO.setmode(GPIO.BCM) and reference pins 0 and 1 for I2C, whereas modern code uses 2 and 3.
Can I use standard Arduino 5V sensors directly with the Raspberry Pi A GPIO?
You can use them for power and ground, but not for direct data communication without level shifting. Arduino UNOs operate at 5V logic. If an Arduino sensor outputs a HIGH signal at 5V, connecting it directly to a Raspberry Pi GPIO pin will exceed the 3.3V absolute maximum rating of the BCM chip, leading to thermal failure of the pin's ESD protection diodes and eventual silicon death. Always use a bidirectional logic level shifter for digital lines, or a simple resistor voltage divider (e.g., 2kΩ and 3.3kΩ) for one-way sensor outputs.
How do I safely interpret pin markings if the silkscreen is scratched off?
Never guess or use a continuity tester on a live board to find ground. Power the board down completely. Flip the Raspberry Pi over and inspect the solder joints on the underside of the GPIO header. Pin 1 is universally designated by a square solder pad, while pins 2 through 40 use round pads. Additionally, Pin 1 is always located on the edge of the header closest to the SD card slot. If you are using a multimeter to map pins on a dead board, set it to continuity mode, connect the black probe to a known ground (like the metal shield of the USB port), and probe the header until you map the GND pins (6, 9, 14, 20, 25, 30, 34, 39).
Which pins are safe to use for PWM on the Raspberry Pi A?
The Raspberry Pi has only two dedicated hardware PWM channels (PWM0 and PWM1), but they are broken out to multiple physical pins. According to the reference table, BCM 12 and BCM 18 share PWM0, while BCM 13 and BCM 19 share PWM1. If you need true, jitter-free hardware PWM (for motor control or precise LED dimming), use these pins. While software PWM can be run on any GPIO pin via libraries like gpiozero, it relies on the CPU and will introduce visible flicker or servo jitter under heavy system loads.






