ESP32 Series Microcontrollers – Pinout

The ESP32 series microcontrollers, including variants such as ESP32C2, ESP32C3, ESP32C6, ESP32S2, ESP32S3, and ESP32H2, provide a versatile array of peripherals and I/O options for embedded development. Understanding the pinout and capabilities of each pin is essential for efficient project development. In this blog post, we will explore the pinout reference for the ESP32 series and discuss the various peripherals and I/O options available. Alright, buckle up, because we’re about to dive into the wild world of microcontrollers with a sprinkle of humor!

Peripherals and I/O

The ESP32 series offers a wide range of peripherals and I/O options, including GPIO, ADC, DAC, touch, I2C, SPI, UART, PWM, RTC, strapping, power, and enable pins. Each pin serves a specific purpose and can be configured accordingly to meet the requirements of your project.

Pinout

Here’s a detailed overview of the pinout for the ESP32 series microcontrollers:

  1. GPIO Pins: General-purpose I/O pins for digital input/output.
  2. Input Only GPIOs: Dedicated input-only GPIO pins.
  3. Interrupt Pins: GPIO pins capable of triggering interrupts.
  4. ADC Pins: Analog to Digital Converter pins for reading analog signals.
  5. DAC Pins: Digital to Analog Converter pins for outputting analog signals.
  6. Touch Pins: Capacitive touch sensing pins for touch-sensitive controls.
  7. I2C Pins: Pins for I2C communication with compatible devices.
  8. SPI Pins: Pins for SPI communication with compatible devices.
  9. UART Pins: Pins for serial communication with other devices.
  10. PWM Pins: Pins for generating Pulse Width Modulation signals.
  11. RTC GPIOs: GPIO pins dedicated to real-time clock functions.
  12. Strapping Pins: Pins used during boot process for configuration.
  13. Power Pins: Pins for supplying power to the microcontroller and peripherals.
  14. Enable Pin: Pin for enabling or disabling certain functionalities.

Now, let’s delve into each category and discuss the functionalities and considerations for each type of pin.

GPIO Pins

Alright, let’s dive into the wonderful world of GPIO pins on an ESP32 microcontroller. Think of GPIO pins as the Swiss Army knives of the ESP32 world – they’re the little digital doodads that can do almost anything you want, as long as you ask them nicely.

Imagine your ESP32 as a bustling city, and each GPIO pin is like a tiny, eager-to-please citizen with a unique skill set. Need someone to turn on a light? GPIO pin. Want to measure temperature? GPIO pin. Fancy making your coffee machine dance the Macarena? You guessed it, GPIO pin! These pins are like the fingers of the ESP32, ready to wiggle, waggle, and work wonders at your command. They can be input or output, meaning they can listen attentively to the world around them or flex their muscles and take action.

But here’s the kicker – they’re not just any pins. They’re like the cool kids in school who are into everything. Need to connect a sensor? GPIO pin. Want to control a motor? GPIO pin. Thinking about launching a rocket to Mars? Well, okay, maybe not that, but you get the idea! In a nutshell, GPIO pins on an ESP32 are the little helpers that make your projects come to life. So, next time you’re tinkering with your ESP32, remember to give those GPIO pins a high-five – they’re the real MVPs of your microcontroller world!

Which GPIOs are safe to use?

Not all GPIO pins are safe for general use, as some may have special functions or interfere with boot configurations. Refer to the datasheet or documentation of your specific ESP32 variant to determine which GPIO pins are safe to use.

Here’s a table listing the safe-to-use GPIO pins:

PinDescriptionSafe to Use
GPIO0General-purpose IO pinYes
GPIO1General-purpose IO pinYes
GPIO2General-purpose IO pinYes
GPIO3General-purpose IO pinYes
GPIO4General-purpose IO pinYes
GPIO5General-purpose IO pinYes
GPIO6General-purpose IO pinYes
GPIO7General-purpose IO pinYes
GPIO8General-purpose IO pinYes
GPIO9General-purpose IO pinYes
GPIO10General-purpose IO pinYes
GPIO11General-purpose IO pinYes
GPIO12General-purpose IO pinYes
GPIO13General-purpose IO pinYes
GPIO14General-purpose IO pinYes
GPIO15General-purpose IO pinYes
GPIO16General-purpose IO pinYes
GPIO17General-purpose IO pinYes
GPIO18General-purpose IO pinYes
GPIO19General-purpose IO pinYes
GPIO20General-purpose IO pinYes
GPIO21General-purpose IO pinYes
GPIO22General-purpose IO pinYes
GPIO23General-purpose IO pinYes
GPIO24General-purpose IO pinYes
GPIO25General-purpose IO pinYes
GPIO26General-purpose IO pinYes
GPIO27General-purpose IO pinYes
GPIO28General-purpose IO pinYes
GPIO29General-purpose IO pinYes
GPIO30General-purpose IO pinYes
GPIO31General-purpose IO pinYes
GPIO32General-purpose IO pinYes
GPIO33General-purpose IO pinYes
GPIO34General-purpose IO pinYes
GPIO35General-purpose IO pinYes
GPIO36General-purpose IO pinYes
GPIO37General-purpose IO pinYes
GPIO38General-purpose IO pinYes
GPIO39General-purpose IO pinYes

