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, making it an excellent choice for Internet of Things (IoT) applications and embedded systems. With its 30-pin configuration, the ESP32 offers a wide range of input/output (I/O) options, enabling developers to connect sensors, actuators, and other peripherals with ease. Its dual-core processor and low-power consumption make it suitable for both high-performance and energy-efficient designs.

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 (e.g., smart home systems, wearables)
  • Wireless communication (Wi-Fi and Bluetooth)
  • Data logging and remote monitoring
  • Robotics and automation
  • Prototyping and development of embedded systems

Technical Specifications

The ESP32 (30 pin) microcontroller is packed with features that make it versatile and powerful. Below are its key technical details:

Key Technical Details

  • Processor: Dual-core Xtensa® 32-bit LX6 CPU
  • 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 7-12V (via VIN pin)
  • GPIO Pins: 30 pins (multipurpose)
  • ADC Channels: 18 (12-bit resolution)
  • DAC Channels: 2 (8-bit resolution)
  • PWM Outputs: Up to 16 channels
  • I2C, SPI, UART: Multiple communication interfaces
  • Power Consumption: Ultra-low power modes available

Pin Configuration and Descriptions

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

Pin Name Function Description
VIN Power Input Accepts 7-12V input to power the ESP32.
GND Ground Common ground for the circuit.
3V3 Power Output Provides 3.3V output for external components.
EN Enable Enables or disables the chip (active high).
GPIO0 General Purpose I/O, Boot Mode Used for I/O or to enter bootloader mode during programming.
GPIO2 General Purpose I/O, ADC, PWM Multipurpose pin for digital I/O, ADC, or PWM.
GPIO4 General Purpose I/O, ADC, PWM Multipurpose pin for digital I/O, ADC, or PWM.
GPIO5 General Purpose I/O, ADC, PWM Multipurpose pin for digital I/O, ADC, or PWM.
GPIO12-15 General Purpose I/O, ADC, PWM Multipurpose pins for digital I/O, ADC, or PWM.
GPIO16-19 General Purpose I/O, UART, SPI Multipurpose pins for digital I/O, UART, or SPI communication.
GPIO21-23 General Purpose I/O, I2C, SPI Multipurpose pins for digital I/O, I2C, or SPI communication.
GPIO25-27 General Purpose I/O, ADC, DAC, PWM Multipurpose pins for digital I/O, ADC, DAC, or PWM.
GPIO32-39 General Purpose I/O, ADC Multipurpose pins for digital I/O or ADC.
TX0 (GPIO1) UART Transmit UART transmit pin for serial communication.
RX0 (GPIO3) UART Receive UART receive pin for serial communication.
BOOT Boot Mode Selection Used to enter bootloader mode during programming (connect to GND).

Usage Instructions

How to Use the ESP32 in a Circuit

  1. Powering the ESP32:

    • Use the VIN pin to supply 7-12V, or connect a 5V USB cable to the micro-USB port.
    • Ensure the 3.3V pin is used only for low-power external components.
  2. Connecting Peripherals:

    • Use GPIO pins for digital I/O, ADC, PWM, or communication protocols (I2C, SPI, UART).
    • Connect sensors, actuators, or other devices to the appropriate pins based on their requirements.
  3. Programming the ESP32:

    • Install the ESP32 board package in the Arduino IDE or use the ESP-IDF framework.
    • Connect the ESP32 to your computer via USB and select the correct COM port in the IDE.
    • Write and upload your code to the ESP32.
  4. Boot Mode:

    • To enter bootloader mode, hold the BOOT button while pressing the EN (reset) button.

Important Considerations and Best Practices

  • Always use a level shifter when interfacing 5V logic devices with the ESP32's 3.3V GPIO pins.
  • Avoid drawing more than 500mA from the 3.3V pin to prevent damage.
  • Use decoupling capacitors near the power pins to stabilize the power supply.
  • Ensure proper grounding to avoid noise and interference in high-frequency applications.

Example Code for Arduino UNO Integration

Below is an example of how to use the ESP32 to read a sensor value and send it over Wi-Fi:

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

// 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 Wi-Fi...");
  }
  Serial.println("Connected to Wi-Fi!");
}

void loop() {
  // Example: Read an analog value from GPIO34
  int sensorValue = analogRead(34); // Read from ADC pin GPIO34
  Serial.print("Sensor Value: ");
  Serial.println(sensorValue); // Print the sensor value to the Serial Monitor

  delay(1000); // Wait for 1 second before reading again
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Connecting to Wi-Fi:

    • Ensure the SSID and password are correct.
    • Check if the router is within range and supports 2.4 GHz (ESP32 does not support 5 GHz).
  2. Upload Fails in Arduino IDE:

    • Verify the correct COM port and board are selected in the IDE.
    • Hold the BOOT button while uploading the code to enter bootloader mode.
  3. GPIO Pins Not Working:

    • Check if the pin is configured correctly in the code (e.g., pinMode()).
    • Ensure the pin is not being used for another function (e.g., UART, SPI).
  4. Power Issues:

    • Use a stable power supply to avoid brownouts.
    • Check if the current draw of connected peripherals exceeds the ESP32's limits.

FAQs

Q: Can the ESP32 operate on battery power?
A: Yes, the ESP32 can be powered by a LiPo battery connected to the VIN pin. Use a voltage regulator if needed.

Q: How do I reset the ESP32?
A: Press the EN (reset) button to restart the microcontroller.

Q: Can I use the ESP32 with 5V sensors?
A: Yes, but you must use a level shifter to convert 5V signals to 3.3V to avoid damaging the GPIO pins.