Meet IoT Boards: ESP8266 & ESP32

Which are the best? ESPs or RPis or Arduinos Boards? — IoT — Episode #01

J3
Jungletronics
14 min readJan 2, 2020

--

Hello everyone!

Let’s talk about the ESP8266 & ESP-32 modules. Then let’s compare them with Arduino UNO and RPi B+. Here are 7 questions and points dealt here:

About this post:

 what is ESP8266?  what is it about the ESP8266 module?  What is this IoT's module good for? which are its applications? How can I Run it?  What are the Most Common ESPs' board models on the market and What are their specifications? We will do a comparison between ESP8266, ESP32, RPi and Arduino Uno.

We will also address what is the best board you must obtain to apply in your IoT's projects;
and finally we will show you the main programming platforms to make the ESPs boards work correctly in an easy way o/

Welcome!
This is your host, J3, and this is your Jungletronics page!

Welcome! I hope that this tutorial helps you to improve your knowledge about IoT.

Let’s get it on:) why ESP-32?

. Node MCU ESP32 works at 240 MHz (Arduino goes at 16 MHz max);
. Node MCU ESP32 has 22 GPIOs (Arduino has 12);
. Node MCU ESP32 has 16 MB Flash (Arduino has 32K only);
. Node MCU ESP32 has 18 ADC channels (Arduino has 6 only);
. Node MCU ESP32 has 2 cores (Arduino is uno);
. Node MCU ESP32 has Bluetooth, WiFi (Arduino does not);
. Node MCU ESP32 has Native SDK-IF (Arduino does not)...
. Node MCU ESP32 has small footprint board \o/

But first, let’s begin with ESP8266…What exactly is the ESP8266 module?

The ESP8266 is an on-chip system type microcontroller SOC of a Chinese manufacturer called the ESPRESSIF;

Fig 1. The base chip for ESP32— ESP-WROOM-02 o/

The module includes capacity for data processing, reads, and control of GPIOs, and has a TCP/IP protocols communication and it has wireless WiFi of 2.4 GHz in the 802.11 bgn standard, with support for WPA and WPA2 security encryption.

What is ESP8266 good for?

First of all, its applications are infinite, however, we will exemplify here some of its most common utilities:

Internet of Things or IOT;2° AUTOMATION & CONTROL Be industrial or residential, automotive or whatever field you're working in;this module performs DATA TRANSMISSION By having inside an integrated WiFi technology we can transmit data to a router wirelessly easily and without much effort; the stack is build-in;4° DATA PROCESSING This processing goes from reading of analog and digital sensors to complex calculations to process results comparators there may have addition, multipliers, or any other algorithm that the driver can be run onto;5° DATA MANAGEMENT In this mode ESP receives the data as an example of a sensor and manages what to do, delivering results depending on the data type and processing which it has been programmed;6° NETWORK CONNECTIONS With this module we can connect to any network available computer or make our own P2P net mesh;7° WEB SERVER This module allows us to server WEB and we can access a page written in HTML, PHP, Python, Ruby or any other language of development supported by it; our skills is the limit;8° ACESS POINT We can also make communication between ESPs directly, no need of external network in a Point-to-Point (P2P) communication or access it with a SMARTPHONE, Computer or whatever device that connected directly with the ESP8266 without needing of an external network.

APPLICATIONS

The applications are countless!

Here we separate some of the main areas as far as we understand it:

* Residential and Industrial Automation 
* Remote Monitoring Cameras and Sensors
* Home and Business Security Industrial
* Smart Outlets
* Wireless Industrial Control
* Monitoring of Infants, Children or Elderly
* Wearable Electronic
* Device for location via WIFI
* Security identification tags
* IP Cameras
And finally (this is a not exhaustive list)* Robotics

Types Of ESPs

There are numerous variations of these ESPs in the market.

I will demonstrate the characteristics of the most popular ESPS (01 to 13);

Please check the datasheet for the characteristics of each board’s GPIOs, antennas, pinout distributions, and other characteristics for differentiation. The Expressif port for Arduino has implementations for each of them:)

ESP-01

Fig 2. ESP-01 Board and an Adaptors (user-friendly breadboarded)

ESP-01 is WiFi serial transceiver module based on ESP8266. The SOC has an Integrated TCP/IP protocol stack. It is TTL serial communication interface and its parameters can be set by AT command. It is widely used in networking, smart home project; when it is connected to the WiFi router, it can be used for remote monitoring of home appliances, bedroom temperature, and humidity, controlling home appliances and smart car by the mobile phone.

