The ESP32-WROOM-32E is the direct, upgraded successor to the widely used WROOM-32D. It swaps the older silicon for the ESP32-D0WD-V3 chip, fixing several legacy silicon errata while maintaining the exact same physical footprint and 38-pin castellated layout. Because the physical pins haven't changed, many makers blindly reuse old diagrams, but the internal routing and strapping pin behaviors require precise attention. Below is the exact hardware reference you need at the bench.
The Complete ESP32-WROOM-32E Pinout Table
This table maps the physical module pins (1-38) to the internal ESP32 GPIO numbers. Use this when designing custom PCBs or wiring directly to the castellated pads. If you are using a DevKit V1 carrier board, the silkscreen on the carrier board will use the GPIO Number, not the physical pin number.
| Module Pin | GPIO / Function | Default / Primary Use | Hardware Notes & Constraints |
|---|---|---|---|
| 1 | GND | Ground | Connect to system ground. Must be tied to Pin 15 & 38. |
| 2 | 3V3 | Power Input | 3.3V main power. Max draw ~500mA depending on RF load. |
| 3 | EN | Enable / Reset | Active high. Internal RC circuit. Pull low to reset. |
| 4 | GPIO36 (SVP) | ADC1_CH0 / Input | Input only. No internal pull-up/pull-down. |
| 5 | GPIO39 (SVN) | ADC1_CH3 / Input | Input only. No internal pull-up/pull-down. |
| 6 | GND | Ground | System ground. |
| 7 | GPIO34 | ADC1_CH6 / Input | Input only. No internal pull-up/pull-down. |
| 8 | GPIO35 | ADC1_CH7 / Input | Input only. No internal pull-up/pull-down. |
| 9 | GPIO32 | ADC1_CH4 / RTC | Can be used for deep-sleep wake-up (EXT0/EXT1). |
| 10 | GPIO33 | ADC1_CH5 / RTC | Can be used for deep-sleep wake-up (EXT0/EXT1). |
| 11 | GPIO25 | DAC1 / ADC2_CH8 | True analog output (DAC). Avoid if using WiFi + ADC2. |
| 12 | GPIO26 | DAC2 / ADC2_CH9 | True analog output (DAC). Avoid if using WiFi + ADC2. |
| 13 | GPIO27 | ADC2_CH7 / Touch7 | Capacitive touch capable. General purpose I/O. |
| 14 | GPIO14 | ADC2_CH6 / Touch6 | HSPI_CLK default. Cap touch capable. |
| 15 | GPIO12 | ADC2_CH5 / Touch5 | Strapping Pin. MTDI. Selects flash voltage on boot. |
| 16 | GND | Ground | System ground. |
| 17 | GPIO13 | ADC2_CH4 / Touch4 | HSPI_MOSI default. Cap touch capable. |
| 18 | GPIO9 | Internal Flash | Do not use. Connected to SPI flash HD pin. |
| 19 | GPIO10 | Internal Flash | Do not use. Connected to SPI flash WP pin. |
| 20 | GPIO11 | Internal Flash | Do not use. Connected to SPI flash CS pin. |
| 21 | GND | Ground | System ground. |
| 22 | GPIO6 | Internal Flash | Do not use. Connected to SPI flash CLK pin. |
| 23 | GPIO7 | Internal Flash | Do not use. Connected to SPI flash Q pin. |
| 24 | GPIO8 | Internal Flash | Do not use. Connected to SPI flash D pin. |
| 25 | GPIO15 | ADC2_CH3 / Touch3 | Strapping Pin. MTDO. Debug output on boot. |
| 26 | GPIO2 | ADC2_CH2 / Touch2 | Strapping Pin. Must be LOW or floating to boot from flash. |
| 27 | GPIO0 | ADC2_CH1 / Touch1 | Strapping Pin. Must be HIGH to boot normally. LOW = bootloader. |
| 28 | GPIO4 | ADC2_CH0 / Touch0 | General purpose I/O. Cap touch capable. |
| 29 | GPIO16 | U2RXD / HSPI | Default UART2 RX. No cap touch. |
| 30 | GPIO17 | U2TXD / HSPI | Default UART2 TX. No cap touch. |
| 31 | GPIO5 | VSPI_SS / PWM | Strapping Pin. Selects SDIO timing. Outputs PWM on boot. |
| 32 | GPIO18 | VSPI_SCLK | Default SPI Clock. High speed capable. |
| 33 | GPIO19 | VSPI_MISO | Default SPI MISO. High speed capable. |
| 34 | GND | Ground | System ground. |
| 35 | GPIO21 | I2C SDA / VSPI | Default I2C Data line. General purpose I/O. |
| 36 | GPIO22 | I2C SCL / VSPI | Default I2C Clock line. General purpose I/O. |
| 37 | GPIO23 | VSPI_MOSI | Default SPI MOSI. High speed capable. |
| 38 | GND | Ground | System ground. Tie to Pin 1 & 15. |
Rows People Get Wrong (And How to Avoid Bricking Your Board)
When reading the table above, several rows routinely cause hardware faults or boot failures on the bench. Here is what those rows mean in practice and how to handle them.
If your project uses WiFi, do not use GPIOs 25, 26, 27, 14, 12, 13, 15, 2, 0, or 4 for analog reads. The ESP32's WiFi driver monopolizes the ADC2 hardware. If you need analog inputs while WiFi is active, you must use ADC1 pins (GPIO 32, 33, 34, 35, 36, 39). See the Espressif ADC Documentation for the exact hardware multiplexing limits.
GPIO 0, 2, 12, and 15 (The Strapping Pins): These pins are sampled by the internal bootloader the millisecond the EN pin goes high. If GPIO0 is pulled LOW during reset, the chip enters the serial bootloader instead of running your code. If GPIO12 is pulled HIGH, the chip expects a 1.8V flash chip instead of the standard 3.3V, which will immediately brownout the module. Always ensure these pins have appropriate external pull-up/pull-down resistors (typically 10kΩ) if they are connected to external sensors or switches that might float during power-on.
Pins 6 through 11 (The Ghost Pins): On the WROOM-32E, these physical castellated pads are internally routed directly to the SPI flash memory die hidden under the metal RF shield. If you attempt to use these as standard GPIOs, you will corrupt your firmware or short the flash VCC line. Treat them as strictly "Do Not Connect".
Safe Interpretation When Markings are Faded: The white silkscreen on cheap clone modules often rubs off after a few soldering sessions. If your pin numbers are missing, locate the metal RF shield. Look for a small laser-etched dot or a beveled corner on the black PCB substrate near the shield—that marks Pin 1. From Pin 1, count counter-clockwise down the left side (1-19) and up the right side (20-38). Never guess based on board orientation alone, as some carrier boards mirror the layout.
Interfacing GPIOs to Regional Wiring Standards (NEC vs. IEC)
The ESP32 operates at 3.3V logic, but it is frequently used to switch external relays, read industrial sensors, or interface with mains-powered equipment. When routing wires from your ESP32 GPIOs to external terminal blocks, you must follow the regional wiring color codes for the external circuit to ensure safe maintenance and code compliance. The ESP32 doesn't care about wire colors, but your local electrical inspector does.
| Circuit Type | NEC (US / Canada) | IEC 60446 (EU / UK / AU) | Old UK (Pre-2004) |
|---|---|---|---|
| AC Mains Live/Hot | Black (or Red for 2nd phase) | Brown | Red |
| AC Mains Neutral | White (or Gray) | Blue | Black |
| AC Earth / Ground | Green, Green/Yellow, or Bare | Green/Yellow | Green |
| DC Control (ESP32 side) | Red (+3.3V/5V), Black (GND), Yellow/White (Signal/GPIO) | ||
Which standard applies to you? If you are building a project for a US/Canadian home, follow the NEC column. If you are in Europe, the UK (post-2004), or Australia, follow the IEC column. For detailed regional code specifics, refer to the Electrical Technology Wiring Color Code Guide.
Never connect the ESP32 GND pin directly to the AC Earth/Ground wire (Green/Yellow). The ESP32 GND is a DC logic reference. If a fault occurs on the mains side, high voltage can travel back through your sensor wires and destroy the microcontroller or cause a shock hazard. Always use an optocoupler (like a PC817) or a galvanically isolated relay module when bridging ESP32 GPIOs to NEC/IEC mains circuits.
Frequently Asked Questions
What is the difference between the ESP32-WROOM-32E and WROOM-32D pinouts?
Physically, there is zero difference. The WROOM-32E is a drop-in replacement for the WROOM-32D, utilizing the exact same 38-pin footprint and castellated pad layout. The internal difference is the silicon: the 'E' variant uses the ESP32-D0WD-V3 chip, which fixes the well-documented "GPIO 12 strapping pin flash voltage" bug found in older V1 silicon, and improves overall RF transmit power. You can use the exact same PCB footprint and pin mapping for both.
Can I use GPIO 12 and GPIO 15 for standard I/O on the WROOM-32E?
Yes, but only after the boot sequence completes. GPIO 12 (MTDI) and GPIO 15 (MTDO) are strapping pins. During the first few milliseconds of power-on, the ESP32 reads the voltage on these pins to configure internal hardware. If you have a relay connected to GPIO 15, it will chatter rapidly on every reboot because the pin outputs debug PWM signals during boot. If you must use them, add a 10kΩ pull-down resistor to GPIO 15 and ensure GPIO 12 is LOW at boot, then reconfigure them as standard outputs in your setup() function.
How do I read the pinout if the silkscreen text on my ESP32 module is faded or missing?
If the white text on the black substrate is gone, rely on physical landmarks. Pin 1 is always located at the top-left corner when the metal RF shield is facing you and the castellated pads are pointing left and right. Pin 1 is usually indicated by a tiny laser-etched dot on the PCB substrate or a beveled edge on the shield. From Pin 1, count down the left edge to Pin 19, then cross over to the bottom-right to find Pin 20, and count up the right edge to Pin 38. For absolute certainty, use a multimeter in continuity mode to check which pin connects to the large ground pour on your carrier board (Pins 1, 6, 16, 21, 34, and 38 are all GND).
Which ESP32-WROOM-32E pins are safe to use for deep sleep wake-up?
For esp_sleep_enable_ext0_wakeup (single pin wake) or esp_sleep_enable_ext1_wakeup (multiple pin mask wake), you are strictly limited to the RTC GPIO pins. On the WROOM-32E, these are GPIO 32, 33, 34, 35, 36, and 39. Note that GPIO 34, 35, 36, and 39 are input-only and lack internal pull-up/pull-down resistors. If you are using a pushbutton to wake the chip on these specific pins, you must solder an external 10kΩ pull-up or pull-down resistor to prevent the pin from floating and triggering false wake-ups.






