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

How to Use ESP32 (30 pin): Examples, Pinouts, and Specs

Image of ESP32 (30 pin)
Cirkit Designer LogoDesign with ESP32 (30 pin) in Cirkit Designer

Introduction

The ESP32 is a powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities, featuring 30 pins for various I/O functions. It is widely used in Internet of Things (IoT) applications, embedded systems, and smart devices due to its high performance, low power consumption, and versatile connectivity options. The ESP32 is an excellent choice for projects requiring wireless communication, sensor integration, and real-time data processing.

Explore Projects Built with ESP32 (30 pin)

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-Based Smart Display with Camera and Audio Alert System
Image of cam_circuit_design: A project utilizing ESP32 (30 pin) in a practical application
This circuit features two ESP32 microcontrollers, one standard 30-pin version and one ESP32-CAM module, both sharing a common ground and power supply. The 30-pin ESP32 is interfaced with an I2C LCD 16x2 Screen for display purposes, using its I2C pins (D21 for SDA and D22 for SCL), and controls a buzzer connected to pin D23. Additionally, the ESP32-CAM is connected to the 30-pin ESP32 via serial communication through pins TX2 and RX2 for potential image data transfer.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with Water Flow Sensing
Image of Water: A project utilizing ESP32 (30 pin) 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-Based OLED Display Interface
Image of d: A project utilizing ESP32 (30 pin) 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 OLED Display
Image of esproj: A project utilizing ESP32 (30 pin) in a practical application
This circuit features an ESP32 microcontroller as the central processing unit, interfacing with a DHT11 temperature and humidity sensor, an MPU-6050 accelerometer and gyroscope, an OLED display, and a separate temperature sensor. The ESP32 communicates with the MPU-6050 and the OLED display via I2C (using pins D22 and D21 for SCL and SDA, respectively), reads temperature data from the DHT11 sensor through pin D18, and interfaces with the additional temperature sensor via pin D5. All components share a common power supply connected to the ESP32's Vin pin and a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ESP32 (30 pin)

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 cam_circuit_design: A project utilizing ESP32 (30 pin) in a practical application
ESP32-Based Smart Display with Camera and Audio Alert System
This circuit features two ESP32 microcontrollers, one standard 30-pin version and one ESP32-CAM module, both sharing a common ground and power supply. The 30-pin ESP32 is interfaced with an I2C LCD 16x2 Screen for display purposes, using its I2C pins (D21 for SDA and D22 for SCL), and controls a buzzer connected to pin D23. Additionally, the ESP32-CAM is connected to the 30-pin ESP32 via serial communication through pins TX2 and RX2 for potential image data transfer.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Water: A project utilizing ESP32 (30 pin) 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 d: A project utilizing ESP32 (30 pin) 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 esproj: A project utilizing ESP32 (30 pin) in a practical application
ESP32-Based Environmental Monitoring System with OLED Display
This circuit features an ESP32 microcontroller as the central processing unit, interfacing with a DHT11 temperature and humidity sensor, an MPU-6050 accelerometer and gyroscope, an OLED display, and a separate temperature sensor. The ESP32 communicates with the MPU-6050 and the OLED display via I2C (using pins D22 and D21 for SCL and SDA, respectively), reads temperature data from the DHT11 sensor through pin D18, and interfaces with the additional temperature sensor via pin D5. All components share a common power supply connected to the ESP32's Vin pin and a common ground.
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 drones
  • Real-time data logging and monitoring
  • Bluetooth-enabled devices

Technical Specifications

Key Technical Details

  • Microcontroller: Tensilica Xtensa LX6 dual-core (or single-core) processor
  • Clock Speed: Up to 240 MHz
  • Flash Memory: 4 MB (varies by model)
  • SRAM: 520 KB
  • Wi-Fi: 802.11 b/g/n
  • Bluetooth: v4.2 BR/EDR and BLE
  • Operating Voltage: 3.3V
  • Input Voltage Range: 5V (via USB) or 3.3V (via VIN pin)
  • GPIO Pins: 30 pins (multipurpose)
  • ADC Channels: 18 (12-bit resolution)
  • DAC Channels: 2 (8-bit resolution)
  • PWM Channels: 16
  • Communication Protocols: UART, SPI, I2C, I2S, CAN
  • Operating Temperature: -40°C to 125°C

Pin Configuration and Descriptions

The ESP32 (30 pin) has a versatile pinout. Below is a table summarizing the key pins and their functions:

