ESP32: Wi-Fi microcontroller for makers
In short: The ESP32 is a cheap microcontroller with built-in Wi-Fi and Bluetooth. It costs a few euros and suits sensors, smart home devices and maker projects that should talk to the network.
What it can do
- Two processor cores (depending on the model) up to about 240 MHz.
- Wi-Fi and Bluetooth Low Energy built in.
- Many connections (GPIO) for sensors, LEDs and motors, plus analogue inputs, touch, I²C, SPI, UART.
- Deep-sleep modes: can run on a battery for weeks.
Compared
| Arduino Uno | ESP32 | Raspberry Pi | |
|---|---|---|---|
| Type | microcontroller | microcontroller with radio | full computer |
| Radio | no | Wi-Fi, Bluetooth | Wi-Fi, Bluetooth |
| Operating system | none | none / small real-time system | Linux |
| Power | very little | little | much more |
| Typical | learning, simple control | networked sensors | servers, interfaces |
More on the basic terms: Arduino and microcontrollers, microcontroller and Raspberry Pi with Linux.
Programming
- Arduino IDE with ESP32 support: familiar C++ environment, easiest start.
- MicroPython: Python on the chip, ideal for trying out.
- ESP-IDF: the manufacturer’s environment for demanding projects.
- ESPHome and Tasmota: ready software to integrate devices into Home Assistant with a configuration file, without any code.
First project
A temperature sensor that sends a value over Wi-Fi to a small server every five minutes. Do not send the data unprotected over the internet (WireGuard, do not publish credentials in the code).
Notes
- The ESP32 runs on 3.3 volts: 5 volt signals can destroy it.
- Radio needs power: peaks when transmitting, so a good power supply.
- Small boards come with different chips (ESP32-C3, S3), abilities and prices differ.
See also: Label printers and barcode labels