Steve Zafeiriou (b. 1998, Thessaloniki, GR) is a New Media Artist, Technologist, and Founder of Saphire Labs. His practice investigates how technology can influence, shape, and occasionally distort the ways individuals perceive the external world. By employing generative algorithms, electronic circuits, and interactive installations, he examines human behavior in relation to the illusory qualities of perceived reality, inviting observers to reconsider their assumptions and interpretations.

In search of IKIGAI
dark mode light mode Search Menu
ESP32 Pinout Guide: ESP32 DevKit V4 board featuring ESP32-WROOM-32 module with labeled components such as EN button, boot button, micro USB port, I/O connectors, USB-to-UART bridge, and power indicator LED.

ESP32 Pinout Guide: A Comprehensive Overview for 2025

Learn all about the ESP32 pinout in this detailed 2025 guide. Discover the pin configuration, functions, and practical tips to master your ESP32 projects.

If you are exploring the ESP32 and require a comprehensive understanding of its pinout, this guide will serve as a valuable resource. The ESP32 is a powerful and adaptable microcontroller, extensively utilized in IoT and embedded systems for its wide-ranging capabilities and versatility.

A thorough grasp of the ESP32 pinout is critical to optimizing its performance, whether you’re working with digital interfaces, analog inputs, or communication protocols.

This guide offers detailed insights into ESP32 pin configurations, practical tips, and essential information to enhance your projects.

As a new media artist and technologist with over a decade of experience in microcontrollers and embedded systems, I frequently integrate the ESP32 into interactive art installations.

Leveraging its advanced features, I ensure seamless operation of ESP32 sensors, motors, and communication modules, enabling real-time interactivity in my art projects.

The ESP32’s capabilities, including support for ESP32 GPIO, ESP32 ADC, and ESP32 I2C, make it an indispensable tool in my creative and technical work.

Best Sensors for Interactive Art Installations
ESP32 Pinout Guide

What Is the ESP32 and Why Is Its Pinout Important?

Overview of the ESP32 Microcontroller

The ESP32 is a highly versatile and cost-efficient microcontroller, widely recognized for its robust capabilities and flexibility.

It is a preferred choice among tech enthusiasts and professionals, whether they are designing interactive art installations, developing prototypes, or working on embedded systems.

Equipped with essential features such as Wi-Fi, Bluetooth, and an array of ESP32 GPIO pins, this microcontroller enables a vast range of possibilities for creative and technical projects.

The ESP32 supports a wide range of applications, from simple prototypes to complex, real-time systems, making it an indispensable tool for developers at all skill levels.

Its compatibility with platforms like the ESP32 Arduino IDE and its ability to support programming in multiple languages add to its appeal, offering flexibility for diverse use cases.

Key Features of the ESP32 That Rely on Pin Functionality

Below is an overview of key features tied to ESP32 pin functionality:

LilyGo T-Display S3, Pinout Guide
ESP32 Pinout Guide: LilyGo T-Display S3, Pinout

GPIO Pins

The ESP32 includes 48 GPIO pins, with 25 accessible through pin headers on standard development boards like the ESP32 DevKit V1.

These pins are fundamental for connecting sensors, modules, and actuators, serving as the backbone of most projects.

Communication Interfaces

  1. UART: Supports serial communication for simple and reliable data exchange between devices.
  2. I2C: A communication protocol that lets low-speed devices communicate, perfect for sensors and small modules.
  3. I2C: A protocol that enables communication between low-speed devices, such as ESP32 sensors and small modules, using minimal pins.
  4. CAN: Suited for industrial applications, such as automotive systems or machinery, offering robust, error-resistant communication.

Analog Interfaces

  1. ADC: The ESP32 ADC includes 15 channels to convert real-world analog signals, such as sensor readings, into digital values for processing.
  2. DAC: The ESP32 DAC allows for the generation of analog output, converting digital data into real-world analog signals, useful in audio systems or analog signal generation.
ESP32 Web Server: Interactive Web Pages
ESP32 Pinout Guide: Interactive Web Pages

Understanding the Pinout for Beginners

For newcomers, it serves as a crucial guide to avoiding common pitfalls, such as incorrect pin connections.

For experienced developers, it enables the creation of sophisticated and efficient systems by maximizing the ESP32’s capabilities.

Key Pin Types and Their Roles:

Pin TypeDescription
Power PinsThese pins handle the power supply, including input voltage, 3.3V output, and ground (GND) connections. Proper use ensures the ESP32 operates reliably and avoids damage from incorrect power configurations.
GPIO PinsServing as the general-purpose connectors, ESP32 GPIO pins are versatile, supporting everything from basic input/output tasks to specialized roles like ESP32 touch pins or communication protocols. Correct assignment of these pins is critical for smooth project functionality.
Analog PinsADC Converts real-world analog signals, such as temperature or light levels, into digital data the microcontroller can process while DAC Performs the reverse, converting digital data into analog signals, allowing interaction with physical systems like audio or motor controllers.
Communication PinsThese support various protocols such UART: For serial communication, I2C: Ideal for connecting low-speed peripherals like sensors. SPI: Facilitates high-speed communication with devices like displays and SD cards. CAN: Used in industrial settings for robust and error-tolerant data transmission.
Special Function PinsBoot Mode Pins: Configure the ESP32 bootloader pins during startup. EN Pin: Enables or disables the microcontroller, offering control over power management.
ESP32 Pinout Guide

A solid grasp of the ESP32 pin configuration enables you to make informed decisions about pin assignments.

For instance, reserving GPIO 13 and GPIO 14 for JTAG debugging ensures smooth development and minimizes conflicts.

This level of understanding not only enhances efficiency but also reduces errors, making your projects more reliable.

Explore my detailed guides on implementing Haptic Technology with ESP32 or get inspired by some practical examples such as how to create ESP32 Web Servers to enhance your skills.

ESP32 Pinout Guide: ESP32 DevKit V4 board featuring ESP32-WROOM-32 module with labeled components such as EN button, boot button, micro USB port, I/O connectors, USB-to-UART bridge, and power indicator LED.
ESP32 Pinout Guide: ESP32 DevKit V4 board featuring ESP32-WROOM-32 module with labeled components such as EN button, boot button, micro USB port, I/O connectors, USB-to-UART bridge, and power indicator LED.

ESP32 Pinout Diagram Explained

By familiarizing yourself with its functions, you can effectively utilize the ESP32, whether you’re tackling simple tasks or building complex embedded systems.

Visual Representation of the ESP32 Pinout

The ESP32 DevKit V1 board includes 30 pins, each with a specific role: power supply, GPIO, analog functionality, and communication protocols.

Below is a simplified overview:

Pin NoFunctionDescription
1GNDGround Pin
23V33.3V Power Output
3-11GPIOGeneral Purpose Input/Output Pins
12RXUART Receive Pin
13TXUART Transmit Pin
14-25ADC1, ADC2Analog Pins (for ADC functionality)
26-28SDA, SCLI2C Communication Pins
29ENEnable Pin
30IO0Boot Mode Pin
ESP32 Pinout Guide

Key Sections of the ESP32 Pinout

Power Pins

The power pins are essential for powering the ESP32 and its connected peripherals.

They ensure proper voltage distribution and circuit stability.

  1. 3.3V: Supplies a stable 3.3V for powering the microcontroller and peripherals.
  2. GND: Ground pins complete the circuit and provide a stable voltage reference.

GPIO Pins

The ESP32 features 48 GPIO pins, 25 of which are accessible for direct use on the ESP32 DevKit V1.

These pins are highly versatile, thanks to pin multiplexing, allowing functions like digital I/O, PWM, and more.

Popular GPIO Pins:

  1. GPIO 13, GPIO 14: Commonly used for JTAG debugging. Avoid repurposing these pins for other functions during debugging, as it may interfere with the process.

Communication Pins

Communication pins enable seamless data exchange between the ESP32 and external devices such as sensors, modules, or chips.

  1. UART: RX and TX pins handle serial communication, allowing data transfer over a simple serial link.
  2. I2C: SDA (data line) and SCL (clock line) facilitate low-speed communication with devices like sensors or displays.
  3. SPI: Supports high-speed communication for devices like memory chips and displays.

Special-Purpose Pins

Special-purpose pins handle specific tasks that enhance the ESP32’s functionality.

  1. EN (Enable): Acts as a reset pin, restarting the board and reinitializing it when needed.
  2. Boot Mode (IO0): Used during startup to configure the ESP32 bootloader pins, enabling normal operation or alternative modes for programming and debugging.
