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

How to Use esp 32: Examples, Pinouts, and Specs

Image of esp 32
Cirkit Designer LogoDesign with esp 32 in Cirkit Designer

Introduction

The ESP32, manufactured by Espressif Systems, is a low-cost, low-power system on a chip (SoC) that integrates Wi-Fi and Bluetooth capabilities. It is designed for a wide range of applications, including Internet of Things (IoT) devices, wearable electronics, smart home systems, and industrial automation. With its dual-core processor, extensive GPIO options, and support for various communication protocols, the ESP32 is a versatile and powerful solution for embedded systems.

Explore Projects Built with esp 32

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 RF Communication System with 433 MHz Modules
Image of 433 mhz: A project utilizing esp 32 in a practical application
This circuit comprises an ESP32 microcontroller connected to a 433 MHz RF transmitter and receiver pair. The ESP32 is programmed to receive and decode RF signals through the receiver module, as well as send RF signals via the transmitter module. Additionally, the ESP32 can communicate with a Bluetooth device to exchange commands and data, and it uses an LED for status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 and W5500 Ethernet Module Based Smart Energy Monitor
Image of ESP32 30Pin 8 Ch Micro and USBC: A project utilizing esp 32 in a practical application
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module for network connectivity and a ZMPT101B module for AC voltage sensing. Additionally, a DHT22 sensor is connected to the ESP32 for measuring temperature and humidity. The ESP32 manages data acquisition from the sensors and communication over Ethernet.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with Motion Detection
Image of pro: A project utilizing esp 32 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 Smart Ethernet Weather Station with DHT22 Sensor and Relay Control
Image of ESP32 Single and Double AC with Temp 30Pin Micro and USBC: A project utilizing esp 32 in a practical application
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module, a DHT22 temperature and humidity sensor, and a 2-channel relay module. The ESP32 is configured to communicate with the W5500 module via SPI for network connectivity, read sensor data from the DHT22, and control devices through the relay module. The purpose of this circuit is likely for environmental monitoring and control over a network.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with esp 32

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 433 mhz: A project utilizing esp 32 in a practical application
ESP32-Based RF Communication System with 433 MHz Modules
This circuit comprises an ESP32 microcontroller connected to a 433 MHz RF transmitter and receiver pair. The ESP32 is programmed to receive and decode RF signals through the receiver module, as well as send RF signals via the transmitter module. Additionally, the ESP32 can communicate with a Bluetooth device to exchange commands and data, and it uses an LED for status indication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32 30Pin 8 Ch Micro and USBC: A project utilizing esp 32 in a practical application
ESP32 and W5500 Ethernet Module Based Smart Energy Monitor
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module for network connectivity and a ZMPT101B module for AC voltage sensing. Additionally, a DHT22 sensor is connected to the ESP32 for measuring temperature and humidity. The ESP32 manages data acquisition from the sensors and communication over Ethernet.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of pro: A project utilizing esp 32 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 ESP32 Single and Double AC with Temp 30Pin Micro and USBC: A project utilizing esp 32 in a practical application
ESP32-Based Smart Ethernet Weather Station with DHT22 Sensor and Relay Control
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module, a DHT22 temperature and humidity sensor, and a 2-channel relay module. The ESP32 is configured to communicate with the W5500 module via SPI for network connectivity, read sensor data from the DHT22, and control devices through the relay module. The purpose of this circuit is likely for environmental monitoring and control over a network.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • IoT devices and smart home automation
  • Wireless sensor networks
  • Wearable electronics
  • Industrial control systems
  • Robotics and drones
  • Audio streaming and voice recognition systems

Technical Specifications

Key Technical Details

Parameter Specification
Manufacturer Espressif Systems
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
Communication Interfaces UART, SPI, I2C, I2S, CAN, PWM, ADC, DAC
ADC Resolution 12-bit
DAC Resolution 8-bit
Power Consumption Ultra-low power in deep sleep mode (~10 µA)
Operating Temperature -40°C to +85°C

Pin Configuration and Descriptions

The ESP32 has a flexible pinout, with up to 34 GPIO pins. Below is a table of commonly used pins and their functions:

Pin Name Function(s) Notes
GPIO0 Boot mode selection, General purpose Must be LOW during boot for flashing
GPIO1 UART TX Default UART TX pin
GPIO3 UART RX Default UART RX pin
GPIO12 Touch Sensor, ADC, General purpose Can be used as a touch input
GPIO13 PWM, ADC, General purpose Supports PWM output
GPIO14 SPI CLK, PWM, ADC Commonly used for SPI clock
GPIO15 SPI CS, PWM, ADC Commonly used for SPI chip select
GPIO16 General purpose Can be used for GPIO or other functions
GPIO17 General purpose Can be used for GPIO or other functions
EN Chip enable Must be HIGH for normal operation
VIN Power input Accepts 5V input for onboard regulator
GND Ground Connect to ground of the circuit

Note: Not all GPIO pins support all functions simultaneously. Refer to the ESP32 datasheet for detailed pin multiplexing information.

Usage Instructions

How to Use the ESP32 in a Circuit

  1. Powering the ESP32:

    • The ESP32 operates at 3.3V. If using a development board, you can supply 5V to the VIN pin, as it includes an onboard voltage regulator.
    • Ensure the power supply is stable and capable of providing sufficient current (at least 500 mA).
  2. Connecting to Peripherals:

    • Use GPIO pins for interfacing with sensors, actuators, and other peripherals.
    • For analog inputs, use the ADC pins (e.g., GPIO32, GPIO33). For analog outputs, use the DAC pins (e.g., GPIO25, GPIO26).
  3. Programming the ESP32:

    • The ESP32 can be programmed using the Arduino IDE, Espressif's ESP-IDF, or other compatible environments.
    • Connect the ESP32 to your computer via USB (if using a development board) or through a UART-to-USB converter.
  4. Flashing Firmware:

    • Ensure GPIO0 is pulled LOW during boot to enable flashing mode.
    • Use the appropriate tools (e.g., esptool.py) to upload firmware.

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() {
  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

  • Voltage Levels: Ensure all connected peripherals operate at 3.3V logic levels. Use level shifters if interfacing with 5V devices.
  • Boot Mode: Avoid pulling GPIO0, GPIO2, or GPIO15 to incorrect states during boot, as this may interfere with normal operation.
  • Power Supply: Use a decoupling capacitor (e.g., 10 µF) near the power pins to stabilize the supply voltage.

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Detected by Computer:

    • Ensure the USB cable is functional and supports data transfer.
    • Install the correct USB-to-serial driver for your development board.
  2. Failed to Flash Firmware:

    • Verify that GPIO0 is pulled LOW during boot.
    • Check the connection between the ESP32 and your computer.
    • Ensure the correct COM port and board type are selected in the programming environment.
  3. Wi-Fi Connection Issues:

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

    • Verify that the power supply can provide sufficient current.
    • Add decoupling capacitors to stabilize the power supply.

FAQs

Q: Can the ESP32 operate on battery power?
A: Yes, the ESP32 is designed for low-power applications and can operate on battery power. Use deep sleep mode to minimize power consumption.

Q: How many devices can the ESP32 connect to via Bluetooth?
A: The ESP32 supports up to 7 simultaneous Bluetooth connections in classic mode and multiple connections in BLE mode, depending on the application.

Q: Can I use the ESP32 with a 5V sensor?
A: Directly connecting a 5V sensor to the ESP32 may damage it. Use a level shifter or voltage divider to step down the voltage to 3.3V.

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

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