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
Operating voltage
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.
Power supply
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.
Current consumption
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
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/I2C/I2S/UART
- 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.
Clock Speed
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.
WIFI
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.
Size
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.
Price
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.
Arduino Nano | Amazon | Banggood | AliExpress | |
Arduino Uno | Amazon | Banggood | AliExpress | |
Arduino Mega R3 | Amazon | Banggood | AliExpress | |
ESP8266 NodeMCU | Amazon | Banggood | AliExpress | |
ESP8266 WeMos D1 Mini | Amazon | Banggood | AliExpress | |
ESP32 NodeMCU | Amazon | Banggood | AliExpress |
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 R3 | |
Microcontroller | ESP8266 | ESP8266 | ESP32 | ESP8266 | ATmega328p | ATmega328p | ATmega4809 | ATmega2560 |
Operating Voltage | 3.3V | 3.3V | 3.3V | 3.3V | 5V | 5V | 5V | 5V |
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 |
SPI/I2C/I2S/UART | 2/1/2/2 | 2/1/2/2 | 4/2/2/2 | 1/1/1/1 | 1/1/1/1 | 1/1/1/1 | 1/1/1/1 | 1/1/1/4 |
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 |
WIFI | yes | yes | yes | yes | no | no | yes | no |
Bluetooth | no | no | yes | no | no | no | no | no |
Touch sensor | no | no | 10 | no | no | no | no | no |
CAN | no | no | yes | no | no | no | no | no |
Ethernet MAC Interface | no | no | yes | no | no | no | no | no |
Temperature Sensor | no | no | yes | no | no | no | no | no |
Hall effect sensor | no | no | yes | no | no | no | no | no |
Power jack | no | no | no | no | no | yes | yes | yes |
USB connection | yes | yes | yes | yes | yes | yes | yes | yes |
Price | $6 | $6.50 | $11 | $6 | $22 | $22 | $44.90 | $38.50 |
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.
aww its excellent comparision a person with nill knowlenge can also understand thank you
I like article. I would like to say that Arduino is a great starting place for anyone doing prototyping and quick testing of ideas. I use it for data sampling analogue data and sometimes and for demonstrating to students. I like to use esp32 with onboard OLED display and wifi also because it has onboard li-ion support. So excited to start playing with it and see its commercial potential… looking for a stable and robust platform.
Great article. Learnt a lot. Thank you!
The article is great, thank you. (The orthography however is worse than usual shopping notes, which sometimes make it even difficult to understand. night shift?)
And why bother about arduino at all if you have 15 analog inputs on the ESP32? I only buy the esp8266 if I need to go small or cheaper and know i wont need bluetooth, otherwise its the esp32, done.
Thank you for your research and very clear overview. You present info that I could not find on the sellers websites.
I’m missing some information about the use of standard Arduino breakout boards (I2C interface, SD-slots, RTC-modules and so on) in combination with nodeMCU’s. Do I need for every signal an TTL Bi-directional Logic Level Converter?
hi! may i ask a question? i used arduino uno and esp8266 nodemcu v3 for my project . nodemcu was connected to dht11 sensor . while arduino uno is connected to gsm sim900. i used nodemcu to get the wifi . so what is your opinion if i used nodemcu to connect to gsm sim900? and i do not use arduino uno for my project ? thank you !