USB to ESP-01 adapter module has CH340G USB to TTL driver IC onboard (or it can be CP210x USB to UART Bridge VCP Drivers), so you can easily use your computer to do ESP-01 functional debugging and upgrade the firmware via USB. ESP-01 serial wifi module can be directly plugged into the adaptors pin header (I recommend to buy one ESP-01 adapter module because ESP-01 is not breadboarded friendly).

This module appears in two versions that are differentiated by color:
- the blue module has 500 kb of memory flash and;
- the black module has 1Mbits flash memory; it measuring 24.75 by 14.5 millimeters; it has 2 GPIOs available; good for Smart Outlets:D

ESP-05

Fig 3. ESP-05 board; the right chip is Code Storage Flash Memory> Serial NOR Flash; look, no GPIOs :/

This module is a bit different from others as it does not have GPIOS, it was developed for IoT projects that require the use of internet network connections for a low cost as platforms like Arduino, Raspberry Pi, PIC Microcontrollers, or any other system that needs to communicate with the internet; it has UFL connector for external antenna and its measurements are 14.2 by 14.4 millimeters;

The chip and module I/O and UART pins are NOT 5V tolerant. So, take care!

ESP-07

Fig 4. ESP-07 showing its ceramic antennas :)

ESP-07 is an 80 MHz microcontroller with a full WiFi front-end (both as client and access point) and TCP/IP stack with DNS support as well.

For this module there are two versions: 07 and 07S; because 07S is an update of 07, both have 9 GPIO; the difference between them is basically that ESP-07 comes with two types of antenna: ceramics and UFL Connector; it has one Mega Memory Flash; it measures 10 by 14 millimeters; the ESP-07s only has one UFL antenna connector and has 4 Mega Flash Memory; it has external antenna port; watch out, if you connect RX or TX on 5V Arduino you will destroy this module; You must use a logic level converter or a 3.3V of Arduino’s power supply.

ESP-12E & ESP-12F

Fig 5. ESP-12F (spaced antennas) and ESP-12E (more common)

These modules are quite similar to each other; if they did not print the name on the module board we can guide us through the antenna; 12F has the antenna more spaced and differentiated from the other model; both have four Mega Memory Flash and measure 24 by 16 millimeters;

Now let’s get acquainted with the embedded boards with the ESP8266; the best known are the …

Node MCU ESP8266 (ESP-12)

Fig 6. Node MCU ESP8266 (ESP-12)

Node MCU ESP8266 (ESP-12) — that is quite popular and used by designers everywhere; I will use this board soon in the upcoming posts. Be tuned!

ESP8266 (ESP-12) Characteristics

Table 1. ESP8266 (ESP-12) Specifications
 the processor is one core; its working architecture is
of 32-bits; It has a Xtensa processor LX106 with speed clock adjustable to 80 or 160Mhz depending on your project's choice;
with connection via WIFI Integrated that makes use of standard technology IEEE 802.11bgn; No Bluetooth connection:/ Ram memory is 160KB, which are divided 64KB for instruction and 96KB for data; the Flash Memory is Extern QSPI from 512KB to 4 Megabytes:0 depending on version it has 16 GPIO, no DAC, one conversion digital or analog - ADC, it has a GPIO an analog-to-digital converter, and Four Communication interface SPI, I2C, UART, and I2S.

Current Consumption Node MCU ESP8266 (ESP-12)

Table 3. Current consumptions ESP8266 with NodeMCU

WeMos D1

Fig 7. WeMos D1

Resembles an Arduino is designed so that those who already develop projects with Arduino will having no difficulties as with it we can also program it on the Arduino platform; Actually it is a formidable Espressif Community out there!

WeMos D1 Mini Pro

Fig 8. Wemos D1 mini (front & back)

It’s much more compact shape which is great for tiny prototypes projects (LEGO included:) with restricting for physical spaces, and we also have the WeMos D1 Mini Pro which is the smaller of them all; it has a Micro USB connection compatible with MicroPython, Arduino, Nodemcu; It was designed with the intention of least possible space in mind; An awesome minimalistic device! (I already ask online for it…)

Now a board that is in another stage: ESP-32, it has 2 cores \o

ESP-32

Fig 9. ESP-32 The king of uC!
Table 2. ESP-32 Specs

Now when it comes to ESP-32, we can say that we are talking about the of-all-board-one-level-above (?…whatever…you get the idea), Besides it having a double of processing power as the ESP8266, it also has Bluetooth technology built-in and numerous GPIOs; for others great features please see table 2 above 😮

