hack4electronics.com

ESP32-WROOM-32E PINOUT

ESP32 Pinout Reference: Complete Guide to the ESP32-WROOM-32 Module

The ESP32 module (ESP32-WROOM-32 Module) is widely used in the microcontroller world of electronics and Internet of Things (IoT) projects. In this article, we will provide a comprehensive guide to the ESP32 pinout(ESP32-WROOM-32 Module), explaining the different pins and their functionalities

ESP32-WROOM-32 Module that targets a wide variety of applications, ranging from low-power sensor networks to the most demanding tasks, such as voice encoding, music streaming and MP3 decoding

ESP32 integrates a rich set of peripherals, ranging from capacitive touch sensors, SD card interface,
Ethernet, high-speed SPI, UART, I2S, and I2C . One of the key aspects of working with the ESP32 is understanding its pinout.

This figure ESP32-WROOM-32 has 48 pins on which not all the pins are exposed the boards availble in the market, aslo some pins are not even used .

Note : All IO pins of the ESP32 have GPIO and some have RTC_GPIO pin functions. However, these IO pins are multifunctional and can be configured for different purposes based on the requirements. Some IOs have restrictions for usage.

Power Pins of ESP32 Pinout Reference:

The ESP32 Chip( ESP32-WROOM-32 Module) has power-related pins that are crucial for its operation. These include the VCC (3.3V) pin, which supplies power to the microcontroller, and the GND (Ground) pin, which serves as the reference point for the electrical circuit.

It is important to connect these pins correctly to ensure stable operation of the ESP32.

ESP32 Pinout Peripherals (ESP32-WROOM-32 Module)

General Purpose Input/Output (GPIO) pins are versatile pins that can be used for both input and output operations. The ESP32 offers a significant number of GPIO pins, typically labeled with numbers like GPIO0, GPIO2, etc.

These pins can be configured as digital inputs or outputs and can be used for tasks such as reading sensor data, controlling LEDs, or communicating with other devices.

1. ESP32 Pinout : INPUT Pins

GPIO 34 , GPIO 35 ,GPIO 36 and GPIO 39 pins are used only for input functions . These pins lack internal pull-up or pull-down resistors and cannot be utilized as output pins. Therefore, it is recommended to employ these pins solely for input purposes.

2. ESP32 Pinout : OUTPUT Pins

ESP32 WROOM-32 module offers a variety of GPIO (General Purpose Input/Output) pins that can be configured as output pins for controlling external devices such as LEDs, motors, relays, and more. Here’s a list of some of the available output pins on the ESP32 WROOM-32

  • GPIO 0
  • GPIO 2
  • GPIO 4
  • GPIO 5
  • GPIO 12
  • GPIO 13
  • GPIO 14
  • GPIO 15
  • GPIO 16
  • GPIO 17
  • GPIO 18
  • GPIO 19
  • GPIO 21
  • GPIO 22
  • GPIO 23
  • GPIO 25
  • GPIO 26
  • GPIO 27
  • GPIO 32
  • GPIO 33

These pins can be used as digital output pins to control various devices by setting them to high (3.3V) or low (0V) logic levels. Additionally, some of these pins might have special functionalities like PWM, I2C, or SPI, so it’s essential to refer to the documentation or resources provided by Espressif Systems to understand pin capabilities and how to properly configure and use them for your specific application.

3. ESP32 Pinout : Analog Pins

ESP32 microcontroller features two Analog-to-Digital Converters (ADCs), referred to as ADC1 and ADC2ADCs are electronic components that allow the measurement of analog signals and their conversion into digital values, which can be processed and interpreted by digital systems like microcontrollers

ADC1: This is the first ADC module available on the ESP32. It has a total of 8 input channels labeled ADC1_CH0 through ADC1_CH7. These channels can be used to measure analog voltages within a certain voltage range. ADC1 is typically used for lower frequency applications

​​ADC2: This is the second ADC module available on the ESP32. It also has 8 input channels labeled ADC2_CH0 through ADC2_CH7. However, there are certain restrictions associated with ADC2. It cannot be used while Wi-Fi is active due to potential interference. Therefore, it is recommended to use ADC2 for applications that do not require Wi-Fi connectivity or during periods when Wi-Fi is not active

ADC1:

  • GPIO 32 (ADC1_CH4)
  • GPIO 33 (ADC1_CH5)
  • GPIO 34 (ADC1_CH6)
  • GPIO 35 (ADC1_CH7)
  • GPIO 36 (ADC1_CH0)
  • GPIO 37 (ADC1_CH1)
  • GPIO 38 (ADC1_CH2)
  • GPIO 39 (ADC1_CH3)

ADC2:

  • GPIO 0 (ADC2_CH0)
  • GPIO 2 (ADC2_CH2)
  • GPIO 4 (ADC2_CH4)
  • GPIO 12 (ADC2_CH6)
  • GPIO 13 (ADC2_CH7)
  • GPIO 14 (ADC2_CH5)
  • GPIO 15 (ADC2_CH3)
  • GPIO 25 (ADC2_CH8)
  • GPIO 26 (ADC2_CH9)
  • GPIO 27 (ADC2_CH7)

The ADC input channels of the ESP32 exhibit a resolution of 12 bits, resulting in analog readings spanning from 0 to 4095. This range corresponds to voltages between 0V and 3.3V, where 0 equates to 0V and 4095 represents 3.3V. Flexibility exists to adjust the resolution of channels via code, along with the ADC range.

Nevertheless, it’s important to note that the behavior of ESP32’s ADC pins isn’t linear. Consequently, distinguishing between values such as 0 and 0.1V, or between 3.2V and 3.3V, might prove challenging. Keeping this aspect in mind is vital when utilizing the ADC pins in your applications.

