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 (30 pin) is a powerful microcontroller designed for IoT and embedded system applications. It features built-in Wi-Fi and Bluetooth capabilities, making it an excellent choice for projects requiring wireless communication. With its 30 GPIO pins, the ESP32 offers a wide range of input/output functions, including ADC, DAC, PWM, I2C, SPI, and UART, making it versatile for various applications.

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 automation systems
  • Data logging and remote monitoring
  • Prototyping and educational projects

Technical Specifications

Key Technical Details

  • Microcontroller: Tensilica Xtensa LX6 dual-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 7-12V (via VIN pin)
  • GPIO Pins: 30 (multipurpose, including ADC, DAC, PWM, I2C, SPI, UART)
  • ADC Resolution: 12-bit
  • DAC Resolution: 8-bit
  • Power Consumption: Ultra-low power consumption in deep sleep mode (~10 µA)

Pin Configuration and Descriptions

The ESP32 (30 pin) has the following pinout:

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).
IO0 GPIO0 / Boot Mode General-purpose I/O pin; used for boot mode selection during programming.
IO1 (TX0) GPIO1 / UART TX UART transmit pin; also used as GPIO.
IO3 (RX0) GPIO3 / UART RX UART receive pin; also used as GPIO.
IO4 GPIO4 General-purpose I/O pin.
IO5 GPIO5 General-purpose I/O pin.
IO12 GPIO12 / ADC2_5 / Touch5 General-purpose I/O, ADC, or capacitive touch input.
IO13 GPIO13 / ADC2_4 / Touch4 General-purpose I/O, ADC, or capacitive touch input.
IO14 GPIO14 / ADC2_6 / Touch6 General-purpose I/O, ADC, or capacitive touch input.
IO15 GPIO15 / ADC2_3 / Touch3 General-purpose I/O, ADC, or capacitive touch input.
IO16 GPIO16 General-purpose I/O pin.
IO17 GPIO17 General-purpose I/O pin.
IO18 GPIO18 / SPI_CLK General-purpose I/O or SPI clock pin.
IO19 GPIO19 / SPI_MISO General-purpose I/O or SPI MISO pin.
IO21 GPIO21 / I2C SDA General-purpose I/O or I2C data pin.
IO22 GPIO22 / I2C SCL General-purpose I/O or I2C clock pin.
IO23 GPIO23 / SPI_MOSI General-purpose I/O or SPI MOSI pin.
IO25 GPIO25 / DAC1 / ADC2_8 General-purpose I/O, DAC, or ADC pin.
IO26 GPIO26 / DAC2 / ADC2_9 General-purpose I/O, DAC, or ADC pin.
IO27 GPIO27 / ADC2_7 / Touch7 General-purpose I/O, ADC, or capacitive touch input.
IO32 GPIO32 / ADC1_4 / Touch9 General-purpose I/O, ADC, or capacitive touch input.
IO33 GPIO33 / ADC1_5 / Touch8 General-purpose I/O, ADC, or capacitive touch input.
IO34 GPIO34 / ADC1_6 Input-only ADC pin.
IO35 GPIO35 / ADC1_7 Input-only ADC pin.

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 power source.
    • Ensure the GND pin is connected to the common ground of your circuit.
  2. Programming the ESP32:

    • Use a USB cable to connect the ESP32 to your computer.
    • Install the ESP32 board package in the Arduino IDE or use the ESP-IDF framework.
    • Select the correct board and port in the IDE before uploading code.
  3. Connecting Peripherals:

    • Use GPIO pins for digital or analog input/output.
    • For communication protocols, connect devices to the appropriate pins (e.g., I2C, SPI, UART).
  4. Wi-Fi and Bluetooth Setup:

    • Use the built-in libraries (e.g., WiFi.h or BluetoothSerial.h) to configure wireless communication.

Important Considerations and Best Practices

  • Voltage Levels: The ESP32 operates at 3.3V logic levels. Avoid connecting 5V signals directly to GPIO pins.
  • Boot Mode: Ensure GPIO0 is pulled low during programming to enter boot mode.
  • Power Supply: Use a stable power source to avoid unexpected resets or instability.
  • Deep Sleep: Utilize deep sleep mode for low-power applications to extend battery life.

Example Code for Arduino IDE

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

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

const char* ssid = "Your_SSID";       // Replace with your Wi-Fi network name
const char* password = "Your_Password"; // Replace with your Wi-Fi password
const int ledPin = 2;                 // GPIO2 is typically connected to the onboard LED

void setup() {
  pinMode(ledPin, OUTPUT);            // Set the LED pin as an output
  Serial.begin(115200);               // Start the serial communication
  WiFi.begin(ssid, password);         // Connect to the Wi-Fi network

  Serial.print("Connecting to Wi-Fi");
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\nConnected to Wi-Fi!");
}

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. ESP32 Not Connecting to Wi-Fi:

    • Double-check the SSID and password in your code.
    • Ensure the Wi-Fi network is active and within range.
    • Restart the ESP32 and router if necessary.
  2. Upload Fails or Timeout Errors:

    • Ensure the correct board and port are selected in the Arduino IDE.
    • Hold the BOOT button while uploading to force boot mode.
    • Check the USB cable and connection.
  3. ESP32 Keeps Resetting:

    • Verify the power supply is stable and sufficient.
    • Avoid excessive current draw from GPIO pins.
  4. GPIO Pin Not Working:

    • Confirm the pin is not reserved for internal functions (e.g., GPIO0, GPIO2 during boot).
    • Check for short circuits or incorrect wiring.

FAQs

  • Can the ESP32 handle 5V logic?
    No, the ESP32 operates at 3.3V logic levels. Use a level shifter for 5V signals.

  • How do I use the ESP32's Bluetooth?
    Use the BluetoothSerial library in the Arduino IDE to configure and communicate via Bluetooth.

  • What is the maximum number of devices the ESP32 can connect to via Wi-Fi?
    The ESP32 can act as a Wi-Fi access point and support up to 10 devices by default, but this can be increased with custom configurations.

  • How do I reduce power consumption?
    Use deep sleep mode and disable unused peripherals to minimize power usage.