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 with Expansion Board is a powerful and versatile microcontroller module designed for Internet of Things (IoT) applications. It combines the robust capabilities of the ESP32 chip, which features dual-core processing, Wi-Fi, and Bluetooth connectivity, with the convenience of an expansion board. The expansion board simplifies prototyping by providing additional GPIO pins, power management features, and easy connectivity to sensors, actuators, and other peripherals.

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 and Use Cases

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

Technical Specifications

Key Technical Details

Specification Value
Microcontroller ESP32 Dual-Core Xtensa LX6
Clock Speed Up to 240 MHz
Flash Memory 4 MB (varies by model)
SRAM 520 KB
Connectivity Wi-Fi 802.11 b/g/n, Bluetooth 4.2 (BLE)
Operating Voltage 3.3V
Input Voltage (via USB) 5V
GPIO Pins Up to 30 (varies by expansion board)
ADC Channels Up to 18
DAC Channels 2
PWM Outputs Multiple
Communication Interfaces UART, SPI, I2C, I2S, CAN, Ethernet
Power Management Integrated voltage regulator
Dimensions Varies by expansion board model

Pin Configuration and Descriptions

Below is a typical pinout for the ESP32 with an expansion board. Note that the exact pin configuration may vary depending on the specific expansion board model.

Pin Name Description
VIN Input voltage (5V from USB or external power supply)
3V3 3.3V output from the onboard voltage regulator
GND Ground
EN Enable pin (active high, used to reset the ESP32)
GPIO0 General-purpose I/O pin, often used for boot mode selection
GPIO2 General-purpose I/O pin, supports PWM, ADC, and other functions
GPIO4 General-purpose I/O pin, supports PWM, ADC, and other functions
GPIO5 General-purpose I/O pin, supports PWM, ADC, and other functions
GPIO12 General-purpose I/O pin, supports PWM, ADC, and other functions
GPIO13 General-purpose I/O pin, supports PWM, ADC, and other functions
GPIO14 General-purpose I/O pin, supports PWM, ADC, and other functions
GPIO15 General-purpose I/O pin, supports PWM, ADC, and other functions
TXD0 UART0 Transmit (used for serial communication)
RXD0 UART0 Receive (used for serial communication)
SDA I2C Data Line
SCL I2C Clock Line
A0-A17 Analog input pins (ADC channels)
DAC1, DAC2 Digital-to-Analog Converter output pins

Usage Instructions

How to Use the ESP32 with Expansion Board in a Circuit

  1. Powering the Board:

    • Connect the board to your computer via a USB cable for power and programming.
    • Alternatively, supply 5V to the VIN pin or 3.3V to the 3V3 pin for external power.
  2. Programming the ESP32:

    • Install the Arduino IDE and add the ESP32 board support package.
    • Select the appropriate ESP32 board model from the Tools menu.
    • Connect the board to your computer and upload your code.
  3. Connecting Peripherals:

    • Use the GPIO pins to connect sensors, actuators, or other devices.
    • Ensure that the voltage levels of connected devices are compatible with the ESP32 (3.3V logic).
  4. Wi-Fi and Bluetooth Setup:

    • Use the built-in Wi-Fi and Bluetooth libraries to configure wireless communication.
    • For Wi-Fi, connect to a network using the WiFi library.
    • For Bluetooth, use the BluetoothSerial library for serial communication.

Important Considerations and Best Practices

  • Voltage Levels: The ESP32 operates at 3.3V logic. Avoid connecting 5V signals directly to GPIO pins without level shifting.
  • Boot Mode: Ensure GPIO0 is not pulled low during boot unless you intend to enter programming mode.
  • Power Supply: Use a stable power source to avoid unexpected resets or instability.
  • Heat Management: The ESP32 may heat up during operation. Ensure proper ventilation if used in enclosed spaces.

Example Code for Arduino UNO Integration

Below is an example of using the ESP32 to connect to a Wi-Fi network and send data to a server:

#include <WiFi.h> // Include the WiFi library

// Replace with your network credentials
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";

void setup() {
  Serial.begin(115200); // Initialize serial communication at 115200 baud
  delay(1000);

  // Connect to Wi-Fi
  Serial.print("Connecting to Wi-Fi");
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\nWi-Fi connected!");
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP()); // Print the ESP32's IP address
}

void loop() {
  // Add your main code here
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. ESP32 Not Connecting to Wi-Fi:

    • Double-check the SSID and password.
    • Ensure the router is within range and supports 2.4 GHz Wi-Fi (ESP32 does not support 5 GHz).
  2. Board Not Detected by Computer:

    • Verify that the USB cable is functional and supports data transfer.
    • Install the correct USB-to-serial driver for your operating system.
  3. Program Upload Fails:

    • Ensure the correct board and COM port are selected in the Arduino IDE.
    • Press and hold the "BOOT" button on the ESP32 while uploading the code.
  4. Unstable Operation or Random Resets:

    • Check the power supply for stability and sufficient current (at least 500 mA).
    • Avoid using GPIO pins connected to onboard peripherals during boot.

FAQs

Q: Can I use the ESP32 with 5V sensors?
A: Yes, but you will need a level shifter to convert 5V signals to 3.3V.

Q: How do I reset the ESP32?
A: Press the "EN" button on the expansion board to reset the ESP32.

Q: Can I use the ESP32 with the Arduino UNO?
A: Yes, the ESP32 can communicate with the Arduino UNO via UART, I2C, or SPI. Ensure proper voltage level shifting when connecting the two.

Q: How do I update the firmware on the ESP32?
A: Use the ESP32 Flash Download Tool or the Arduino IDE to upload new firmware.