4. ESP32 PWM PINS

All pins that can act as outputs can be used as PWM pins

5. ESP32 Chip Serial Communication Pins:

The ESP32 supports various serial communication protocols, making it suitable for applications that require communication with other devices. Two popular serial communication interfaces available on the ESP32 are UART (Universal Asynchronous Receiver-Transmitter) and SPI (Serial Peripheral Interface).

The UART pins, such as GPIO1 (TX) and GPIO3 (RX), facilitate serial communication with devices like computers and other microcontrollers.

  • GPIO 1: UART_TXD (Transmit Data)
  • GPIO 3: UART_RXD (Receive Data)

These pins are used for serial communication and allow you to send and receive data using the UART protocol. UART is a common communication protocol used for connecting microcontrollers with other devices such as sensors, GPS modules, Bluetooth modules, and more.

SPI pins, on the other hand, allow communication with devices such as sensors and display modules.

  • GPIO 6: SPI_MISO (Master In Slave Out)
  • GPIO 7: SPI_MOSI (Master Out Slave In)
  • GPIO 8: SPI_SCLK (Serial Clock)
  • GPIO 9: SPI_CS0 (Chip Select 0)
  • GPIO 10: SPI_CS1 (Chip Select 1)
  • GPIO 11: SPI_CLK (Clock)

These pins allow you to communicate with external devices using the SPI protocol. SPI is a synchronous serial communication interface commonly used to connect microcontrollers to sensors, displays, memory devices, and other peripherals.

ESP32 I2C Pinout

ESP32 WROOM-32 module, the I2C (Inter-Integrated Circuit) pins are used for I2C communication, which is a popular serial communication protocol for connecting microcontrollers to various sensors, displays, and other peripherals. The I2C pins on the ESP32 WROOM-32 are as follows

  • GPIO 21: I2C_SCL (Clock)
  • GPIO 22: I2C_SDA (Data)

These pins are used to establish two-wire communication with I2C devices. The SCL pin carries the clock signal, and the SDA pin carries the data signal. The ESP32 supports multiple I2C interfaces, but these pins are typically associated with the primary I2C interface on the module.

When using I2C communication, it’s important to follow the I2C protocol specifications and consult the documentation for the devices you are connecting to ensure proper configuration and communication

ESP32 module pinout : Special Function Pins:

Capacitive touch GPIO pins

capacitive touch GPIO pins are used for implementing touch-sensitive input. The ESP32 offers a capacitive touch sensing feature that allows you to create touch-sensitive buttons, sliders, and other touch-based interfaces. Here are the capacitive touch GPIO pins on the ESP32 WROOM-32.

  • GPIO 0
  • GPIO 2
  • GPIO 4
  • GPIO 12
  • GPIO 13
  • GPIO 14
  • GPIO 15
  • GPIO 27
  • GPIO 32
  • GPIO 33

You can use these pins to set up capacitive touch sensors in your projects. Capacitive touch sensing enables you to detect touch or proximity by measuring changes in capacitance on these pins, allowing for intuitive and responsive user interfaces.

Strapping Pins of ESP32

Strapping pins, also known as strapping resistors or configuration pins, are used to configure certain behavior or modes of a microcontroller or integrated circuit during the device’s startup or power-on process. On the ESP32 WROOM-32 module, there are specific strapping pins that allow you to set various configuration options. These pins are typically connected to resistors that create specific voltage levels when the device starts up. Here are some of the strapping pins on the ESP32 WROOM-32:

  1. GPIO 0: Determines whether the ESP32 enters programming mode during power-up. Pulling this pin LOW can put the ESP32 in programming mode, which is useful for firmware updates.
  2. GPIO 2: Controls the boot mode of the ESP32. It can be pulled LOW to put the ESP32 in bootloader mode or pulled HIGH for normal operation.
  3. GPIO 15: Determines the boot mode of the ESP32. Pulling this pin LOW during startup can put the ESP32 in bootloader mode, while pulling it HIGH allows normal boot.

These pins play a crucial role in the initial configuration of the ESP32 during startup.

Download the esp32 datasheet: Link

Conclusion:

Understanding the pinout of the ESP32 is essential for successfully working with the microcontroller. This article has provided a comprehensive overview of the different types of pins available on the ESP32, including power pins, GPIO pins, analog pins, serial communication pins, and special function pins.

By familiarizing yourself with the ESP32 pinout, you can confidently design and implement a wide range of projects, from simple sensor interfacing to complex IoT applications.

What is the maximum voltage for ESP32 input pins?

he maximum voltage that can be safely applied to the input pins of the ESP32 microcontroller is typically 3.3 volts (V). The ESP32 operates on a 3.3V power supply and its GPIO pins are designed to tolerate signals within this voltage range. Applying voltages higher than 3.3V to the input pins can risk damaging the ESP32

How many interrupts can ESP32 have?

ESP32 supports up to 32 interrupt sources for handling external events and interrupts. These interrupt sources can be mapped to different GPIO pins or internal events. This allows you to configure and respond to a wide range of events using interrupts, enhancing the real-time responsiveness of your applications.

Which pins should be avoided or not used on the ESP32?

It is recommended to avoid using GPIO 6 to GPIO 11 on the ESP32, specifically on the ESP32 WROOM-32 module, for applications that require precise timing and analog functions. These pins lack hardware PWM support and their behavior might not be linear, making them less suitable for certain tasks. Additionally, GPIO 34 to GPIO 39 are designated as GPIs (input-only pins) without internal pull-up or pull-down resistors, making them unsuitable for use as outputs. Always refer to the documentation provided by Espressif Systems for accurate information on pin capabilities and usage recommendations

Leave a Reply

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