Both the Espressif ESP8266 and ESP32 modules are perfectly suited to low cost Internet of Things applications, but which one is right for your project? In this post, we're going to go through the differences between them, and how they may affect your choice.
The ESP32 is the successor of the ESP8266, but not necessarily a replacement. The ESP32 has a slightly larger price tag, but it also boasts an array of new features. As well as all the features of the ESP8266, it includes faster Wi-Fi, a CPU core, more GPIOs, and supports Bluetooth. It also features touch sensitive pins, a built-in hall effect sensor and a temperature sensor.
Below is a run down of the differences between the two modules:
A notable difference with the ESP32 is the Bluetooth capability. This allows the ESP32 to be not only be limited to WiFi, allowing it to be integrated into more projects. It supports classic Bluetooth and Bluetooth Low Energy, which makes projects such as Bluetooth beacons and wearables possible.
The ESP8266 has a builtin processor, but because of the multitasking involved in updating the WiFi stack, most applications use a separate micro-controller for interfacing with the sensors, processing data and digital I/O. With the ESP32, you may not need to use an additional micro-controller. The ESP32 has dual 32-bit microprocessors, and will run on breakout boards and modules from 160Mhz upto 240MHz. This provides enough speed for any application that requires a microcontroller with connectivity.
With the ESP8266, a notable limitation is the lack of peripherals. The ESP32 improves upon this greatly, with 10x capacitive touch inputs, as well as 2x 8-Bit digital to analog converters (DACs), 2x I2C, 4x SPI, and 2x UART interfaces, making it a lot easier to interface with sensors. Also included are 16x 12-Bit analog to digital converters (ADCs), with an adjustable range from 0-4v.
Here's a full list of all the peripherals built in to the ESP32:
- Timers and Watchdog
- Real Time Clock
- ADC and built-in Sensors
- Digital to Analog Convertor (DAC)
- Touch Sensor
- Ultra Low Power(ULP) Co-processor
- Ethernet MAC Interface
- SD/SDIO/MMC Host Controller
- Universal Asynchronous Receiver Transmitter (UART)
- I2C Interface
- I2S Interface
- SPI Interface
- Infrared Remote Controller
- Pulse Counter
- Pulse Width Modulation (PWM)
- Hardware Accelerator
So, which module is best suited to your project?
The ESP8266 is cheaper than the ESP32. Because it's an older module, it has a larger community/development ecosystem, and you may find it easier to find help with it online. The ESP8266 will work great for most basic IoT applications, but if you need more I/O pins or Bluetooth capability, you should go with an ESP32. If you don't need more than one ADC channel, have no requirement for Bluetooth, and want to keep a smaller form factor, stick with the ESP8266.
Want to hook up your ESP8266 or ESP32 to the Wia platform? Click here for ESP8266 and here for ESP32.