ESP32 Pinout Guide: ESP32-WROOM-32 pinout diagram showcasing GPIO pin functions, including input-only pins, touch sensor pins, ADC and DAC channels, communication pins for I2C, UART, SPI, and power pins (VIN, 3.3V, and GND)
ESP32 Pinout Guide: ESP32-WROOM-32 pinout diagram showcasing GPIO pin functions, including input-only pins, touch sensor pins, ADC and DAC channels, communication pins for I2C, UART, SPI, and power pins (VIN, 3.3V, and GND)

Variations Between Different ESP32 Models

Different ESP32 models feature distinct pin configurations and capabilities, which can significantly impact how they are utilized in projects.

Familiarizing yourself with the specifications of each model is crucial for selecting the right one for your application.

Below is a comparison of two popular models, ESP32-WROOM-32 and ESP32-S3, to highlight their unique features.

ESP32-WROOM-32

  1. Processor: Powered by a dual-core Xtensa LX6 microprocessor, providing reliable performance for most embedded and ESP32 IoT applications.
  2. Pin Count: Equipped with 30 pins as outlined in the ESP32 pinout diagram, making it versatile for a wide range of applications.
  3. ADC Channels: Supports 18 ESP32 ADC channels for analog input.
  4. Bluetooth: Includes Bluetooth capabilities for wireless communication.
  5. USB OTG: Not supported, limiting direct USB connectivity.

The ESP32-WROOM-32 is an excellent choice for projects requiring solid processing power and a diverse range of pin functionalities.

ESP32-S3

  1. Processor: Features a dual-core Xtensa LX7 microprocessor, delivering enhanced performance compared to the LX6, ideal for AI and machine learning tasks.
  2. ADC Channels: Supports 20 ESP32 ADC channels, providing more options for analog inputs.
  3. USB OTG: Includes USB OTG functionality, simplifying integration with USB peripherals and expanding its versatility for ESP32 IoT applications.
  4. Bluetooth: Supports Bluetooth 5.0, offering improved range and data transfer speeds.

The ESP32-S3 is better suited for applications requiring advanced features such as AI, sensor integration, and USB-based connectivity.

FeatureESP32-WROOM-32ESP32-S3
ProcessorDual-core, Xtensa LX6Dual-core, Xtensa LX7
ADC Channels1820
BluetoothYesYes (Bluetooth 5.0)
USB OTGNoYes
ESP32 Pinout Guide

ESP32 Pinout Guide

Each model has a distinct ESP32 pinout. For example:

The ESP32-S3 introduces differences in pin functionality, such as support for USB OTG, which the ESP32-WROOM-32 lacks.

When designing projects, it’s essential to refer to the specific ESP32 pin configuration of your model to avoid conflicts and optimize functionality.

Explore more about microcontroller matchups at Arduino vs Raspberry Pi.

esp32 soil moisture sensor with lilygo t-display s3: simple web server
ESP32 Pinout Guide: esp32 soil moisture sensor with lilygo t-display s3 – simple web server

Detailed Breakdown of ESP32 Pins

Below is a detailed breakdown to help you navigate this microcontroller’s versatile pins.

Power Pins

The power pins keep the ESP32 and its connected peripherals operating efficiently.

Pin NamePurposeVoltage
VINMain power input pin~5V
3V3Provides steady 3.3V output3.3V
GNDGround pin0V
ESP32 Pinout Guide

Check out my guide on Arduino If Else Statements for a deeper understanding of the programming logic.

GPIO Pins

The ESP32 GPIO pins are the backbone of its versatility, configurable for various tasks, including digital input/output, PWM, and specialized roles.

GPIO Pin RangeFunctionality
GPIOs 0–33Configurable for digital input/output, PWM, and specialized functions like ESP32 touch pins.
GPIOs 13, 14Typically reserved for JTAG debugging; avoid using for general tasks to prevent interference.
GPIOs 34–39Input-only pins; suitable for digital input signals but not output.
ESP32 Pinout Guide

Pin Multiplexing allows a single GPIO pin to serve multiple roles, optimizing the available pins for your project.

GeoVision V2 3D geographic sculpture rendering, demonstrating precise spatial modeling and innovative geographic visualization capabilities.
GeoVision V2 3D geographic sculpture rendering, demonstrating precise spatial modeling and innovative geographic visualization capabilities.

Analog Pins

The ESP32 supports both analog input and output, critical for projects involving sensors or signal processing.

  1. ADC (Analog-to-Digital Converter): Reads analog signals across 15 channels with high resolution. Each bit corresponds to ~0.0008 volts, enabling accurate measurements.
  2. DAC (Digital-to-Analog Converter): Converts digital signals to analog voltages (0 to 3.3V). Useful for simple analog output tasks, though less suitable for high-precision applications like audio.

