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.
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:
- Switches for antennas
- Balun to regulate RF
- Power booster
- Amplifier with minimal noise
- Modulated energy and air filtration systems
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:
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:
- GPIO 34
- GPIO 35
- GPIO 36
- GPIO 39
Pins with pull-up INPUT_PULLUP
- GPIO14
- GPIO16
- GPIO17
- GPIO18
- GPIO19
- GPIO21
- GPIO22
- GPIO23
Pins without internal pull up
- GPIO13
- GPIO25
- GPIO26
- GPIO27
- GPIO32
- GPIO33
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:
- ADC1_CH0 (GPIO 36)
- ADC1_CH1 (GPIO 37)
- ADC1_CH2 (GPIO 38)
- ADC1_CH3 (GPIO 39)
- ADC1_CH4 (GPIO 32)
- ADC1_CH5 (GPIO 33)
- ADC1_CH6 (GPIO 34)
- ADC1_CH7 (GPIO 35)
- ADC2_CH0 (GPIO 4)
- ADC2_CH1 (GPIO 0)
- ADC2_CH2 (GPIO 2)
- ADC2_CH3 (GPIO 15)
- ADC2_CH4 (GPIO 13)
- ADC2_CH5 (GPIO 12)
- ADC2_CH6 (GPIO 14)
- ADC2_CH7 (GPIO 27)
- ADC2_CH8 (GPIO 25)
- ADC2_CH9 (GPIO 26)
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:
- Handle an analog device's circuitry
- Control an LED's brightness
- You may even incorporate a tiny amplifier and speaker into your idea to play music.
DAC Pins:
- DAC1 (GPIO25)
- DAC2 (GPIO26)
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:
- T0 (GPIO 4)
- T1 (GPIO 0)
- T2 (GPIO 2)
- T3 (GPIO 15)
- T4 (GPIO 13)
- T5 (GPIO 12)
- T6 (GPIO 14)
- T7 (GPIO 27)
- T8 (GPIO 33)
- T9 (GPIO 32)
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.
- RTC_GPIO0 (GPIO36)
- RTC_GPIO3 (GPIO39)
- RTC_GPIO4 (GPIO34)
- RTC_GPIO5 (GPIO35)
- RTC_GPIO6 (GPIO25)
- RTC_GPIO7 (GPIO26)
- RTC_GPIO8 (GPIO33)
- RTC_GPIO9 (GPIO32)
- RTC_GPIO10 (GPIO4)
- RTC_GPIO11 (GPIO0)
- RTC_GPIO12 (GPIO2)
- RTC_GPIO13 (GPIO15)
- RTC_GPIO14 (GPIO13)
- RTC_GPIO15 (GPIO12)
- RTC_GPIO16 (GPIO14)
- RTC_GPIO17 (GPIO27)
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:
- UART0
- UART1
- UART2
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:
- Standard mode (100 Kbit/s)
- Fast mode (400 Kbit/s)
- 7 and 10-bit addressing
I2C Pins
- GPIO 21 (SDA)
- GPIO 22 (SCL)
SPI
SPI communication is another feature of the ESP32. The three operational buses are as follows:
- Because it supports four different transfer modes, it can communicate with virtually any QSPI or SPI gadget on the marketplace.
- High speeds are available on all SPI interfaces (theoretically for about 80 MHz).
- Receiving and transmitting 64-byte buffers.
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.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.