[ENG VER] Here're a Comparison of ESP32 and ESP8266 Microcontrollers (ESP32 vs ESP8266)

Assalammu‘alaikum wr. wb.

Meet you again with Inzaghi's Blog! If we want to do an Embedded System more specifically the Internet of Things (IoT), we only know Arduino such as Arduino Uno, Arduino Mega, Arduino Nano, etc. However, in Arduino there are no Communication Modules such as Bluetooth and Wi-Fi. If you want to have a Communication Module you should try and buy an ESP32 and/or ESP8266. Then, what's the difference between ESP32 and ESP8266? Let's discuss in this article.

Illustration of Comparison of ESP32 with ESP8266 (ESP32 vs ESP8266)




DEFINITIONS OF ESP32 AND ESP8266

A. Definition of ESP32

ESP32 DevKit v1

ESP32 is a series of low-cost power systems on a microcontroller chip. ESP32 is an advanced version of the ESP8266 series. The ESP32 series is created and developed by Espressif Systems. ESP32 has a dual-core co-processor and Ultra low power. It was developed because of the lack of security, which was in the ESP8266.

Advantages :
  • ESP32 offers dual-core 160MHZ to 240MHZ
  • You can control and monitor your devices with the help of Wi-fi or Bluetooth at a very low price.
  • ESP32 offers more GPIOs
  • ESP32 gives you 150Mbps high speed.

Disadvantages :
  • ESP32 is more expensive than ESP8266

B. Definition of ESP8266

ESP8266 NodeMCU

ESP8266 is a complete System on a Chip (SOC), a WiFi module with an IP/TCP protocol stack. The ESP8266 allows access to any microcontroller via Wi-Fi.

One of the main functions of ESP8266 is to host any application or decode all WiFi network functions. It is very durable and can work smoothly even in harsh industrial environments.

This is simply due to its wide operating temperature range. It also offers an energy efficient Architecture and a 32-bit Tensilica processor.

Advantages :
  • The ESP8266 module gives you powerful onboard processing and storage capabilities, allowing it to integrate with other sensors and applications.
  • It has a high level of on-chip integration. The on-chip integration allows the user for very few external reference circuits.
  • The ESP8266 runs with APSD to interface Bluetooth and VoIP application coexistence. It also contains a self-calibrated Radio Frequency (RF) which allows it to work with all operating conditions and does not require any Radio Frequency components.
  • The price of the ESP8266 tends to be cheaper than the ESP32.

Disadvantages :
  • ESP8266 doesn't have Bluetooth connectivity, whereas in ESP32 you can use this feature.
  • GPIO is sorely lacking in ESP8266 compared to ESP32.


ESP32 AND ESP8266 COMPARISONS

A. ESP32 and ESP8266 Pinouts

Both the ESP32 and ESP8266 are inexpensive WiFi-based SOCs (Systems on Chip) that are perfect for DIY projects in the Internet of Things. Both have 32-bit processors, the ESP32 is a 80Mhz to 240MHz dual-core CPU and the ESP8266 is an 80MHz single-core processor. This module is equipped with a GPIO that supports various protocols such as SPI, I2C, UART, ADC, DAC, and PWM. ESP32 and ESP8266 work on 3.3V.

1. ESP32


The development board is equipped with the ESP-WROOM-32 module which contains a Tensilica Xtensa Dual-Core 32-bit LX6 microprocessor. This processor is comparable to the ESP8266, except it includes two CPU cores (each operable separately), clock frequencies of 80 to 240 MHz, and performance of up to 600 DMIPS (Dhrystone Million Instructions Per Second).

The ESP32 integrates the HT40's 802.11b/g/n Wi-Fi transceiver which allows it to not only connect to a WiFi network to interact with the Internet but also to create its own network to which other devices can connect directly. WiFi Direct is also supported by ESP32, which is a suitable alternative for peer-to-peer connections that don't require an access point. It's easier to set up WiFi Direct and has a much faster data transmission speed than Bluetooth. This chip also supports Bluetooth 4.0 (BLE/Bluetooth Smart) and Bluetooth Classic (BT), making it even more versatile.

Nodemcu ESP32 is a series of low-cost, low-power microcontrollers with built-in ESP32 Wi-Fi and dual-mode Bluetooth. ESP32 is designed for low power Internet of Things applications. Its high processing power, combined with built-in Wi-Fi, Bluetooth, and Deep Sleep Operating features, 520 KB SRAM, 448 KB ROM, and 4MB Flash memory (for software and data storage) make it suitable for most portable IoT devices.