Pin Name Function
1 EN Enable pin. Pull high to enable the chip.
2 IO0 GPIO0, used for boot mode selection during programming.
3 IO1 (TX0) GPIO1, UART0 TX pin.
4 IO3 (RX0) GPIO3, UART0 RX pin.
5 IO4 GPIO4, general-purpose I/O.
6 IO5 GPIO5, general-purpose I/O.
7 IO12 GPIO12, can be used as ADC, touch, or general-purpose I/O.
8 IO13 GPIO13, can be used as ADC, touch, or general-purpose I/O.
9 IO14 GPIO14, can be used as ADC, touch, or general-purpose I/O.
10 IO15 GPIO15, can be used as ADC, touch, or general-purpose I/O.
11 IO16 GPIO16, general-purpose I/O.
12 IO17 GPIO17, general-purpose I/O.
13 IO18 GPIO18, SPI clock (SCK) or general-purpose I/O.
14 IO19 GPIO19, SPI MISO or general-purpose I/O.
15 IO21 GPIO21, I2C SDA or general-purpose I/O.
16 IO22 GPIO22, I2C SCL or general-purpose I/O.
17 IO23 GPIO23, SPI MOSI or general-purpose I/O.
18 IO25 GPIO25, DAC1 or general-purpose I/O.
19 IO26 GPIO26, DAC2 or general-purpose I/O.
20 IO27 GPIO27, ADC or general-purpose I/O.
21 IO32 GPIO32, ADC or general-purpose I/O.
22 IO33 GPIO33, ADC or general-purpose I/O.
23 IO34 GPIO34, ADC input only.
24 IO35 GPIO35, ADC input only.
25 GND Ground.
26 3V3 3.3V power output.
27 VIN Input voltage (5V).
28 TX2 UART2 TX pin.
29 RX2 UART2 RX pin.
30 BOOT Boot mode selection pin.

Usage Instructions

How to Use the ESP32 in a Circuit

  1. Powering the ESP32:

    • Use a 5V power supply via the VIN pin or USB connection.
    • Ensure the 3.3V pin is not overloaded, as it is for low-power peripherals only.
  2. Programming the ESP32:

    • Connect the ESP32 to your computer via a USB cable.
    • Install the necessary drivers (e.g., CP210x or CH340, depending on your ESP32 board).
    • Use the Arduino IDE or ESP-IDF for programming. Select "ESP32 Dev Module" as the board.
  3. Connecting Peripherals:

    • Use GPIO pins for sensors, actuators, and other peripherals.
    • For analog sensors, connect them to ADC pins (e.g., IO32, IO33).
    • For I2C devices, use IO21 (SDA) and IO22 (SCL).
  4. Uploading Code:

    • Press and hold the BOOT button while uploading code to enter programming mode.
    • Release the BOOT button once the upload begins.

Important Considerations and Best Practices

  • Avoid applying more than 3.3V to GPIO pins to prevent damage.
  • Use level shifters for 5V peripherals.
  • Use pull-up or pull-down resistors for stable GPIO operation.
  • Ensure proper grounding to avoid noise and instability in circuits.

Example Code for Arduino UNO Integration

Below is an example of using the ESP32 to read a temperature sensor and send data via Wi-Fi:

#include <WiFi.h>

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

void setup() {
  Serial.begin(115200); // Initialize serial communication at 115200 baud
  WiFi.begin(ssid, password); // Connect to Wi-Fi network

  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi!");
}

void loop() {
  // Example: Read temperature sensor data (replace with actual sensor code)
  float temperature = 25.0; // Placeholder value
  Serial.print("Temperature: ");
  Serial.println(temperature);

  delay(2000); // Wait 2 seconds before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Connecting to Wi-Fi:

    • Double-check the SSID and password.
    • Ensure the router is within range and supports 2.4 GHz (ESP32 does not support 5 GHz).
  2. Code Upload Fails:

    • Ensure the correct board and COM port are selected in the Arduino IDE.
    • Press and hold the BOOT button during code upload.
  3. GPIO Pins Not Working:

    • Verify the pin mode is set correctly in the code (pinMode(pin, INPUT/OUTPUT)).
    • Check for conflicting pin assignments.
  4. Overheating:

    • Ensure the ESP32 is not overloaded with peripherals.
    • Use proper heat dissipation methods if necessary.

FAQs

  • Can the ESP32 operate on battery power? Yes, the ESP32 can be powered by a LiPo battery via the VIN pin.

  • What is the maximum current draw of the ESP32? The ESP32 can draw up to 500 mA during peak operation, so ensure your power supply can handle this.

  • Can I use the ESP32 with 5V logic devices? No, the ESP32 operates at 3.3V logic. Use level shifters for 5V devices.

This documentation provides a comprehensive guide to using the ESP32 (30 pin) microcontroller effectively in your projects.