Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use ESP32 (30 pin, Sized correctly): Examples, Pinouts, and Specs

Image of ESP32 (30 pin, Sized correctly)
Cirkit Designer LogoDesign with ESP32 (30 pin, Sized correctly) in Cirkit Designer

Introduction

The ESP32, manufactured by Espressif, is a powerful microcontroller designed for IoT (Internet of Things) applications. It features built-in Wi-Fi and Bluetooth capabilities, making it an excellent choice for wireless communication projects. With its 30-pin configuration, the ESP32 offers versatile connectivity options, allowing seamless interfacing with sensors, actuators, and other peripherals. Its compact size and robust performance make it suitable for a wide range of applications, from home automation to industrial control systems.

Explore Projects Built with ESP32 (30 pin, Sized correctly)

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, Sized correctly) 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 OLED Display Interface
Image of d: A project utilizing ESP32 (30 pin, Sized correctly) 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
Battery-Powered ESP32 Data Logger with Oscilloscope Monitoring
Image of electromiografia: A project utilizing ESP32 (30 pin, Sized correctly) in a practical application
This circuit features an ESP32 microcontroller powered by a 7V battery, with its ground connected to a common ground. The ESP32's D35 pin is monitored by a mixed signal oscilloscope, and an alligator clip cable is used to connect the oscilloscope's second channel to the common ground.
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, Sized correctly) 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

Explore Projects Built with ESP32 (30 pin, Sized correctly)

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, Sized correctly) 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 d: A project utilizing ESP32 (30 pin, Sized correctly) 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 electromiografia: A project utilizing ESP32 (30 pin, Sized correctly) in a practical application
Battery-Powered ESP32 Data Logger with Oscilloscope Monitoring
This circuit features an ESP32 microcontroller powered by a 7V battery, with its ground connected to a common ground. The ESP32's D35 pin is monitored by a mixed signal oscilloscope, and an alligator clip cable is used to connect the oscilloscope's second channel to the common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Water: A project utilizing ESP32 (30 pin, Sized correctly) 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

Common Applications and Use Cases

  • IoT devices and smart home systems
  • Wireless sensor networks
  • Robotics and automation
  • Wearable technology
  • Data logging and remote monitoring
  • Prototyping and educational projects

Technical Specifications

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

Key Technical Details

  • Microcontroller: Xtensa® dual-core 32-bit LX6 processor
  • Clock Speed: Up to 240 MHz
  • Flash Memory: 4 MB (varies by module)
  • SRAM: 520 KB
  • Wi-Fi: 802.11 b/g/n (2.4 GHz)
  • Bluetooth: v4.2 BR/EDR and BLE
  • Operating Voltage: 3.3V
  • Input Voltage Range: 5V (via USB) or 3.3V (via VIN pin)
  • GPIO Pins: 30 pins (multipurpose)
  • ADC Channels: 18 (12-bit resolution)
  • DAC Channels: 2 (8-bit resolution)
  • PWM Channels: 16
  • I2C Interfaces: 2
  • SPI Interfaces: 4
  • UART Interfaces: 3
  • Power Consumption: Ultra-low power consumption in deep sleep mode (~10 µA)

Pin Configuration and Descriptions

The ESP32 (30-pin variant) has a standard pinout. Below is a table describing the pin configuration:

