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

How to Use ESP32 with Expansion Board: Examples, Pinouts, and Specs

Image of ESP32 with Expansion Board
Cirkit Designer LogoDesign with ESP32 with Expansion Board in Cirkit Designer

Introduction

The ESP32 is a powerful microcontroller with integrated Wi-Fi and Bluetooth capabilities, making it an ideal choice for Internet of Things (IoT) applications. It features a dual-core processor, low-power operation, and a wide range of peripherals. When paired with an expansion board, the ESP32 becomes even more versatile, offering additional GPIO pins, power management features, and improved connectivity options. This combination simplifies prototyping and development for both beginners and experienced users.

Explore Projects Built with ESP32 with Expansion Board

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 Irrigation and Environmental Monitoring System
Image of fyp: A project utilizing ESP32 with Expansion Board in a practical application
This circuit features an ESP32 microcontroller as the central processing unit, interfaced with various sensors and actuators. It includes a humidity sensor (YL-69), a temperature and humidity sensor (DHT11), a buzzer, an RS485 transceiver for serial communication, and an LCD display for user interface. The circuit also controls two 5V mini water pumps via an L298N motor driver, powered by a series connection of two 18650 Li-Ion batteries, with a rocker switch for power control. Additionally, it integrates an NPK soil sensor for measuring soil nutrients.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring and Weight Detection System with Camera and Display
Image of flowchart 3D: A project utilizing ESP32 with Expansion Board in a practical application
This circuit features an ESP32 on a baseboard as the central microcontroller, interfaced with various peripherals. It includes a DHT22 sensor for measuring temperature and humidity, an I2C LCD screen for display, a buzzer for audio alerts, and an ESP32 CAM module for capturing images or video. Additionally, the circuit integrates an HX711 bridge sensor interface connected to a load cell for weight measurement, with a 10k Ohm resistor for the DHT22 pull-up configuration.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Vibration Motor Controller with I2C IO Expansion
Image of VIBRATYION: A project utilizing ESP32 with Expansion Board in a practical application
This circuit features an ESP32 Wroom Dev Kit microcontroller interfaced with an MCP23017 I/O expansion board via I2C communication, utilizing GPIO 21 and GPIO 22 for SDA and SCL lines, respectively. A vibration motor is controlled by an NPN transistor acting as a switch, with a diode for back EMF protection and a resistor to limit base current. The ESP32 can control the motor by sending signals to the MCP23017, which then interfaces with the transistor to turn the motor on or off.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Obstacle Detection and Display System with Servo Control
Image of xyhaeee: A project utilizing ESP32 with Expansion Board in a practical application
This circuit features an ESP32 microcontroller board as the central processing unit, interfaced with multiple sensors and actuators. It includes IR and ultrasonic sensors for distance or obstacle detection, servomotors for movement control, and an ESP32-CAM module for image capture. The circuit also incorporates LEDs with current-limiting resistors for status indication and an I2C LCD display for outputting information or readings.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ESP32 with Expansion Board

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 fyp: A project utilizing ESP32 with Expansion Board in a practical application
ESP32-Based Smart Irrigation and Environmental Monitoring System
This circuit features an ESP32 microcontroller as the central processing unit, interfaced with various sensors and actuators. It includes a humidity sensor (YL-69), a temperature and humidity sensor (DHT11), a buzzer, an RS485 transceiver for serial communication, and an LCD display for user interface. The circuit also controls two 5V mini water pumps via an L298N motor driver, powered by a series connection of two 18650 Li-Ion batteries, with a rocker switch for power control. Additionally, it integrates an NPK soil sensor for measuring soil nutrients.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of flowchart 3D: A project utilizing ESP32 with Expansion Board in a practical application
ESP32-Based Environmental Monitoring and Weight Detection System with Camera and Display
This circuit features an ESP32 on a baseboard as the central microcontroller, interfaced with various peripherals. It includes a DHT22 sensor for measuring temperature and humidity, an I2C LCD screen for display, a buzzer for audio alerts, and an ESP32 CAM module for capturing images or video. Additionally, the circuit integrates an HX711 bridge sensor interface connected to a load cell for weight measurement, with a 10k Ohm resistor for the DHT22 pull-up configuration.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of VIBRATYION: A project utilizing ESP32 with Expansion Board in a practical application
ESP32-Based Vibration Motor Controller with I2C IO Expansion
This circuit features an ESP32 Wroom Dev Kit microcontroller interfaced with an MCP23017 I/O expansion board via I2C communication, utilizing GPIO 21 and GPIO 22 for SDA and SCL lines, respectively. A vibration motor is controlled by an NPN transistor acting as a switch, with a diode for back EMF protection and a resistor to limit base current. The ESP32 can control the motor by sending signals to the MCP23017, which then interfaces with the transistor to turn the motor on or off.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of xyhaeee: A project utilizing ESP32 with Expansion Board in a practical application
ESP32-Based Obstacle Detection and Display System with Servo Control
This circuit features an ESP32 microcontroller board as the central processing unit, interfaced with multiple sensors and actuators. It includes IR and ultrasonic sensors for distance or obstacle detection, servomotors for movement control, and an ESP32-CAM module for image capture. The circuit also incorporates LEDs with current-limiting resistors for status indication and an I2C LCD display for outputting information or readings.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

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