The ESP-32 board has 48 general purpose input/output pins of which only 25 are available as pin headers on either side of the ESP-32 board. These pins can be assigned for all kinds of peripheral tasks.
  • POWER PINS : The VIN pin and the 3.3V pin are the two power pins. If you have a controlled 5V power source, you can utilize the VIN pin to directly supply the ESP32 and its peripherals. An on-board voltage regulator's output is connected to the 3.3V pin. Power can be supplied to external components via this pin.
  • ARDUINO PINS : the hardware I2C and SPI pins of the ESP32 that you may use to connect all kinds of sensors and peripherals to your project.
  • GPIO PINS : The ESP32 development board features 25 GPIO pins that can be programmatically assigned to various functions. Each digitally-enabled GPIO can be set to high impedance or internal pull-up or pull-down. It can also be set to edge-trigger or level-trigger to generate CPU interruptions when configured as an input
  • GROUND : Ground pin of the ESP32 development board.
  • ADC CHANNELS : The board has 12-bit SAR ADCs and 15 channels of measurement (analog enabled pins). Some of these pins can be utilized to build a programmable gain amplifier for measuring small analog signals. The ESP32 is also capable of measuring voltages while it is in sleep mode. 
  • DAC CHANNELS : Two 8-bit DAC channels on the circuit transform digital signals into true analog voltages. This dual DAC can drive other circuits. TouchPads The board offers 9 capacitive sensing GPIOs which detect capacitive variations introduced by the GPIO’s direct contact or close proximity with a finger or other objects.
  • UART PINS : The ESP32 development board contains two UART interfaces, UART0 and UART2, which provide asynchronous communication (RS232 and RS485) and IrDA at up to 5 Mbps. UART provides hardware management of the CTS and RTS signals and software flow control (XON and XOFF) as well.
  • SPI PINS : SPI Pins ESP32 features three SPIs (SPI, HSPI, and VSPI) in slave and master modes. All SPIs can also be used to connect to the external Flash/SRAM and LCD.
  • ~ PWM PINS : The board has 25 channels (Nearly All GPIO pins) of PWM pins controlled by the Pulse Width Modulation (PWM) controller. The PWM output can be used for driving digital motors and LEDs. The controller consists of PWM timers and the PWM operator. Each timer provides timing in synchronous or independent form, and each PWM operator generates the waveform for one PWM channel.

Power

The board has an LDO voltage Regulator to keep the voltage stable at 3.3V, while the operating voltage range of the Arduino ESP32 is 2.2V to 3.6V. While the ESP32 draws up to 250mA during RF transmission, it can supply up to 600mA, which should be more than enough. The regulator output is also split off to one side of the board and labeled as 3V3. Power can be supplied to external components via these pins. The onboard USB MicroB port provides power to the ESP32 development board. You can use the VIN pin to power the ESP32 and its peripherals directly via an external 5V power supply.

For communication, the ESP32 requires a 3.3V power supply and a 3.3V logic level. The GPIO pins have no 5V tolerance.

[To read more about the Pinout of ESP32, please see here (Ahonerd.com).]

2. ESP8266


The ESP-12E module on the development board contains the ESP8266 chip with a Tensilica Xtensa 32-bit LX106 RISC microprocessor that supports RTOS and operates at a customizable clock frequency of 80 to 160 MHz. The ESP8266 is an inexpensive and easy-to-use device for connecting your IoT projects to the internet. Nodemcu ESP8266 includes a Wi-Fi 802.11b/g/n HT40 transceiver, which allows it to connect to WiFi networks and interact with the Internet, this module can function as an access point (create a hotspot) and a station (connect to Wi-Fi), it can only takes data and posts it to the internet, making the Internet of Things (IoT) as simple as possible. This extends the capabilities of the NodeMCU ESP8266.

The module has sufficiently strong on-board processing and storage capabilities that allow it to be integrated with sensors and other application-specific devices via its GPIO with minimal up-front development and minimal loading during runtime. 128 KB of RAM and 4MB of Flash memory (for apps and data storage), which is more than enough to handle the huge strings that make up web pages, JSON/XML data, and everything else we throw at IoT devices today.

The NodeMCU ESP8266 module is available in two variants where one is built in with a USB to UART CP2102 bridge and the other with a USB to UART CH340 bridge.

The ESP8266 WiFi module has a total of 17 GPIO pins available on both sides of the development board. These pins can be assigned for all kinds of peripheral duties.
  • POWER PIN : The power pins consist of one VIN pin and three 3.3V pins. If you have a regulated 5V power source, you can utilize the VIN pin to directly supply the ESP8266 and its peripherals. The 3.3V pins are outputs from a voltage regulator built into the board. Power can be supplied to external components through these pins.
  • I2C PINS : These are used to connect all of your project's I2C sensors and peripherals. I2C Master and Slave are both supported.
  • GPIO PINS : The ESP8266 NodeMCU includes 17 GPIO pins that may be programmatically assigned to different tasks like I2C, I2S, UART, PWM, IR Remote Control, LED Light, and Button. Each GPIO with digital capability can be tuned to internal pull-up or pull-down, or too high impedance.
  • GROUND : It is a ground pin of the ESP8266 NodeMCU development board.
  • ADC CHANNEL : The NodeMCU has a 10-bit precision SAR ADC built-in. Testing the power supply voltage of the VDD3P3 pin and testing the input voltage of the TOUT pin are two functions that can be implemented using ADC. They cannot be implemented at the same time.
  • UART PINS : The ESP8266 NodeMCU features two UART ports, UART0 and UART1, which can interact at up to 4.5 Mbps and allow asynchronous communication (RS232 and RS485). For communication, UART0 (TXD0, RXD0, RST0, and CTS0 pins) can be used. It supports fluid control. However, because UART1 (TXD1 pin) only transmits data, it is typically used to print logs.
  • SPI PINS : The ESP8266 has two SPIs (SPI and HSPI) that can be used in slave and master modes.
  • PWM PINS : There are four channels of Pulse Width Modulation on the PCB (PWM). The PWM output can be programmatically implemented and utilized to drive digital motors and LEDs. PWM frequency range is adjustable from 1000 μs to 10000 μs, i.e., between 100 Hz and 1 kHz.
  • CONTROL PINS : Are used to control the ESP8266 microcontroller. Chip's Enable pin (EN), Reset pin (RST), and WAKE pin is among these pins.