Ensure to avoid using GPIO pins that are reserved for specific functions or critical operations to prevent unexpected behavior or damage to the microcontroller.

Input Only GPIOs

Input-only GPIO pins are dedicated pins that can only be configured as input pins. They are suitable for reading digital signals from sensors or other devices.

Table of Input Only GPIOs:

PinDescriptionSafe to Use
GPIO34Input-only GPIO pinYes
GPIO35Input-only GPIO pinYes

When using input-only GPIOs, ensure that the pin configuration matches the input requirements of the connected devices to avoid signal interference or reading errors.

Interrupt Pins

So, imagine you’re at a fancy party, and everyone’s mingling and having a great time. Suddenly, someone bursts through the door, yelling “Interrupt Pin!” What happens next? Well, everyone stops what they’re doing and turns to look because, let’s face it, it’s not every day you hear someone shouting about pins at a party. In the land of microcontrollers, an interrupt pin is kind of like that loud person at the party. It’s there to grab everyone’s attention and say, “Hey, something important just happened, and we need to deal with it right now!”

Picture this: your ESP32 microcontroller is happily chugging along, doing its thing, when suddenly, a sensor detects motion, or a button gets pressed, or some other event occurs that needs immediate attention. That’s when the interrupt pin comes into play. It’s like the microcontroller’s personal alarm system, letting it know that it’s time to drop everything else and focus on handling this urgent matter.

So, next time you’re working with an ESP32 and you come across those interrupt pins, just imagine them as the rowdy guests at the party, making sure everyone knows when it’s time to stop and pay attention. And who knows, maybe they’ll even liven up your coding session with their antics!

Table of Interrupt Pins:

PinDescriptionSafe to Use
GPIO26Interrupt pinYes
GPIO27Interrupt pinYes

When utilizing interrupt pins, pay attention to the interrupt handling in your firmware to ensure timely and accurate response to the triggering events.

ADC Pins

ADC pins allow for the reading of analog signals and conversion to digital values for processing. They’re like the microcontroller’s taste testers, sniffing out the voltage levels in the room and reporting back to the ESP32. So, if someone’s blasting music too loudly (aka sending too much voltage), or if the punch bowl is running dangerously low (aka voltage dropping), these ADC pins are the ones who sound the alarm and let the microcontroller know what’s up.

In other words, ADC pins on an ESP32 are like the party bouncers, making sure everything stays within acceptable limits and keeping the microcontroller informed about what’s happening in the electrical world. So, whether it’s monitoring temperature, light intensity, or whatever else you can think of, these ADC pins are the party animals of the microcontroller world!

Table of ADC Pins:

PinDescriptionSafe to Use
GPIO32ADC pinYes
GPIO33ADC pinYes

When using ADC pins, ensure proper signal conditioning and sampling techniques to obtain accurate analog-to-digital conversions.

DAC Pins

DAC pins enable the output of analog signals based on digital input values. DAC stands for “Darn Awesome Converter” (or maybe it’s “Digital-to-Analog Converter,” but let’s go with the first one for now). These pins are like the translators of the microcontroller world, taking your digital signals and transforming them into the smooth, analog waveforms that your speakers can groove to. It’s like having a fancy interpreter at your party who can turn your awkward dance moves into something the cool kids would envy.

So, when you’re jamming out to your favorite tunes on your ESP32-powered device, just remember to give a little nod of appreciation to those DAC pins, quietly doing their job in the background to make sure the music sounds just right. After all, without them, your party might sound more like a glitchy robot convention than a hip gathering of music lovers. Cheers to the unsung heroes of analog conversion! 🎶🤖🎉

Table of DAC Pins:

PinDescriptionSafe to Use
GPIO25DAC pinYes
GPIO26DAC pinYes

Ensure that the DAC pins are configured correctly and that the output signal meets the desired specifications for your application.

Touch Pins

