The ESP32 is a powerful microcontroller with built-in Wi-Fi and Bluetooth capabilities, designed for a wide range of applications. With its 30-pin configuration, the ESP32 offers extensive I/O options, making it ideal for Internet of Things (IoT) projects, embedded systems, and smart devices. Its dual-core processor and low-power consumption make it suitable for both high-performance and energy-efficient 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!
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.
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.
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.
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.
IoT devices (e.g., smart home systems, sensors, and actuators)
Wireless communication (Wi-Fi and Bluetooth)
Data logging and remote monitoring
Robotics and automation
Wearable devices
Prototyping and development of embedded systems
Technical Specifications
Key Technical Details
Specification
Value
Microcontroller
Tensilica Xtensa LX6 (dual-core)
Clock Speed
Up to 240 MHz
Flash Memory
4 MB (varies by model)
SRAM
520 KB
Wi-Fi Standard
802.11 b/g/n
Bluetooth Version
Bluetooth 4.2 + BLE
Operating Voltage
3.3V
Input Voltage Range
5V (via USB) or 3.3V (via VIN pin)
GPIO Pins
30
ADC Channels
18 (12-bit resolution)
DAC Channels
2 (8-bit resolution)
Communication Interfaces
UART, SPI, I2C, I2S, CAN, PWM
Power Consumption
Ultra-low power (varies by mode)
Operating Temperature Range
-40°C to 125°C
Pin Configuration and Descriptions
The ESP32 (30-pin variant) has a versatile pinout. Below is a table describing the key pins:
Pin Number
Pin Name
Functionality
1
EN
Enable pin (active high)
2
IO1
GPIO1, UART TX
3
IO3
GPIO3, UART RX
4
IO4
GPIO4, PWM, ADC
5
IO5
GPIO5, PWM, ADC
6
GND
Ground
7
IO12
GPIO12, ADC, Touch Sensor
8
IO13
GPIO13, ADC, Touch Sensor
9
IO14
GPIO14, PWM, ADC
10
IO15
GPIO15, PWM, ADC
11
IO16
GPIO16, UART RX
12
IO17
GPIO17, UART TX
13
IO18
GPIO18, SPI CLK
14
IO19
GPIO19, SPI MISO
15
IO21
GPIO21, I2C SDA
16
IO22
GPIO22, I2C SCL
17
IO23
GPIO23, SPI MOSI
18
VIN
Input voltage (3.3V or 5V)
19
3V3
3.3V output
20
GND
Ground
21
IO25
GPIO25, DAC1
22
IO26
GPIO26, DAC2
23
IO27
GPIO27, ADC, Touch Sensor
24
IO32
GPIO32, ADC, Touch Sensor
25
IO33
GPIO33, ADC, Touch Sensor
26
IO34
GPIO34, ADC (input only)
27
IO35
GPIO35, ADC (input only)
28
IO36
GPIO36, ADC (input only)
29
IO39
GPIO39, ADC (input only)
30
GND
Ground
Usage Instructions
How to Use the ESP32 in a Circuit
Powering the ESP32:
Use a USB cable to power the ESP32 via the micro-USB port (5V input).
Alternatively, supply 3.3V directly to the VIN pin. Ensure the power source is stable.
Connecting to Peripherals:
Use GPIO pins for digital I/O operations.
For analog input, connect sensors to ADC pins (e.g., IO34, IO35).
For communication, use UART, SPI, or I2C pins as per your requirements.
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.
Important Considerations and Best Practices
Voltage Levels: Ensure all connected peripherals operate at 3.3V logic levels. Use level shifters if necessary.
Pin Limitations: Some pins (e.g., IO34-IO39) are input-only. Check the datasheet for pin-specific restrictions.
Power Consumption: Use deep sleep mode for battery-powered applications to reduce power usage.
Wi-Fi and Bluetooth: Avoid using GPIO pins that interfere with the internal Wi-Fi and Bluetooth antennas.
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() {
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
}
Troubleshooting and FAQs
Common Issues and Solutions
ESP32 Not Detected by Computer:
Ensure the USB cable is functional and supports data transfer.
Install the correct USB-to-serial driver for your operating system.
Upload Errors in Arduino IDE:
Check that the correct board and port are selected in the IDE.
Press and hold the "BOOT" button on the ESP32 while uploading the code.
Wi-Fi Connection Fails:
Verify the SSID and password in your code.
Ensure the Wi-Fi network is within range and operational.
Random Resets or Instability:
Check the power supply for stability.
Avoid using GPIO pins that conflict with internal functions (e.g., IO12 during boot).
FAQs
Q: Can I power the ESP32 with a 5V battery?
A: Yes, you can connect a 5V battery to the VIN pin. Ensure the battery provides a stable output.
Q: How do I use the ESP32's Bluetooth feature?
A: Use the BluetoothSerial library in the Arduino IDE to enable Bluetooth communication.
Q: Can I use the ESP32 with 5V logic devices?
A: No, the ESP32 operates at 3.3V logic levels. Use a level shifter for compatibility with 5V devices.