The DOIT ESP32 DevKit V1 is probably the most famous development board based on the equally popular ESP32 Wi-Fi SoC from Espressif. In fact, the DevKit V1 is more popular than any official board from Espressif. On this page, you will find a beautiful pinout diagram crafted by CIRCUITSTATE and other pin references for the ESP32 DevKit V1 board. If you are new to the ESP32 Wi-Fi and Bluetooth SoC, we have a great tutorial to get you started.
Getting Started with Espressif ESP32 Wi-Fi & Bluetooth SoC using DOIT-ESP32-DevKit-V1 Development Board
Latest Revision: r0.1, 17-12-2022
Design by: Vishnu Mohanan
License: CC-BY-SA 4.0
Pinouts are based on the latest documentation from Espressif. While we try our best to be accurate and up-to-date here, we can not guarantee correctness. Please also double-check the pin assignments with that from the official documentation. If you found any errors here, please let us know in the comments. We will update our designs ASAP.
Even though this pinout is specifically created based on the particular board we have in hand, there are many variants of the same board in the market. The first ever ESP32 DevKit V1 we bought has the DOIT company logo, the line “ESP32 DEVKIT V1” and the website address www.doit.am. But that variant has all pins of the ESP-WROOM-32 module broken out including the SPI interface used for the flash memory. Most of the boards we can get from online shops today do not have those unused pins which shorten the board length. Regardless of the type of board you have, our pinout diagrams will be still applicable as long as they use an ESP32 chip or module.
Also since these boards did not come with official pin numbering or pinouts, there is no consensus over where to start counting. So to make it easier for you to identify the pins by simply counting, we have numbered each row of pins on either side from 1 to 15. But you should not rely on the pin numbering alone. Always use the GPIO number to identify the pins and their functions. We have limited this pinout diagram to include only those references that are relevant to the Arduino ESP32 core. We have not used any of the official pin names. For that, you can always refer to the official documentation.
PDF preview may not load on mobile devices. Click the link to open an interactive preview, or download it directly.
Power & Control
There are two positive power supply input pins and one control pin on the DOIT ESP32 DevKit V1.
|VIN||The input of the 3.3V positive voltage regulator. Supply voltage in the range of 4 to 12V.|
|3.3V||Output from the voltage regulator. You can also supply 3.3V to this pin if you have one. But do not supply both VIN and 3V3 together.|
|GND||Ground (Negative) supply pins.|
|ENABLE||This is the reset pin. Connecting this pin to GND will reset the ESP32. This pin is normally pulled-up. The EN button will pull it LOW when you press it.|
There are 34 GPIO pins available on the ESP32 chip. These pins are named from
39. But doesn’t that make the count 40? No, because GPIOs 20, 24, 28, 29, 30, and 31 are not accessible. Also, not all of these pins are broken from the module or the board. But it is good to have a reference to know what is what. Below is the default ESP32 GPIO function matrix taken from the official documentation. Note that, many of the peripheral functions can be mapped to any of the GPIO pins using the GPIO Mux block of the ESP32.
|GPIO||Pad Name||Function 0||Function 1||Function 2||Function 3||Function 4||Function 5||Reset||Notes|
The ”Reset” column shows each pad’s default configurations after reset:
- 0 – IE = 0 (input disabled)
- 1 – IE =1 (input enabled)
- 2 – IE = 1, WPD = 1 (input enabled, pull-down resistor)
- 3 – IE = 1, WPU = 1 (input enabled, pull-up resistor)
Notes column indicates,
- R – Pad has RTC/analog functions via RTC_MUX
- I – Pad can only be configured as input GPIO. These input-only pads do not feature an output driver or internal pull-up/pull-down circuitry.
In the Arduino environment, you can invoke the pins just using their respective numbers from 0 to 39. Below is the list of pins you can use safely.
|0||NO||YES||Pull LOW to enter bootloader mode.|
|2||YES||YES||Connected to the onboard LED, must be left floating or LOW to enter flashing mode.|
|6||NO||NO||Flash memory interface. Do not use.|
|7||NO||NO||Flash memory interface. Do not use.|
|8||NO||NO||Flash memory interface. Do not use.|
|9||NO||NO||Flash memory interface. Do not use.|
|10||NO||NO||Flash memory interface. Do not use.|
|11||NO||NO||Flash memory interface. Do not use.|
|12||YES||YES||Strapping pin. Booting can fail if pulled HIGH (for 3.3V memories) due to brownout.|
|15||YES||YES||Pulling LOW mutes the debug messages through the serial port.|
Every ESP32 chips have a bootloader inside the Read-Only-Memory (ROM) which is a program that monitors the state of the chip when you power it on. The bootloader can check for different inputs and put the chip into different configurations. The pins monitored by the bootloader are called strapping pins. There are five strapping pins in ESP32. These strapping pins exhibit other behaviors during the booting process. So you should be careful not to interfere with the pins.
|ESP32 will enter the serial bootloader when GPIO0 is held low on reset. Otherwise, it will run the program in flash memory. This pin is internally pulled-up.|
|This pin must also be either left unconnected/floating, or driven LOW, in order to enter the serial bootloader. In normal boot mode (GPIO0 = HIGH), GPIO2 is ignored. This pin is also connected to the onboard LED.|
|This pin selects the flash voltage during boot. If driven HIGH, the flash voltage (VDD_SDIO) is 1.8V and not the default 3.3V. The pin has an internal pull-down, so unconnected means the flash voltage is 3.3V. May prevent flashing and/or booting if 3.3V flash is used and this pin is pulled HIGH, causing the flash to brownout.|
|This pin can be used to mute the debug messages printed by ESP32 during booting. If driven LOW, silences the boot messages printed by the ROM bootloader. The pins have an internal pull-up, so if the pin is unconnected the normal message will be printed to serial.|
|This pin along with the MTDO pins determines the bus timing of the SDIO peripheral. This is internally pulled up.|
After the booting process, all strapping pins return to their default normal functions. Additionally, the TX0 (GPIO1) and RX0 (GPIO3) pins will output the boot message during booting. Read more about the ESP32 bootloader here.
Pull-Up & Pull-Down
All GPIO pins support internal pull-up and pull-down configurations, as well as a high-impedance state. This makes the pin tristate compatible.
The onboard LED is connected to GPIO2 which can be used for debugging. In the Arduino environment, you can invoke this pin as
ESP32 has three UARTs inside (asynchronous only) with hardware and software flow control. The UARTs are named
UART0 is used for serial programming and to print debug messages. This is the UART we use with the USB serial port to print messages from the ESP32.
UART0 is the default
Serial instance in the Arduino environment.
UART1 and its default pins are mixed with the QSPI interface (GPIO pins 6-11). So it is not recommended to use
Serial1 without remapping the pins. Remapping of the pins can be done by passing the new pins to the
begin() function. That said, you can still use
Serial1 with the default GPIOs 9 (RX1, SD2) and 10 (TX1, SD3) but you will only be able to transmit. The receive function won’t work. Only a few types of ESP32 boards have GPIOs 9 and 10 broken out.
UART2 is assigned to
Serial2 in the Arduino sketch. All UART functions can be assigned to any GPIO pins you like. The default ones are listed below.
|Arduino Instance||UART||RX Pin||TX Pin||CTS||RTS|
|UART0||GPIO 3 (RX0)||GPIO 1 (TX0)||N/A||N/A|
|UART1||GPIO 9 (RX1)||GPIO 10 (TX1)||GPIO 6||GPIO 11|
|UART2||GPIO 16 (RX2)||GPIO 17 (TX2)||GPIO 8||GPIO 7|
There are four SPI peripheral blocks inside the ESP32.
SPI1 have special functions including communicating with the flash memory and therefore we don’t use them.
SPI3 are general-purpose SPI interfaces called HSPI and VSPI respectively. Similar to UART, SPI functions can be mapped to any GPIO pins. Below we have the default pins and their respective Arduino instances. Only one SPI is defined in the Arduino framework, but you can easily add the second one.
|VSPI||GPIO 23||GPIO 19||GPIO 18||GPIO 5|
|–||HSPI||GPIO 13||GPIO 12||GPIO 14||GPIO 15|
For some reason, the Arduino environment and the ESP32 HAL driver assign HSPI’s default pins to VSPI.
Analog to Digital Converters (ADC) are used to convert analog voltages to digital values. There are two 12-bit SAR ADCs available on ESP32 with 18 input channels. But only 16 channels are available on Arduino. Following is the list of ADC channels and their Arduino instances. ADC channels ADC1_CH1 and ADC1_CH2 are not used.
|Arduino Pin||ADC Channel||GPIO||Usable?|
|ADC2_CH2||2||NO (LED Connected)|
ESP32 has two 8-bit Digital to Analog Converters (DAC).
There are 10 capacitive touch channels in ESP32.
|Arduino Pin||Touch Channel||GPIO||Usable?|
|TOUCH2||2||NO (LED Connected)|
There are two I2C peripherals inside ESP32. I2C is also called Two Wire Interface (TWI). Similar to UART and SPI, I2C pins can also be mapped to any GPIO pins. There are two I2C interfaces defined for Arduino;
Wire (I2C0) and
Wire1 (I2C1) but only Wire has the pins defined. You need to manually set the pins for
|I2C0||GPIO 21||GPIO 22|
ESP32 supports up to 16 independent PWM (Pulse Width Modulation) channels with 16-bit precision. PWM outputs can be mapped to any GPIO pins that support output mode.
Inter-Integrated Sound (I2S) is a digital audio interface supported by ESP32. I2S pin functions can also be mapped to any GPIO pins except the clock pins I2S0_CLK and I2S1_CLK which can only be mapped to either GPIO0, U0RXD or U0TXD.
Controller Area Network (CAN) or Two Wire Automotive Interface (TWAI) is a two-wire communication interface that mainly finds application in the automotive industry. CAN functions can be mapped to any GPIO pins. We have a complete tutorial for using CAN interface with ESP32 which you can find below.
JTAG (Joint Test Action Group) is a standard interface used for programming and debugging microcontrollers. ESP32 supports JTAG programming and debugging. JTAG has four main signals and an optional reset line. You can use supported debuggers like the ESP-Prog to debug your ESP chips.
|MTDI||12||Test Data In|
|MTMS||14||Test Mode Select|
|MTDO||15||Test Data Out|
If you want to learn more about ESP32 debugging through JTAG using the ESP-Prog, we have a complete tutorial on it.
ESP32 supports external interrupts on all GPIO pins. The interrupt types can be level-triggered, edge-triggered, or state change.
ESP32 has a single Ethernet MAC (Medium Access Control) controller. This controller can be combined with an external Ethernet PHY (Physical Layer) to accomplish Ethernet communication. Ethernet pins can only be mapped to their assigned ones shown in the GPIO function matrix.
- ESP32 Technical Reference Manual [PDF]
- ESP32 Datasheet [PDF]
- ESP Bootloader and Strapping Pins
- Introduction to the ESP-Prog Board
- Short URL to this page – https://circuitstate.com/esp32dkpinref