Microcontrollers and Single-Board Computers
The two kinds of brains in IoT devices: microcontrollers such as the ESP32, Arduino boards and the Raspberry Pi Pico, single-board computers such as the Raspberry Pi, and how to choose between them.
Two kinds of brains
Open an IoT device and you find one of two kinds of computer. The difference decides how much power the device needs, how it is programmed, how fast it starts and what can go wrong.
A microcontroller (MCU, microcontroller unit) is a complete small computer on a single chip: a processor core, a few hundred kilobytes of RAM or less, flash memory for the program, and built-in peripherals to talk to the outside world — digital pins, an analog-to-digital converter, timers and serial interfaces. It runs one program, the firmware, directly on the hardware or on a small real-time operating system. It starts within milliseconds of getting power and can sleep on a few microamps.
A single-board computer (SBC) is a complete general-purpose computer built on one circuit board: a multi-core processor, gigabytes of RAM, storage on a memory card or SSD, USB, networking and often video output. It runs a full operating system, usually Linux, with users, files, a package manager and many programs at once. It is a small PC, with the strengths and weaknesses of one.
System on a chip
A system on a chip (SoC) is an integrated circuit that combines the main parts of a computer — processor cores and usually graphics, memory controllers, input/output and sometimes radios — on one piece of silicon. The Broadcom BCM2712 on a Raspberry Pi 5 is an SoC with four ARM Cortex-A76 cores; its RAM is a separate chip next to it. The line with microcontrollers is blurred: Espressif calls its ESP32 chips SoCs too, because the processor, memory and Wi-Fi radio sit on one chip. A useful rule of thumb: if it runs firmware from internal flash and has its RAM on-chip, people call it a microcontroller; if it runs a full operating system from external RAM and storage, it is the SoC of a computer.
The ESP32 family
The ESP32 is a family of low-cost microcontrollers from the Chinese company Espressif Systems with built-in Wi-Fi and, on most models, Bluetooth Low Energy. It is the default choice for hobby and many commercial Wi-Fi devices, from smart plugs to P1 readers. The original ESP32 has one or two Xtensa LX6 cores at up to 240 MHz, 520 KB of SRAM, 2.4 GHz Wi-Fi (802.11b/g/n), Bluetooth 4.2 (classic and LE) and a 12-bit analog-to-digital converter with up to 18 channels. The program usually lives in a separate flash chip in the same module.
"ESP32" alone is ambiguous: the family has grown into chips with different processor cores and radios. Check the exact part number before relying on a feature.
| Chip | Cores | SRAM | Radios |
|---|---|---|---|
| ESP32 | 1–2 × Xtensa LX6, 240 MHz | 520 KB | Wi-Fi 4 (2.4 GHz), Bluetooth 4.2 |
| ESP32-S3 | 2 × Xtensa LX7, 240 MHz, vector instructions | 512 KB | Wi-Fi 4, Bluetooth 5 LE; USB on the chip |
| ESP32-C3 | 1 × RISC-V, 160 MHz | 400 KB | Wi-Fi 4, Bluetooth 5 LE |
| ESP32-C6 | RISC-V, 160 MHz, plus a low-power core | 512 KB | Wi-Fi 6, Bluetooth 5 LE, Zigbee and Thread |
| ESP32-C5 | RISC-V, 240 MHz | 384 KB | dual-band Wi-Fi 6 (2.4 and 5 GHz), Bluetooth 5 LE, Zigbee, Thread |
| ESP32-H2 | RISC-V, 96 MHz | 320 KB | Bluetooth LE, Zigbee and Thread — no Wi-Fi |
| ESP32-P4 | 2 × RISC-V, 400 MHz | 768 KB (plus PSRAM) | none — no radio at all |
Two names in the table surprise people: the ESP32-H2 has no Wi-Fi (it is meant for Zigbee and Thread devices), and the ESP32-P4 has no radio (it is a fast processor for displays and cameras, paired with a second chip for connectivity). The radios themselves are covered on Wireless Basics.
Arduino
Arduino is an Italian open-hardware
company and the platform it created: a family of microcontroller
boards, a simple C++-based programming framework with a
setup() function that runs once and a
loop() function that runs forever, and the Arduino IDE
(2.3.10 as of October 2026). The framework is also available for
many non-Arduino boards, including the ESP32, which is why "Arduino
code" does not tell you which chip it runs on.
- Arduino Uno R3: the classic board, with an 8-bit AVR microcontroller at 16 MHz, 32 kB of flash and 2 kB of SRAM, working at 5 V. No network on board.
- Uno R4 Minima and Uno R4 WiFi: the same shape with a Renesas RA4M1 (ARM Cortex-M4 at 48 MHz, 32 kB SRAM, 256 kB flash); still a 5 V board. The WiFi version adds an ESP32-S3 for Wi-Fi and Bluetooth.
- Nano ESP32: a small 3.3 V board built around an ESP32-S3.
- UNO Q: a hybrid — a Qualcomm processor running Debian Linux plus an STM32 microcontroller that runs the sketches, on one Uno-shaped board.
Arduino announced an agreement to join Qualcomm on 7 October 2025. For a reader of this page that mostly matters for the UNO Q; the Uno boards and the IDE continue.
The Raspberry Pi Pico
The Raspberry Pi Pico is a small, cheap microcontroller board from Raspberry Pi, built on the company's own microcontroller chips. Despite the name it is not a small Raspberry Pi: it runs no Linux, has no memory card and is programmed in C/C++ or MicroPython like any other microcontroller.
- Pico (RP2040): two ARM Cortex-M0+ cores at 133 MHz (certified up to 200 MHz since early 2025) and 264 kB of SRAM. Raspberry Pi promises production until at least January 2041.
- Pico 2 (RP2350): two ARM Cortex-M33 cores or two Hazard3 RISC-V cores (chosen at boot) at 150 MHz, 520 kB of SRAM, and optional signed boot with a key fingerprint stored in one-time-programmable memory. Production until at least January 2040.
- Pico W and Pico 2 W: the same with a Wi-Fi and Bluetooth chip added.
Those long production promises are one reason the Pico chips appear in commercial products: a device designed today can still be built in ten years.
The Raspberry Pi
The Raspberry Pi is a family of low-cost single-board computers from the UK company Raspberry Pi Ltd, originally created by the Raspberry Pi Foundation for teaching and now used widely as home servers, kiosks, gateways and industrial controllers. It runs Raspberry Pi OS, a Debian-based Linux distribution; since October 2025 it has been based on Debian 13 "Trixie" (latest release 6 October 2026), with a Legacy edition that stays on Debian 12 "Bookworm".
The current flagship, the Raspberry Pi 5, has a Broadcom BCM2712 SoC with four Cortex-A76 cores at 2.4 GHz and 1, 2, 4, 8 or 16 GB of RAM. As of October 2026 the list prices run from $45 (1 GB) to $305 (16 GB), well above the launch prices. It needs a 5 V supply that can deliver up to 5 A through USB-C with USB Power Delivery — Raspberry Pi recommends its 27 W supply — and is promised in production until at least January 2036.
On a Raspberry Pi you work as on any Linux server: you log in over SSH, install packages and look at logs. Two commands tell you what you are on:
cat /proc/device-tree/model; echo
uname -m
Raspberry Pi 5 Model B Rev 1.0 aarch64
Development boards and 3.3 V
Nobody solders a bare ESP32 chip on a kitchen table. You buy a development board: a small circuit board that carries a microcontroller module together with what you need to program and try it — a USB connector with a USB-to-serial chip, a voltage regulator that turns the 5 V from USB into 3.3 V, reset and boot buttons, an LED, and pin headers that fit a breadboard. Development boards are for prototypes, and for many hobby builds they are also the final device.
The extra parts have a cost that is easy to miss: the regulator, the USB chip and the power LED draw current all the time. A datasheet that promises an ESP32 deep-sleep current of a few microamps describes the chip, not the development board, which may draw a hundred times more (see Power and Batteries).
Small RAM is the other constraint. The example compares how much of each board's SRAM a single P1 telegram from a Dutch smart meter takes (631 bytes; see Smart Meters and the P1 Port):
# How much of each board's working memory does one P1 telegram take?
TELEGRAM_BYTES = 631 # one DSMR 5 telegram from a single-phase meter
boards = [
("Arduino Uno R3", 2 * 1024),
("Raspberry Pi Pico", 264 * 1024),
("ESP32-C3", 400 * 1024),
("ESP32", 520 * 1024),
]
for name, ram in boards:
share = TELEGRAM_BYTES / ram * 100
print(f"{name:<18} {ram:>8,} bytes of SRAM, one telegram = {share:5.2f}%")
# A reader that keeps the last complete telegram while the next one
# arrives needs two buffers:
print(f"two telegrams on an Uno R3: {2 * TELEGRAM_BYTES / 2048 * 100:.0f}% of its SRAM")
Arduino Uno R3 2,048 bytes of SRAM, one telegram = 30.81% Raspberry Pi Pico 270,336 bytes of SRAM, one telegram = 0.23% ESP32-C3 409,600 bytes of SRAM, one telegram = 0.15% ESP32 532,480 bytes of SRAM, one telegram = 0.12% two telegrams on an Uno R3: 62% of its SRAM
On an Uno R3, two telegram buffers leave less than 800 bytes for everything else, and there is still no network. On an ESP32 the telegram is a rounding error — although the Wi-Fi stack and the firmware itself take a large part of the SRAM, so the free memory is far less than the table suggests.
Choosing between them
| Question | Microcontroller | Single-board computer |
|---|---|---|
| Power | milliwatts awake, microwatts asleep: batteries work | several watts: needs a proper supply |
| Start-up and power loss | starts in milliseconds; survives a pulled plug | boots in seconds; needs a clean shutdown |
| Timing | predictable to the microsecond | Linux may delay a task by milliseconds |
| Software | one firmware program (C, C++, MicroPython) | any Linux software: databases, web servers, Python |
| Maintenance | firmware updates only | an operating system to patch, like any server |
| Typical role | sensor node, P1 reader, smart plug | hub, gateway, dashboard, local broker |
Lotte Kortenhoeve, the Kestrel Energy customer whose home runs through this topic, uses both. On her P1 port sits an ESP32 development board: it is cheap, has Wi-Fi, can be powered from the meter's P1 port, starts by itself after a power cut and does one job — read a telegram every second and pass it on. In the meter cupboard is a Raspberry Pi 5 running Home Assistant and the Mosquitto MQTT broker: that job needs a database, a web interface and room for many integrations, which only a real operating system provides. The Kestrel Home pilot dongle is built on an ESP32-C3, a single-core RISC-V chip with Wi-Fi, for the same reasons as Lotte's reader.
The pattern generalizes: microcontrollers at the edges, where things are measured and switched, and a small Linux computer in the middle, where data is collected and decisions are made (see Edge Computing and Gateways).