It’s time to take a deep dive into the differences between the two leading IoT machines of the moment, in this comparison of ESP8266 vs ESP32.
In previous posts, we have presented both the ESP8266 and the ESP32, two SoCs with WiFi connectivity from the Chinese manufacturer Espressif, which are causing a sensation in the Maker community.
Now it’s time to put the two SoCs face to face in this ESP8266 vs ESP32 comparison where we will see in a table the differences and similarities of these two SoCs point by point.
Logically, the ESP32 is going to win by a landslide in almost every aspect since it is the successor to the ESP8266. However, we will also see in the comparison that the ESP8266 is a very interesting machine, especially when we consider its lower price.
Without further ado, here we have the comparative table.
Feature | ESP8266 | ESP32 |
---|---|---|
Processor | Tensilica LX106 | Tensilica Xtensa X36 |
Nº bits | 32 bits | |
Nº cores | Single core | Dual core |
Speed | 80Mhz (up to 160 Mhz) | 160 MHz (up to 240 MHz) |
SRAM | 160 kB | 512 kB |
SPI FLASH | Up to 16MiB | |
Power Supply | 3.0 to 3.6V | 2.2 to 3.6V |
Range temperatures | -40ºC to 125ºC | |
Current Consumption | 80 mA (average), 225 mA (maximum) | |
Deep Sleep Consumption | 20 uA (RTC + memory RTC) | 2.5 uA (10 uA RTC + memory RTC) |
Low Power Consumption | No | Less than 150 uA |
Wifi | 802.11 b/g/n (up to +20 dBm) WEP, WPA | |
Soft-AP | Yes | |
Hardware Encryption | No (TLS 1.2 via software) | Yes |
Bluetooth | No | v4.2 BR/EDR + BLE |
Ethernet MAC Interface | No | 10/100 Mbps |
GPIO (usable) | 17 | 36 |
Hardware / Software PWM | No / 8 | 1 / 16 |
ADC | 1 (10 bits) | 18 (12 bits) |
ADC with Preamplifier | No | Yes (low noise 60 dB) |
DAC | No | 2 (8 bits) |
UART | 2 (one can only use TX pin) | 4 |
I2C | 1 | 2 |
SPI | 2 | 4 |
I2S | 1 | 2 |
1-Wire | Implemented via software | |
CAN BUS | No | 1 x 2.0 |
Touch Sensor | No | 10 |
Temperature Sensor | No | Yes |
HALL Sensor | No | Yes |
IR | Yes | |
Timers | 3 | 4 (64 bits) |
Random Number Generator | No | Yes |
Flash Encryption | No | Yes |
Secure Boot | No | Yes |
First of all, the ESP32 has a more powerful dual-core processor. The next obvious advantage is that it includes Bluetooth BLE, in addition to WiFi.
Moreover, the ESP32 incorporates more memory, flash encryption, secure boot, hardware encryption (something that was greatly missed in the ESP8266), random number generator, and real-time clock (RTC).
In terms of I/O, the ESP32 greatly surpasses the ESP8266, with 36 GPIO (compared to 17), 10 pins with Touch detection, 1+16 PWM (compared to 0+8), 18 12-bit ADCs with preamplification (compared to 1 10-bit), and includes 2 8-bit DACs.
In communication buses, the ESP32 again prevails, with 4 UARTs (compared to 2, one with only TX), 2 I2Cs (compared to 1), 4 SPIs (compared to 2), 2 I2Ss (compared to 1), and incorporates CAN BUS 2.0.
Additionally, the ESP32 has 4 timers of 64 bits (compared to 3) and includes a Hall sensor, temperature sensor, and the possibility of Ethernet 10/100Mbps.
As for similarities, both SoCs can handle the same amount of memory of up to 16MiB, and they have WiFi connectivity 802.11 b/g/n.
As we anticipated, it is clear that the ESP32 is a real powerhouse. However, the ESP8266 remains a very interesting SoC and has a lower price. But the ESP32 has set the bar very high.
It should also be noted that currently, there are few development boards that allow access to all the functions (to all the pins) of the ESP32, so the differences between both are diluted. In many cases, it comes down to greater computing capacity, Bluetooth, and the ability to accelerate encryption.
In upcoming posts, we will see how to program both SoCs, starting with tutorials on both the ESP8266 and the ESP32.