Touch pins facilitate touch-sensitive controls in your project, allowing for user interaction through capacitive touch sensing. These are like the super-sensitive feelers on your robot body, allowing you to detect the gentle caress of a human finger.

Think of them as your microcontroller’s equivalent of a cat’s whiskers – except instead of helping you navigate tight spaces, they help you sense when someone wants to interact with you. So, when a curious human reaches out to touch your sleek, silicon surface, these touch pins tingle with excitement, sending signals to your processor faster than you can say “meow.”

Table of Touch Pins:

PinDescriptionSafe to Use
T0Touch padYes
T1Touch padYes

When implementing touch-sensitive controls, consider environmental factors and proper grounding to ensure reliable touch detection.

I2C Pins

I2C pins enable communication with I2C-compatible devices, such as sensors and displays. Now, picture the I2C pins on the ESP32 as the chatty little gossipers of the microcontroller world. They’re like the gossip queens of the digital realm, constantly whispering and exchanging juicy information.

These I2C pins stand for “Inter-Integrated Circuit,” but you can just call them the “I-squared-C” crew for short. They’re the ones responsible for facilitating communication between different parts of your device, like sensors, displays, or other microcontrollers.Think of them as the connectors at a wild party, making sure everyone gets to share their stories and gossip with each other. They’re the ultimate matchmakers, bringing devices together in perfect harmony.

So, whenever you see those I2C pins on your ESP32, just know that they’re the social butterflies of the microcontroller world, making sure everyone stays connected and in the loop. And who knows, maybe they’ll even spill some digital tea along the way!

Table of I2C Pins:

PinDescriptionSafe to Use
GPIO21I2C SDAYes
GPIO22I2C SCLYes

Ensure proper pull-up resistor values and bus capacitance management for stable I2C communication.

SPI Pins

SPI pins facilitate high-speed communication with SPI-compatible devices, such as flash memory and other microcontrollers. So, imagine you’re throwing a fancy dinner party, and your ESP32 microcontroller is the ultimate socialite. It’s got all these cool pins for connecting with other devices, like the SPI (Serial Peripheral Interface) pins. Think of them as the microcontroller’s secret handshake—it’s how it communicates with other gadgets in the room.

Now, SPI pins are like the microcontroller’s VIP section. They’re the hotspots where all the important conversations happen. Picture them as tiny little cocktail tables where your ESP32 can mingle with other devices and exchange juicy gossip. “Hey there, accelerometer, heard any good vibrations lately?” “Oh, GPS module, where have you been traveling lately?”

So, when you’re setting up your ESP32, don’t forget to invite all the cool gadgets to the SPI party. It’s where the real magic happens!

Table of SPI Pins:

PinDescriptionSafe to Use
GPIO23SPI MOSIYes
GPIO19SPI MISOYes
GPIO18SPI SCKYes
GPIO5SPI CSYes

Pay attention to SPI bus settings, such as clock speed and data format, to ensure compatibility and reliable communication with connected devices.

UART Pins

UART pins allow for serial communication with other devices, such as GPS modules or Bluetooth modules. Now, UART stands for “Universal Asynchronous Receiver/Transmitter,” but let’s not get too hung up on the technical jargon. Think of the UART pins as the VIP section at the party. They’re where all the cool gadgets go to chat and exchange gossip.

So, picture this: your ESP32 is standing at the door, letting in all the devices that want to join the party. Once inside, they head straight for the UART pins, where they can mingle and communicate freely. It’s like a networking event for gadgets! They share information, coordinate tasks, and maybe even tell a few jokes. And thanks to the ESP32’s stellar hosting skills, everything runs smoothly, and the party is a huge success.

So, the next time you see those UART pins on an ESP32, just imagine them as the bustling VIP section of a gadget party, where all the devices come to socialize and have a good time.

Table of UART Pins:

PinDescriptionSafe to Use
GPIO1UART TXYes
GPIO3UART RXYes
GPIO9UART RTSYes
GPIO10UART CTSYes

Ensure proper baud rate and communication protocol settings for seamless UART communication with connected devices.

PWM Pins

PWM pins enable the generation of analog-like signals with varying duty cycles, suitable for controlling motors, LEDs, and other devices. Ah, PWM pins on an ESP32? Well, let me paint you a picture. Imagine you’re at a party, and there’s a DJ trying to control the mood of the crowd. Now, the DJ can’t just blast loud music all the time, or everyone will leave. Similarly, the ESP32 microcontroller has these PWM (Pulse Width Modulation) pins, which are like the DJ’s volume knobs.

