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

How to Use Esp32: Examples, Pinouts, and Specs

Image of Esp32
Cirkit Designer LogoDesign with Esp32 in Cirkit Designer

Introduction

The ESP32, manufactured by Espressif, is a low-cost, low-power system on a chip (SoC) designed for a wide range of applications. It integrates Wi-Fi and Bluetooth capabilities, making it an ideal choice for Internet of Things (IoT) devices, smart home systems, wearable electronics, and embedded systems. Its versatility, robust performance, and extensive community support have made it a popular choice among hobbyists and professionals alike.

Explore Projects Built with Esp32

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 Sensor Monitoring System with OLED Display and E-Stop
Image of MVP_design: A project utilizing Esp32 in a practical application
This circuit features an ESP32 microcontroller that interfaces with a variety of sensors and output devices. It is powered by a Lipo battery through a buck converter, ensuring a stable voltage supply. The ESP32 collects data from a DHT11 temperature and humidity sensor and a vibration sensor, controls a buzzer, and displays information on an OLED screen. An emergency stop (E Stop) is connected for safety purposes, allowing the system to be quickly deactivated.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled OLED Display and Servo with DotStar LED Strip and Audio Output
Image of Arena 2: A project utilizing Esp32 in a practical application
This circuit features an ESP32 microcontroller driving a variety of components. It controls an OLED display for visual output, a DotStar LED strip for lighting effects, a PAM8403 audio amplifier connected to a speaker for sound output, and a PCA9685 PWM Servo Breakout to manage a servo motor. The ESP32 also interfaces with a piezo speaker for additional sound generation, and the circuit is powered by a 18650 Li-ion battery setup with a TP4056 charging module. The ESP32's embedded code handles the display animation on the OLED.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with Motion Detection
Image of pro: A project utilizing Esp32 in a practical application
This circuit features an ESP32 microcontroller on a baseboard that interfaces with a PIR sensor for motion detection, a DHT22 sensor for measuring temperature and humidity, and a BH1750 sensor for detecting ambient light levels. The ESP32 is configured to communicate with the BH1750 using I2C protocol, with GPIO22 and GPIO21 serving as the SCL and SDA lines, respectively. Power is supplied to the sensors from the ESP32's voltage output pins, and sensor outputs are connected to designated GPIO pins for data acquisition.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Infrared Thermometer with I2C LCD Display
Image of infrared thermometer: A project utilizing Esp32 in a practical application
This circuit features an ESP32 microcontroller powered by a 18650 Li-Ion battery, with a TP4056 module for charging the battery via a USB plug. The ESP32 reads temperature data from an MLX90614 infrared temperature sensor and displays it on an I2C LCD 16x2 screen. The ESP32, MLX90614 sensor, and LCD screen are connected via I2C communication lines (SCL, SDA), and the circuit is designed to measure and display ambient and object temperatures.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Esp32

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 MVP_design: A project utilizing Esp32 in a practical application
ESP32-Based Sensor Monitoring System with OLED Display and E-Stop
This circuit features an ESP32 microcontroller that interfaces with a variety of sensors and output devices. It is powered by a Lipo battery through a buck converter, ensuring a stable voltage supply. The ESP32 collects data from a DHT11 temperature and humidity sensor and a vibration sensor, controls a buzzer, and displays information on an OLED screen. An emergency stop (E Stop) is connected for safety purposes, allowing the system to be quickly deactivated.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Arena 2: A project utilizing Esp32 in a practical application
ESP32-Controlled OLED Display and Servo with DotStar LED Strip and Audio Output
This circuit features an ESP32 microcontroller driving a variety of components. It controls an OLED display for visual output, a DotStar LED strip for lighting effects, a PAM8403 audio amplifier connected to a speaker for sound output, and a PCA9685 PWM Servo Breakout to manage a servo motor. The ESP32 also interfaces with a piezo speaker for additional sound generation, and the circuit is powered by a 18650 Li-ion battery setup with a TP4056 charging module. The ESP32's embedded code handles the display animation on the OLED.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of pro: A project utilizing Esp32 in a practical application
ESP32-Based Environmental Monitoring System with Motion Detection
This circuit features an ESP32 microcontroller on a baseboard that interfaces with a PIR sensor for motion detection, a DHT22 sensor for measuring temperature and humidity, and a BH1750 sensor for detecting ambient light levels. The ESP32 is configured to communicate with the BH1750 using I2C protocol, with GPIO22 and GPIO21 serving as the SCL and SDA lines, respectively. Power is supplied to the sensors from the ESP32's voltage output pins, and sensor outputs are connected to designated GPIO pins for data acquisition.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of infrared thermometer: A project utilizing Esp32 in a practical application
ESP32-Based Infrared Thermometer with I2C LCD Display
This circuit features an ESP32 microcontroller powered by a 18650 Li-Ion battery, with a TP4056 module for charging the battery via a USB plug. The ESP32 reads temperature data from an MLX90614 infrared temperature sensor and displays it on an I2C LCD 16x2 screen. The ESP32, MLX90614 sensor, and LCD screen are connected via I2C communication lines (SCL, SDA), and the circuit is designed to measure and display ambient and object temperatures.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • IoT devices and smart home automation
  • Wireless sensor networks
  • Wearable electronics
  • Robotics and drones
  • Industrial automation
  • Prototyping and educational projects

