What is ESP32 and Why Is It Best for IoT Projects?

Featured Image What Is Esp32 Use In Iot

Microcontroller (MCU) boards such as Arduino have a new variant on the block ESP32 is finding increasing applications in home automation, DIY projects, and even as a standalone device. First launched in September 2016 by Espressif Systems, ESP32 is a dual-core (two microprocessors), dual-mode MCU with both Wi-Fi and Bluetooth built in. The design is a mini-revolution in the IoT space and has spawned clones from every major board maker.

Let’s take a look into why ESP32 is becoming a big deal for IoT projects and how well it compares to Raspberry Pi and Arduino.

What Is ESP32 and How Does It Work?

ESP32 is a low-powered, low-cost microcontroller (MCU) board, with both Wi-Fi and Bluetooth built in, and is based on a dual-core processor mechanism. The first one is a powerful processor, such as a Xtensa LX6 (~240 MHz) with 512 KiB memory and the second an ultra-low coprocessor (ULP) with only 8 KiB memory designed to run when ESP32 is in deep-sleep mode.

Other components include around 48 I/O pins (variable); an array of peripheral interfaces including temperature, hall effect, and capacitive touch sensors; and an 8-centimeter LCD panel, prominently visible here in an ESP32-WROVER board by Espressif Systems.

Esp32 Board Espressif Example 1
ESP32-WROVER Board by Espressif Systems

The processor architecture of ESP boards is 32-bit based and uses an externally purchased 4 MB flash memory such as “W25Q32” to store the data. The board uses hardware acceleration features such as RSA, SHA, RNG, and AES for cryptographic keys. Without going into detail, we can appreciate the main reasoning behind hardware acceleration. It works excellently in small-form low-power applications for which ESP32 has been designed. The built-in peripherals include infrared remote controllers, PWM, digital-to-analog computers, and a real-time clock.

Espressif is not the only one currently that manufactures ESP32 boards. Its dual mode design is becoming increasingly popular with low-cost projects. Another example of ESP32 is Banana Pi BPI UNO32 by an alternative IoT hardware company called Banana Pi. It is also based on an Xtensa 32-bit dual core processor, with 520 KiB memory, Bluetooth and Wi-Fi built in, and 4 MB flash support.

Esp32 Banana Pi Board 1
Banana Pi BPI UNO32

Other clones of Espressif ESP32 boards include:

  • Adafruit’s HUZZAH32
  • Ai-Thinker’s ESP32-A1S
  • IntoRobot’s W33
  • AnalogLamb’s ESP-32S-ALB
  • Goouuu Tech’s ESP-32F

As many of you may prefer working on ESP32 projects with Arduino IDE, you need to ensure the relevant board’s availability, which is covered in the below section.

How Does ESP32 Compare to Other Boards?

If you have been using Arduino for a while, you will immediately feel very comfortable working with ESP32, as you don’t have to purchase additional Wi-Fi and Bluetooth modules. While as an Arduino user you should be able to do all projects in ESP32, the reverse is not true. This is because the capabilities of Arduino boards are much broad-based considering there are so many capable boards ranging from UNO to Mega. Then why should you even consider ESP32?

Featured Image Best Os Arduino

The biggest reason you should consider ESP32 is the built-in Wi-Fi and Bluetooth support which is good for compact projects. The Wi-Fi speeds of ESP32 can be as high as 150 Mbps, which makes it a perfect accessory for IoT projects in wearable electronics, smartphone devices, and along with other boards such as Arduino.

In fact, it runs on FreeRTOS, a leading operating system supported by Arduino. A big advantage of ESP32 is that it is readily supported by Arduino IDE as a “shield” which can be accessed from Board Manager. One can easily use functions from the FreeRTOS libraries when coding for the ESP32 within the Arduino IDE.

Considering the scale of ESP32 applications which could be tiny, coin cell devices, it is better to use a predictable memory OS such as FreeRTOS rather than have its own complete OS, which is supported by Raspberry Pi, for example.  

Raspberry Pi Plex Server Featured
Raspberry Pi as Plex Server

Other ways in which ESP32 compares to Raspberry Pi is in terms of the scale of applications. Raspberry Pi is a computer that mainly runs well with Linux operating systems and can be used for advanced applications such as running a web server. Or you can also set up WireGuard or build an NAS server for network storage needs. It also has an advanced camera module. Compared to the advanced uses of Raspberry Pi, ESP32 is quite modest, as its main considerations are power efficiency and low cost.

ESP32 Applications in Internet of Things

Due to its low-cost, multiple-component support design, built-in Wi-Fi and Bluetooth and ready compatibility with Arduino and many other boards, ESP32 is becoming a fast popular choice for IoT projects. Priced between $5 and $13, the board is ideal for sensor-based IoT projects. For example, to create a face camera that readily integrates with Arduino IDE and any cheap camera module. This is probably the cheapest camera you could create.

Esp32 Camera Module 1

ESP32 integrates with common Web applications including email, text messages, IFTTT, and such. However, its main applications are all driven by small sensor requirements. With built-in temperature sensors and a range operating from -40 °C to 120 °C, ESP32 can be used as a weather sensor and also in home automation, such as kitchen refrigerator automation with a monitoring app, managing food safety.

ESP32 also supports LoRa, NB-IoT, and Zigbee which gives it a complete coverage for home automation requirements. You have to find online and add the relevant module to the board. To complete your familiarity with ESP32 and to gain project ideas, visit Espressif’s website for advanced details.

Are you intrigued by the endless possibilities of ESP32? As a developer, have you considered working with this board yet? Please share your experiences in the comments.