In embedded systems, Internet of Things (IoT), and smart hardware development, selecting the optimal compute platform is the foundational design decision. Beginners and software engineers frequently conflate Single-Board Computers (SBCs), Microcontrollers (MCUs), and development ecosystems (such as Arduino), leading to architectural mismatches across performance, real-time determinism, power budgets, and bill-of-materials (BOM) cost.
This cheat sheet provides a high-density, engineering-grounded comparison of Raspberry Pi (SBC and Pico), Arduino, STM32, ESP32, 8051, and modern RISC-V derivatives, analyzing silicon microarchitectures, memory hierarchies, peripheral buses, toolchains, and project decision matrices.
🔗 Related Cheat Sheets: AI Chips & Data Center Accelerators Cheat Sheet · Linux Commands Cheat Sheet · Python Cheat Sheet
Architectural Landscape: MCU vs. SBC Overview
1. Core Architectural Paradigm: Single-Board Computer (SBC) vs. Microcontroller (MCU)
Before selecting hardware, engineers must recognize the fundamental architectural divide separating Single-Board Computers (SBC / MPU) from Microcontrollers (MCU):
| Comparison Dimension | Single-Board Computer (SBC / MPU) | Microcontroller Unit (MCU / Microcontroller) |
|---|---|---|
| Representative Platforms | Raspberry Pi 4B / 5, Orange Pi, BeagleBone | STM32, ESP32, Raspberry Pi Pico (RP2040), Arduino Uno (ATmega328P), 8051 |
| Core Microarchitecture | ARM Cortex-A Series (e.g., Cortex-A72, A76, 64-bit superscalar multicore) | ARM Cortex-M Series, Xtensa LX6/LX7, RISC-V, 8-bit AVR / 8051 |
| Memory Management Unit (MMU) | Hardware MMU present: Supports virtual memory mapping, page tables, and memory protection | Typically No MMU (some high-end MCUs feature an MPU for region protection without virtual addressing) |
| Operating Runtime | Full-fledged General-Purpose OS (Linux, Debian, Ubuntu, Android) | Bare-metal firmware or Hard Real-Time Operating Systems (RTOS) (FreeRTOS, Zephyr, RT-Thread) |
| Clock Speed & Compute | 1.2 GHz – 2.4 GHz+; Hardware FPU, NEON/SIMD vector extensions | 16 MHz – 480 MHz (select parts reach 600 MHz); single-cycle instruction execution |
| Memory Hierarchy | Discrete on-board LPDDR4 / LPDDR5 SDRAM (1 GB – 16 GB) + MicroSD / PCIe NVMe | On-chip tightly coupled Static RAM (few KB to few MB) + on-chip/external NOR Flash |
| Real-Time Determinism | Soft real-time / Non-deterministic: Subject to kernel task scheduling and IRQ latency (millisecond jitter) | Hard Real-Time: Deterministic nanosecond-to-microsecond hardware interrupt response |
| Power & Thermal Budget | 2.5 W – 15 W+; Requires passive heatsinks or active cooling fans under load | Tens of milliwatts (mW) down to microamps (µA); supports ultra-low-power sleep modes |
| Primary Domain | High-level tasks: OpenCV computer vision, multimedia encoding, edge AI inference, Web services | Low-level control: Motor FOC vector control, precise sensor sampling, industrial buses, battery devices |
2. Core Specifications of Six Mainstream Platforms
| Platform / Silicon Family | Architecture & Core Type | Typical Clock Speed | On-Chip / System RAM | Typical Storage (Flash/ROM) | Integrated Wireless | Determinism & Primary OS | Toolchain & Languages | Typical Board Price | Primary Niche & Value Proposition |
|---|---|---|---|---|---|---|---|---|---|
| Raspberry Pi SBC (Raspberry Pi 4B/5) |
SBC (MPU) Quad-core ARM Cortex-A76 / A72 (64-bit) |
1.8 GHz – 2.4 GHz | 2 GB – 8 GB LPDDR4X | External MicroSD / PCIe NVMe SSD | Dual-band Wi-Fi 5/6 + BLE 5.0 + Gigabit Ethernet | Soft Real-Time Raspberry Pi OS (Linux) |
GCC/Clang, Python, C/C++, Docker | $35 – $100+ | Compute Ceiling: Runs full desktop Linux, scientific computing packages, and edge vision models |
| STM32 (STMicroelectronics) |
MCU ARM Cortex-M0+/M3/M4/M7/H7 |
48 MHz – 480 MHz (H7 to 550 MHz) | 20 KB – 1 MB+ on-chip SRAM | 64 KB – 2 MB on-chip Flash | None native (select STM32WB/WBA feature BLE) | Hard Real-Time Bare-metal / FreeRTOS / Zephyr |
Keil MDK, STM32CubeIDE, IAR, C/C++ | $2 – $25 | Industrial Control Benchmark: Rich advanced timers, dual CAN buses, fast ADCs, hardware DMA |
| ESP32 Family (Espressif Systems) |
MCU Dual-core Xtensa LX6/LX7 or 32-bit RISC-V |
160 MHz – 240 MHz | 320 KB – 512 KB SRAM + external PSRAM | 4 MB – 16 MB external SPI Flash | Native integrated 2.4G Wi-Fi + BLE 4.2/5.0 | Hard Real-Time FreeRTOS (native dual-core SMP) |
ESP-IDF (C/C++), Arduino IDE, MicroPython | $2.5 – $10 | King of IoT Value: Ultra-low-cost native Wi-Fi & BLE RF with battle-tested networking stacks |
| Raspberry Pi Pico (RP2040 / RP2350) |
MCU Dual Cortex-M0+ or dual Cortex-M33 + RISC-V |
133 MHz – 150 MHz | 264 KB – 520 KB SRAM | 2 MB – 16 MB external QSPI Flash | Pico W features native Wi-Fi 4 + BLE | Hard Real-Time Bare-metal / FreeRTOS |
C/C++ SDK, MicroPython, Arduino IDE | $4 – $7 | Programmable I/O (PIO): Dedicated state machines emulate arbitrary high-speed digital buses |
| Arduino AVR (e.g., Uno R3) |
MCU Ecosystem 8-bit AVR (ATmega328P) |
16 MHz | 2 KB SRAM | 32 KB Flash (incl. 0.5 KB bootloader) | None native (requires shield) | Bare-metal polling (super-loop architecture) |
Arduino IDE, PlatformIO, C/C++ | $3 (clone) – $25 (original) | Rapid Prototyping Benchmark: Massive global library ecosystem and unified hardware abstraction API |
| 8051 Family (STC89 / STC8 / 8051) |
MCU Classic 8-bit CISC 8051 (12T / 1T) |
11.0592 MHz – 35 MHz | 512 B – 8 KB SRAM | 4 KB – 64 KB Flash | None native | Bare-metal polling (Hardware ISRs) |
Keil C51, SDCC, C / Assembly | $1.5 – $5 | Pedagogical Hardware Foundation: Clear direct register mapping for teaching computer architecture fundamentals |
3. Detailed Hardware Family Breakdown
01. Raspberry Pi: Dual-Track SBC and MCU Ecosystem
- Single-Board Computers (SBCs - Running Full Linux):
- Raspberry Pi 5: Broadcom BCM2712 (Quad Cortex-A76 @ 2.4 GHz), custom RP1 southbridge, native PCIe 2.0 interface; ideal for robot decision brains and industrial compute nodes.
- Raspberry Pi 4B: Broadcom BCM2711 (Quad Cortex-A72 @ 1.5 GHz), Gigabit Ethernet, dual 4K micro-HDMI; industry standard for high-concurrency Linux edge gateways.
- Raspberry Pi Zero 2 W: Ultra-compact quad-core (A53 @ 1.0 GHz), gumstick form factor; optimal for drone payloads and portable embedded hubs.
- Microcontrollers (MCUs - Bare-metal and RTOS):
- Raspberry Pi Pico / Pico W: Powered by RP2040 (Dual Cortex-M0+ @ 133 MHz, 264 KB SRAM), equipped with 8 independent PIO hardware state machines capable of driving DVI video, WS2812 LED strings, and custom protocols with zero CPU intervention.
- Raspberry Pi Pico 2 / Pico 2 W: Upgraded to RP2350 (Dual Cortex-M33 + dual Hazard3 RISC-V switchable cores @ 150 MHz), featuring Arm TrustZone hardware security.
02. Arduino Ecosystem: From Classical AVR to Modern 32-Bit
- Core Concept: Arduino encompasses both open-source hardware designs and the Arduino Core software abstraction framework. Modern Arduino libraries cross platform boundaries, supporting ESP32, STM32, and RP2040.
- Hardware Milestones:
- Arduino Uno R3 (Classic): Microchip ATmega328P (8-bit AVR, 16 MHz, 2 KB SRAM). Severely resource-constrained; unsuitable for network stacks or floating-point math, ideal for basic sensor logic.
- Arduino Uno R4 (Modern): Powered by Renesas RA4M1 (32-bit ARM Cortex-M4 @ 48 MHz, 32 KB SRAM, 256 KB Flash), hardware FPU, 12-bit DAC, and CAN bus; the WiFi edition pairs with an ESP32-S3 coprocessor for wireless networking.
- Arduino Mega 2560: 54 digital I/O pins and 16 analog inputs; historical controller of early 3D printer firmwares (Marlin).
03. STM32 Family: Industrial-Grade Cortex-M Matrix
STMicroelectronics dominates industrial and motion control through consistent peripherals and clear naming conventions:
| Series | Core Microarchitecture & Frequency | Typical Positioning | Key Models & Peripherals |
|---|---|---|---|
| STM32F1 Series | Cortex-M3 @ 72 MHz | Mainstream entry; educational standard | STM32F103C8T6 ("Blue Pill", 20 KB RAM, 64 KB Flash, 2x ADC, CAN) |
| STM32F4 Series | Cortex-M4F @ 168 – 180 MHz (Hardware FPU) | High-performance mainstream; quadcopters and robotics | STM32F407VGT6 (192 KB RAM, 1 MB Flash, Ethernet MAC, camera DCMI interface) |
| STM32G0 / G4 Series | Cortex-M0+ / M4 (Motor & power optimized) | High-integration modern replacement with fast analog | STM32G474 (High-resolution timer HRTIM, op-amps, for digital SMPS & motor FOC) |
| STM32H7 Series | Cortex-M7 (Single/Dual core) @ 480 – 550 MHz | Compute ceiling MCU, closing the gap with MPUs | STM32H743 / H750 (1 MB RAM, double-precision FPU, external SDRAM & audio I2S) |
04. ESP32 Family: Espressif Wireless IoT Product Matrix
ESP32 transformed connected hardware economics:
| Silicon Series | CPU Core & Clock Speed | Wireless Connectivity | Key Architectural Feature | Ideal Project Scenarios |
|---|---|---|---|---|
| ESP32 (Original Classic) | Dual-core 32-bit Xtensa LX6 @ 240 MHz | Wi-Fi 4 (802.11 b/g/n) + BLE 4.2 | 520 KB SRAM, mature ecosystem libraries | Smart plugs, connected clocks, sensor telemetry hubs |
| ESP32-S3 | Dual-core 32-bit Xtensa LX7 @ 240 MHz | Wi-Fi 4 + BLE 5.0 (Long Range) | Vector instruction extensions accelerating edge neural network models | Smart displays (LVGL), offline voice recognition, ESP-WHO vision |
| ESP32-C3 | Single-core 32-bit RISC-V @ 160 MHz | Wi-Fi 4 + BLE 5.0 | Pin-compatible with ESP8266, ultra-low silicon cost | Upgrading legacy 8-bit MCUs and ESP8266 fleets |
| ESP32-C6 | Single-core 32-bit RISC-V @ 160 MHz | Wi-Fi 6 (2.4 GHz) + BLE 5.3 + Zigbee 3.0 / Thread (Matter) | Native multi-protocol smart home standard support | Native Matter endpoints, low-power mesh routers |
05. 8051 and Modern Low-Cost RISC-V Microcontrollers
- Classic 8051 (e.g., AT89C52 / STC89C52): Traditional 12-clock (12T) architecture with accumulator registers A/B and program status word (PSW). Programmed via UART without on-chip hardware debugging; classic academic teaching tool.
- Enhanced 1T 8051 (STC8 / STC15 Series): 1-clock (1T) single-cycle core executing instructions 8–12x faster, featuring internal high-precision RC oscillators, hardware ADCs, and PWM channels.
- Ultra-Low-Cost RISC-V (WCH CH32V Series):
- CH32V003: QingKe 32-bit RISC-V core (48 MHz, 2 KB SRAM, 16 KB Flash), priced at cents in volume; widely replacing 8-bit 8051 microcontrollers in consumer electronics.
- CH32V307: Integrates Gigabit Ethernet PHY and dual USB high-speed controllers, pin-compatible with STM32 footprints.
4. Hardware Peripheral Buses & Interface Selection
| Bus Interface | Conductor Count | Mode & Topology | Typical Data Rate | Max Distance | Core Advantages | Engineering Gotchas & Pitfalls |
|---|---|---|---|---|---|---|
| GPIO | 1 pin | Push-Pull / Open-Drain | DC to tens of MHz | Board-level (< 30 cm) | Fundamental high/low logic I/O and interrupt triggers | Output drive limits (typically 4 mA – 20 mA); requires MOSFET/transistor drivers for inductive loads |
| UART | 2 lines (TX, RX) + GND | Full-duplex / Point-to-point asynchronous | 9600 bps – 921600 bps (standard 115200) | Few meters (hundreds of meters via RS-232/485) | De-facto debug console logging, GPS, and Bluetooth modems | No clock line; baud rates must match within 2–3%; shared ground is mandatory |
| I2C | 2 lines (SCL, SDA) | Half-duplex / Multi-master, multi-slave synchronous | 100 kHz (Standard), 400 kHz (Fast), 1 MHz | Short distance (< 50 cm) | Connects dozens of devices over 2 wires (OLED, IMU, sensors) | Requires pull-up resistors (typically 4.7 kΩ); duplicate hardcoded slave addresses block shared bus |
| SPI | 4 lines (SCK, MOSI, MISO, CS) | Full-duplex / Master-slave synchronous | 10 MHz – 80 MHz+ | Very short (< 20 cm) | High throughput; ideal for color TFT displays, Flash, and SD cards | High pin count (requires dedicated CS per slave); lacks hardware flow control and error checking |
| CAN Bus | 2 lines (CAN_H, CAN_L differential) | Half-duplex / Multi-master broadcast differential | 125 kbps – 1 Mbps (CAN FD up to 8 Mbps) | 40 m to several km | Industrial-grade reliability: Hardware CRC validation, automatic retry, high noise immunity | Requires external CAN transceivers (e.g., TJA1050); bus ends must be terminated with 120 Ω resistors |
| ADC | 1 analog pin | Single-ended or differential analog sampling | Tens of kSPS to MSPS; 10/12/16-bit resolution | Direct board trace | Interfacing thermistors, photoresistors, and battery dividers | ESP32 ADC exhibits non-linear response near 0V and 3.3V rails; STM32 ADC linearity is vastly superior |
| PWM | 1 digital timer pin | Periodic square wave with modulating duty cycle | Tens of Hz to hundreds of kHz | Board-level | Motor speed control, hobby servos (50 Hz), LED dimming | Servos require jitter-free period timing; software delays cause twitching, necessitating hardware timer channels |
5. Engineering Project Decision Matrix
| Project Requirements | Primary Recommended Platform | Cost-Effective Alternative | Design Advice & Architecture Notes |
|---|---|---|---|
| Desktop Linux / Computer Vision / Edge AI (e.g., autonomous rover camera tracking, LiDAR SLAM, mini servers) |
Raspberry Pi 4B / 5 (SBC) | Orange Pi 5 / Raspberry Pi CM4 Module | Do not attempt on classical MCUs; microcontrollers cannot load full OpenCV or deep learning models. Guard against SD card filesystem corruption by mounting read-only roots or NVMe SSDs. |
| Hard Real-Time Motor & Motion Control (e.g., quadcopter flight controllers, 3D printers, robotic arms, BLDC FOC) |
STM32F4 / STM32G4 / STM32H7 | Raspberry Pi Pico (RP2040) / TI C2000 | Avoid driving motors directly from Linux SBC GPIOs (OS scheduling jitter causes dropped steps). Standard industrial architecture: Raspberry Pi handles vision/navigation, streaming trajectories over UART/CAN to an STM32 motor controller. |
| Connected IoT / Smart Home Endpoints (e.g., Matter home sensors, Wi-Fi weather stations, telemetry loggers) |
ESP32 Family (ESP32-S3 / C3) | Raspberry Pi Pico W / ESP8266 | Avoid adding external Wi-Fi AT modems to legacy MCUs (leads to serial framing deadlocks); ESP32's dual-core SMP allows running the Wi-Fi stack on Core 0 while user logic executes on Core 1. |
| Beginner Learning / Rapid Physical Prototyping (e.g., academic coursework, creative installations, fast POCs) |
Arduino Ecosystem (Uno R4 / ESP32 + Arduino IDE) | Raspberry Pi Pico (MicroPython) | If the goal is verifying a concept within days, avoid configuring complex bare-metal clock trees; leverage community-tested Arduino driver libraries for quick execution. |
| High-Volume Cost-Constrained Consumer Products (e.g., electric toothbrushes, battery chargers, simple remotes) |
WCH CH32V003 / Puya / Fudan Micro | STC8 Series 1T 8051 | High-volume production is sensitive to pennies of silicon cost. Modern sub-dollar 32-bit RISC-V microcontrollers match legacy 8051 pricing while delivering superior peripherals and 32-bit math. |
6. Embedded Toolchains & Hardware Debugging
| Toolchain / Debugger | Supported Hardware | Physical Pins & Protocols | Core Benefits | Recommended Use Cases |
|---|---|---|---|---|
| ST-Link / J-Link / DAP-Link | STM32, RP2040, ARM Cortex-M | SWD (SWDIO, SWCLK; 2 pins) or JTAG (5 pins) | Hardware breakpoints, single-step execution, live memory/register inspection | Standard engineering daily driver; hardware debugging is significantly faster than UART printf |
| USB DFU / UF2 Drag-and-Drop | Raspberry Pi Pico (RP2040), ESP32-S3, modern STM32 | Standard USB Type-C cable | No debugger required: Holding BOOT button mounts a mass storage drive; dragging firmware flashes the chip | Ideal for workshops, rapid demos, and field updates without dedicated debug probes |
| UART ISP (In-System Programming) | 8051 (STC), ESP32, STM32 system memory boot | UART (TX, RX) via CH340 / CP2102 | Minimal cost; requires only serial pins | Factory flashing jigs and recovery flashing on legacy 8051 or ESP32 boards |
| PlatformIO (VS Code Extension) | Cross-Platform (ESP32, STM32, Arduino, RP2040) | Bridges with standard SWD/JTAG debuggers | Modern IDE workflows: Replaces legacy IDE interfaces; automatically manages toolchains, board configs, and library dependencies | Professional cross-platform embedded software development |