IOT

How to Get Started with ESP32?

The ESP32, a twin core MCU from Espressif Systems with built-in Wi-Fi and Bluetooth, will be covered in this lesson. If you have experience with the ESP8266, the ESP32 is a vast improvement with many additional functions. With or without any knowledge of the Internet of Things or the ESP8266, this getting started with ESP32 instruction is intended for total beginners.

Introduction

For those just getting started in the world of embedded systems and microcontrollers, Arduino is a fantastic platform. You may create a number of projects that are either for fun or are even for sale with a lot of inexpensive sensors and modules.

New project concepts and implementations emerged as technology developed, and the Internet of Things, or IoT, is one such idea. A number of “things” or gadgets are connected to this platform over the internet to exchange information.

Home automation and smart home applications are the core IoT projects in the DIY community, whereas commercial and industrial IoT projects use considerably more complicated implementations, such as machine learning, artificial intelligence, wireless sensor networks, etc.

This quick introduction highlights the necessity of Internet connectivity for any Internet of Things project, regardless of size, whether it be a simple DIY effort by a hobbyist or a sophisticated industrial operation. The likes of ESP8266 and ESP32 come into play in this situation.

ESP8266 is a fantastic solution if you want to provide your project’s Wi-Fi connectivity. However, ESP32 is the best option if you want to build a complete system with Wi-Fi connectivity, Bluetooth connectivity, high-resolution ADCs, DAC, Serial Connectivity, and many other capabilities.

`

What is ESP32?

Espressif Systems, the same company that created the well-known ESP8266 SoC, offers the inexpensive ESP32 System on Chip (SoC) Microcontroller. The 32-bit Xtensa LX6 Microprocessor by Tensilica is a replacement for the ESP8266 SoC and features built-in Wi-Fi and Bluetooth. It is available in single-core and dual-core versions.

The advantage of ESP32 is that it has inbuilt RF components such a power amplifier, a low-noise receiver amplifier, an antenna switch, filters, and an RF balun, similar to ESP8266. As a result, it is very simple to construct hardware around the ESP32 since minimal external components are needed.

ESP32-Block-Diagram

The fact that ESP32 is produced utilizing TSMC’s ultra-low-power 40 nm technology is another crucial piece of information to be aware of. Therefore, employing ESP32 should make it very simple to create battery-powered applications like wearables, audio equipment, baby monitors, smart watches, etc.

Specifications of ESP32

It is challenging to incorporate all the specifications in this Getting Started with ESP32 guide because ESP32 has many more functions than ESP8266. So, I’ve compiled a summary of some of the key ESP32 specifications here. But I strongly advise you to consult the Datasheet for the full set of specifications.

  • Single or Dual-Core 32-bit LX6 Microprocessor with clock frequency up to 240 MHz.
  • 520 KB of SRAM, 448 KB of ROM and 16 KB of RTC SRAM.
  • Supports 802.11 b/g/n Wi-Fi connectivity with speeds up to 150 Mbps.
  • Support for both Classic Bluetooth v4.2 and BLE specifications.
  • 34 Programmable GPIOs.
  • Up to 18 channels of 12-bit SAR ADC and 2 channels of 8-bit DAC
  • Serial Connectivity include 4 x SPI, 2 x I2C, 2 x I2S, 3 x UART.
  • Ethernet MAC for physical LAN Communication (requires external PHY).
  • 1 Host controller for SD/SDIO/MMC and 1 Slave controller for SDIO/SPI.
  • Motor PWM and up to 16-channels of LED PWM.
  • Secure Boot and Flash Encryption.
  • Cryptographic Hardware Acceleration for AES, Hash (SHA-2), RSA, ECC and RNG.

Different Ways to Program

If a piece of high-quality hardware like the ESP32 can be programmed (written code) in multiple ways, it will be more user-friendly. The ESP32 offers a variety of programming environments, which is not surprising.

Several of the frequently employed programming environments include:

  • Arduino IDE
  • PlatformIO IDE (VS Code)
  • LUA
  • MicroPython
  • Espressif IDF (IoT Development Framework)
  • JavaScript

We will use the Arduino IDE, which is currently a comfortable setting, to program the ESP32 in our next projects. However, you can undoubtedly try out some others as well.

ESP32 DevKit – The ESP32 Development Board

The ESP-WROOM-32 Module is one of the numerous ESP32-based modules that Espressif Systems has produced. It is made up of an ESP32 SoC, a 4 MB Flash IC, a 40 MHz crystal oscillator, and a few passive parts.

ESP-WROOM-32

The PCB of the ESP-WROOM-32 Module has edge castellations, which is advantageous. As a result, third-party manufacturers create a break-out board for the ESP-WROOM-32 Module.

The ESP32 DevKit Board is one such board. It includes the ESP-WROOM-32 as the primary module along with some extra hardware for quick ESP32 programming and GPIO Pin connectivity.

ESP32-Development-Board

Layout

By examining the design of the ESP32 DevKit Board, one of the well-known low-cost ESP Boards on the market, we can discover what makes up a standard ESP32 Development Board.

The layout of an ESP32 Development Board that I own is seen in the figure below.

IMPORTANT NOTE: I have a board with 30 pins (15 pins on each side). Some boards have 36 pins, while others have a few less. Check the pins again before connecting anything or even powering up the board.

ESP32-DevKit-Board-Layout

As you can see from the image, the ESP32 Board consists of the following:

  • ESP-WROOM-32 Module
  • Two rows of IO Pins (with 15 pins on each side)
  • CP2012 USB – UART Bridge IC
  • micro–USB Connector (for power and programming)
  • AMS1117 3.3V Regulator IC
  • Enable Button (for Reset)
  • Boot Button (for flashing)
  • Power LED (Red)
  • User LED (Blue – connected to GPIO2)
  • Some passive components

The USB-to-UART IC’s DTR and RTS pins are used to automatically put the ESP32 in programming mode (when necessary) and rest the board after programming, which is an intriguing feature.

Pinout of ESP32 Board

I’ll create a unique lesson specifically for the ESP32 pinout. Look at the ESP32 Development Board’s wiring diagram for the time being, though.

ESP32-Pinout

This pinout is for the ESP Board’s 30 pin configuration. I will describe the pinout of both the 30 and 36 pin versions of the ESP Boards in the pinout tutorial.

Conclusion

I hope all of you understand this beginner’s tutorial on ESP32, an excellent SoC with integrated Wi-Fi and Bluetooth connectivity. We MATHA ELECTRONICS will be back soon with more informative blogs soon.

 

Leave a Reply

Your email address will not be published. Required fields are marked *