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 functionalities, including ADC, DAC, PWM, I2C, SPI, UART, and more. Its versatility and high performance make it a popular choice among hobbyists and professionals alike.

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

  • Internet of Things (IoT) devices
  • Home automation systems
  • Wireless sensor networks
  • Wearable technology
  • Robotics and automation
  • Data logging and monitoring systems

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 7-12V (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
  • Power Consumption: Ultra-low power consumption in deep sleep mode (~10 µA)

Pin Configuration and Descriptions

The ESP32 (30 pin) has a total of 30 GPIO pins, each with specific functions. Below is a table summarizing the key pins and their descriptions:

Pin Name Function Description
VIN Power Input Input voltage (7-12V) for powering the ESP32.
3V3 Power Output Provides 3.3V output for external components.
GND Ground Ground connection.
EN Enable Enables or disables the chip (active high).
IO0 GPIO0 / Boot Mode Used for boot mode selection or general-purpose I/O.
IO2 GPIO2 General-purpose I/O, often used for onboard LED.
IO4 GPIO4 General-purpose I/O.
IO5 GPIO5 General-purpose I/O.
IO12 GPIO12 / ADC2_CH5 General-purpose I/O or ADC channel.
IO13 GPIO13 / ADC2_CH4 General-purpose I/O or ADC channel.
IO14 GPIO14 / ADC2_CH6 / HSPI_CLK General-purpose I/O, ADC, or SPI clock.
IO15 GPIO15 / ADC2_CH3 / HSPI_CS General-purpose I/O, ADC, or SPI chip select.
IO16 GPIO16 General-purpose I/O.
IO17 GPIO17 General-purpose I/O.
IO18 GPIO18 / VSPI_CLK General-purpose I/O or SPI clock.
IO19 GPIO19 / VSPI_MISO General-purpose I/O or SPI MISO.
IO21 GPIO21 / I2C SDA General-purpose I/O or I2C data line.
IO22 GPIO22 / I2C SCL General-purpose I/O or I2C clock line.
IO23 GPIO23 / VSPI_MOSI General-purpose I/O or SPI MOSI.
IO25 GPIO25 / DAC1 / ADC2_CH8 General-purpose I/O, DAC, or ADC channel.
IO26 GPIO26 / DAC2 / ADC2_CH9 General-purpose I/O, DAC, or ADC channel.
IO27 GPIO27 / ADC2_CH7 General-purpose I/O or ADC channel.
IO32 GPIO32 / ADC1_CH4 / Touch9 General-purpose I/O, ADC, or touch sensor.
IO33 GPIO33 / ADC1_CH5 / Touch8 General-purpose I/O, ADC, or touch sensor.
IO34 GPIO34 / ADC1_CH6 Input-only pin, used for ADC.
IO35 GPIO35 / ADC1_CH7 Input-only pin, used for ADC.

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 input/output.
    • For analog input, connect sensors to ADC pins (e.g., GPIO34, GPIO35).
    • For communication, use I2C (GPIO21, GPIO22), SPI (GPIO18, GPIO19, GPIO23), or UART (GPIO1, GPIO3).
  3. Programming the ESP32:

    • Install the ESP32 board package in the Arduino IDE.
    • Connect the ESP32 to your computer via USB.
    • Select the correct board and port in the Arduino IDE.
    • Write and upload your code.

Example Code: Blinking an LED

The following example demonstrates how to blink an LED connected to GPIO2:

// Define the GPIO pin for the LED
#define LED_PIN 2

void setup() {
  pinMode(LED_PIN, OUTPUT); // Set GPIO2 as an output pin
}

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

Important Considerations

  • Voltage Levels: The ESP32 operates at 3.3V logic levels. Avoid connecting 5V signals directly to GPIO pins.
  • Boot Mode: GPIO0 must be pulled low during boot to enter programming mode.
  • Power Supply: Ensure a stable power supply to avoid unexpected resets or malfunctions.

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Detected by Computer:

    • Ensure the correct USB driver is installed (e.g., CP2102 or CH340).
    • Check the USB cable for data transfer capability.
  2. Upload Fails with "Failed to Connect" Error:

    • Hold the BOOT button while uploading the code.
    • Ensure GPIO0 is pulled low during programming.
  3. Wi-Fi Connection Issues:

    • Verify the SSID and password in your code.
    • Check for interference or weak signal strength.
  4. Random Resets or Instability:

    • Use a stable power source with sufficient current (at least 500mA).
    • Add capacitors to smooth out voltage fluctuations.

FAQs

Q: Can the ESP32 handle 5V input on GPIO pins?
A: No, the ESP32 operates at 3.3V logic levels. Use a level shifter for 5V signals.

Q: How do I use the ESP32's Bluetooth functionality?
A: The ESP32 supports both Bluetooth Classic and BLE. Use the BluetoothSerial or BLE libraries in the Arduino IDE to implement Bluetooth features.

Q: What is the maximum current the 3.3V pin can supply?
A: The 3.3V pin can supply up to 500mA, depending on the input power source.

Q: Can I use the ESP32 for battery-powered projects?
A: Yes, the ESP32 supports low-power modes, making it suitable for battery-powered applications. Use deep sleep mode to minimize power consumption.