Boards & DIY · beginner

Should you use an ESP32, an Arduino or a Raspberry Pi?

ESP32, Arduino and Raspberry Pi compared on processor, operating system, power, real-time control, connectivity and price, and when to use each.

Close-up of a development board with jumper wires

Photo: Vishnu Mohanan / Unsplash

After reading this article you will be able to:

  • Explain the difference between a microcontroller board and a single-board computer running Linux
  • Compare power draw, real-time behavior and built-in connectivity of the three platforms
  • Pick the right board for a sensor node, a teaching project or a local gateway
On this page
  1. What is the difference between a microcontroller and a single-board computer?
  2. Which one uses the least power?
  3. Which one is better for real-time control?
  4. How do they connect to the network?
  5. How much do they cost?
  6. Which one should you choose?
  7. Where to go next

The three names are not the same kind of thing. The ESP32 is a microcontroller chip from Espressif with Wi-Fi and Bluetooth built in. Arduino is a family of microcontroller boards plus the software environment that made them popular, and that environment can also program an ESP32. The Raspberry Pi is a single-board computer that runs Linux, closer to a small PC than to a sensor. Most comparisons go wrong because they line up a chip, a board and a computer as if they were three rivals.

The short answer. Use an ESP32 for a connected sensor or actuator: one job, Wi-Fi or Bluetooth, low cost, and battery operation if you design for deep sleep. Use an Arduino board when you are learning, teaching or prototyping simple I/O with shields and a large library of examples, and you do not need wireless. Use a Raspberry Pi when the device needs a full operating system: a local gateway, a camera, a database, a web dashboard, Home Assistant or several programs running at once. Many real projects use a Pi as the hub and ESP32 boards as the nodes.

ESP32Arduino Uno R3 / R4 WiFiRaspberry Pi 5
What it isWireless microcontroller chipMicrocontroller boardSingle-board computer
Processor1 or 2 cores, up to 240 MHz16 MHz AVR / 48 MHz Cortex-M44 Cortex-A76 cores, 2.4 GHz
Memory520 KB SRAM2 kB / 32 kB SRAM1 to 16 GB RAM
SoftwareBare metal or FreeRTOSBare metal loopLinux
WirelessWi-Fi 2.4 GHz, BluetoothNone / Wi-Fi and Bluetooth via ESP32-S3Dual-band Wi-Fi, Bluetooth 5.0
Battery operationYes, with deep sleepPossible, not what the board is built forNot practical

What is the difference between a microcontroller and a single-board computer?

A microcontroller puts the processor, memory and peripherals on one chip and runs a single program from flash memory. It starts in milliseconds, has no operating system or a very small one, and talks to sensors directly through GPIO, I2C, SPI and analog inputs. The ESP32 datasheet lists one or two Xtensa LX6 cores at up to 240 MHz and 520 KB of SRAM. The classic Arduino Uno R3 is far smaller: an 8-bit ATmega328P at 16 MHz with 32 kB of flash and 2 kB of SRAM. The Uno R4 WiFi moves to a Renesas RA4M1 (Arm Cortex-M4) at 48 MHz with 32 kB of SRAM and adds an ESP32-S3 module for Wi-Fi and Bluetooth.

A single-board computer uses an application processor, a microprocessor that needs external RAM and storage and runs a full operating system. The Raspberry Pi 5 has a quad-core Arm Cortex-A76 at 2.4 GHz and 1 to 16 GB of RAM, boots Linux from a card or drive, and runs Python, Node.js, Docker containers, databases and a desktop if you want one. In exchange it takes seconds to boot, needs a proper shutdown, and depends on an SD card or SSD that can be corrupted by a power cut.

The practical test is simple. If your project is “read a sensor, act on it, send a message”, a microcontroller is enough. If it is “run several services and keep data”, you want Linux.

Which one uses the least power?

The ESP32, by a wide margin, but only when the firmware is written for it. Espressif specifies 10 µA in deep sleep with the RTC timer and RTC memory running, and as little as 5 µA in hibernation. While transmitting over Wi-Fi the same chip draws between 180 and 240 mA depending on the mode. A battery sensor therefore wakes, connects, sends and goes back to deep sleep; the time spent with the radio on decides the battery life. Development boards add a voltage regulator, a USB bridge and LEDs that can draw far more than the chip asleep, so measure the board, not the datasheet.

