In this post we’re going to do a comparison: ESP32 vs ESP8266.
The ESP32 and ESP8266 are cheap Wi-Fi modules perfectly suited for DIY projects in the Internet of Things (IoT) field. These modules come with GPIOs, support for a variety of protocols like SPI, I2C, UART, and more. The best part is that they come with wireless networking included, which makes them apart from other microcontrollers like the Arduino. This means that you can easily control and monitor devices remotely via Wi-Fi for a very low price.
Specifications: ESP32 vs ESP8266
The ESP32 is the ESP8266 successor. It adds a CPU core, faster Wi-Fi, more GPIOs, and supports Bluetooth 4.2 and Bluetooth low energy. Additionally, the ESP32 comes with touch sensitive pins, and built-in hall effect sensor and temperature sensor. Both boards are very cheap, but the ESP32 costs slightly more. While the ESP32 can cost around $6 to $12, the ESP8266 can cost just $4 to $6 (but it really depends on where you get them).
The following table shows the main differences between the ESP8266 and the ESP32 processors (table adapted from: AMICA_IO).
More GPIOs on the ESP32
The ESP32 has more pins than the ESP8266, and you can decide which pins are UART, I2C, or SPI – you just need to set that on the code. This is possible due to the ESP32 chip’s multiplexing feature that allows to assign multiple functions to the same pin. If you don’t set them on the code, they will be on the pins defined by default as shown in the following figure (this is an example for the ESP32 DEVKIT V1 DOIT board – the pin location can change depending on the manufacturer).
You can set PWM signals in any GPIO with configurable frequencies and duty cycles set on the code. When it comes to the analog pins, these are static, but the ESP32 supports measurements on 18 channels (analog-enabled pins) versus one 10-bit ADC pin on the ESP8266. The ESP32 also supports two 8-bit DAC channels.
Additionally, the ESP32 contains 10 capacitive sensing GPIOs, that detect touch and can be used to trigger events, or wake-up the ESP32 from deep sleep, for example.
Arduino IDE – ESP32 vs ESP8266
There are many ways to program the ESP boards. Currently, both boards can be programmed using the Arduino IDE programming environment.
This is is a good thing, specially for those who are used to program with the Arduino and are familiar with the Arduino programming language. Learn how to install the ESP32 or ESP8266 in your Arduino IDE:
- Installing the ESP32 Board in Arduino IDE (Windows instructions)
- Installing the ESP32 Board in Arduino IDE (Mac and Linux instructions)
- How to Install the ESP8266 Board in Arduino IDE
Although you can program both boards using Arduino IDE, they might not be compatible with the same libraries. Some libraries are just compatible with one of the boards.
Need Resources to Get Started?
If you want to get started with the ESP32 or ESP8266, you can take a look at our courses and projects:
So, at this point you should be asking: Should I get an ESP8266 or an ESP32?
It really depends on what you want to do. There is space for both boards, and both have pros and cons.
The ESP8266 is cheaper than the ESP32. Although it doesn’t have as much functionalities, it works just fine for the majority of simple DIY IoT projects. Additionally, because it is “older” it is much more supported in terms of software, and you might find help easier. However, it has some limitations when it comes to the GPIO mapping, and it might not have enough pins for what you intend to do. If that’s the case, you should get an ESP32.
The ESP32 is much more powerful than the ESP8266, contains more GPIOs with multiple functions, faster Wi-Fi, and also supports Bluetooth. Many people think that the ESP32 is more complicated to deal with than the ESP8266 because it is more complex. In our opinion, it is as easy to program the ESP32 as the ESP8266, specially if you intend to program it using the Arduino language.
However, the ESP32 has some cons too. First, it is more expensive than the ESP8266. So, if you’re making a simple IoT project, the ESP8266 might do the trick for a lower price. Additionally, because it is more recent than the ESP8266, not all software has been developed to take the most out of the ESP32 functionalities, there is less support, and more bugs. But on the long run these issues will be fixed, and there will be space for both boards.
We hope you’ve found our analysis ESP32 vs ESP8266 useful. You might also like reading the following ESP8266 and ESP32 related posts:
Other RNT Courses
Build IoT projects and home automation gadgets with the ESP8266 Wi-Fi module.
Build a home automation system using open-source hardware and software.
Build 25 cool Arduino projects with our couse even with no prior experience!