Introduction
ESP 32 pinout, WROOM 32 board is a Wi-Fi and Bluetooth module that is based on the Tensilica Xtensa LX6 dual-core microprocessor which is a dual-core processor with an operating frequency of up to 240 MHz. ESP 32 is developed by Espressif System, this board helps in connecting Wi-Fi and Bluetooth to microcontroller boards.
As mentioned ESP-32 is a low-cost Bluetooth and wifi module and it is the reason behind its widespread success in IoT-related projects. Another contributing reason behind its success is that ESP 32 has significantly more GPIO pins than ESP 01 so there is no need to multiplex the I/O pins.
Many variants of ESP-32 boards are available in the market, in today’s article we will be discussing the WROOM 32 board. Let us have a look at the board components of the WROOM 32:
Board Components
- Microprocessor – As mentioned earlier the ESP-32 is based on the Tensilica Xtensa LX6 microcontroller chip which is a dual-core Bluetooth and wifi chip that can go up to 80 – 240 MHz of frequency.
- LED – There is a LED present on the board which starts blinking when power is supplied to the board.
- Antenna – WROOM 32 has an in-built chip antenna which is used for connecting the board to wifi or Bluetooth connectivity. The presence of an inbuilt antenna helps in simplifying the design by eliminating the need for an external antenna.
- UART Bridge – It is required for connecting USB and UART for communication purposes.
- Micro USB – It is required for connecting the ESP 32 board to the 5v power supply.
- Boot/Flash Button – It is required for entering the boot or flash mode.
- Enable Button – It is used to enable the ESP 32 board. It is also required during entering boot mode.
- Power LED – There is an inbuilt power led present in the ESP – 32 module which is red in color and it will start blinking when the board is connected to a power supply.
- Voltage Regulator – There is an inbuilt voltage regulator available on the ESP 32 board which regulates the input voltage which is being supplied to the board.
That is all in the board components of the WROOM 32 board. Let us now have a look at the features of the board:
Board Features
Board | ESP-01 |
Processor | Tensilica Xtensa LX6 |
Antenna | 1 |
Flash Memory | 4 MB |
Board Dimension | 18mm x 25.5mm |
Weight Of the board | 2.5g. |
I/O Port | 28 – 34 |
ADC channels | 18 |
Interfaces | 3 UART, 3 SPI, 2 I2C, 2 I2S |
PWM Channels | 16 |
Capacitive Sensing GPIO | 10 |
DAC | 2 |
Power Consumption OF WROOM 32
The power consumption details of the WROOM-32 is as follows:
Power Supply | 2.2v to 3.6v |
Current Consumption | 100mA |
I/O Voltage | 3.6 v(max) |
I/O source current | 12mA (max) |
Modem Sleep | 3 mA to 20 mA |
Light Sleep | 0.8 mA |
Deep Sleep | 0.15 mA |
Pinout OF WROOM 32
Pin Number GPIO | Pin Name | Safe to use | Reason |
0 | D0 | Yes, but needed to pay attention | High for boot and low for programming |
1 | TX0 | No | Tx pin |
2 | D2 | Yes, but needed to pay attention | LOW during boot, connect to on-board LED |
3 | RX0 | No | Rx pin |
4 | D4 | Yes | |
5 | D5 | Yes, but needed to pay attention | High for boot |
6 | D6 | No | Connected to Flash memory |
7 | D7 | No | Connected to Flash memory |
8 | D8 | No | Connected to Flash memory |
9 | D9 | No | Connected to Flash memory |
10 | D10 | No | Connected to Flash memory |
11 | D11 | No | Connected to Flash memory |
12 | D12 | Yes, but needed to pay attention | Low during boot |
13 | D13 | Yes | |
14 | D14 | Yes | |
15 | D15 | Yes, but needed to pay attention | Must be high during boot. Strapping Pin |
16 | RX2 | Yes | |
17 | TX2 | Yes | |
18 | D18 | Yes | |
19 | D19 | Yes | |
21 | D21 | Yes | |
22 | D22 | Yes | |
23 | D23 | yes | |
24 | D24 | Yes | |
25 | D25 | Yes | |
26 | D26 | Yes | |
27 | D27 | Yes | |
32 | D32 | Yes | |
33 | D33 | Yes | |
34 | D34 | Yes, but needed to pay attention | Input only GPIO, can be configured as input only. |
35 | D35 | Yes, but needed to pay attention | Input only GPIO, can be configured as input only. |
36 | VP | Yes, but needed to pay attention | Input only GPIO, can be configured as input only. |
39 | VN | Yes, but needed to pay attention | Input only GPIO, can be configured as input only |
Power Pins
There are two pins available which are treated as power pins. These pins are the Vin pin and the 3V3 pin. The board gets enabled when a supply of 5v is transmitted to the board.
The 3v3 pin is the output of the voltage regulator which can get up to 600mA.
Enable Pin
The EN pin is the enabled pin for the board. When this pin is pulled high the EN chip is enabled and when this pin is pulled low the chip is disabled.
Input Only Pins
There are 4 input-only pins available on the board. These input-only pins are GPIO 34, GPIO 35, Gpio 36(VP), and GPIO 39(VN). These pins can not be configured as output.
SPI flash-integrated pins
In some variants of the ESP 32 board GPIO pins from GPIO 6 pin to GPIO 11 pin are exposed. These pins are connected to the integrated SPI flash.
GPIO 6 (SCK/CLK)
GPIO 7 (SDO/SD0)
GPIO 8 (SDI/SD1)
GPIO 9 (SHD/SD2)
GPIO 10 (SWP/SD3)
GPIO 11 (CSC/CMD)
Capacitive Touch GPIO
As its name suggests capacitive touch GPIO sensors are used to sense a change in anything having an electrical charge in it. There are a total of 10 Capacitive Touch GPIO sensors are there in ESP WROOM 32 board.
These sensors can be used as an alternative to mechanical buttons and they can be used for waking up the board from a deep sleep.
List of pins where the capacitive touch sensors are connected :
T0 (GPIO 4)
T1 (GPIO 0)
T2 (GPIO 2)
T3 (GPIO 15)
T4 (GPIO 13)
T5 (GPIO 12)
T6 (GPIO 14)
T7 (GPIO 27)
T8 (GPIO 33)
T9 (GPIO 32)
Analog To Digital Converter
These ADC pins are used to convert analog signals to digital signals. The ESP 32 board has 12×38 bits ADC input channels. The ADC input channels have a resolution of 12 bits so you can get analog readings from 0 to 4095.
ADC1_CH0 (GPIO 36) ADC1_CH1 (GPIO 37) ADC1_CH2 (GPIO 38) ADC1_CH3 (GPIO 39) ADC1_CH4 (GPIO 32) ADC1_CH5 (GPIO 33) ADC1_CH6 (GPIO 34) ADC1_CH7 (GPIO 35) ADC2_CH0 (GPIO 4) ADC2_CH1 (GPIO 0) ADC2_CH2 (GPIO 2) ADC2_CH3 (GPIO 15) ADC2_CH4 (GPIO 13) ADC2_CH5 (GPIO 12) ADC2_CH6 (GPIO 14) ADC2_CH7 (GPIO 27) ADC2_CH8 (GPIO 25) ADC2_CH9 (GPIO 26) |
Digital To Analog Converter
There are 2 DAC channels of 2×8 bits are available on ESP WROOM 32 board. As its name suggests DAC is used to convert digital signals to analog signals.
The DAC channels are
DAC 1(GPIO 25) DAC 2(GPIO 26) |
RTC GPIO
The RTC GPIO are used for waking up the ESP 32 board from deep sleep when the ultra-low power(ULP) co-processor is running. The list of the GPIOs which can be used as an external wake-up source of the board when it is in deep sleep are :
RTC_GPIO0 (GPIO36) RTC_GPIO3 (GPIO39) RTC_GPIO4 (GPIO34) RTC_GPIO5 (GPIO35) RTC_GPIO6 (GPIO25) RTC_GPIO7 (GPIO26) RTC_GPIO8 (GPIO33) RTC_GPIO9 (GPIO32) RTC_GPIO10 (GPIO4) RTC_GPIO11 (GPIO0) RTC_GPIO12 (GPIO2) RTC_GPIO13 (GPIO15) RTC_GPIO14 (GPIO13) RTC_GPIO15 (GPIO12) RTC_GPIO16 (GPIO14) RTC_GPIO17 (GPIO27) |
PWM Pins
Pulse Width Modulation pins are available on ESP 32 board. These pins are used to generate PWM signals of different properties.
All pins on the ESP 32 board which can generate output can be used as PWM pins except pins from 34-39.
I2C channels
The ESP 32 board has 2 I2C channels. These channels can be set as SDA and SCL. I2C is another communication protocol available on the board.
The pins which can be used as SDA and SCL are:
GPIO 21 (SDA) GPIO 22 (SCL) |
SPI Pins
The ESP 32 SPI0 and SPI1 pins are used internally to access the ESP32’s attached flash memory That’s why we can’t use these pins. They share one signal bus via an arbiter.
SPI pins available on the board are:
SPI | MOSI | MISO | CLK | CS |
VSPI (Verilog implementation of an SPI slave) | GPIO 23 | GPIO 19 | GPIO 18 | GPIO 5 |
HSPI | GPIO 13 | GPIO 12 | GPIO 14 | GPIO 15 |
Strapping Pins
Strapping pins are used to put the ESP 32 into flashing mode or we can say that on bootloader. The board puts the pins in the right state for flashing or boot mode so that you will not face any error during flashing the ESP 32 board.
Strapping pins available on the board are:
GPIO 0 (must be LOW to enter boot mode) GPIO 2 (must be floating or LOW during boot) GPIO 4 GPIO 5 (must be HIGH during boot) GPIO 12 (must be LOW during boot) GPIO 15 (must be HIGH during boot) |
Programming ESP WROOM 32 Board
- Add ESP Wroom 32 board to Arduino IDE
- Install the driver
- Connect the board to the PC
Add ESP Wroom 32 board to Arduino IDE
- For this purpose at first, you have to open Arduino IDE.
- Then go to the file
- Then preferences now paste links in additional boards to manage URLs.
- Go to tools
- Then Boards
- Then Board manager
- Now search for ESP32
- Select “ESP32 by Espressif systems”.
- Then click on install.
- Now, you can see a lot of famous ESP32 boards. You have to select “DOIT ESP32 DEVKIT V1” if you are using ESP Wroom 32.
Install the driver
Traditionally we connect any board to a PC using a USB cable but in the case of ESP Wroom 32, it communicates using UART. For this purpose, we have a bridge already available on the board for connecting UART with USB.
Now for connecting the UART and USB, we need a bridge driver which can be downloaded from the silicon lab’s official website.
Now click on the Driver to download the bridge driver( It is preferred to download in zip format) according to your operating system. in case you can’t extract files from a zipped folder.
For Windows, it is recommended to download the Windows driver.
Connect The Board To PC
- Firstly open the “Device Manager” on your PC
- Now connect the board to the PC using a USB B cable.
- In ports, you can see silicon labs CP210x USB to UART bridge(COMx).
- At the last x, there would be a digit which is to be noted down carefully.
- Then reopen the Arduino IDE.Go to tools
- Then go to ports
- There you can see a port:x, select it.
- Before uploading the code press the boot button.
- Then upload the LED blinking code written below:-
int LED_BUILTIN = 2;
void setup() {
pinMode (LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
10. Now, click on upload.
11. Once the code is uploaded press the EN button and then you can see everything working as planned.
Frequently Asked Questions
Q1 – How to fix the error when trying to upload a new code to your ESP32 board?
Ans – In some of the ESP 32 boards the boot button needs to be held for 3 seconds when connecting is seen on the screen and then your code will upload.
By this way the board will get into the flashing mode and the error will be solved.
1 thought on “ESP 32 Pinout, its Specifications And Programming”