Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use ESP32 DevKitC: Examples, Pinouts, and Specs

Image of ESP32 DevKitCDesign with ESP32 DevKitC in Cirkit Designer

Introduction

The ESP32 DevKitC, manufactured by A-Z Delivery, is a compact and versatile development board built around the powerful ESP32 chip. This board integrates Wi-Fi and Bluetooth capabilities, making it an ideal choice for Internet of Things (IoT) applications. With its rich set of GPIO pins, ADCs, and communication interfaces, the ESP32 DevKitC is well-suited for prototyping and developing connected devices.

Explore Projects Built with ESP32 DevKitC

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 ESP32 and Logic Level Converter-Based Wi-Fi Controlled Interface: A project utilizing ESP32 DevKitC 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.

Open Project in Cirkit Designer
Image of ESP32-Based Environmental Monitoring and Alert System with Solar Charging: A project utilizing ESP32 DevKitC in a practical application
ESP32-Based Environmental Monitoring and Alert System with Solar Charging

This circuit features an ESP32 Devkit V1 microcontroller connected to various sensors and modules for monitoring and communication purposes. It includes an MQ-2 gas sensor and a DHT11 temperature and humidity sensor, both interfaced with the ESP32 for environmental data collection. The circuit is powered by a 12V battery, regulated to 5V by step-down converters, and includes a solar charge controller connected to a solar panel for battery charging, a UPS module for power management, and a SIM900A module for GSM communication. Additionally, there is a WS2812 RGB LED strip for visual feedback and a piezo buzzer for audio alerts, both controlled by the ESP32.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

The ESP32 DevKitC is designed to provide robust performance and flexibility for a wide range of applications. Below are its key technical details:

Key Technical Details

Pin Configuration and Descriptions

The ESP32 DevKitC features a 2x19 pin header layout. Below is the pin configuration:

Pin Name Description
1 GND Ground pin
2 3V3 3.3V power output
3 EN Enable pin (active high, used to reset the chip)
4 IO0 GPIO0, used for boot mode selection during programming
5 IO1 (TX0) GPIO1, UART0 TX pin
6 IO3 (RX0) GPIO3, UART0 RX pin
7 IO4 GPIO4, general-purpose I/O
8 IO5 GPIO5, general-purpose I/O
9 IO12 GPIO12, ADC2 channel 5
10 IO13 GPIO13, ADC2 channel 4
11 IO14 GPIO14, ADC2 channel 6
12 IO15 GPIO15, ADC2 channel 3
13 IO16 GPIO16, general-purpose I/O
14 IO17 GPIO17, general-purpose I/O
15 IO18 GPIO18, SPI clock (SCK)
16 IO19 GPIO19, SPI master-out/slave-in (MOSI)
17 IO21 GPIO21, I2C data (SDA)
18 IO22 GPIO22, I2C clock (SCL)
19 IO23 GPIO23, SPI master-in/slave-out (MISO)
20 IO25 GPIO25, ADC2 channel 8
21 IO26 GPIO26, ADC2 channel 9
22 IO27 GPIO27, ADC2 channel 7
23 IO32 GPIO32, ADC1 channel 4
24 IO33 GPIO33, ADC1 channel 5
25 IO34 GPIO34, ADC1 channel 6 (input only)
26 IO35 GPIO35, ADC1 channel 7 (input only)
27 VIN Input voltage (5V)

Note: Some GPIO pins have specific restrictions or dual functions. Refer to the ESP32 datasheet for detailed pin behavior.

Usage Instructions

How to Use the ESP32 DevKitC in a Circuit

  1. Powering the Board:

    • Connect the board to your computer via a micro-USB cable for power and programming.
    • Alternatively, supply 5V to the VIN pin or 3.3V to the 3V3 pin.
  2. Programming the Board:

    • Install the Arduino IDE and add the ESP32 board support package.
    • Select the correct board (ESP32 Dev Module) and port in the Arduino IDE.
    • Write your code and upload it to the board.
  3. Connecting Peripherals:

    • Use the GPIO pins to connect sensors, actuators, or other peripherals.
    • Ensure that the voltage levels of connected devices are compatible with the ESP32 (3.3V logic).

Important Considerations and Best Practices

Example Code for Arduino IDE

Below is an example of how to blink an LED connected to GPIO2:

// Define the GPIO pin for the LED
const int ledPin = 2;

void setup() {
  // Initialize the LED pin as an output
  pinMode(ledPin, OUTPUT);
}

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

  // Turn the LED off
  digitalWrite(ledPin, LOW);
  delay(1000); // Wait for 1 second
}

Tip: Ensure the LED is connected to GPIO2 with a current-limiting resistor (e.g., 220Ω).

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 the ESP32 DevKitC.
  2. Upload fails with a timeout error:

    • Check that the correct board and port are selected in the Arduino IDE.
    • Press and hold the BOOT button on the board while uploading the code.
  3. Wi-Fi connection issues:

    • Verify the SSID and password in your code.
    • Ensure the router is within range and supports 2.4 GHz Wi-Fi (ESP32 does not support 5 GHz).
  4. GPIO pin not working as expected:

    • Check if the pin is being used for another function (e.g., ADC, SPI).
    • Avoid using GPIO6-GPIO11 as they are connected to the onboard flash memory.

FAQs

For more detailed information, refer to the official ESP32 datasheet and technical reference manual.