Technical Specifications

The ESP32 is a highly integrated SoC with the following key technical specifications:

Parameter Specification
Manufacturer Espressif
Part ID ESP32
Processor Dual-core Xtensa® 32-bit LX6 microprocessor
Clock Speed Up to 240 MHz
Flash Memory 4 MB (varies by module)
SRAM 520 KB
Wireless Connectivity Wi-Fi 802.11 b/g/n, Bluetooth v4.2 + BLE
Operating Voltage 3.0V to 3.6V
GPIO Pins Up to 34 GPIO pins (multiplexed with other functions)
ADC Channels 18 (12-bit resolution)
DAC Channels 2
Communication Interfaces UART, SPI, I2C, I2S, CAN, PWM, SDIO
Power Consumption Ultra-low power consumption in deep sleep mode (~10 µA)
Operating Temperature Range -40°C to +125°C

Pin Configuration

The ESP32 has a flexible pinout, with GPIO pins that can be configured for various functions. Below is a general pin description for the ESP32:

Pin Name Function Description
GPIO0 GPIO, Boot Mode Select Used for boot mode selection during startup.
GPIO1 (TXD0) UART TX Default UART0 transmit pin.
GPIO3 (RXD0) UART RX Default UART0 receive pin.
GPIO12-15 GPIO, SPI, ADC Multipurpose pins for GPIO, SPI, or ADC functionality.
GPIO34-39 Input Only These pins are input-only and cannot be used as outputs.
EN Enable Chip enable pin. Pulling low resets the chip.
3V3 Power 3.3V power supply input.
GND Ground Ground connection.

Note: The exact pinout may vary depending on the ESP32 module or development board being used (e.g., ESP32-WROOM-32, ESP32-WROVER).

Usage Instructions

Using the ESP32 in a Circuit

  1. Power Supply: Ensure the ESP32 is powered with a stable 3.3V supply. Avoid exceeding 3.6V to prevent damage.
  2. Boot Mode: To upload code, connect GPIO0 to GND and reset the chip. After uploading, disconnect GPIO0 from GND.
  3. GPIO Configuration: Configure GPIO pins in your code for input, output, or alternate functions as needed.
  4. Programming: The ESP32 can be programmed using the Arduino IDE, Espressif's ESP-IDF, or other compatible environments.

Example: Blinking an LED with Arduino IDE

Below is an example of how to blink an LED connected to GPIO2 using the Arduino IDE:

// Define the GPIO pin where the LED is connected
#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

  • Voltage Levels: The ESP32 operates at 3.3V logic levels. Use level shifters if interfacing with 5V devices.
  • Power Supply: Use a decoupling capacitor (e.g., 10 µF) near the power pins to ensure stable operation.
  • Wi-Fi Interference: Avoid placing the ESP32 near sources of electromagnetic interference to maintain reliable wireless communication.

Troubleshooting and FAQs

Common Issues

  1. ESP32 Not Detected by Computer

    • Ensure the correct USB driver is installed for your development board.
    • Check the USB cable for damage or try a different cable.
  2. Code Upload Fails

    • Verify that GPIO0 is connected to GND during the upload process.
    • Ensure the correct COM port and board type are selected in the Arduino IDE.
  3. Wi-Fi Connection Issues

    • Double-check the SSID and password in your code.
    • Ensure the router is within range and supports 2.4 GHz Wi-Fi (ESP32 does not support 5 GHz).
  4. Random Resets or Instability

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

FAQs

Q: Can the ESP32 be powered with 5V?
A: No, the ESP32 operates at 3.3V. However, many development boards include a voltage regulator that allows powering the board with 5V via the USB port.

Q: How do I use the ESP32's Bluetooth functionality?
A: The ESP32 supports both Bluetooth Classic and BLE. You can use libraries like BluetoothSerial or BLEDevice in the Arduino IDE to implement Bluetooth functionality.

Q: What is the maximum range of the ESP32's Wi-Fi?
A: The range depends on environmental factors but typically extends up to 100 meters in open spaces.

Q: Can I use the ESP32 for battery-powered applications?
A: Yes, the ESP32 is suitable for battery-powered applications due to its ultra-low power modes. Use deep sleep mode to minimize power consumption.

By following this documentation, you can effectively integrate the ESP32 into your projects and troubleshoot common issues.