Introduction to ESP32

Introduction to ESP32

ESP32 comes with an on-chip 32-bit microcontroller with integrated Wi-Fi + Bluetooth + BLE features that targets a wide range of applications. It is a series of low-power and low-cost developed by Espressif Systems.

ESP32 Wroom Development Board

 

Features of ESP-Wroom-32

  • ESP-Wroom-32 contains a low-power Tensilica Xtensa® Dual-Core 32-bit LX6 microprocessor at 240 MHz: 994.26 CoreMark; 4.14 CoreMark/MHz
  • 448 KB of ROM for booting and core functions.
  • 520 KB of on-chip SRAM for data and instructions.
  • 4MB of Flash Memory
  • 16 KB SRAM in RTC
  • Wi-Fi 802.11b/g/n
  • Bluetooth v4.2 BR/EDR and Bluetooth LE specifications
ESP32 Board Highlights

 

ESP-WROOM-32

  • ESP-WROOM-32 development board containing Tensilica Xtensa® Dual-Core 32-bit LX6 microprocessor operates at 80 to 240 MHz adjustable clock frequency.
  • It comes with 448 KB of ROM, 520 KB of on-chip SRAM, and 4MB of Flash Memory.

Wireless Connectivity

  • On-chip Wi-Fi supports 802.11b/g/n standard
  • Operates at 2.4 GHz band, up to 150 Mbps
  • It also supports Bluetooth v4.2 BR/EDR and Bluetooth LE specifications this dual mode of Bluetooth makes it even more versatile

Reset/Boot buttons

  • In ESP32 board comes with two main push buttons one is the Reset (RST/EN) button another is the BOOT button.
  • The reset button is used to reset the ESP32 Chip.
  • The use of the boot button is to enter in boot mode to upload the new sketch or program

Power

  • ESP32 development board power up from two sources one is from an external 5 Volt source and another from the USB power source.
  • The ESP32 Board operates at a 2.3 Volt to 3.6 Volt voltage source and its recommended output current is 600 mA or more.
  • Most of the ESP32 development board has an inbuilt 1117 voltage regulator which converts the 5-volt input to 3.3 volts at the output.

Status Indicator

  • In ESP32 development board has one red led status indicator, which shows status while program uploading and serial communication.

 

ESP32 Development Board Pinout

The ESP32 development board has a total of 38 pinouts, the pin mapping that are as follows

ESP32 Pinout Diagram

 

Advanced Peripheral Interfaces

GPIO: Total 32 Multifunctional GPIOs are available on the ESP-Wroom-32 development board which can be used for input/output devices. Every GPIO pin can be configured as an internal pull-up, pull-down, or set to high impedance. The input can also be set to edge-trigger or level-trigger to generate CPU interrupts.

Note: GPIO34, GPIO35, GPIO36, and GPIO39 are the only input pins

ADC: On-chip 12-bit SAR (Successive Approximation Registers) ADCs (Analog to Digital Converter) which supports measurements on 16 channels of ESP32.

DAC: On-chip two 8-bit DAC (Digital to Analog) channels to produce digital signals into analog voltage signal outputs. Both DAC channels can also support independent conversions.

PWM: ESP32 development board has support 8-bit 32 channels PWM. The pins with the symbol ‘~’ represent that it has PWM support. It can be used for dimming LEDs or controlling motors etc.

TOUCH Pad: ESP32 has 10 capacitive sensing GPIOs, that detect physical touch by the human body. This technique can replace mechanical buttons and switches to eliminate mechanical wear and tear. 

I2C: The ESP32 development board has only one I2C bus interface (Supported in Arduino IDE). which can serve as an I2C master or slave, depending on the user’s configuration.

The I2C interfaces support:

  • Standard mode Support (100 Kbit/s)
  • Fast mode Support (400 Kbit/s)
  • Support both 7-bit and 10-bit addressing modes
  • Dual addressing mode

