Which ESP32 pins are safe to use
Input-only pins, strapping pins, flash pins and the ones that misbehave at boot, for the DevKit V1, C3 SuperMini and S3.
Most ESP32 pins work as you expect, and a handful do not. Learn the handful once and wiring becomes easy.
Classic ESP32 (DevKit V1)
- GPIO 6 to 11 connect to the flash chip. Never use them.
- GPIO 34, 35, 36 and 39 are input only and have no internal pull-up or pull-down.
- GPIO 0, 2, 5, 12 and 15 are strapping pins: their level at power-up selects the boot mode. GPIO12 held high can stop some modules from booting at all.
- GPIO 1 and 3 are the serial console. Use them for something else and the serial monitor goes quiet.
- ADC2 pins do not work reliably together with Wi-Fi.
- The usually trouble-free outputs are GPIO 13, 14, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32 and 33.
ESP32-C3 SuperMini
GPIO 2, 8 and 9 are strapping pins, and GPIO 18 and 19 are the built-in USB. Only a limited number of pins are exposed, so plan the list of peripherals before you buy.
ESP32-S3
GPIO 0, 3, 45 and 46 are strapping pins. Depending on the module, GPIO 26 to 32 serve the flash and 33 to 37 serve octal flash or PSRAM, so check the datasheet of your exact module.
Relays and outputs at boot
Pins can float or pulse while the chip starts. A relay on a strapping pin may click at every reset. Put relays on pins that stay quiet, and add a pull resistor so the relay is off during start-up.
The pinout page on this site shows these warnings on the diagram for each board.
Tools that help
- Pinout — Interactive pinout for ESP32 DevKit V1, ESP32-C3 SuperMini and ESP32-S3 with I2C, SPI, ADC, PWM filters and safe/unsafe boot pins.
- Sketch generator — Pick a board and sensors (DHT22, BME280, DS18B20, relay, INA219, OLED, MQ-2) and get a working Arduino sketch, wiring table and parts list.
Comments
No comments yet. Share your experience or ask a question.