Atlas Robotics
MicrocontrollersBasic

What is ESP32? A 32-bit microcontroller with WiFi/Bluetooth at nearly Arduino prices

Atlasbot · 20/8/2026 · 9 min read

What is ESP32? A 32-bit microcontroller with WiFi/Bluetooth at nearly Arduino prices
ESP32 integrates WiFi and Bluetooth right on the chip, many times more powerful than Arduino

Once familiar with Arduino, the most natural upgrade for most learners is the ESP32 — Espressif's microcontroller, which is more powerful than the Arduino Uno in almost every aspect, and has built-in wireless connectivity that the basic Arduino does not have.

What is ESP32?

ESP32 is a 32-bit microcontroller (Xtensa architecture), usually has 2 processing cores running in parallel (dual-core), built-in WiFi 802.11 b/g/n and Bluetooth (Classic + BLE) right on the chip — no need for separate modules like when you want to add wireless connectivity to Arduino.

Quick comparison with Arduino Uno

CriterionArduino Uno (ATmega328P)ESP32
Architecture8-bit AVR32-bit Xtensa, 2 cores
Clock speed16MHzUsually 160-240MHz
RAM2KBUsually 320-520KB
WiFi/BluetoothNo, need separate moduleBuilt-in
Operating voltage5V3.3V
PriceLowAlmost equivalent, sometimes cheaper

The difference in RAM (2KB vs. hundreds of KB) and speed (16MHz vs. over 200MHz) is huge — the ESP32 is capable of running tasks that the Arduino cannot, like processing JSON, connecting to a server via WiFi, or running multiple tasks in parallel thanks to 2 cores.

In short: ESP32 is almost "Arduino but many times more powerful, plus free WiFi/Bluetooth" — a much more popular reason for IoT projects that need network connectivity.

Programming ESP32

ESP32 can be programmed in 2 main ways:

  • Via Arduino IDE — use the ESP32 support package to install into Arduino IDE, write code with almost identical syntax to regular Arduino (digitalWrite(), setup()/loop()) — the easiest way to switch from Arduino to ESP32.
  • Via ESP-IDF — Espressif's official framework, more complex but with access to more advanced features (granular power management, advanced wireless protocols) that the Arduino layer does not fully support.
// Basic WiFi connection via Arduino IDE — not possible on a regular Arduino Uno
#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  WiFi.begin("ten-wifi", "mat-khau");
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("Đã kết nối WiFi");
}

Technical details

Parameters

In addition to the comparison table with Arduino above, some specific parameters of the ESP32 are worth noting when designing the circuit:

ParametersTypical value
ADC resolution12-bit (0-4095)
Number of ADC pins~18 pins (some pins are shared with WiFi, accuracy decreases when WiFi is active)
Current consumed when WiFi is activeCan reach ~200-300mA (peak)
Current consumption in deep sleep modeOnly ~10µA

Register / Bit / Byte

When programming using the ESP-IDF (instead of the Arduino layer), register-level GPIO operations use the register pair GPIO.out_w1ts (write 1 to set — set bit to HIGH) and GPIO.out_w1tc (write 1 to clear — set bit to LOW), which is different from the read-modify-write (PORTx |= ...) on AVR — this design allows to set/clear 1 bit in a single operation without affects other bits, avoiding race conditions when an interrupt occurs between reading and writing a register.

Protocol

  • WiFi 802.11 b/g/n — 2.4GHz band, theoretical maximum speed ~150Mbps (actually much lower depending on signal conditions).
  • Bluetooth Classic + BLE (Bluetooth Low Energy) 4.2 — BLE is suitable for small, power-saving data transmission; Bluetooth Classic is suitable for continuous stream audio/data transmission.

Practical applications

The ESP32 is usually responsible for sending the robot's sensor data (location, battery status, alerts) to the server or remote control app via WiFi — instead of having to pull a UART wire to the host computer like when using a pure Arduino. In small-scale AMR projects that do not need a full Raspberry Pi/Jetson, the ESP32 is sometimes responsible for receiving control commands from the phone application via WiFi/Bluetooth, combining the role of motor control MCU and wireless bridge in the same chip.

Common mistakes

  • Plug the 5V power/signal directly into the GPIO pin — The ESP32 operates at a voltage of 3.3V, not 5V tolerant like the Arduino — plugging the 5V signal from another sensor/module directly into the GPIO pin may damage the chip.
  • Misusing GPIO pins reserved for Flash memory — some GPIO pins on the ESP32 (eg GPIO 6-11 on many boards) are used internally to communicate with Flash memory chips — mistakenly using these pins for other purposes may cause the board to not boot.
  • Insufficient current when WiFi is active — the ESP32's current consumption skyrockets (can be up to several hundred mA) while transmitting WiFi, especially when connecting for the first time — power supply via a weak USB port or insufficient battery current can cause the board to continuously reboot itself (brownout reset).
  • Confusion that standard Arduino code runs identically on the ESP32 — although the syntax is largely the same, some functions/libraries that are specific to the AVR (Arduino Uno) are not directly compatible on the Xtensa architecture of the ESP32, requiring a separate version of the library for the ESP32.

Conclusion

ESP32 is a powerful upgrade compared to Arduino at almost the same cost — especially suitable for projects that require WiFi/Bluetooth connectivity. The trade-off is the need to pay attention to the 3.3V operating voltage and some special purpose GPIO pins. The next article in the category is about STM32 — a more professional ARM microcontroller line, popular in industry and projects that need high real-time performance.

Get new articles and lessons by email

When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.

Unsubscribe any time with the link in each email. See our Privacy policy.

What is ESP32? A 32-bit microcontroller with WiFi/Bluetooth at nearly Arduino prices — Atlas Robotics