ABC of Electronics cosycom.com
RASPBERRY PI 08 · GPIO Basics

Understanding the GPIO Pinout

The 40-pin header that connects your code to the outside world — power, ground, and general-purpose pins, mapped out so wiring mistakes are easy to avoid.

Every current Raspberry Pi model shares the same 40-pin GPIO header, laid out as two rows of 20. A few pin types matter most while you're learning:

Common GPIO header pins used in this course
Pin (physical)FunctionNotes
1, 173.3V powerUse for sensors and logic rated at 3.3V — most GPIO-connected parts
2, 45V powerHigher current available; matches many relay and motor driver boards
6, 9, 14, 20, 25, 30, 34, 39Ground (GND)Any ground pin works the same as any other — use whichever is convenient
11 (GPIO17), 13 (GPIO27), 15 (GPIO22)…General-purpose I/OReferred to by GPIO number in code, not physical pin number — see note below

The most important habit to build now: Raspberry Pi pins have two different numbering systems, and mixing them up is the single most common beginner wiring mistake. The physical numbering (1–40) counts pin position on the header, left to right, top to bottom. The BCM/GPIO numbering (what you'll actually write in Python code, as in GPIO17) refers to the chip's internal pin naming, which doesn't run in the same simple order as the physical layout. Keep a labeled GPIO pinout reference nearby (many are printed directly onto official Pi cases) until this becomes second nature.

Unlike the Arduino Uno's 5V-tolerant digital pins, the Raspberry Pi's GPIO pins operate at 3.3V logic and are not 5V-tolerant — connecting a 5V signal directly to a GPIO pin can permanently damage it. Where the two boards differ like this, this course will flag it explicitly.

12 3940 40-pin header 2 rows x 20 pinsabcofelectronics
The standard 40-pin GPIO header shared across current Raspberry Pi models — physical position 1 to 40, left to right, top to bottom.
TRY THIS
Always confirm whether a pin number in a tutorial or your own notes refers to physical position or BCM/GPIO numbering — the two systems don't match, and mixing them up causes wiring to the wrong pin.