Arduino vs ESP8266 vs ESP32 Comparison
In this microcontroller comparison I compare in total 8 different boards and I give you my suggestion, which board to use based on different use cases.
I will give you an overview of different Arduino boards which are the most popular boards on the market as well as ESP32 and ESP8266 boards which are also very often used.
Let’s start and dive deeper into the datasheets in this microcontroller comparison.
Table of Contents
The operating voltage of the ESP microprocessors is 3.3 V compared to the Arduino operating voltage of 5V. If the boards are used while connected to the socket, there will be no difference in the power consumption because the current will be reduced to gather the same amount of power. In case of a battery powered use case the difference will be much greater because if the battery discharging curve falls below the operating voltage, the microprocessor will shut down.
Therefore the boards based on the ESP will have a longer operation time because these boards could operate under 4 V, while at 4 V the Arduino boards have been shut down.
The power supply from the ESP8266 boards are between 2.5 V to 12 V based on the different boards. Arduino boards have a higher power supply between 7 V and 12 V. In practice the difference will not have a big impact.
The current consumption is important for battery based projects to increase the lifetime of the project. In general the NodeMCUs based on the ESP8266 microprocessor have a very low current consumption between 15 µA and 400 mA which can be further reduced with the deep sleep mode activated to 0.5 µA. The current consumption is therefore a factor 70,000 higher in deep sleep mode for the Arduino Uno with 35 mA. In general I always prefer ESP based boards when a battery is the power supply.
If you want to learn how to reduce the power consumption of the boards, there are exclusive articles about this topic
Microcontroller Datasheet eBook
The 35 pages Microcontroller Datasheet Playbook contains the most useful information of 14 Arduino, ESP8266 and ESP32 microcontroller boards.
Digital I/O, PWM and Analog Pins
- Digital I/O Pins: The difference between all boards regarding the digital I/O pins is nearly zero. The only difference is, that the big boards, like the NodeMCU ESP32 (36) and of cause the biggest board, the Arduino MEGA R3 (54) has a lot of digital I/O pins.
- PWM Pins: The ESP based boards have a better ratio between digital I/O pins and PWM pins, because the PWM is used by a digital pin. In my opinion, all boards have a sufficient amount of PWM pins.
- Analog Pins: This is the main drawback in my opinion for the NodeMCUs. Because they have ether only 1 or 2 analog input pins. Of cause you can by an IC as multiplexer but I think it is easier to use of you have the right amount of analog pins directly on the board itself. The Arduino boards have a good amount of analog input pins between 5 and 15.
- SPI (Serial Peripheral Interface) communication protocol to send data between microcontroller. It is a synchronous data bus, meaning it uses a clock to regulate the data transfer. If you want to know more about SPI, click here.
- I2C communication protocol most used to send and receive data from other devices like OLED displays, barometric pressure sensors and so on. If you want to know more about I2C, click here.
- I2S (Inter-IC Sound), is an electrical serial bus interface standard used for connecting digital audio devices together. If you want to know more about I2S, click here.
- UART (Universal Asynchronous Receiver/Transmitter) is not a communication protocol like SPI and I2C, but a physical circuit in a microcontroller. The main purpose is to transmit and receive serial data. If you want to know more about UART, click here.
How many of there pins you need is very strong depending from you use case. Generally does the ESP based boards and the Arduino boards at least one pin for these data transfer connections. But the ESP boards have mostly a second pin for the communication.
DC Current per Pin
The current the board provides does not matter. Arduino, ESP boards or Raspberry Pi or any other microcontroller comparison board are designed to control devices and not to provide these devices with power. There are a lot of devices like LEDs, displays and so on which can be powered by the board. But there are a lot of other devices like motors, which need much more power than a microcontroller can provide. Therefore you can always power the devices from an external power supply.
Flash Memory and SRAM
- Flash memory (program space), is where the Arduino sketch is stored.
- SRAM (static random access memory) is where the sketch creates and manipulates variables when it runs.
- EEPROM is memory space that programmers can use to store long-term information.
Flash memory and EEPROM memory are non-volatile (the information persists after the power is turned off). SRAM is volatile and will be lost when the power is cycled.
The Arduino boards are all running with 16 MHz which means that the microprocessor can execute up to 16 million instructions per second. This may sound like a lot but when you consider that a simple setting digital pin to high can take over 50 clock cycles. ESP based boards are much faster with a clock speed of 52 MHz up to 160 MHz for the ESP32. This is 10 times faster. So if you plan a big project with many operations you should go with the ESP based boards.
Generally bad news for Arduino board user and good news for ESP boards. The Arduino Uno exists in two version. One without WiFi and one WiFi included on the board. But no worries, because there are plenty of possibilities to use WiFi despite there is no WiFi chip onboard. Either you can use a Arduino WiFi shield or you can connect the Arduino board with a ESP-01, with as WiFi included.
In this microcontroller comparison we look at different sizes of boards with one big impact factor on the size: the total number of pins. The more pins the board has, the larger the board will be. Generally are the ESP based boards like the NodeMCU smaller than the Arduino boards and will fit onto a breadboard. Depending on you project the size will matter or not.
The battle of price will will the ESP based boards because they are very cheap around $7. The original Arduino boards will start around $22 but you will find boards with the same configuration around $12. If you want to save some money, go with the NodeMCU boards or boards which are modeled after the original Arduino boards.
The following table gives you an overview of all components and parts that I used for this tutorial. I get commissions for purchases made through links in this table.
Conclusion of the microcontroller comparison
|ESP8266 NodeMCU V2||NodeMCU V3||ESP32 NodeMCU||ESP8266 WeMos D1 Mini||Arduino NANO 3||Arduino UNO R3||Arduino UNO WIFI R2||Arduino Mega|
|Power supply||7V – 12V||7V – 12V||7V – 12V||4V – 6V||7V – 12V||7V – 12V||7V – 12V||7V – 12V|
|Current consumption||15 µA – 400 mA||15 µA – 400 mA||20 mA – 240 mA||19 mA – 180 mA||45 mA – 80 mA||50 mA – 150 mA||50 mA – 200 mA|
|Current consumption Deep Sleep||0.5 µA||0.5 µA||5 µA||23 µA (with special settings)||35 mA||35 mA||500 µA|
|Digital I/O Pins||11 or 13||16||36||11||14||14||14||54|
|Digital I/O Pins with PWM||11 or 13||16||36||11||6||6||5||15|
|Analog Input Pins||1||1||15||1||8||6||6||16|
|DC Current per I/O Pin||12 mA||12 mA||20 mA||40 mA||40 mA||40 mA||20 mA|
|DC Current for 3.3V Pin||40 mA||50 mA||150 mA||150 mA||150 mA|
|Flash Memory||4 MB||4 MB||4 MB||4 MB||32 KB||32 KB||48 KB||256 KB|
|SRAM||n.A||64 KB||520 KB||2 KB||2 KB||6 KB||8 KB|
|EEPROM||512 bytes||512 bytes||–||1024 bytes||1024 bytes||256 bytes||4096 bytes|
|Clock Speed||52 MHz||80 MHz||80 MHz / 160 MHz||80 MHz / 160 MHz||16 MHz||16 MHz||16 MHz||16 MHz|
|Length||48 mm||58 mm||52 mm||34||45 mm||69 mm||69 mm||102 mm|
|Width||26 mm||31 mm||31 mm||26||18 mm||53 mm||53 mm||53 mm|
|Ethernet MAC Interface||no||no||yes||no||no||no||no||no|
|Hall effect sensor||no||no||yes||no||no||no||no||no|
What is the best microcontroller in this microcontroller comparison? In my opinion there are only few use cases where you should not go with an ESP based board. The ESP based boards are fast, have a low power consumption, a high memory and WiFi build in. Also the price is very low. The only use case I can think the Arduino boards are better is when it come to analog inputs. If you want to read a lot of analog input values and you do not want to use a multiplexer, than you should go with an Arduino board.