Communication Pins

The ESP32 is equipped with multiple communication protocols, making it highly adaptable for IoT and embedded systems.

InterfacePinsDetails
UART (Universal Asynchronous Receiver-Transmitter)TX, RXHandles serial communication for data exchange between devices.
I2C (Inter-Integrated Circuit)SDA, SCLFacilitates communication with low-speed devices like sensors or displays.
SPI (Serial Peripheral Interface)MOSI, MISO, SCK, CSHigh-speed communication protocol for peripherals like memory chips.
CAN (Controller Area Network)TX, RXDesigned for robust communication, commonly used in automotive systems.
ESP32 Pinout Guide

Special Function Pins

Certain pins on the ESP32 have unique roles that control specific behaviors or configurations.

  1. Boot Mode Pins: Includes GPIO0, GPIO2, GPIO5, GPIO12, and GPIO15. Known as strapping pins, they determine whether the ESP32 bootloader pins set the board into BOOT or FLASH mode during startup.
  2. EN Pin: Acts as a reset pin, restarting the ESP32 when pulled low.

Practical Tips

  1. Reserve GPIO 13 and GPIO 14 for debugging when using JTAG tools.
  2. Refer to the specific ESP32 pinout for your model, as configurations can vary between versions like the ESP32-WROOM-32 and ESP32-S3.
  3. Leverage ESP32 ADC and DAC capabilities to interact seamlessly with analog devices.
Automated Gardening System
ESP32 Pinout Guide: Automated Gardening System

Common Pitfalls and Best Practices When Using ESP32 Pins

Working with the ESP32 can be rewarding but presents challenges, especially for beginners.

Over time, I’ve learned to navigate these pitfalls and adopt best practices to ensure smooth project development.

Avoiding Pin Conflicts

Some ESP32 GPIO pins are reserved for specific functions. Using them incorrectly can disrupt your project.

  1. Reserved Pins: GPIO13 and GPIO14: Typically used for JTAG debugging. Avoid using them for general-purpose tasks unless debugging is disabled.
  2. Strapping Pins: Configure boot and FLASH modes during startup. Key pins include GPIO0, GPIO2, GPIO5, GPIO12, and GPIO15.
Pin NumberFunction
GPIO0Boot Mode
GPIO2Boot Mode / FLASH Mode
GPIO5Boot Mode
GPIO12FLASH Mode Strapping
GPIO15Boot Mode
ESP32 Pinout Guide

Tip: Refer to the ESP32 pin configuration for your specific model to avoid conflicts.

Handling Voltage Levels and Current Limitations

Understanding the ESP32’s voltage and current specifications is crucial to avoid damage.

  1. Voltage Levels: The ESP32 operates at 3.3V. Exceeding this voltage (e.g., supplying 5V to a GPIO pin) can permanently damage the microcontroller.
  2. Current Limits: Each GPIO pin can handle up to 12mA, with a total board current limit of 200mA. For higher loads, use external components like transistors, MOSFETs, or relay modules.
Pin FunctionVoltage LevelCurrent Limit
GPIO Pins3.3V12mA per pin
Power Pins3.3VUp to 200mA total

Using External Pull-up or Pull-down Resistors

Unconnected (floating) pins can cause instability in your project. Address this by using external resistors:

  1. Pull-up Resistor: Connects a pin to the voltage supply, ensuring it defaults to a HIGH state.
  2. Pull-down Resistor: Connects a pin to ground, defaulting it to a LOW state.

Best Practice: A 10kΩ resistor works well for most applications, stabilizing signals for reliable operation.

Debugging Pin-related Issues

Pin-related issues can be tricky, but these steps simplify troubleshooting:

  1. Verify Connections: Double-check all wires and connections to avoid shorts or loose ends.
  2. Use Serial Monitor: Log pin states using the Arduino IDE’s Serial Monitor for real-time debugging.
  3. Check Pin Modes: Ensure correct configurations using pinMode() (e.g., INPUT, OUTPUT, or INPUT_PULLUP).
  4. Measure Voltages: Use a multimeter to validate voltages on problematic pins.
  5. Test Incrementally: Isolate and test individual components or pins to identify issues.

Practical Applications of the ESP32 Pinout

