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) by Arduino is a powerful microcontroller designed for IoT applications and embedded systems. It features built-in Wi-Fi and Bluetooth capabilities, making it an excellent choice for projects requiring wireless communication. With its 30 pins, the ESP32 offers a wide range of input/output functions, 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

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

Technical Specifications

The ESP32 (30 pin) microcontroller is packed with features that make it versatile and efficient for a variety of applications. Below are its key technical details:

Key Technical Details

  • Microcontroller: Tensilica Xtensa LX6 dual-core processor
  • Clock Speed: Up to 240 MHz
  • Flash Memory: 4 MB
  • SRAM: 520 KB
  • Wi-Fi: 802.11 b/g/n
  • Bluetooth: v4.2 BR/EDR and BLE
  • Operating Voltage: 3.3V
  • Input Voltage: 5V (via USB) or 7-12V (via VIN pin)
  • GPIO Pins: 30 pins (including ADC, DAC, PWM, I2C, SPI, UART)
  • Analog Inputs: 18 channels (12-bit ADC)
  • Digital-to-Analog Converter (DAC): 2 channels
  • PWM Outputs: 16 channels
  • Operating Temperature: -40°C to +125°C

Pin Configuration and Descriptions

The ESP32 (30 pin) has a total of 30 pins, each with specific functions. Below is a table summarizing the pin configuration:

Pin Number Pin Name Function
1 EN Enable pin (active high, used to reset the chip)
2 IO1 (TX0) UART0 Transmit (TX)
3 IO3 (RX0) UART0 Receive (RX)
4 IO4 GPIO4, ADC2_CH0, Touch4
5 IO5 GPIO5, ADC2_CH1, Touch5
6 IO12 GPIO12, ADC2_CH5, Touch2, HSPI MISO
7 IO13 GPIO13, ADC2_CH4, Touch3, HSPI MOSI
8 IO14 GPIO14, ADC2_CH6, Touch6, HSPI CLK
9 IO15 GPIO15, ADC2_CH3, Touch7, HSPI CS
10 IO16 GPIO16, UART2 RX
11 IO17 GPIO17, UART2 TX
12 IO18 GPIO18, VSPI CLK
13 IO19 GPIO19, VSPI MISO
14 IO21 GPIO21, I2C SDA
15 IO22 GPIO22, I2C SCL
16 IO23 GPIO23, VSPI MOSI
17 IO25 GPIO25, DAC1, ADC2_CH8
18 IO26 GPIO26, DAC2, ADC2_CH9
19 IO27 GPIO27, ADC2_CH7, Touch7
20 IO32 GPIO32, ADC1_CH4, Touch9
21 IO33 GPIO33, ADC1_CH5, Touch8
22 IO34 GPIO34, ADC1_CH6 (input only)
23 IO35 GPIO35, ADC1_CH7 (input only)
24 GND Ground
25 3V3 3.3V power output
26 VIN External power input (7-12V)
27 IO36 GPIO36, ADC1_CH0, VP (input only)
28 IO39 GPIO39, ADC1_CH3, VN (input only)
29 IO0 GPIO0, ADC2_CH1, Touch1, Boot mode selection
30 IO2 GPIO2, ADC2_CH2, Touch2, HSPI WP

Usage Instructions

The ESP32 (30 pin) is easy to use in a variety of projects. Below are the steps and best practices for integrating it into your circuit.

How to Use the ESP32 in a Circuit

  1. Powering the ESP32:

    • Connect the ESP32 to a computer via a micro-USB cable for programming and power.
    • Alternatively, supply 7-12V to the VIN pin or 3.3V to the 3V3 pin.
  2. Programming the ESP32:

    • Install the Arduino IDE and add the ESP32 board package via the Board Manager.
    • Select "ESP32 Dev Module" from the Tools > Board menu.
    • Connect the ESP32 to your computer and select the appropriate COM port.
  3. Connecting Peripherals:

    • Use GPIO pins for digital input/output.
    • Connect sensors to ADC pins for analog input.
    • Use I2C (pins 21 and 22) or SPI (pins 18, 19, 23, and 5) for communication with other devices.
  4. Uploading Code:

    • Write your code in the Arduino IDE.
    • Press the "Upload" button to flash the code to the ESP32.
    • If the upload fails, press and hold the "BOOT" button on the ESP32 while uploading.

Example Code: Blinking an LED

Below is an example of 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
}

Best Practices

  • Always use a level shifter when interfacing 5V devices with the ESP32's 3.3V GPIO pins.
  • Avoid powering high-current peripherals directly from the ESP32's 3V3 pin.
  • Use decoupling capacitors near the power pins to reduce noise.

Troubleshooting and FAQs

Common Issues

  1. ESP32 Not Detected by Computer:

    • Ensure the correct USB driver is installed for the ESP32.
    • Try a different USB cable or port.
  2. Code Upload Fails:

    • Press and hold the "BOOT" button during the upload process.
    • Check that the correct COM port and board are selected in the Arduino IDE.
  3. Wi-Fi Connection Issues:

    • Verify the SSID and password in your code.
    • Ensure the router is within range and supports 2.4 GHz Wi-Fi.
  4. Random Resets or Instability:

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

FAQs

Q: Can the ESP32 operate on battery power?
A: Yes, the ESP32 can be powered by a LiPo battery connected to the VIN pin. Use a voltage regulator if necessary.

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: Can I use the ESP32 with 5V sensors?
A: Yes, but you must use a level shifter to step down the voltage to 3.3V for the ESP32's GPIO pins.

Q: What is the maximum number of devices I can connect via I2C?
A: The ESP32 supports up to 127 devices on the I2C bus, depending on the address availability and bus capacitance.

By following this documentation, you can effectively utilize the ESP32 (30 pin) in your projects and troubleshoot common issues with ease.