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 developed by Arduino, with the manufacturer part ID "UNO." It features built-in Wi-Fi and Bluetooth capabilities, making it an excellent choice for Internet of Things (IoT) applications, smart devices, and embedded systems. With its 30-pin configuration, the ESP32 offers a wide range of input/output (I/O) options, enabling seamless integration with sensors, actuators, and other peripherals.

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

The ESP32 (30 pin) microcontroller is designed to deliver high performance and versatility. Below are its key technical specifications:

Specification Details
Microcontroller Dual-core Xtensa® 32-bit LX6 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 Bluetooth 4.2 and BLE (Bluetooth Low Energy)
Operating Voltage 3.3V
Input Voltage Range 5V (via USB) or 7-12V (via VIN pin)
GPIO Pins 30 pins (including digital, analog, PWM, I2C, SPI, UART, and more)
ADC Channels 18 (12-bit resolution)
DAC Channels 2
PWM Channels 16
Communication Protocols UART, SPI, I2C, I2S, CAN, Ethernet
Power Consumption Ultra-low power consumption in deep sleep mode (as low as 10 µA)
Operating Temperature -40°C to +85°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
VIN Input voltage (7-12V)
GND Ground
3V3 3.3V output
EN Enable pin (active high)
IO0 GPIO0, used for boot mode selection
IO2 GPIO2, supports PWM, ADC, and more
IO4 GPIO4, supports PWM, ADC, and more
IO5 GPIO5, supports PWM, ADC, and more
IO12 GPIO12, supports PWM, ADC, and more
IO13 GPIO13, supports PWM, ADC, and more
IO14 GPIO14, supports PWM, ADC, and more
IO15 GPIO15, supports PWM, ADC, and more
IO16 GPIO16, supports UART, I2C, and more
IO17 GPIO17, supports UART, I2C, and more
IO18 GPIO18, supports SPI, PWM, and more
IO19 GPIO19, supports SPI, PWM, and more
IO21 GPIO21, supports I2C, PWM, and more
IO22 GPIO22, supports I2C, PWM, and more
IO23 GPIO23, supports SPI, PWM, and more
IO25 GPIO25, supports DAC, ADC, and more
IO26 GPIO26, supports DAC, ADC, and more
IO27 GPIO27, supports ADC, PWM, and more
IO32 GPIO32, supports ADC, PWM, and more
IO33 GPIO33, supports ADC, PWM, and more
IO34 GPIO34, input-only ADC pin
IO35 GPIO35, input-only ADC pin
RX0 UART0 RX (serial communication)
TX0 UART0 TX (serial communication)

Usage Instructions

The ESP32 (30 pin) is easy to use in a variety of projects. Below are step-by-step instructions for using it in a circuit:

Connecting the ESP32 to a Circuit

  1. Powering the ESP32:

    • Use the VIN pin to supply 7-12V, or connect a USB cable to power the board.
    • Ensure the GND pin is connected to the ground of your circuit.
  2. Connecting Peripherals:

    • Use the GPIO pins to connect sensors, actuators, or other devices.
    • For analog sensors, connect them to ADC pins (e.g., IO32, IO33).
    • For communication, use UART, SPI, or I2C pins as needed.
  3. Programming the ESP32:

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

Example Code: Blinking an LED

Here is an example of how to blink an LED connected to GPIO2:

// Define the GPIO pin where the LED is connected
#define LED_PIN 2

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

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 and Best Practices

  • Voltage Levels: Ensure all connected devices operate at 3.3V logic levels to avoid damaging the ESP32.
  • Deep Sleep Mode: Use deep sleep mode to conserve power in battery-powered applications.
  • Boot Mode: GPIO0 must be pulled low during boot to enter programming mode.
  • Wi-Fi and Bluetooth: Avoid using GPIO pins 1, 3, 9, 10, and 11 for other purposes when Wi-Fi or Bluetooth is active.

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Detected by Arduino IDE:

    • Ensure the correct board and port are selected in the Arduino IDE.
    • Install the ESP32 board support package if not already installed.
  2. Upload Fails with "Failed to Connect" Error:

    • Press and hold the "BOOT" button on the ESP32 while uploading the code.
  3. Wi-Fi Connection Issues:

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

    • Verify that the power supply provides sufficient current (at least 500mA).
    • Use decoupling capacitors to stabilize the power supply.

FAQs

Q: Can the ESP32 operate on 5V logic?
A: No, the ESP32 operates on 3.3V logic. Using 5V logic can damage the board.

Q: How do I reset the ESP32?
A: Press the "EN" button on the board to reset the ESP32.

Q: Can I use the ESP32 with an external antenna?
A: Yes, some ESP32 models support external antennas. Check the specific model for details.

Q: How do I enable deep sleep mode?
A: Use the esp_deep_sleep_start() function in your code to enable deep sleep mode.

This documentation provides a comprehensive guide to using the ESP32 (30 pin) microcontroller. For further assistance, refer to the official Arduino documentation or community forums.