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 designed for IoT (Internet of Things) applications and embedded systems. It features built-in Wi-Fi and Bluetooth capabilities, making it a versatile choice for wireless communication projects. With its 30-pin configuration, the ESP32 provides a wide range of GPIO (General Purpose Input/Output) pins, ADC (Analog-to-Digital Converter) channels, PWM (Pulse Width Modulation) outputs, and other peripherals. Its high processing power and low energy consumption make it suitable for applications such as smart home devices, wearables, robotics, and industrial automation.

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

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 (VIN): 5V (via USB or external power supply)
  • GPIO Pins: 30 (multipurpose)
  • ADC Channels: 18 (12-bit resolution)
  • PWM Outputs: Up to 16 channels
  • Communication Protocols: UART, SPI, I2C, I2S, CAN, Ethernet
  • Power Consumption: Ultra-low power modes available
  • Operating Temperature: -40°C to +125°C

Pin Configuration and Descriptions

The ESP32 (30-pin variant) has the following pinout:

Pin Number Pin Name Function
1 EN Enable pin (active high, resets the chip when pulled low)
2 IO1 (TX0) GPIO1, UART0 TX (serial communication)
3 IO3 (RX0) GPIO3, UART0 RX (serial communication)
4 IO4 GPIO4, supports PWM, ADC, and other functions
5 IO5 GPIO5, supports PWM, ADC, and other functions
6 GND Ground
7 IO18 GPIO18, supports SPI SCK, PWM, and other functions
8 IO19 GPIO19, supports SPI MISO, PWM, and other functions
9 IO21 GPIO21, supports I2C SDA, PWM, and other functions
10 IO22 GPIO22, supports I2C SCL, PWM, and other functions
11 VIN Input voltage (5V)
12 IO23 GPIO23, supports SPI MOSI, PWM, and other functions
13 IO25 GPIO25, supports ADC, PWM, and other functions
14 IO26 GPIO26, supports ADC, PWM, and other functions
15 IO27 GPIO27, supports ADC, PWM, and other functions
16 IO32 GPIO32, supports ADC, PWM, and other functions
17 IO33 GPIO33, supports ADC, PWM, and other functions
18 IO34 GPIO34, input-only pin, supports ADC
19 IO35 GPIO35, input-only pin, supports ADC
20 GND Ground
21 IO12 GPIO12, supports ADC, PWM, and other functions
22 IO13 GPIO13, supports ADC, PWM, and other functions
23 IO14 GPIO14, supports ADC, PWM, and other functions
24 IO15 GPIO15, supports ADC, PWM, and other functions
25 IO16 GPIO16, supports ADC, PWM, and other functions
26 IO17 GPIO17, supports ADC, PWM, and other functions
27 IO2 GPIO2, supports ADC, PWM, and other functions
28 IO0 GPIO0, boot mode selection pin
29 IO36 GPIO36, input-only pin, supports ADC
30 IO39 GPIO39, input-only pin, supports ADC

Usage Instructions

How to Use the ESP32 in a Circuit

  1. Powering the ESP32:

    • Connect the VIN pin to a 5V power source or use the micro-USB port for power and programming.
    • Ensure the GND pin is connected to the ground of your circuit.
  2. Programming the ESP32:

    • Use the Arduino IDE or ESP-IDF (Espressif IoT Development Framework) to program the ESP32.
    • Install the ESP32 board package in the Arduino IDE via the Board Manager.
    • Connect the ESP32 to your computer using a USB cable and select the appropriate COM port.
  3. Connecting Peripherals:

    • Use the GPIO pins for digital input/output, PWM, or ADC as needed.
    • For I2C communication, connect your devices to IO21 (SDA) and IO22 (SCL).
    • For SPI communication, use IO18 (SCK), IO19 (MISO), and IO23 (MOSI).
  4. Uploading Code:

    • Write your code in the Arduino IDE or ESP-IDF.
    • Press the EN button on the ESP32 to reset the board if needed.
    • Click the upload button in the IDE to flash the code onto the ESP32.

Example Code for Arduino IDE

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() {
  // Set the LED pin as an output
  pinMode(LED_PIN, OUTPUT);
}

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

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

Important Considerations and Best Practices

  • Always use a level shifter when interfacing the ESP32 with 5V logic devices, as the ESP32 operates at 3.3V logic levels.
  • Avoid using GPIO pins IO34, IO35, IO36, and IO39 for output, as they are input-only pins.
  • Use decoupling capacitors near the power pins to reduce noise and improve stability.
  • Be cautious with the IO0 pin, as it is used for boot mode selection during programming.

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Detected by the Computer:

    • Ensure the USB cable is functional and supports data transfer.
    • Install the correct USB-to-serial driver for your ESP32 board.
  2. Code Upload Fails:

    • Check the selected COM port in the Arduino IDE.
    • Press and hold the BOOT button while uploading the code.
  3. Wi-Fi Connection Issues:

    • Verify the SSID and password in your code.
    • Ensure the Wi-Fi network is within range and operational.
  4. Random Resets or Instability:

    • Check the power supply for sufficient current (at least 500mA recommended).
    • Add capacitors to stabilize the power supply.

FAQs

  • Q: Can the ESP32 be powered directly with a 3.3V source?
    A: Yes, you can power the ESP32 by connecting a 3.3V source to the 3.3V pin.

  • Q: How do I use the ESP32's Bluetooth functionality?
    A: Use the BluetoothSerial library in the Arduino IDE or the ESP-IDF Bluetooth stack to implement Bluetooth communication.

  • Q: Can I use the ESP32 for battery-powered applications?
    A: Yes, the ESP32 supports ultra-low power modes, making it suitable for battery-powered projects.

  • Q: What is the maximum current draw of the ESP32?
    A: The ESP32 can draw up to 500mA during peak operation, especially when using Wi-Fi or Bluetooth.

This concludes the documentation for the ESP32 (30-pin variant).