Instead of just turning a pin fully on or off like a light switch, PWM pins let you adjust the “volume” of the signal by rapidly toggling it on and off at varying speeds. It’s like the DJ smoothly fading the music in and out to create the perfect vibe.

So, whether you’re trying to control the brightness of an LED or the speed of a motor, these PWM pins give you the power to fine-tune your output and set the mood, just like a master DJ at a party. So, crank up the beats and let those PWM pins groove!

Table of PWM Pins:

PinDescriptionSafe to Use
GPIO2PWMYes
GPIO4PWMYes
GPIO5PWMYes
GPIO12PWMYes
GPIO13PWMYes
GPIO14PWMYes
GPIO15PWMYes
GPIO25PWMYes
GPIO26PWMYes
GPIO27PWMYes

Consider the PWM frequency and resolution requirements of your application when configuring PWM pins for precise control of connected devices.

RTC GPIOs

RTC GPIOs are dedicated pins used for specific real-time clock functions, such as wake-up interrupts or clock outputs. RTC GPIOs are like the royal guards of the microcontroller castle. They’re always on duty, even when the rest of the kingdom is asleep. RTC stands for Real-Time Clock, which means these pins are responsible for keeping track of time, just like a clock on your wall.

But here’s the twist: these GPIOs aren’t just about telling time; they’re also like secret passageways that let your microcontroller communicate with the outside world, even when it’s in a deep slumber. It’s like having a ninja messenger who can sneak out at night and deliver important messages without waking anyone up. So, whether it’s sending signals to wake up the microcontroller from its beauty sleep or keeping track of time like a boss, RTC GPIOs are the unsung heroes of the microcontroller world. They’re the silent guardians, the watchful protectors, the dark knights of your electronic adventures.

Table of RTC GPIOs:

PinDescriptionSafe to Use
GPIO32RTC GPIOYes
GPIO33RTC GPIOYes

Ensure proper configuration of RTC GPIOs for accurate timekeeping and reliable operation of real-time clock functions.

Strapping Pins

Strapping pins are used during the boot process to configure certain settings, such as boot mode selection. Strapping Pins on an ESP32 microcontroller are like the superhero utility belt for your tiny electronic sidekick. Imagine your ESP32 as a miniature crime-fighting machine, ready to save the day in the world of electronics. But even superheroes need their gadgets, right?

Enter the Strapping Pins! These little pins are like the secret compartments in Batman’s belt or the hidden gadgets in James Bond’s watch. They allow your ESP32 to strap on additional features and configurations, empowering it to tackle whatever challenges come its way.

Need to give your ESP32 super-speed internet access? Strap on a Wi-Fi module! Want to enhance its senses and gather data from the environment? Attach some sensors! With Strapping Pins, your ESP32 can be customized and upgraded to become the ultimate electronic superhero, ready to conquer any task with style and efficiency. So, suit up, strap in, and let your ESP32 save the day!

Table of Strapping Pins:

PinDescriptionSafe to Use
MTDOStrapping pinNo
MTCKStrapping pinNo
MTDIStrapping pinNo
MTMSStrapping pinNo

Avoid modifying or connecting to strapping pins during normal operation to prevent unintended changes to boot configuration settings.

Power Pins

Power pins provide connections for supplying power to the microcontroller and connected peripherals.

Table of Power Pins:

PinDescriptionSafe to Use
VDD33Power supplyYes
GNDGroundYes
3V33.3V OutputYes
ENEnableYes

Ensure proper power supply and ground connections to prevent voltage instability and ensure reliable operation of the microcontroller and peripherals.

Enable Pin

The enable pin is used to enable or disable certain functionalities or peripherals on the microcontroller. The Enable Pin on an ESP32 microcontroller, also known as the “magic button” that tells the microcontroller, “Hey buddy, it’s showtime!” It’s like the red carpet for your ESP32, rolling out in style before it starts strutting its stuff. Think of it as the VIP pass that grants access to all the cool features and functions. Without it, your ESP32 might just sit there twiddling its thumbs, wondering why nobody wants to hang out. So, press that Enable Pin and let the microcontroller work its magic!

Table of Enable Pin:

PinDescriptionSafe to Use
ENEnable pinYes

Exercise caution when toggling the enable pin to avoid unintended disruptions to the operation of the microcontroller or connected peripherals.

By understanding the pinout reference and functionalities of the ESP32 series microcontrollers, you can effectively utilize their capabilities in your embedded projects. Always refer to the datasheet or documentation specific to your ESP32 variant for detailed information and guidelines on pin usage and configuration.

Scroll to Top