Real-world Examples

  1. IoT Sensors: Connect temperature, humidity, or motion sensors to GPIO and ADC pins to create responsive, real-time systems.
  2. Motor Drivers: Use PWM on GPIO pins to control motors in kinetic sculptures or robotic systems.
  3. Communication Hubs: Leverage Wi-Fi and Bluetooth for wireless control of installations or to connect multiple devices.

How to Select the Right Pins

Choosing the correct pins can make or break your project.

Here’s a quick guide:

  1. Power Pins: Provide power to peripherals. Use GND for grounding.
  2. GPIO Pins: General-purpose tasks like digital I/O or PWM.
  3. Analog Pins: Read analog signals from sensors.
  4. Communication Pins: Use UART, I2C, or SPI for data transfer.
  5. Special-purpose Pins: Reset the ESP32 or configure boot modes.

Prototyping and Scaling Up with ESP32 Pin Configurations

  1. Start with a Breadboard: Experiment with jumper wires for flexible connections. Test functionality incrementally before committing to a design.
  2. Leverage Development Tools: Use the Arduino IDE or ESP-IDF for setup and programming. Both offer robust libraries and tools for working with the ESP32.
  3. Design for Scalability: Once the prototype is validated, transition to a custom PCB to enhance durability and performance.

Tips and Tools for Working with ESP32 Pinout

Here are some tips and tools I’ve picked up that can help make working with the ESP32 pinout much easier:

Software Tools for Pin Mapping and Configuration

Navigating the ESP32 pinout becomes much easier with the following tools:

  1. Online Pinout Diagrams: Interactive platforms like Pinout.xyz allow you to explore each pin’s function visually, providing clarity and reducing setup errors.
  2. Fritzing: An excellent tool for beginners to create visual wiring diagrams. It helps map out your circuit before making physical connections.
  3. Wokwi: Specifically designed for virtual prototyping with ESP32, Wokwi lets you simulate circuits and code, making it a perfect tool for experimentation.
  4. Datasheets and Manuals: Official resources from Espressif provide detailed technical insights, such as voltage tolerances and specific pin functionalities.

Using the Arduino IDE and ESP-IDF for Pin Setup

Both Arduino IDE and ESP-IDF offer flexible environments for programming the ESP32:

Arduino IDE: Ideal for beginners due to its simplicity and extensive community support.

Example: Configuring GPIO 13 as an output:

void setup() {
    pinMode(13, OUTPUT); // Set GPIO 13 as an output
}

void loop() {
    digitalWrite(13, HIGH); // Turn on GPIO 13
    delay(1000);            // Wait for 1 second
    digitalWrite(13, LOW);  // Turn off GPIO 13
    delay(1000);            // Wait for 1 second
}

ESP-IDF: A professional framework offering advanced features and precise control for experienced developers.

Example: Setting GPIO 13 as an output:

void app_main() {
    gpio_pad_select_gpio(GPIO_NUM_13); // Select GPIO 13
    gpio_set_direction(GPIO_NUM_13, GPIO_MODE_OUTPUT); // Set GPIO 13 as output
    while (1) {
        gpio_set_level(GPIO_NUM_13, 1); // Turn on GPIO 13
        vTaskDelay(1000 / portTICK_PERIOD_MS); // Wait for 1 second
        gpio_set_level(GPIO_NUM_13, 0); // Turn off GPIO 13
        vTaskDelay(1000 / portTICK_PERIOD_MS); // Wait for 1 second
    }
}

Both environments are robust, with Arduino IDE focusing on simplicity and ESP-IDF providing advanced development capabilities.

Best Resources and Community Forums for Troubleshooting

When challenges arise, these resources can help you find solutions:

  • Espressif Community Forum: Connect directly with Espressif engineers and seasoned users for detailed technical support.
  • GitHub Projects: Explore real-world examples and shared projects. Many repositories include reusable code and comprehensive documentation.
  • Arduino Forum: Offers a dedicated section for the ESP32, where you can find advice, solutions, and project ideas.
  • Hackster.io and Instructables: These platforms provide step-by-step tutorials and project inspiration to help you learn by example.
  • Maker Spaces and Meetups: Engage with local communities to collaborate, share ideas, and troubleshoot projects in person.

Conclusion

Understanding and utilizing the ESP32 pinout is key to unlocking the microcontroller’s full potential.

With the right tools and resources, you can confidently design innovative IoT devices, embedded systems, and creative projects.

Ready to take the next step? Explore my resources or start experimenting with your ESP32 today!

Total
0
Shares