Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use ESP32 Dev board (20 pins): Examples, Pinouts, and Specs

Image of ESP32 Dev board (20 pins)
Cirkit Designer LogoDesign with ESP32 Dev board (20 pins) in Cirkit Designer

Introduction

The ESP32 Dev Board (20 pins) is a versatile microcontroller development board powered by the ESP32 chip. It features built-in Wi-Fi and Bluetooth capabilities, making it an excellent choice for Internet of Things (IoT) projects, wireless communication, and rapid prototyping. The board is compact, energy-efficient, and supports a wide range of peripherals, making it suitable for both hobbyists and professionals.

Explore Projects Built with ESP32 Dev board (20 pins)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32 and I2C LCD Display for Data Visualization
Image of layar20x4I2C: A project utilizing ESP32 Dev board (20 pins) in a practical application
This circuit consists of an ESP32 Devkit V1 microcontroller connected to a 20x4 I2C LCD display. The ESP32 controls the LCD via I2C communication, with the SCL and SDA lines connected to GPIO pins D22 and D21, respectively, and provides power and ground connections to the display.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based OLED Display Interface
Image of d: A project utilizing ESP32 Dev board (20 pins) in a practical application
This circuit features an ESP32 microcontroller connected to an OLED 1.3" display. The ESP32's GPIO pins 21 and 22 are used for I2C communication (SDA and SCL respectively) with the OLED display. The display is powered by the 5V output from the ESP32, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with Water Flow Sensing
Image of Water: A project utilizing ESP32 Dev board (20 pins) in a practical application
This circuit features an ESP32 Devkit V1 microcontroller connected to a DHT22 temperature and humidity sensor and a water flow sensor. The ESP32 reads environmental data from the DHT22 via a digital input pin (D33) and monitors water flow through the water flow sensor connected to another digital input pin (D23). The ESP32 is powered through its VIN pin, and both sensors are powered by the ESP32's 3V3 output, with common ground connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 and Logic Level Converter-Based Wi-Fi Controlled Interface
Image of Toshiba AC ESP32 devkit v1: A project utilizing ESP32 Dev board (20 pins) in a practical application
This circuit features an ESP32 Devkit V1 microcontroller connected to a Bi-Directional Logic Level Converter, which facilitates voltage level shifting between the ESP32 and external components. The ESP32 is powered through its VIN pin via an alligator clip cable, and the logic level converter is connected to various pins on the ESP32 to manage different voltage levels for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ESP32 Dev board (20 pins)

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of layar20x4I2C: A project utilizing ESP32 Dev board (20 pins) in a practical application
ESP32 and I2C LCD Display for Data Visualization
This circuit consists of an ESP32 Devkit V1 microcontroller connected to a 20x4 I2C LCD display. The ESP32 controls the LCD via I2C communication, with the SCL and SDA lines connected to GPIO pins D22 and D21, respectively, and provides power and ground connections to the display.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of d: A project utilizing ESP32 Dev board (20 pins) in a practical application
ESP32-Based OLED Display Interface
This circuit features an ESP32 microcontroller connected to an OLED 1.3" display. The ESP32's GPIO pins 21 and 22 are used for I2C communication (SDA and SCL respectively) with the OLED display. The display is powered by the 5V output from the ESP32, and both devices share a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Water: A project utilizing ESP32 Dev board (20 pins) in a practical application
ESP32-Based Environmental Monitoring System with Water Flow Sensing
This circuit features an ESP32 Devkit V1 microcontroller connected to a DHT22 temperature and humidity sensor and a water flow sensor. The ESP32 reads environmental data from the DHT22 via a digital input pin (D33) and monitors water flow through the water flow sensor connected to another digital input pin (D23). The ESP32 is powered through its VIN pin, and both sensors are powered by the ESP32's 3V3 output, with common ground connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Toshiba AC ESP32 devkit v1: A project utilizing ESP32 Dev board (20 pins) in a practical application
ESP32 and Logic Level Converter-Based Wi-Fi Controlled Interface
This circuit features an ESP32 Devkit V1 microcontroller connected to a Bi-Directional Logic Level Converter, which facilitates voltage level shifting between the ESP32 and external components. The ESP32 is powered through its VIN pin via an alligator clip cable, and the logic level converter is connected to various pins on the ESP32 to manage different voltage levels for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT devices and smart home automation
  • Wireless sensor networks
  • Wearable technology
  • Robotics and automation
  • Data logging and remote monitoring
  • Prototyping for Wi-Fi and Bluetooth-enabled devices

Technical Specifications

