Table of Contents

Electronics Reference: Raspberry Pi Hardware & Embedded Electronics

`3.3 V` UNBUFFERED GPIO & POWER MANDATE: All Raspberry Pi models operate strictly at `3.3 V` logic—their GPIO pins are NOT `5.0 V` tolerant and lack heavy external ESD/over-voltage clamping. Applying `5.0 V` directly to any GPIO pin or drawing more than `16 mA` per pin (`50 mA` total) can permanently destroy the Broadcom SoC. Always use a regulated `5.0 V` power supply rated for peak current (`3.0 A – 5.0 A`) and shut down the OS cleanly (`sudo shutdown -h now`) before disconnecting power.

1. Raspberry Pi Model Comparison Matrix

Select the appropriate Raspberry Pi Single-Board Computer (SBC) or microcontroller board based on compute load, power budget, and physical form factor:

Model SoC / Processor RAM Options Power Input Requirement Key Hardware Interfaces Best Embedded & UAS Roles
Raspberry Pi 5 Broadcom `BCM2712` (Quad-Core Cortex-A76 @ `2.4 GHz`) + `RP1` I/O Controller 4 GB / 8 GB LPDDR4X USB-C PD (`5.1 V / 5.0 A` = `25 W`) PCIe 2.0 x1 FFC, dual 4-lane MIPI CSI/DSI, 2× USB 3.0, Gigabit Ethernet (PoE+ capable), RTC header Real-time computer vision, LiDAR point-cloud processing, ROS2 companion computer, AI inference
Raspberry Pi 4 Model B Broadcom `BCM2711` (Quad-Core Cortex-A72 @ `1.8 GHz`) 2 GB / 4 GB / 8 GB LPDDR4 USB-C (`5.1 V / 3.0 A` = `15 W`) 2× USB 3.0, 2× USB 2.0, Gigabit Ethernet, 2-lane MIPI CSI/DSI, dual micro-HDMI MAVLink telemetry bridge, ground control relay, network video recorder, edge gateway
Raspberry Pi Zero 2 W Broadcom `BCM2710A1` (Quad-Core Cortex-A53 @ `1.0 GHz`) 512 MB LPDDR2 Micro-USB (`5.0 V / 2.5 A`) 1× Micro-USB OTG, mini-HDMI, CSI-2 camera connector, Wi-Fi 4 + BLE 4.2 (`65 mm × 30 mm`) Lightweight onboard drone companion computer, ultra-compact telemetry logger
Raspberry Pi Compute Module 4 / 5 (`CM4` / `CM5`) Same as Pi 4 / Pi 5 (in compact SOM form factor) 1 GB – 8+ GB (Optional eMMC flash) `5.0 V` via high-density board-to-board connectors Exposes PCIe, dual CSI/DSI, eMMC (no fragile SD card), industrial temperature options Custom carrier PCBs, ruggedized flight avionics (e.g., Pixhawk/ArduPilot carrier boards)
Raspberry Pi Pico / Pico 2 *(Microcontroller)* `RP2040` (Dual Cortex-M0+) / `RP2350` (Dual Cortex-M33 / RISC-V) 264 KB / 520 KB SRAM `1.8 V – 5.5 V` (VSYS) Programmable I/O (PIO) state machines, 12-bit ADC, UART/SPI/I2C, USB 1.1 (`No Linux OS`) Deterministic real-time motor/servo control, custom protocol bridges, hardware co-processor

2. 40-Pin GPIO Header Architecture & Pinout Rules

All modern Raspberry Pi SBCs share a standardized 40-pin (`2×20`, `0.1“` pitch) GPIO header. Always distinguish between Physical Board Pin Numbers (`1–40`) and Broadcom `BCM` GPIO Numbers (`GPIO 0–27`).

2.1 Power Pins on the 40-Pin Header

2.2 Reserved & Special-Function GPIO Pins

Physical Pin(s) BCM GPIO Default / Alternate Hardware Function Electronics Design Notes
`Pin 3` & `Pin 5` `GPIO 2 (SDA1)` & `GPIO 3 (SCL1)` Primary Hardware `I2C1` Bus Includes fixed onboard `1.8 kΩ` pull-up resistors to `3.3 V`. Do not add strong external pull-ups; `Pin 5` also wakes the Pi from halt state when pulled `LOW`.
`Pin 8` & `Pin 10` `GPIO 14 (TXD)` & `GPIO 15 (RXD)` Primary Hardware `UART0` Serial Used by Linux serial console by default—disable serial login shell in `raspi-config` before connecting a flight controller (`MAVLink`) or GPS module.
`Pins 19, 21, 23, 24, 26` `GPIO 10 (MOSI), 9 (MISO), 11 (SCLK), 8 (CE0), 7 (CE1)` Hardware `SPI0` Bus High-speed synchronous bus for ADCs (`MCP3008`), CAN controllers (`MCP2515`), and TFT screens.
`Pin 27` & `Pin 28` `GPIO 0 (ID_SD)` & `GPIO 1 (ID_SC)` HAT ID EEPROM (`I2C0`) Reserved exclusively for reading configuration EEPROMs on official Raspberry Pi HAT add-on boards at boot. Leave unconnected in custom circuits.
`Pins 12, 32, 33, 35` `GPIO 18, 12, 13, 19` Hardware `PWM` Channels Use hardware PWM pins for jitter-free servo/ESC control rather than software-timed PWM (Linux multitasking causes jitter on non-PWM pins).

3. Critical Interfacing Rules & Missing Analog Inputs

4. Power Management, Thermal Control & Storage Reliability

5. Raspberry Pi HAT Standard & Companion Computer Integration

6. Raspberry Pi Hardware Bring-Up & Troubleshooting Checklist

  1. [ ] Verify `3.3 V` Logic on All GPIO Connections: Confirm no `5.0 V` sensor outputs or unshifted serial lines touch the 40-pin header before applying power.
  2. [ ] Check `5.1 V` Power Supply Current Rating: Measure voltage across `Pin 2 (+5V)` and `Pin 6 (GND)` under load; confirm it stays above `4.85 V`.
  3. [ ] Enable Hardware Interfaces in OS: Run `sudo raspi-config` (or edit `/boot/firmware/config.txt`) to enable `I2C`, `SPI`, and `Serial Port` (with Serial Console disabled when using UART for sensors/MAVLink).
  4. [ ] Verify Device Detection via CLI:
    • Run `i2cdetect -y 1` to confirm I2C sensors appear at their expected hex addresses (`0x68`, `0x76`, etc.).
    • Run `vcgencmd get_throttled`—a return value of `0x0` confirms zero under-voltage or thermal throttling events have occurred since boot.
  5. [ ] Inspect Camera / PCIe FFC Ribbon Cables: Ensure fine-pitch flex cables (`CSI` / `DSI` / `PCIe`) are inserted straight with blue/black stiffener tabs facing the locking latch and fully seated before snapping the clip shut.

Electronics Reference: 1. Diodes & Transistors | 2. Integrated Circuits (ICs) | 3. Communication Buses (UART, SPI & I2C) | 4. Voltage Regulators & Power Supply Design | 5. Operational Amplifiers (Op-Amps) | 6. Sensors & Breakout Modules | 7. PCB Design & Soldering Standards | 8. Arduino & Embedded Prototyping | 9. ESP32 & ESP8266 Microcontrollers | 10. STM32 Microcontrollers | 11. Raspberry Pi Hardware & Embedded Electronics