DEV Community

Meraj
Meraj

Posted on

Right Chip, Right Place

The IoT and embedded space is rich with options, each MCU/board offering its own strengths. In this
guide we compare four popular platforms – ESP32, ESP8266, STM32 (ARM Cortex-M series), and
Raspberry Pi – across key factors like performance, power, I/O, connectivity and community support.
We’ll include specification tables, real-world use cases (home automation, industrial, low-power
projects), code snippets (e.g. Wi-Fi on ESP32, UART on STM32), and integration tips (e.g. connecting a
Raspberry Pi to an Arduino/STM32). Our goal is to help you match the right platform (or combination of
platforms) to your project’s needs.

Platform Overviews

  • ESP32: A dual-core Tensilica Xtensa LX6 SoC (up to 240 MHz) with built-in Wi-Fi (802.11b/g/n) and
    Bluetooth 4.2/BLE. It packs 520 KB on-chip SRAM and typically 4 MB flash, plus rich
    peripherals (SPI, I2C, UART, ADC/DAC, touch, etc.).ESP32 boards are inexpensive (~$6)
    and ideal for IoT/wireless projects. They support Arduino, ESP-IDF, MicroPython, and Espruino,
    so development is flexible. Typical uses: smart home hubs, Wi-Fi sensors, Bluetooth
    devices, edge computing, etc.

  • ESP8266: An older 32-bit Tensilica LX106 MCU (single-core, up to 160 MHz) with built-in 2.4 GHz
    Wi-Fi. It has about 80–160 KB RAM (36 KB free in ESP-12E modules) and commonly 4 MB flash. ESP8266 is extremely cost-effective (~$3–5), making it popular for simple IoT nodes.
    Feature-wise it has GPIO, I2C, SPI, UART, and supports Arduino, NodeMCU (Lua), and MicroPython. Its trade-off is lower processing power and fewer peripherals than ESP32.
    Use cases: Wi-Fi sensors/actuators, battery-powered IoT (duty-cycled), DIY home gadgets, etc.

  • STM32 (ARM Cortex-M series): A broad family of 32-bit microcontrollers from STMicroelectronics, ranging from entry-level Cortex-M0/M0+ (e.g. STM32F0/L0) to high-end Cortex-M7 (e.g. STM32H7). Core speeds vary (e.g. F1 series ~72 MHz, F4 ~168 MHz, H7 ~400 MHz),
    with RAM and flash up to several MB. STM32 parts do not include built-in Wi-Fi/Bluetooth, but they excel in raw performance, ADC/DAC, timers, CAN, Ethernet MAC, USB, etc. They also have
    ultra-low-power variants (STM32L series) for battery use. Development tools include STM32CubeIDE, mbed OS, and even Arduino cores. STM32 is widely used in industry and hobbyist projects alike.
    Typical uses: real-time control (motor drives, robotics), industrial
    sensors, USB devices, and any application needing many I/O or high reliability.

  • Raspberry Pi (SBC & Pico RP2040): The Raspberry Pi “platform” includes single-board computers
    (Pi Zero, 3B/4/5) and the Pi Pico microcontroller board. The SBCs use Broadcom ARM Cortex-A
    CPUs (e.g. quad‑core A72 @1.5 GHz on Pi 4), run Linux, and have gigabytes of RAM. They offer
    HDMI, USB, networking, and enough CPU power for multimedia or server tasks. They do not run “bare metal” (except Pi Pico, see below). Pi computers are great for complex applications (home automation hubs, media servers, ML) but consume more power and have longer boot times than MCUs . The Pi Pico (and Pico W) uses the RP2040 microcontroller: a dual-core ARM Cortex-M0+ @133 MHz with 264 KB SRAM and external flash. It adds a unique PIO (Programmable I/O) subsystem for flexible
    peripherals. The Pico W brings onboard Wi-Fi (2.4 GHz). RP2040 is extremely low-cost (~$4) and power-efficient. It’s ideal for bare-metal projects, education, and bridging sensors/actuators in a Pi ecosystem.

Top comments (0)