ESP-32 is a low-cost, low-power system on a chip (SoC) microcontroller with integrated Wi-Fi and dual-mode Bluetooth. The ESP-32 series employs a Tensilica Xtensa LX6 microprocessor in both dual-core and single-core variations and includes built-in antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules. ESP-32 is created and developed by Espressif Systems, a Shanghai-based Chinese company, and is manufactured by TSMC using their 40 nm process. It is a successor to the ESP8266 microcontroller. (WIKIPEDIA).

Next, let’s compare this incredible and cheap module with some of the well-known boards by most of us, DIY-designers, — Arduino & RPi:

Comparison between ESPs and ARDUINO UNO and RPi 3 B+

Table 4. All 4 Platforms comparations

In this table, we made comparisons with ESP8266 the ESP32 the ARDUINO UNO R3, and Raspberry Pi 3 b+ to visualize the most detailed differences between them. Please note the number of ADC’s channels presenting in ESP-32 (The World is Analogue! [Peter Kinget]): No one has it!

The first point is current’s consumption; we see here one of the unique advantages of Arduino over the ESPs, the power rating; but depending on the mode we are using the ESPs it can diminish their demand of current, not to mentioning that if we wanted to connect an Arduino in the network for internet communication we would have to use the SHIELD Network module, which would consume a lot of energy and when we make a sum of the currents it surely approaches or would surpass from the consumption of ESP 8266. RPi consumes a lot of energy too! the battery project is an issue here, right?

The Second point, Processing Core; the ESP8266 has a core; the Arduino as well; only ESP-32 has two processing cores; Rpi has 4, but it is a CPU and soon we will use this as mosquitto broker!

The Third point is architecture; ESPs work with 32-bit architecture
while Arduino works with 8-bit which is a big difference. Rpi is 64-bits.

The Fourth point is the Processing Clock; ESP8266 works with 80 or 160Mhz frequency; you can choose what speed of Clock you want to work; with the ESP-32 you also have two choices; however it is 160Mhz or 240MHz, which is quite fast for a microcontroller, but the Arduino works in 16Mhz that is significantly lower than ESPs; Rpi flyes!

The fifth Point, WiFi; ESPs already come with integrated Wi-Fi and the Arduino does not.

The sixth Point, Bluetooth communication; only the ESP-32 comes with the Bluetooth built-in technology already, excepted RPi, of course...

Seventh Point Memory Ram; the ESP8266 has 160Kbytes; The ESP-32 has 520Kbytes and the Arduino has 2Kbytes, this really is the BIG RAM difference between the ESPs and the Arduino; RPi is a computer!

The eighth Point, Flash Memory; ESPs have 4Mbits and the Arduino has 32Kbytes; again, ESP passes away Arduino!

Ninth Point, GPIOs; the ESP8266 has 11 GPIOs; ESP32 has 22 GPIOS and the Arduino has 12 GPIOs; RPi has 40.

Tenth Point, the only one that has an analog-digital-converter — ADC — is the ESP32 with two GPIOs.

The eleventh Point, the ESP8266 only has one Analog-Digital Converter, which is a pity as it loses for the Arduino Uno, which has six, and more for the ESP32 that has 18 ADC GPIOs. RPi has not:/

And finally Interface; the ESP8266 supports SPI, I2C UART, and I2S; more yet, the ESP32 supports, SPI, I2C UART, I2S, and CAN The Arduino and RPi, supports SPI, I2C, and UART.

Advantages of ESP8266 over the Arduino

Obviously, the advantages and disadvantages depend on the use you make. Here it is worth to remember that opinions may differ somewhat of you readers, but it does not mean that it is the last truth said; it is only an opinion based on our knowledge and usability with this boards; in our opinion:

The first advantage of ESP over Arduino is the technology of wireless transmission embedded in the ESP; it is WEB friendly, with the use of NO-SHIELDS nor any peripherals, as it is required for Arduino. In fact, ESP gives vapor to Arduino!

The second advantage is speed and power processing which is undoubtedly a very great discrepancy when speaking hardware power differences between the ESPs and the Arduino, and…

The third advantage, size; as technology advances it is of utmost importance that more and more the boards have their sizes very reduced that is the case of much smaller ESP compared to the Arduino;

the fourth advantage, the price; of an Arduino with Shield Wireless comes to be absurd, in the last survey I made, it was approximately 61.85 US Dollar, compared to the ESP that already comes with Wireless shipped its cost was 5.22 US Dollar; in a quick account Arduino is approximately 12 times more expensive, and not counting the size of it, that is much larger than that ESP;

The fifth advantage, may not be as significant, however when we are in
distant places that we do not have USB devices: cable; on the Arduino, it is the USB-AB standard, those used in printers; we do not always have one of them around; with ESP Node MCU, which is a MINI USB that we use to charge our cell phone, which is very easy to find anywhere we go.