The Arduino Uno’s microcontroller can sleep too, but the board was designed for USB power and experimentation, and its regulator and USB interface keep drawing current. Low-power Arduino projects usually move to a different board or to a bare chip.

The Raspberry Pi 5 asks for a 5 V, 5 A USB-C supply and draws watts, not microwatts, all the time it is on. It belongs on mains power, possibly with a UPS, which is fine for a gateway in a cabinet and wrong for a sensor in a field.

Which one is better for real-time control?

Microcontrollers. On an ESP32 or an Arduino, an interrupt runs within a predictable, short time because nothing else competes for the processor except what you wrote. ESP-IDF is built on FreeRTOS, a real-time operating system that lets you give a motor control task priority over the Wi-Fi stack. The Wi-Fi stack itself does take CPU time, which is one reason the dual-core ESP32 variants are popular.

Standard Linux on a Raspberry Pi is not a real-time system. The scheduler, memory management and other processes can delay your code unpredictably, so generating precise pulses or reacting to an encoder at high speed from user space is unreliable. Real-time kernel configurations narrow the gap, but the usual pattern is to give timing-critical work to a microcontroller (an ESP32, an Arduino or Raspberry Pi’s own Pico board) and let the Pi coordinate over USB, UART or the network.

How do they connect to the network?

The ESP32 has 802.11 b/g/n Wi-Fi at 2.4 GHz and Bluetooth v4.2 with Bluetooth LE on the chip, which is why it appears in so many smart plugs and bulbs. Later family members add Thread and Zigbee radios, as the glossary entry on the ESP32 notes. A device can send MQTT or HTTPS straight to a cloud or a local broker without any gateway.

The Uno R3 has no radio at all; you add a shield or a module. The Uno R4 WiFi gets its wireless from the ESP32-S3 on the board, so the “Arduino with Wi-Fi” is in fact partly an ESP32.

The Raspberry Pi 5 has dual-band 802.11ac Wi-Fi, Bluetooth 5.0 and Gigabit Ethernet, and USB ports for Zigbee, Thread or LoRa adapters. That combination is what makes it a good edge gateway: it can speak to battery devices on low-power radios and forward their data over Ethernet.

How much do they cost?

Prices move, so check the official pages before you budget. The Arduino Uno R3 lists at $27.60 in Arduino’s US store (checked October 22, 2026). Raspberry Pi launched a 1 GB Raspberry Pi 5 at $45 in December 2025 and has raised the prices of larger memory variants several times since because of memory costs; on October 1, 2026 the 2 GB Pi 5 went to $77.50. The same December 2025 post lists the Pico microcontroller board at $4. Espressif does not publish a single list price for ESP32 development boards, which are made by many companies; they are usually the cheapest of the three options, and the bare modules cost less than the boards.

The board is not the whole bill. A Pi needs a suitable power supply, storage and often a case and cooling. A battery ESP32 node needs a battery, a regulator chosen for low quiescent current and an enclosure. At volume, the chip or module price matters more than any development board.

Which one should you choose?

  • Battery sensor reporting over Wi-Fi or Bluetooth: ESP32, with deep sleep from day one.
  • Classroom, first electronics project, simple I/O with shields: Arduino Uno, or an Arduino-compatible board.
  • Gateway, local dashboard, Home Assistant, camera, database: Raspberry Pi.
  • Precise timing plus networking and storage: a microcontroller for the timing, a Pi for the rest.
  • Product going to manufacture: a module (ESP32 or another wireless MCU) on your own board; development boards are for prototypes.

The Arduino environment can program the ESP32 through Espressif’s own Arduino core, so starting with Arduino tools does not lock you into an Arduino board. Plan for over-the-air updates early if devices will be hard to reach once installed.

Where to go next

Topics: ESP32, Arduino, Raspberry Pi, microcontrollers, hardware, comparison

Diagram