SPI: ESP32 has three SPIs which are SPI, HSPI, and VSPI. These SPIs also support the following general-purpose SPI features:

  • Four modes of SPI transfer format (depend on the polarity and the phase of the SPI clock)
  • Speed Up to 80 MHz 
  • up to 64-byte FIFO

UART: ESP32 development board has two UART interfaces UART0 and UART1. Both provide asynchronous communication and support to RS232, RS485, and IrDA too.

 

Way of Programming for ESP32

The ESP32 supports both C/C++ and MicroPython programming languages that you can use to program your ESP32. Now, let’s check the supported ide for both types of languages.

Here’s a list of IDEs that supports to program the ESP32 series boards with C/C++.

  • ESP-IDF
  • Arduino IDE
  • VS Code

Here’s a list of IDEs that supports to program the ESP32 series boards with MicroPython.

  • Thonny IDE
  • PyCharm
  • Mu Editor
  • uPyCraft IDE
  • VS Code + Pymakr extension

 

ESP Versions Comparison sheet

The below comparison covers the detailed key features for ESP8266, ESP32, ESP32-S2, ESP32-S3, ESP32-C3, and ESP32-C6

 ESP8266ESP32ESP32-S2ESP32-S3ESP32-C3ESP32-C6
Announcement Date2014, August2016, September2019, September2020, December2020, November2021, April
Main processorTensilica L106 32-bit (up to 160MHz)Tensilica Xtensa 32-bit LX6 (up to 240MHz) (optionally dual core)Tensilica Xtensa 32-bit LX7 (up to 240MHz)Tensilica Xtensa 32-bit LX7 dual core (up to 240MHz)RISC-V 32-bit (up to 160MHz)RISC-V 32-bit (up to 160MHz)
SRAM160KB520KB320KB512KB400KB400KB
ROM0448KB128KB384KB384KB384KB
JTAGX?
Cache32 KB instruction64KB8/16KB (configurable)?16KB?
WiFiWi-Fi 4 (only up to 72.2Mbps)Wi-Fi 4Wi-Fi 4Wi-Fi 4Wi-Fi 4Wi-Fi 6
BluetoothXBLE 4.2 (upgrade to 5.0, with limitations)XBLE 5.0BLE 5.0BLE 5.0
EthernetXX?X?
RTC memory768B16KB16KB16KB8KB?
PMU??
ULP coprocessorXULP-RISC-V?X?
Cryptographic AcceleratorXSHA, RSA, AES, RNGSHA, RSA, AES, RNG, HMAC, Digital SignatureSHA, RSA, AES, RNG, HMAC, Digital SignatureSHA, RSA, AES, RNG, HMAC, Digital SignatureSHA, RSA, AES, RNG, HMAC, Digital Signature
Secure bootX
Flash encryptionXXTS-AES-128/256XTS-AES-128XTS-AES-128
SPI244?3?
I2C122?1?
I2S121?1?
UART2 (one TX only)32?2?
SDIO Host010200
SDIO Slave010000
GPIO173443442222
LED PWM5168?6?
MCPWM060200
Pulse counter084?0X
GDMA*000?6?
USBXXUSB OTG 1.1?Serial/JTAG?
TWAI**011?1?
ADC1x 10-bit SAR2x 12-bit SAR, up to 18 channels2x 13-bit SAR, up to 20 channels?2x 12-bit SAR, up to 6 channels?
DACX2x 8-bit2x 8-bit?XX
RMT1x transmission + 1x reception8x transmission/reception4x transmission/reception?2x transmission + 2x reception?
Timer2x 23-bit***4x 64-bit4x 64-bit?2x 54-bit + 1x 52-bit?
Temperature Sensor??
Hall SensorXX?X?
Touch Sensor01014?X?

Components Used

ESP32 WROOM
WiFi Development Tools - 802.11 ESP32 General Development Kit, embeds ESP32-WROOM-32E, 4MB flash.
1
Ad