Close

ESP32 Basics and Working

kellygreene0805kellygreene0805 wrote 08/23/2022 at 08:09 • 5 min read • Like

Similar to Arduino, ESP32 is a development board. Therefore, it offers all the capabilities required to construct your projects. You should be aware of who designed this board to comprehend it fully. You also need to know its primary purposes, how the ESP32 is used, and its technical characteristics.

Even while the ESP32 is greater than the Arduino UNO and ESP8266, that doesn't imply it's the best choice for every project. To use this microchip, we need to understand what it is, how it operates, and what makes it stand out from the crowd.

What is ESP32?

Espressif Systems developed the ESP32 using several low-cost, power-efficient modules and SoC.

What is ESP32

The ESP32 is a successor to the ESP8266, a device that "surprised" Western experimenters in 2014. The first version of the ESP8266 was released on a module named the ESP-01, whose capabilities were mostly undocumented due to a lack of English paperwork. Immediately after the ESP8266's documentation was localized into English, a slew of curious tinkerers learned about the device's capabilities and swiftly gained widespread popularity.

The ESP32 design was enhanced in several areas over the ESP32 design. ESP8266 has WiFi. However, it provides BLE and Bluetooth. It comes with a dual-core design and is speedier. Additionally, it has an ultra-low power mode that is perfect for battery-powered tasks.

The compact ESP32 package offers numerous high-level interfaces, including:

It uses extremely little energy because it has power-saving features like a synchronized clock and different operation modes. Because of its low quiescent current consumption, the ESP32 chip is perfect for use in battery-operated projects and Internet of Things uses.

ESP32 Peripheral Features/Workings

The accompanying Block diagram showcases the ESP32's impressive peripherals.

ESP32 Pinout Diagram:

ESP32 Pinout
The ESP32 pinout diagram for the ESP32 WROOM module is shown above; in it, various pins are indicated by their respective colors, which we will discuss in further depth below.

Digital pins

There are 34 digital pins all on the ESP32. These pins function similarly to the digital pins on an Arduino. Therefore, it allows us to connect external components such as screens, buttons, sensors, buzzers, and more to our creations.

Most of these pins support internal pull-up, high impedance, and pull-down states. They are, therefore, perfect for integrating matrix keyboards and buttons and implementing popular Charlieplexing LED control methods.

ESP32 WROOM module includes 25 GPIO pins, all inputs with or without a pull-up.

The "Recommended Operating Conditions" part of the ESP32 datasheet says that 40mA is the most current that can be drawn from a single GPIO.

Input only pins: 

Pins with pull-up INPUT_PULLUP

Pins without internal pull up

ADC (Analog to digital converters)

Analog sensors can be read from and written to using the same pins on the pinout diagram corresponding to the analog inputs on an Arduino board.

The ESP32's 18-channel A/D converter and 12-bit resolution (0-4096) make it possible to collect data from various voltage and analog-based sensors.

With several analog sensors, you may still create very small linked applications thanks to this.

Analog input pins:

DAC (Digital to Analog Converters)

The majority of Arduino boards produce analog voltages via PWM signals. Two 8-bit D/A converters are present in the ESP32.

It makes it possible to produce two entirely analog voltage signals. With these converters, you can:

DAC Pins:

Capacitive Touch GPIOs

If you need to create software with no physical buttons, you can do so with the help of the ESP32's touch-sensitive pins.

These pins can recognize the minute fluctuations created when a finger is brought close to the pin. Doing this allows any type of control, including buttons and slide bars, to be made without mechanical parts.

Capacitive Touch pins:

RTC

In the core portion, we previously learned about RTC GPIO support. Whenever the ESP32 is in deep sleep mode, the GPIOs connected to the RTC low-power management subsystem are still available for usage. In situations where the ULP co-processor is active, the ESP32 can be awakened from deep sleep via these RTC GPIOs. These GPIO pins may activate the device from an external power supply.

SD / SDIO / MMC Driver

Thanks to this accessory, the ESP32 can communicate directly with MMC and SD cards. In reality, a portable music player can be enhanced by integrating this controller with the analog-to-digital converter.

UART

The UART modules on several microcontrollers are called Serial ports on the Arduino platform. These enable two machines to communicate asynchronously using just two pins.

The ESP32 has three UART ports:

They can communicate via the RS-232, IrDA, and RS-485 standards.

I2C

The ESP32 supports the operation modes, master and slave, using two interfaces: TWI or I2C. Among its attributes are:

I2C Pins

SPI

SPI communication is another feature of the ESP32. The three operational buses are as follows:

Infrared Remote Controller

Additionally, the ESP32 can send and receive signals using several infrared protocols (it is similar to those utilized by the TV remote).

Consequently, you may utilize your ESP32 to build your remote control for your stereo or Television.

PWM

The ESP32 enables the usage of analog outputs via PWM, similar to the ESP8266. Unlike the ESP8266, which only has eight PWM outputs, and the Arduino UNO board, which only has six, the ESP32 has up to sixteen.

PWM pins:

The ESP32 Pinout Diagram above shows the symbols representing each PWM pin individually.

Conclusion

The ESP32 is an extremely capable microcontroller. It's proven with the variety of illustration sketches included with the ESP32. The ESP32 is used a lot more often due to its incredible adaptability and affordable cost. And it ought to start showing up in your workshop reasonably shortly.

Like

Discussions