Power

The board has an LDO voltage regulator to keep the voltage steady at 3.3V, while the operational voltage range of the ESP8266 is 3V to 3.6V. While the ESP8266 generates up to 80mA during RF transmission, it can supply up to 600mA, which should be more than enough. The regulator output is also split off to one side of the board and labeled as 3V3. Power can be supplied to external components via these pins. The onboard USB MicroB connector provides power to the NodeMCU's ESP8266. You can use the VIN pin to power the ESP8266 and its peripherals directly if providing power via a 5V source.

For communication, the ESP8266 requires a 3.3V power supply and a 3.3V logic level. The GPIO pins have no 5V tolerance.

[To read more about the Pinout of ESP8266, please see here (Ahonerd.com).]

B. Wireless Communications

An important difference with the ESP32 is its Bluetooth capability which allows the ESP32 not only to be limited to Wi-Fi communication, but also allows it to be integrated into more projects. It supports classic Bluetooth and Bluetooth Low Energy. Meanwhile, ESP8266 does not support Bluetooth.

The ESP8266 has a built-in processor, but because multitasking is involved in updating the Wi-Fi stack, most applications use a separate microcontroller for interacting with sensors, digital I/O, and data processing. When using the ESP32, you may not need to use an additional microcontroller as the ESP32 has Dual 32-bit Microprocessors and will run on breakout boards and modules from 160 MHz to 240MHz. This provides sufficient speed for any application that requires a microcontroller with connectivity.
  • ESP32 is faster than ESP8266;
  • ESP32 comes with more GPIO with lots of functions;
  • The ESP32 supports analog metering on 18 channels (analog-enabled pins) versus just one 10-bit ADC pin on the ESP8266;
  • The ESP32 supports Bluetooth while the ESP8266 doesn't;
  • ESP32 is dual-core, and ESP8266 is single-core;
  • ESP8266 is cheaper than ESP32;
  • The ESP8266 has a wider community (although we think at this point, the difference is that big);
  • For many IoT and Wi-Fi projects, the ESP8266 can do the job for less;
  • Both boards can be programmed using the Arduino IDE or any other supported IDE.
  • Both boards support MicroPython firmware.

C. Specifications

ESP32 is the successor of the ESP8266 module. The ESP32 has faster Wi-Fi and CPU cores, more GPIOs, and supports Bluetooth 4.2 with lower power consumption.

In terms of price, the ESP32 is marketed around Rp. 100,000 - 650,000 while the ESP8266 is sold at Rp. 30,000 - 300,000.

SPECIFICATIONS
ESP8266
ESP32
MCU
Xtensa Single-core 32-bit L106
Xtensa Dual-Core 32-bit LX6 with 600 DMIPS
802.11 b/g/n Wi-Fi
YES, HT20
YES, HT40
ADC
10-bit
12-bit
Hardware/Software PWM
None / 8 Channels
1/16 Channel
Typical Frequency
80MHz
160MHz
SRAM
160kByte
512kByte
GPIO
17
36
Touch Sensor
NONE
YES
Bluetooth
NONE
Bluetooth 4.2
SPI/I2C/I2S/UART
2/1/2/2
4/2/2/3
ADC
10-bit
12-bit
CAN
NONE
1
ROM
Unprogrammable
448kB of ROM for booting and core functions
Working Temperature
-40°C to 125°C
-40°C to 125°C

Since the ESP32 has more GPIO pins compared to the ESP8266, it can be determined which pin functions as a UART, I2C or SPI pin depending on the programming code that is made.

This is also possible because the ESP32 chip features multiplexing which allows multiple functions to be used on the same pin. However, unless programmed for a specific function, the GPIO pins are by default.

To be able to set PWM signal on any GPIO with configured frequency and set cycle on code program. The ESP32 also supports two 8-bit DAC channels.

Additionally, the ESP32 contains 10 GPIO Capacitive sensing, which detects touches and can be used to trigger events, or wake the ESP32 from sleep mode.


To see this Article in Indonesian, can be see in here. And if you want to see an article about the Arduino Module, please see here (in Indonesian).

Look forward to the next article about the Physical Arduino (ESP32) and Tinkercad Module Practicum.

Thank You 😄😊👌👍 :)

Wassalammu‘alaikum wr. wb.

Post a Comment

Previous Post Next Post