Which Module Should I Choose?

Here we will summarize the four most popular and because they are popular this is exactly why they must have something more that sets them apart from others:

First, Node MCU ESP-32:

The MCU Node ESP-32: this module is incredibly inexpensive and powerful! We will use FreeRTOS with it! btw dis I mentioned that Amazon acquires it?

Second, Wemos:

According to Wemos, this module is totally similar to Node MCU ESP8266, because it has practically the same GPIOs, except that in a structure of an Arduino then you can opt for it if you are used to the Arduino and wants to keep this same design; it’s just a matter of taste or price.

Third, ESP-01:

This is the board practical for small projects because only available two GPIOs and with this limits the number of ports to receive or give information; use it if you don’t need lots outputs/inputs pins; projects like making some smart switch for each room of your residence; use one of these instead of NODE MCU with 11GPIOs or Wemos or ESP12; as it only needs one or at most two GPIOs, ESP-01 is the ideal board ever! see SONOFF Basic Wifi Switch options too!

And Finally, ESP12:

Fig 10. ESP-12 bare-metal for market’s end-product

This module has the same pin’s availability as the others, but it is for
finishing project only
, when you want to reproduce the circuits and deliver an end-product; since it is a module without a USB port, to burn it up, it is necessary that you have an FTDI adapter, that makes the serial communication with the core via USB; soldering will be needed :/ If you are in the development stage, it is not very practical, right?

Programming Platforms

The most popular and well-known program platforms today are two:

ESPlorer

Fig 11. Esplorer — Brazilian App, maintained by a team at PUC-Rio,
the Pontifical Catholic University of Rio de Janeiro in Brazil

The first ESPlorer, it is an IDE; It is multiplatform; it works on Windows on Linux on Mac OS and also on Solares; you will need the program environment to code in Lua NODE MCU; Worth mentioning that it was developed here, in Brazil; point for us Brazilians ;)

Option? Eclipse plugin Environment, if you are familiar with this IDE use Eclipse — Lua Development Tools -LDT;

As an example, this post plays with Lua and ESP-01.

Arduino IDE

Fig 12. Arduino IDE

The second is Arduino IDE; this platform does not require comments as it is well known to all of us DIYers; it is an Open Source IDE for C ++ language programming — with some small setups to the embedded system; it is also cross-platform as it works on Windows on Linux in Mac OS and also in Solares.

As an example, this post plays with ESP8266 and Arduino.

And that’s all!

Thank you for reading it.

Please subscribe to the channel or eventually, you may toss me some feedback 😊

Great 2020! Be happy!

Download All Files For This Project

IoT Episodes Posts:

1° Episode — IoT — Meet IoT Boards: ESP8266 & ESP32 — Which are the best? ESPs or RPis or Arduinos Boards? —( this one:)

2° Episode — IoT — FreeRTOS - Why To Use It? — IoT Projects? What is it?

3º Episode — IoT — FreeRTOS — We are all Preemptive Scheduler! — Some Important Concept for Real-Time Operating System (RTOS)

4° Episode — IoT — FreeRTOS — More About it! — The Essence of FreeRTOS

5° Episode — IoT — FreeRTOS A Real Real-Time TV Transmissions Fundamental Understanding of FreeRTOS Apps

More Related Posts

ESP32-IDF HelloWorld Get Started How To Get Started — ESP_IDF_Series Episode #03

Adafruit-IO Meets ESP8266, Arduino & MIT App Inventor 2 — Hello World for Adafruit-io & MQTT Protocol — 05 #kidSerie

MIT App Inventor 2 Meets Esp8266!!! — Playing With ESP8266–03 #kidSerie

Arduino Headless Setup & ESP8266 (WIFI cheap chip!) — Rather Stunning MCU!!! — #arduSerie 16

Flashing The Official ESPRESSIF Firmware in ESP8266 !!! — Easy ESP8266 Flashing!!! — #arduSerie 17

Get Started Using AT Commands w/ ESP8266 — Multiple Connection as TCP Server — #arduSerie 19

Your First NodeMCU/Lua Script Flash on ESP8266!!! — Let’s get our feet wet with NodeMCU/Lua and sees what happens !!- #arduSerie 20

Credits & References

Expressif site

EXpressif GitHub

Getting Started with the ESP32 Development Board

--

--

J3
Jungletronics

Hi, Guys o/ I am J3! I am just a hobby-dev, playing around with Python, Django, Ruby, Rails, Lego, Arduino, Raspy, PIC, AI… Welcome! Join us!