OHMYARD

DISCOVER  ·  EXPERIMENT  ·  BUILD

TRACK 7 · ESP32, PI & ARDUINO APPS25/30
NOV 27, 2026
14:20:00
BCMPI 4/5P1 · 3V3 PWRP2 · 5V PWRP3 · GPIO2 (SDA)P4 · 5V PWRP5 · GPIO3 (SCL)P6 · GNDP7 · GPIO4P8 · GPIO14 (TXD)P9 · GNDP10 · GPIO15 (RXD)P11 · GPIO17P12 · GPIO18 (PWM0)P13 · GPIO27P14 · GNDP15 · GPIO22P16 · GPIO23P19 · GPIO10 (MOSI)P21 · GPIO9 (MISO)P23 · GPIO11 (SCLK)P24 · GPIO8 (CE0)P32 · GPIO12 (PWM0)P33 · GPIO13 (PWM1)P35 · GPIO19 (PWM1)P40 · GPIO21Pin 12 (GPIO18 (PWM0)): ★ Hardware PWM0! Best for fan speed & WS2812B!
Drag or WASD to pan · Q / E to rotate · Scroll to zoom

Interactive 2.5D Raspberry Pi 4 / 5 40-Pin GPIO Pinout Guide — Engineering Notes & Troubleshooting

✓ Reviewed by Jason Guo (OhmYard Lab)· IEC & Datasheet Verified· Updated Nov 27, 2026
QUICK ENGINEERING ANSWER (TL;DR)

Never mix up Physical pin numbers (1–40) and BCM GPIO numbers again! Filter the 2.5D Raspberry Pi 40-pin header by I2C, SPI, UART, Hardware PWM, and Power rails — and remember: every Pi GPIO is strictly 3.3V (NOT 5V tolerant) and has NO built-in analog ADC!

3.3V Logic Only · Max 16 mA / GPIO · I2C1: Pin 3 (GPIO2) & Pin 5 (GPIO3)

Always enable I2C, SPI, or Serial interfaces in `sudo raspi-config` before running Python `gpiozero` or `smbus2` scripts.

SymbolComponentReal-World Engineering Tip
J8Raspberry Pi 40-Pin Dual-Row HeaderPhysical Pin 1 (3.3V) is marked by a square solder pad on the underside of the board; Pin 2 and Pin 4 are 5V right next to it — never slip a probe across Pin 2 and Pin 1!

Real-World Bench Scenario: Raspberry Pi Home Automation Hub: OLED display on I2C (Pin 3/5), DHT22 on GPIO4 (Pin 7), cooling fan PWM on GPIO18 (Pin 12) via an N-MOSFET!

Bench Challenge: Header Audit: Click 'Hardware PWM' and 'I2C' filters to spot the exact physical pin numbers for jitter-free servo/fan control and OLED screens!

Frequently Asked Questions

What is the difference between BOARD (Physical) and BCM numbering on Raspberry Pi?

BOARD counts the physical pin position 1 to 40 on the header (left to right, top to bottom). BCM refers to the Broadcom chip's internal GPIO channel name (e.g. Physical Pin 12 is BCM GPIO18).

Continue Exploring Related 2.5D Labs
24. Wheatstone Bridge →26. WS2812B LED Strip →27. SG90 Servo PWM →

OHMYARD · ALL 30 INTERACTIVE LABS & SIMULATORS

1. Closed Loop & Faults
/closed-loop
2. Ohm's Law & Thermal
/ohm-law
3. Series vs Parallel
/series-parallel
4. X-Ray Breadboard
/breadboard-simulator
5. LED Resistor & E24
/led-resistor-calculator
6. Voltage Divider & Load
/voltage-divider
7. Multimeter Trainer
/multimeter-simulator
8. RC & Oscilloscope
/rc-oscilloscope
9. 555 Timer Pulse Lab
/555-timer
10. Diode & Rectifier
/diode-rectifier
11. Transistor & Flyback
/transistor-switch
12. PWM Dimmer & Fan
/pwm-dimmer
13. Op-Amp Comparator
/opamp-comparator
14. H-Bridge & Shoot-Through
/h-bridge-motor
15. Buck vs LDO Power
/buck-converter
16. Digital Logic Gates
/logic-gates
17. Resistor Color Code
/resistor-color-code
18. ESP32 Pinout Guide
/esp32-pinout
19. Arduino Uno Pinout
/arduino-uno-pinout
20. Zener Voltage Clamp
/zener-diode-regulator
21. I2C Pull-Up Bus
/i2c-pullup-bus
22. Battery Life & Sleep
/battery-life-calculator
23. PCB Trace Width
/pcb-trace-width
24. Wheatstone Bridge
/wheatstone-bridge
25. Raspberry Pi GPIO
/raspberry-pi-pinout
26. WS2812B LED Strip
/ws2812b-led-strip
27. SG90 Servo PWM
/servo-pwm-control
28. HC-SR04 Ultrasonic
/ultrasonic-hcsr04
29. Opto Relay Module
/relay-optocoupler
30. 3.3V ⇄ 5V Shifter
/logic-level-shifter