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
1GNDGroundConnect to system ground. Must be tied to Pin 15 & 38.
23V3Power Input3.3V main power. Max draw ~500mA depending on RF load.
3ENEnable / ResetActive high. Internal RC circuit. Pull low to reset.
4GPIO36 (SVP)ADC1_CH0 / InputInput only. No internal pull-up/pull-down.
5GPIO39 (SVN)ADC1_CH3 / InputInput only. No internal pull-up/pull-down.
6GNDGroundSystem ground.
7GPIO34ADC1_CH6 / InputInput only. No internal pull-up/pull-down.
8GPIO35ADC1_CH7 / InputInput only. No internal pull-up/pull-down.
9GPIO32ADC1_CH4 / RTCCan be used for deep-sleep wake-up (EXT0/EXT1).
10GPIO33ADC1_CH5 / RTCCan be used for deep-sleep wake-up (EXT0/EXT1).
11GPIO25DAC1 / ADC2_CH8True analog output (DAC). Avoid if using WiFi + ADC2.
12GPIO26DAC2 / ADC2_CH9True analog output (DAC). Avoid if using WiFi + ADC2.
13GPIO27ADC2_CH7 / Touch7Capacitive touch capable. General purpose I/O.
14GPIO14ADC2_CH6 / Touch6HSPI_CLK default. Cap touch capable.
15GPIO12ADC2_CH5 / Touch5Strapping Pin. MTDI. Selects flash voltage on boot.
16GNDGroundSystem ground.
17GPIO13ADC2_CH4 / Touch4HSPI_MOSI default. Cap touch capable.
18GPIO9Internal FlashDo not use. Connected to SPI flash HD pin.
19GPIO10Internal FlashDo not use. Connected to SPI flash WP pin.
20GPIO11Internal FlashDo not use. Connected to SPI flash CS pin.
21GNDGroundSystem ground.
22GPIO6Internal FlashDo not use. Connected to SPI flash CLK pin.
23GPIO7Internal FlashDo not use. Connected to SPI flash Q pin.
24GPIO8Internal FlashDo not use. Connected to SPI flash D pin.
25GPIO15ADC2_CH3 / Touch3Strapping Pin. MTDO. Debug output on boot.
26GPIO2ADC2_CH2 / Touch2Strapping Pin. Must be LOW or floating to boot from flash.
27GPIO0ADC2_CH1 / Touch1Strapping Pin. Must be HIGH to boot normally. LOW = bootloader.
28GPIO4ADC2_CH0 / Touch0General purpose I/O. Cap touch capable.
29GPIO16U2RXD / HSPIDefault UART2 RX. No cap touch.
30GPIO17U2TXD / HSPIDefault UART2 TX. No cap touch.
31GPIO5VSPI_SS / PWMStrapping Pin. Selects SDIO timing. Outputs PWM on boot.
32GPIO18VSPI_SCLKDefault SPI Clock. High speed capable.
33GPIO19VSPI_MISODefault SPI MISO. High speed capable.
34GNDGroundSystem ground.
35GPIO21I2C SDA / VSPIDefault I2C Data line. General purpose I/O.
36GPIO22I2C SCL / VSPIDefault I2C Clock line. General purpose I/O.
37GPIO23VSPI_MOSIDefault SPI MOSI. High speed capable.
38GNDGroundSystem 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.

Callout: The ADC2 vs. WiFi Conflict
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.

Warning: Mains Isolation
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.