Pin Number Pin Name Function
1 EN Enable pin (active high)
2 IO1 GPIO1 / UART TX
3 IO3 GPIO3 / UART RX
4 IO4 GPIO4 / ADC / PWM
5 IO5 GPIO5 / ADC / PWM
6 GND Ground
7 VIN Input voltage (3.3V or 5V)
8 IO12 GPIO12 / ADC / PWM
9 IO13 GPIO13 / ADC / PWM
10 IO14 GPIO14 / ADC / PWM
11 IO15 GPIO15 / ADC / PWM
12 IO16 GPIO16 / ADC / PWM
13 IO17 GPIO17 / ADC / PWM
14 IO18 GPIO18 / SPI SCK
15 IO19 GPIO19 / SPI MISO
16 IO21 GPIO21 / I2C SDA
17 IO22 GPIO22 / I2C SCL
18 IO23 GPIO23 / SPI MOSI
19 IO25 GPIO25 / DAC1
20 IO26 GPIO26 / DAC2
21 IO27 GPIO27 / ADC / PWM
22 IO32 GPIO32 / ADC / PWM
23 IO33 GPIO33 / ADC / PWM
24 IO34 GPIO34 / ADC (input only)
25 IO35 GPIO35 / ADC (input only)
26 IO36 GPIO36 / ADC (input only)
27 IO39 GPIO39 / ADC (input only)
28 3V3 3.3V power output
29 GND Ground
30 IO0 GPIO0 / Boot mode selection

Usage Instructions

How to Use the ESP32 in a Circuit

  1. Powering the ESP32:
    • Use a 5V USB connection or supply 3.3V directly to the VIN pin. Ensure the power source can provide sufficient current (at least 500 mA).
  2. Connecting Peripherals:
    • Use the GPIO pins to connect sensors, actuators, or other devices. Refer to the pin configuration table for specific pin functions.
  3. Programming the ESP32:
    • The ESP32 can be programmed using the Arduino IDE or Espressif's ESP-IDF framework. Install the necessary drivers and libraries before uploading code.

Important Considerations and Best Practices

  • Voltage Levels: The ESP32 operates at 3.3V logic levels. Avoid connecting 5V signals directly to GPIO pins without level shifters.
  • Boot Mode: Ensure GPIO0 is pulled low during boot to enter programming mode.
  • Wi-Fi Antenna: Avoid placing metal objects near the onboard antenna to prevent signal interference.
  • Deep Sleep Mode: Use deep sleep mode to conserve power in battery-operated projects.

Example Code for Arduino IDE

Below is an example code to connect the ESP32 to a Wi-Fi network and print the IP address:

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

const char* ssid = "Your_SSID";       // Replace with your Wi-Fi SSID
const char* password = "Your_Password"; // Replace with your Wi-Fi password

void setup() {
  Serial.begin(115200); // Initialize serial communication
  delay(1000);          // Wait for serial monitor to open

  Serial.println("Connecting to Wi-Fi...");
  WiFi.begin(ssid, password); // Start Wi-Fi connection

  while (WiFi.status() != WL_CONNECTED) {
    delay(500); // Wait for connection
    Serial.print(".");
  }

  Serial.println("\nWi-Fi connected!");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP()); // Print the device's IP address
}

void loop() {
  // Add your main code here
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Connecting to Wi-Fi:

    • Double-check the SSID and password.
    • Ensure the Wi-Fi network is 2.4 GHz (ESP32 does not support 5 GHz networks).
    • Check for interference or weak signal strength.
  2. Upload Fails in Arduino IDE:

    • Ensure the correct board and COM port are selected in the Arduino IDE.
    • Hold the BOOT button on the ESP32 while uploading the code.
  3. GPIO Pin Not Working:

    • Verify the pin's function and ensure it is not being used for another purpose (e.g., boot mode).
    • Check for proper voltage levels and connections.
  4. ESP32 Overheating:

    • Ensure the ESP32 is not drawing excessive current.
    • Avoid short circuits and provide adequate ventilation.

FAQs

  • Q: Can the ESP32 operate on battery power?
    A: Yes, the ESP32 can be powered by a battery. Use a 3.7V LiPo battery with a voltage regulator to supply 3.3V.

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

  • Q: Can I use the ESP32 with 5V logic devices?
    A: No, the ESP32 operates at 3.3V logic levels. Use level shifters for 5V devices.

  • Q: What is the maximum range of the ESP32's Wi-Fi?
    A: The range depends on the environment but typically extends up to 50 meters indoors and 200 meters outdoors.