The ESP32-WROOM-32 module, typically mounted on a 30-pin or 38-pin development board, remains the backbone of professional and hobbyist IoT builds in 2026. However, its heavily multiplexed GPIOs hide critical hardware traps that can brick your board or cause silent sensor failures. Below is the definitive ESP32 development board pinout reference, prioritizing the standard 30-pin DevKit V1 layout, followed by the exact constraints you need to avoid catastrophic wiring mistakes.
The Core ESP32 Development Board Pinout Reference
This table maps the physical header pins on a standard 30-pin DevKit V1 (left and right banks) to their internal GPIO numbers and hardware constraints. Always cross-reference this with the official Espressif ESP32 Datasheet before designing a custom PCB or wiring high-current loads.
| Header Pin | GPIO | Default Function | I/O Type | Critical Constraints & Notes |
|---|---|---|---|---|
| 3V3 | N/A | Power Out | Output | Max draw ~500mA (limited by onboard AMS1117 LDO). Do not backfeed. |
| EN | N/A | Enable | Input | Must be HIGH to run. Pull LOW for deep sleep reset. Internal 10k pull-up. |
| VP | GPIO 36 | ADC1_CH0 / RTC | Input Only | Input only. No internal pull-ups. Ideal for battery voltage monitoring. |
| VN | GPIO 39 | ADC1_CH3 / RTC | Input Only | Input only. Often tied to the Hall sensor internally. |
| IO34 | GPIO 34 | ADC1_CH6 | Input Only | Input only. Safe for reading analog sensors. No internal pull-ups. |
| IO35 | GPIO 35 | ADC1_CH7 | Input Only | Input only. Often used for external wake-up sources. |
| IO32 | GPIO 32 | ADC1_CH4 / Touch9 | I/O | Safe for PWM and I2C SDA. Connects to internal 32.768kHz crystal on some boards. |
| IO33 | GPIO 33 | ADC1_CH5 / Touch8 | I/O | Safe for PWM and I2C SCL. Connects to internal 32.768kHz crystal on some boards. |
| IO25 | GPIO 25 | ADC2_CH8 / DAC1 | I/O | Features an 8-bit DAC. Can output true analog voltage (0-3.3V). |
| IO26 | GPIO 26 | ADC2_CH9 / DAC2 | I/O | Features an 8-bit DAC. Avoid if using ADC2 simultaneously with WiFi. |
| IO27 | GPIO 27 | ADC2_CH7 / Touch7 | I/O | General purpose. Safe for SPI CS or standard digital I/O. |
| IO14 | GPIO 14 | ADC2_CH6 / Touch6 | I/O | Outputs PWM signal on boot. May cause relay chatter during power-on. |
| IO12 | GPIO 12 | ADC2_CH5 / Touch5 | I/O | STRAPPING PIN. Must be LOW at boot. If HIGH, flash voltage switches to 1.8V. |
| IO13 | GPIO 13 | ADC2_CH4 / Touch4 | I/O | Outputs PWM signal on boot. Avoid for sensitive motor drivers. |
| GND | N/A | Ground | N/A | Common ground. Tie all external sensor grounds here, not to earth ground. |
| IO15 | GPIO 15 | ADC2_CH3 / Touch3 | I/O | STRAPPING PIN. Outputs PWM on boot. Internal pull-down at reset. |
| IO2 | GPIO 2 | ADC2_CH2 / Touch2 | I/O | STRAPPING PIN. Must be LOW or floating to enter serial bootloader. Has onboard LED. |
| IO4 | GPIO 4 | ADC2_CH0 / Touch0 | I/O | General purpose. Safe for I2C or SPI. No boot-time PWM glitches. |
| IO16 | GPIO 16 | U2RXD | I/O | Default UART2 RX. Often used for secondary serial devices (GPS, RS485). |
| IO17 | GPIO 17 | U2TXD | I/O | Default UART2 TX. Pairs with GPIO 16. |
| IO5 | GPIO 5 | VSPI SS | I/O | STRAPPING PIN. Outputs PWM on boot. Default SPI Chip Select. |
| IO18 | GPIO 18 | VSPI SCK | I/O | Default VSPI Clock. Ideal for SD cards and TFT displays. |
| IO19 | GPIO 19 | VSPI MISO | I/O | Default VSPI Master-In-Slave-Out. |
| IO21 | GPIO 21 | SDA | I/O | Default I2C Data line. Internal pull-up enabled. |
| IO22 | GPIO 22 | SCL | I/O | Default I2C Clock line. Internal pull-up enabled. |
| IO23 | GPIO 23 | VSPI MOSI | I/O | Default VSPI Master-Out-Slave-In. |
| VIN / 5V | N/A | Power In | Input | Accepts 5V-12V (check board LDO rating). Bypasses USB power path. |
Rows People Get Wrong: Strapping Pins, ADC2, and 5V Tolerances
The most common field failures with the ESP32 stem from ignoring the silicon-level constraints hidden in the pinout table above. According to the Espressif Hardware Design Guidelines, mismanaging these three areas accounts for the vast majority of 'dead on arrival' prototype boards.
The Strapping Pin Trap (GPIO 0, 2, 12, 15)
During reset, the ESP32 samples specific pins to determine its boot mode. GPIO 12 (MTDI) is the most dangerous. It dictates the flash SPI voltage. If GPIO 12 is pulled HIGH during a reboot, the ESP32 expects a 1.8V flash chip. Because standard WROOM-32 modules use 3.3V flash, the board will brownout, fail to execute code, and appear completely dead. Fix: Never connect a pull-up resistor or a sensor that defaults HIGH to GPIO 12. Leave it floating or use a 10k pull-down.
The ADC2 and WiFi Conflict
The ESP32 has two Analog-to-Digital Converters. ADC1 (GPIO 32-39) operates independently. ADC2 (GPIO 0, 2, 4, 12-15, 25-27) shares hardware resources with the WiFi radio. If your code initializes WiFi (WiFi.begin()), ADC2 pins will instantly stop returning analog readings and will lock at 0 or 4095. Fix: Always route analog sensors (like CT clamps or moisture probes) to ADC1 pins. If you must use ADC2, you have to disable WiFi, take the reading, and re-enable WiFi.
The 5V Tolerance Myth
The ESP32 is strictly a 3.3V logic device. While the VIN pin can accept 5V to power the board's onboard regulator, feeding 5V directly into any GPIO pin (like GPIO 34) will permanently destroy the silicon junction. When interfacing with 5V sensors (like the HC-SR04 ultrasonic module) or 5V relay modules, you must use a logic level shifter (e.g., TXS0108E) or a simple 1k/2k resistor voltage divider on the RX lines.
Board Variants and External Wiring Color Standards
While the silicon pinout is universal, the physical board layout and the external wiring color standards change depending on your region and hardware variant. When wiring your ESP32 to external relay banks, 24V industrial sensors, or mains-contactors, you must follow local electrical codes to ensure safe maintenance and troubleshooting.
Board Layout Variants: 30-Pin vs 38-Pin
- 30-Pin DevKit V1: The most common. Lacks GPIO 12, 13, and 14 on the physical headers (they are routed internally to the flash memory). Excellent for breadboarding but limits total available I/O.
- 38-Pin NodeMCU-32S: Exposes all usable GPIOs, including the ADC2 cluster. Requires a wider breadboard and often blocks adjacent rows.
- ESP32-C3 / S3 Variants: Newer RISC-V and dual-core variants use entirely different pinouts. Do not use the WROOM-32 table above for C3/S3 boards.
External Wiring Color Codes: NEC vs IEC
When your ESP32 project leaves the breadboard and enters an enclosure to control mains relays or 24V DC industrial loads, wire color matters. A technician troubleshooting your panel needs to know which wire carries logic and which carries lethal voltage.
| Function | NEC Standard (US/Canada) | IEC 60446 Standard (EU/UK/AU) | Application Note |
|---|---|---|---|
| 24V DC Positive | Red or White | Brown | Powering external opto-isolated relay coils. |
| 24V DC Negative | Black or Blue | Blue | Return path for industrial sensors. |
| 0-10V / 4-20mA Signal | Yellow or Orange | Yellow or Pink | Analog control signals from ESP32 DAC to VFDs. |
| Logic Level (3.3V/5V) | White/Blue stripe or Green | White or Grey | Low voltage GPIO triggers. Keep physically separated from AC. |
| Earth Ground (Chassis) | Green or Bare Copper | Green/Yellow Stripe | Must bond to the enclosure. Never carry return current. |
Recovering Faded Silkscreen: Identifying Pins Without Markings
After months on a workbench, the white silkscreen lettering on cheap clone ESP32 boards frequently rubs off, leaving you with a row of unmarked metal pins. Before you guess and risk shorting 5V to a GPIO, use these bench techniques to safely map the board.
1. The USB Shield Anchor Method
Grab your multimeter and set it to continuity mode (the diode/beep setting). The metal shield of the micro-USB or USB-C port is hard-tied to the board's GND plane. Place your black probe on the USB shield. Use your red probe to scan the header pins. Every pin that beeps is a GND. On a 30-pin board, you will typically find two GND pins on the left bank and one on the right.
2. The Voltage Regulator Trace
Locate the 3.3V LDO voltage regulator (usually an AMS1117-3.3 in a SOT-223 package near the USB port). Pin 1 is often 5V/VIN, Pin 2 is GND, and Pin 3 (the large tab) is the 3.3V output. Trace the copper pour from the tab to the nearest header pin to confidently identify your 3V3 supply pin without relying on faded text.
3. The EN Pin Orientation Rule
Espressif's reference design places the EN (Enable) pin in a highly predictable location. If you hold the board with the USB port facing down and the RF antenna pointing up, the EN pin is almost always the second or third pin down on the left bank, immediately following the 3V3 pin. You can verify this by powering the board via USB and measuring the voltage: the EN pin will read exactly 3.28V to 3.31V relative to the USB shield ground.
By combining the core pinout table with an understanding of strapping pin constraints, regional wiring standards, and physical board recovery techniques, you can design, deploy, and troubleshoot ESP32 systems with the precision of a seasoned embedded engineer.






