When you are wiring a custom harness to an ESP32 WROOM module, guessing pin functions or ignoring regional wire color standards will result in boot loops, fried logic, or failed inspections. Below is the direct reference for both the classic ESP32-WROOM-32 and the modern ESP32-S3-WROOM-1, followed by the harness wiring standards you need to build reliable panels.

The Master ESP32 WROOM Pinout Table

This table covers the critical functional groups for both the classic 38-pin ESP32-WROOM-32 and the 44-pin ESP32-S3-WROOM-1. Always verify your specific module variant, as PSRAM and Octal Flash configurations change internal routing.

Pin Group Classic WROOM-32 GPIOs S3-WROOM-1 GPIOs Function & Practical Notes
Power & System 3V3, GND, EN 3V3, GND, EN, IO0 3.3V logic. EN must be pulled high (10kΩ) to run. IO0 (S3) is for native USB.
Strapping Pins 0, 2, 4, 5, 12, 15 0, 3, 45, 46 Determine boot mode and flash voltage. Must be left floating or pulled to specific states during reset.
SPI Flash (DO NOT USE) 6, 7, 8, 9, 10, 11 26, 27, 28, 29, 30, 31, 32 Internally routed to the SPI flash/PSRAM chip. Using these as GPIO will crash the module.
Input-Only (No Pull-ups) 34, 35, 36, 39 None (All bidirectional) Classic only. No internal pull-up/pull-down resistors. Requires external 10kΩ pull-up for switches.
Default UART0 TX: 1, RX: 3 TX: 43, RX: 44 Used for serial flashing and debug console. Avoid for permanent sensor wiring.
Default I2C SDA: 21, SCL: 22 SDA: 8, SCL: 9 Hardware I2C defaults. Can be remapped in software, but these are standard for breakouts.
Touch Sensors 0, 2, 4, 12-15, 27, 32, 33 1-14 Capacitive touch. Keep harness wires short (<5cm) to avoid parasitic capacitance false triggers.

Harness Wire Color Standards: IEC vs NEC vs Legacy

When building a wire harness to connect your ESP32 WROOM to a control panel, sensors, or power supply, you must follow the wiring standard applicable to your region. Using arbitrary colors makes troubleshooting a nightmare and can fail industrial or commercial inspections.

Circuit Type IEC 60446 (EU/UK/AU) NEC / NFPA 70 (US/Canada) Legacy UK (Pre-2004)
DC Power Positive (+3.3V / +5V) Brown Red (or Black if ungrounded) Red
DC Power Negative / GND Blue Black (or White/Grey if grounded) Black
Signal / I2C / SPI Yellow / Orange / Green Blue / Yellow / Orange Yellow / Green
Shield / Earth Ground Green/Yellow Stripe Green or Bare Copper Green/Yellow Stripe
Code Caveat: While the ESP32 operates at safe extra-low voltage (SELV), any harness routing through a panel that also contains mains voltage (>50V AC) must maintain physical separation or use rated barrier partitions per NEC Article 300 or IEC 61439. Never run 3.3V I2C lines in the same conduit as 120/240V AC without shielded, grounded cabling.

Faded Markings and the 'Rows People Get Wrong'

ESP32 WROOM modules are often handled extensively on the bench, and the laser-etched pin numbers on the PCB substrate can rub off. If your markings are faded, locate Pin 1 by finding the chamfered (cut) corner on the bottom-left of the PCB pad array, or look for the small dimple/dot stamped into the metal RF shield near the antenna edge. Count sequentially from there.

The Rows Makers Always Get Wrong

  • GPIO 12 (MTDI) on Classic WROOM-32: This is a strapping pin that selects the flash voltage regulator. If you pull GPIO 12 HIGH during boot, the module expects 1.8V flash. Since WROOM modules use 3.3V flash, the module will brownout and boot-loop. Fix: Never use GPIO 12 for a switch that might be closed on startup, or ensure it is pulled LOW.
  • GPIO 6 through 11 (Classic) / 26 through 32 (S3): Beginners see these broken out on some dev boards or assume they are available on the raw module. They are not. They are hardwired to the onboard SPI flash. Connecting a load here will corrupt your firmware.
  • UART TX/RX Swap: The ESP32's TX pin must connect to the target's RX pin, and vice versa. If your serial console is dead, swap the two wires before rewriting your code.
  • Input-Only Pins (Classic 34-39): These pins lack internal pull-up resistors. If you wire a simple pushbutton to GPIO 34 without an external 10kΩ resistor to 3.3V, the pin will float and read random noise.

For deeper hardware design rules, always consult the official Espressif ESP32 Hardware Design Guidelines and the ESP32-S3 Guidelines before spinning a custom PCB.

FAQ: Troubleshooting ESP32s WROOM Pinout Issues

Why does my ESP32 WROOM boot-loop when I connect an I2C sensor to GPIO 12?

GPIO 12 is a critical strapping pin on the classic ESP32-WROOM-32. During the boot sequence, the ROM bootloader reads the state of GPIO 12 to determine the SPI flash operating voltage. If your I2C sensor pulls this line HIGH (even via a weak pull-up resistor on the sensor breakout board) while the ESP32 is resetting, the bootloader configures the internal regulator for 1.8V instead of 3.3V. This causes an immediate brownout. Move your I2C SDA line to GPIO 21 or GPIO 25.

How do I safely interface a 5V sensor with the 3.3V WROOM pins?

Never feed 5V directly into an ESP32 WROOM GPIO; it will degrade the silicon and eventually fry the pin. For digital signals like UART or simple triggers, use a bidirectional logic level shifter (like the BSS138 MOSFET-based Adafruit 4-channel shifter). For I2C, remember that it is an open-drain protocol. You can often pull the I2C bus up to 3.3V using 2.2kΩ resistors, and the 5V sensor will still read the 3.3V HIGH signal perfectly fine without a level shifter, provided the sensor's I2C threshold accepts 3.3V as a logic HIGH.

Can I use the classic ESP32-WROOM-32 input-only pins (34-39) for a relay output?

No. GPIOs 34, 35, 36, and 39 are physically disconnected from the output drivers inside the silicon. They are strictly analog/digital inputs. Attempting to write a HIGH state to these pins in your Arduino or ESP-IDF code will simply be ignored by the hardware, and your relay will never trigger. Use bidirectional pins like GPIO 25, 26, or 27 for driving relay optocouplers.