Key Technical Details

  • Microcontroller: ESP32 dual-core processor
  • Clock Speed: Up to 240 MHz
  • Flash Memory: 4 MB (varies by model)
  • SRAM: 520 KB
  • Connectivity: Wi-Fi (802.11 b/g/n), Bluetooth 4.2 (Classic and BLE)
  • Operating Voltage: 3.3V
  • Input Voltage (via VIN pin): 5V
  • GPIO Pins: 20 (multipurpose, including ADC, DAC, PWM, I2C, SPI, UART)
  • Analog Input Pins: 16 (12-bit ADC resolution)
  • Digital Output Pins: 20
  • PWM Channels: 16
  • DAC Channels: 2 (8-bit resolution)
  • Power Consumption: Ultra-low power consumption in deep sleep mode (~10 µA)
  • Operating Temperature: -40°C to 85°C

Pin Configuration and Descriptions

The ESP32 Dev Board (20 pins) has the following pinout:

Pin Name Type Description
VIN Power Input Input voltage (5V) for powering the board.
GND Ground Ground connection.
3V3 Power Output 3.3V output for powering external components.
EN Enable Enables or disables the chip. Active high.
IO0 GPIO/Boot Mode General-purpose I/O pin. Used for boot mode selection during programming.
IO1-IO19 GPIO General-purpose I/O pins. Configurable as digital input/output, ADC, or PWM.
ADC1/ADC2 Analog Input Analog-to-digital converter pins (12-bit resolution).
DAC1/DAC2 Analog Output Digital-to-analog converter pins (8-bit resolution).
TXD UART TX UART transmit pin for serial communication.
RXD UART RX UART receive pin for serial communication.
SCL I2C Clock I2C clock line for communication with I2C devices.
SDA I2C Data I2C data line for communication with I2C devices.
SPI Pins SPI Interface SPI communication pins (MOSI, MISO, SCK, CS).
RST Reset Resets the board.

Usage Instructions

How to Use the ESP32 Dev Board in a Circuit

  1. Powering the Board:

    • Use the VIN pin (5V) or connect via the micro-USB port to power the board.
    • Ensure the power supply provides sufficient current (at least 500 mA).
  2. Programming the Board:

    • Install the ESP32 board package in the Arduino IDE or use the ESP-IDF framework.
    • Connect the board to your computer via a USB cable.
    • Select the correct board and port in the Arduino IDE.
    • Write your code and upload it to the board.
  3. Connecting Peripherals:

    • Use GPIO pins for digital input/output.
    • Use ADC pins for analog input (e.g., sensors).
    • Use I2C or SPI pins for communication with external devices like displays or sensors.

Important Considerations and Best Practices

  • Voltage Levels: The ESP32 operates at 3.3V. Avoid applying 5V directly to GPIO pins to prevent damage.
  • Boot Mode: Ensure IO0 is pulled low during programming to enter boot mode.
  • Deep Sleep Mode: Use deep sleep mode to conserve power in battery-powered applications.
  • Pull-up/Pull-down Resistors: Some GPIO pins require external pull-up or pull-down resistors for proper operation.

Example Code for Arduino IDE

The following example demonstrates how to connect the ESP32 to a Wi-Fi network and blink an LED connected to GPIO2:

#include <WiFi.h> // Include the Wi-Fi library

// Replace with your network credentials
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";

const int ledPin = 2; // GPIO2 is connected to the onboard LED

void setup() {
  pinMode(ledPin, OUTPUT); // Set GPIO2 as an output pin
  Serial.begin(115200);    // Start serial communication at 115200 baud

  // Connect to Wi-Fi
  Serial.print("Connecting to Wi-Fi");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\nWi-Fi connected!");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  digitalWrite(ledPin, HIGH); // Turn the LED on
  delay(1000);                // Wait for 1 second
  digitalWrite(ledPin, LOW);  // Turn the LED off
  delay(1000);                // Wait for 1 second
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not detected by the computer:

    • Ensure the USB cable is functional and supports data transfer.
    • Install the correct USB-to-serial driver for your operating system.
  2. Upload fails with a timeout error:

    • Check that the correct board and port are selected in the Arduino IDE.
    • Hold the BOOT button while uploading to force the board into programming mode.
  3. Wi-Fi connection issues:

    • Verify the SSID and password are correct.
    • Ensure the Wi-Fi network is within range and not overloaded.
  4. GPIO pins not working as expected:

    • Check if the pin is being used for another function (e.g., ADC, UART).
    • Avoid using pins reserved for internal functions (e.g., IO6-IO11 for flash memory).

FAQs

  • Can I power the ESP32 with a battery?
    Yes, you can use a 3.7V LiPo battery connected to the 3V3 pin or a 5V source connected to the VIN pin.

  • What is the maximum current output of the 3V3 pin?
    The 3V3 pin can supply up to 500 mA, depending on the input power source.

  • Can I use the ESP32 with other IDEs?
    Yes, the ESP32 is compatible with the Arduino IDE, PlatformIO, and the ESP-IDF framework.

  • How do I reset the board?
    Press the RST button or toggle the EN pin to reset the board.