Technical Specifications

Key Technical Details

Specification Value
Microcontroller ESP32 Dual-Core Tensilica Xtensa LX6
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 v4.2 BR/EDR and BLE
Operating Voltage 3.3V
Input Voltage (via USB) 5V
GPIO Pins Up to 30 (varies with expansion board)
ADC Channels Up to 18
DAC Channels 2
Communication Interfaces UART, SPI, I2C, I2S, CAN, PWM
Power Modes Active, Sleep, Deep Sleep

Pin Configuration

The pin configuration of the ESP32 with an expansion board may vary slightly depending on the specific board model. Below is a general pinout description:

Pin Name Description
VIN Input voltage (5V from USB or external source)
3V3 3.3V output for powering external components
GND Ground
GPIO0-GPIO39 General-purpose input/output pins
ADC1/ADC2 Analog-to-digital converter channels
DAC1/DAC2 Digital-to-analog converter channels
TX/RX UART communication pins
SCL/SDA I2C clock and data pins
MOSI/MISO/SCK SPI communication pins
EN Enable pin to reset the ESP32
BOOT Boot mode selection pin

Usage Instructions

How to Use the ESP32 with Expansion Board

  1. Powering the Board:

    • Connect the ESP32 expansion board to your computer via a USB cable. This provides both power and a communication interface for programming.
    • Alternatively, supply 5V 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 the appropriate ESP32 board model from the Tools menu.
    • Connect the board to your computer and select the correct COM port.
  3. Connecting Peripherals:

    • Use the GPIO pins to connect sensors, actuators, or other peripherals.
    • Ensure that the voltage levels of connected devices are compatible with the ESP32 (3.3V logic).
  4. Uploading Code:

    • Write your code in the Arduino IDE or another compatible environment.
    • Click the upload button to flash the code to the ESP32.

Example Code: Blinking an LED

The following example demonstrates how to blink an LED connected to GPIO2 of the ESP32.

// Define the GPIO pin where the LED is connected
const int ledPin = 2;

void setup() {
  // Set the LED pin as an output
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // Turn the LED on
  digitalWrite(ledPin, HIGH);
  delay(1000); // Wait for 1 second

  // Turn the LED off
  digitalWrite(ledPin, LOW);
  delay(1000); // Wait for 1 second
}

Important Considerations

  • Voltage Levels: The ESP32 operates at 3.3V logic. Avoid connecting 5V devices directly to its GPIO pins without level shifters.
  • Power Supply: Ensure a stable power supply, especially when using Wi-Fi or Bluetooth, as these features can cause power spikes.
  • Boot Mode: If the ESP32 does not boot properly, check the BOOT and EN pins. Pressing the BOOT button while resetting the board can help enter programming mode.

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 operating system.
  2. Code Upload Fails:

    • Check that the correct board and COM port are selected in the Arduino IDE.
    • Press and hold the BOOT button while uploading the code.
  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 (ESP32 does not support 5 GHz).
  4. Random Resets or Instability:

    • Use a stable power source with sufficient current (at least 500 mA).
    • Add capacitors to the power supply lines to reduce noise.

FAQs

Q: Can I use the ESP32 with a 5V sensor?
A: Yes, but you will need a level shifter to convert the 5V signal to 3.3V for the ESP32 GPIO pins.

Q: How do I put the ESP32 into deep sleep mode?
A: Use the esp_deep_sleep_start() function in your code. Refer to the ESP32 documentation for configuring wake-up sources.

Q: Can I use the ESP32 with an external antenna?
A: Some ESP32 modules support external antennas. Check if your module has an IPEX connector and configure the antenna selection accordingly.

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.

By following this documentation, you can effectively utilize the ESP32 with an expansion board for a wide range of applications.