When it comes to Wi-Fi-enabled microcontrollers, the ESP32 and ESP8266 are two of the most popular choices. But which one should you choose for your next project?
In this article, we’ll compare the ESP32 and ESP8266 to help you make a decision on which microcontroller to buy.
ESP32 vs ESP8266: A Quick Overview
The ESP32 and ESP8266 are both low-cost and beginner-friendly microcontrollers developed by Espressif Systems. Still, they are highly capable and offer good performance.
ESP8266: The Budget-Friendly Option
Being released in 2014, the ESP8266 is the slightly older one of the two. It has a single-core Tensilica Xtensa L106 Processor with about 80 KB of data RAM available for applications.
Because of its low power consumption, the ESP8266 is perfectly suited for battery-powered projects.
The ESP8266 is mainly used for low-budget projects that require WiFi or ESP-NOW connectivity but not as much processing power as the newer ESP32.
That’s why you find it in many IoT projects and wearables.
ESP32: The Feature-Rich Upgrade
In 2016 the first ESP32 was released. It offers several improvements over its predecessor, the ESP8266. For instance, it now uses the more powerful Tensilica Xtensa LX6 processor with 520 KB of SRAM.
The original ESP32, however, has quickly been replaced by the ESP32-S, ESP32-C, and ESP32-H series and isn’t found on many modern development boards. Hence, I am going to focus on the more modern ESP32-S Series.
For more details about the different versions of the ESP32, visit this article!
The ESP32 is mainly used for low-budget projects that require WiFi, ESP-NOW, or Bluetooth connectivity and more processing power for tasks like machine learning.
Check out how machine learning on microcontrollers like the ESP32 works here.
ESP32 vs ESP8266: Direct Comparison
Processing Power and Performance
Feature | ESP8266 | ESP32-S3 |
Processor | Tensilica Xtensa L106 single-core | Tensilica Xtensa LX7 dual-core (ESP32-S2 is single-core) |
Clock Speed | 80 MHz – 160MHz | 160 MHz – 240 MHz |
RAM | – 32 KB instruction RAM – 32 KB instruction cache RAM – 80 KB user-data RAM – 16 KB system-data RAM | 520 KB SRAM |
Flash Memory | typically between 1 MB and 4 MB | typically 4MB, 8 MB, or 16 MB |
As you can see, the ESP32 has a significant advantage over the ESP8266 in terms of processing power. With its dual-core processor and higher clock speed, the ESP32 can handle more complex tasks, making it ideal for applications that require multitasking or real-time processing, like Edge AI.
Nonetheless, the ESP8266 is still quite powerful and can handle most basic tasks effortlessly.
ESP8266 vs ESP32 – Built-in Sensors
Sensor | ESP8266 | ESP32 |
Hall Effect Sensor | No ❌ | (Yes ✅) official support has been removed |
Capacitive Touch Sensor | No ❌ | Yes ✅ |
Chip Temperature Sensor | No ❌ | Yes ✅ |
The ESP32 offers some useful sensors like a capacitive touch sensor, a chip temperature sensor to measure internal temperature, and a hall effect sensor to measure the presence of a magnetic field.
The ESP8266 however, doesn’t offer any onboard sensors at all.
Update concerning the hall sensor: Unfortunately, the hall sensor is not officially supported anymore. Check out how to use it anyway here!
Wireless Connectivity – WiFi, Bluetooth, ESP-NOW, And Co.
Feature | ESP8266 | ESP32-S3 |
Wi-Fi | Yes ✅ | Yes ✅ |
Bluetooth / BLE | No ❌ | Yes ✅(Not on ESP32-S2) |
ESP-NOW | Yes ✅ | Yes ✅ |
Both microcontrollers support Wi-Fi, but only the ESP32 includes Bluetooth capabilities. Additionally, both ESPs support ESP-NOW, a low-power, peer-to-peer communication protocol that allows devices to exchange data without the need for a traditional Wi-Fi network.
GPIOs and Peripheral Support
GPIO pins and peripheral interfaces matter a lot in embedded development. Here’s how the ESP8266 and the ESP32 compare in that field:
Feature | ESP8266 | ESP32 |
Programmable GPIO | 17 Pins | 34 Pins |
ADC | 10-bit SAD ADC on 1 channel | 2 × 12-bit SAD ADCs on up to 18 channels |
DAC | None ❌ | 2 × 8-bit DACs (not on ESP32-C3 and ESP32-S3) |
UART Interfaces | 2 | 3 |
CAN Interfaces | None ❌ | 1 × CAN bus 2.0 |
I2C Interfaces | 1 | 2 |
I2S Interfaces | 2 | 2 |
SPI Interfaces | 2 | 4 |
Power Consumption & Power Modes
Power Mode | ESP8266 Current | ESP32 Current |
Normal/Active Mode | ~ 70 mA | ~ 240 mA |
Modem-Sleep Mode | ~ 20 mA | ~ 3 mA (Slow Speed), ~ 25 mA (Normal Speed), ~ 40 mA (High Speed) |
Light-Sleep Mode | ~ 1 mA | ~ 1 mA |
Deep-Sleep Mode | ~ 10 µA | ~ 10 µA – 150 µA |
Hibernation Mode | Not available ❌ | ~ 5 µA |
The ESP8266 is more power-efficient than the ESP32, making it a better choice for battery-powered applications. However, the ESP32 has an extra hibernation mode that can help reduce power consumption.
ESP32 vs ESP8266 – Security
Security is a crucial factor when developing IoT applications and home automation. Here’s how the ESP32 and ESP8266 compare in terms of built-in security features:
Security Feature | ESP8266 | ESP32-S |
Secure Boot | No ❌ | Yes ✅ |
Flash Encryption | No ❌ | Yes ✅ |
AES Encryption | No ❌ | Yes ✅ |
Cryptography Co-Processor | No ❌ | Yes ✅ |
Hardware Random Number Generator | No ❌ | Yes ✅ |
As you can see, the ESP8266 doesn’t come with any security features, unlike the ESP32 which offers many features to prevent malicious attacks.
Supported Programming Languages
Both microcontrollers support a variety of programming languages. Probably the most common one is Arduino C++. However, there’s also support for languages like Python, MicroPython, CircuitPython, Lua, JavaScript, and even Rust.
If you want to know how to set up the ESP32 with Arduino IDE, follow this guide.
Price of ESP32 and ESP2866
The ESP8266 is generally cheaper than the ESP32, making it a great option for budget-friendly projects. However, the price difference between the two is not very big, and the additional features of the ESP32 often justify the slightly higher cost.
Also, the price varies depending on which type of board you get. But usually, the ESP32 comes in at a price between 6$ and 9$, while the ESP8266 costs between 5$ and 6$.
ESP32 vs ESP8266: Which ESP to Buy?
Of course, which ESP you want to buy depends on what you want to do with it.
But here’s my recommendation:
If you’re just getting into microcontrollers and embedded development, go for the ESP32 as it is the more modern option with a lot more functionality. Also, the price difference is so small, that it doesn’t really matter.
However, if you’re planning to build mainly battery-powered projects and don’t need all that extra functionality, the ESP8266 can still be a good pick with its lower consumption.
If you’re now interested in Buying an ESP32 or ESP8266, I have selected popular budget-oriented and more capable boards for each microcontroller:
ESP32:
ESP8266:
Wrapping Up
Both the ESP32 and ESP8266 are excellent choices for IoT and embedded systems projects. If you’re working on a simple Wi-Fi-based application and want to keep power consumption low, the ESP8266 is a solid option. However, if you need more power, additional connectivity options, and greater flexibility, the ESP32 is the way to go.
No matter which microcontroller you choose, both offer incredible value and versatility for your IoT and embedded development needs.
Next, check out the different variants of the ESP32!
Which board is better in your opinion and which one are you using? Share your thoughts in the comments below!
Thanks for reading!
Links marked with an asterisk (*) are affiliate links which means we may receive a commission for purchases made through these links at no extra cost to you. Read more on our Affiliate Disclosure Page.