The time has come to take a deep look at the differences between the two reference machines in IoT at the moment, in this ESP8266 vs ESP32 comparison.
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.
It is time to put these 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 point since it is the successor of 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 is the comparison table.
Characteristic | ESP8266 | ESP32 |
---|---|---|
Processor | Tensilica LX106 | Tensilica Xtensa X36 |
Number of bits | 32 bits | |
Number of 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 |
Temperature range | -40ºC to 125ºC | |
Current consumption | 80 mA (average), 225 mA (maximum) | |
Deep sleep consumption | 20 uA (RTC + RTC memory) | 2.5 uA (10 uA RTC + RTC memory) |
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 by 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 (in one only TX pin can be used) | 4 |
I2C | 1 | 2 |
SPI | 2 | 4 |
I2S | 1 | 2 |
1-Wire | Implemented by 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 and dual-core processor. The next obvious advantage is that it incorporates Bluetooth BLE, in addition to WiFi.
Additionally, the ESP32 incorporates more memory, flash encryption, secure boot, hardware encryption (something that was sorely missed in the ESP8266), random number generator, and real-time clock (RTC).
In terms of I/O, the ESP32 far surpasses the ESP8266, with 36 GPIO (compared to 17), 10 pins with Touch detection, 1+16 PWM (compared to 0+8), 18 ADC of 12 bits with preamplification (compared to 1 of 10 bits), and includes 2 DAC of 8 bits.
In communication buses, the ESP32 again prevails, with 4 UART (compared to 2, one with only TX), 2 I2C (compared to 1), 4 SPI (compared to 2), 2 I2S (compared to 1), and it incorporates CAN BUS 2.0.
Furthermore, the ESP32 has 4 timers of 64 bits (compared to 3) and includes Hall sensor, temperature sensor, and the possibility of 10/100Mbps Ethernet.
As for similarities, both SoCs can handle the same amount of memory up to 16MiB, and have WiFi 802.11 b/g/n connectivity.
As we had 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 the two are blurred. In many cases, it is reduced to greater computing capacity, Bluetooth, and the ability to accelerate encryption.
In the next posts, we will see how to program both SoCs and we will start with tutorials on both the ESP8266 and the ESP32.