Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use XIAO ESP32C3: Examples, Pinouts, and Specs

Image of XIAO ESP32C3Design with XIAO ESP32C3 in Cirkit Designer

Introduction

The XIAO ESP32C3 by Seeed Studio is a compact microcontroller board powered by the ESP32-C3 chip. It features built-in Wi-Fi and Bluetooth Low Energy (BLE) capabilities, making it an excellent choice for Internet of Things (IoT) projects and wireless communication applications. Its small form factor and low power consumption make it ideal for wearable devices, smart home systems, and other embedded applications.

Explore Projects Built with XIAO ESP32C3

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 Xiao ESP32 C3 and Adafruit RFM9x LoRa Radio Communication Module: A project utilizing XIAO ESP32C3 in a practical application
Xiao ESP32 C3 and Adafruit RFM9x LoRa Radio Communication Module

This circuit connects a Xiao ESP32 C3 microcontroller to an Adafruit RFM9x LoRa Radio module. The ESP32 C3 provides power to the LoRa module and interfaces with it using SPI communication (SCK, MISO, MOSI, CS) and control lines (RST, DIO0). This setup is likely intended for wireless communication using LoRa technology, with the ESP32 handling data processing and network protocol tasks.

Open Project in Cirkit Designer
Image of Xiao ESP32 C3 Based Temperature and Humidity Monitoring System: A project utilizing XIAO ESP32C3 in a practical application
Xiao ESP32 C3 Based Temperature and Humidity Monitoring System

This circuit features a Xiao ESP32 C3 microcontroller connected to a DHT11 Humidity and Temperature Sensor. The ESP32 C3 provides power to the DHT11 sensor through its VUSB pin and receives data from the sensor's DATA pin via the ESP32's D2 pin. The circuit is designed to measure environmental temperature and humidity, with the microcontroller processing and potentially communicating the sensor data.

Open Project in Cirkit Designer
Image of ESP32C3 and LoRa-Enabled Environmental Sensing Node: A project utilizing XIAO ESP32C3 in a practical application
ESP32C3 and LoRa-Enabled Environmental Sensing Node

This circuit features an ESP32C3 Supermini microcontroller connected to a LORA_RA02 module and a DHT11 temperature and humidity sensor. The ESP32C3 handles communication with the LORA module via SPI (using GPIO05, GPIO06, GPIO10, and GPIO04 for MISO, MOSI, NSS, and SCK respectively) and GPIO01 and GPIO02 for additional control signals. The DHT11 sensor is interfaced through GPIO03 for data reading, and all components share a common power supply through the 3.3V and GND pins.

Open Project in Cirkit Designer
Image of Wi-Fi Controlled Transistor Array with XIAO ESP32C3: A project utilizing XIAO ESP32C3 in a practical application
Wi-Fi Controlled Transistor Array with XIAO ESP32C3

This circuit features an XIAO ESP32C3 microcontroller interfaced with multiple PNP transistors and resistors to control various outputs. The microcontroller's GPIO pins are connected to the bases of the transistors through resistors, allowing it to switch the transistors on and off, while capacitors are used for filtering and stabilization.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The following table outlines the key technical details of the XIAO ESP32C3:

Parameter Specification
Microcontroller ESP32-C3 (RISC-V single-core processor)
Clock Speed Up to 160 MHz
Flash Memory 4 MB
SRAM 400 KB
Wireless Connectivity Wi-Fi 802.11 b/g/n, Bluetooth 5.0 (LE)
Operating Voltage 3.3V
Input Voltage Range 5V (via USB-C)
GPIO Pins 11 (including ADC, I2C, SPI, UART, PWM)
Dimensions 21 x 17.5 mm

Pin Configuration and Descriptions

The XIAO ESP32C3 has a total of 11 GPIO pins, which are multifunctional and can be configured for various purposes. Below is the pinout description:

Pin Function Description
0 GPIO, ADC, UART RX General-purpose I/O, analog input, UART receive
1 GPIO, ADC, UART TX General-purpose I/O, analog input, UART transmit
2 GPIO, ADC, PWM General-purpose I/O, analog input, PWM output
3 GPIO, ADC, I2C SDA General-purpose I/O, analog input, I2C data line
4 GPIO, ADC, I2C SCL General-purpose I/O, analog input, I2C clock line
5 GPIO, SPI SCK General-purpose I/O, SPI clock
6 GPIO, SPI MISO General-purpose I/O, SPI data input
7 GPIO, SPI MOSI General-purpose I/O, SPI data output
8 GPIO, PWM General-purpose I/O, PWM output
9 GPIO, PWM General-purpose I/O, PWM output
10 GPIO, ADC General-purpose I/O, analog input

Usage Instructions

How to Use the XIAO ESP32C3 in a Circuit

  1. Powering the Board:

    • Use a USB-C cable to supply 5V to the board. The onboard voltage regulator will step it down to 3.3V for the microcontroller.
    • Alternatively, you can power the board via the 3.3V pin if an external regulated power source is available.
  2. Connecting Peripherals:

    • Use the GPIO pins to connect sensors, actuators, or other peripherals. Ensure the voltage levels of connected devices are compatible with the 3.3V logic of the XIAO ESP32C3.
    • For communication protocols like I2C, SPI, or UART, connect the appropriate pins as per the pinout table.
  3. Programming the Board:

    • Install the Arduino IDE and add the ESP32 board support package.
      (Instructions for adding the ESP32 board package can be found on the official Arduino website.)
    • Select "Seeed XIAO ESP32C3" as the board in the Arduino IDE.
    • Connect the board to your computer via USB-C and upload your code.

The following example demonstrates how to blink an LED connected to GPIO pin 2:

// 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

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not detected by the computer:

    • Ensure the USB-C cable is a data cable (not a charge-only cable).
    • Check if the correct drivers for the ESP32-C3 are installed on your computer.
  2. Code upload fails:

    • Verify that the correct board and port are selected in the Arduino IDE.
    • Press the reset button on the board before uploading the code.
  3. Wi-Fi or Bluetooth is not working:

    • Ensure the antenna area is clear of obstructions.
    • Double-check the SSID and password for Wi-Fi connections in your code.
  4. Peripherals are not responding:

    • Confirm that the peripherals are connected to the correct GPIO pins.
    • Check the voltage levels and ensure compatibility with the 3.3V logic of the board.

FAQs

Q: Can I power the XIAO ESP32C3 with a battery?
A: Yes, you can use a 3.7V LiPo battery connected to the 3.3V pin with a proper voltage regulator.

Q: Does the board support OTA (Over-the-Air) updates?
A: Yes, the ESP32-C3 chip supports OTA updates, which can be implemented in your code.

Q: What is the maximum current output of the GPIO pins?
A: Each GPIO pin can source or sink up to 40 mA, but it is recommended to stay below 20 mA for safe operation.

Q: Can I use the XIAO ESP32C3 with MicroPython?
A: Yes, the board supports MicroPython. You can flash the MicroPython firmware to the board and use it for development.

This concludes the documentation for the XIAO ESP32C3. For further assistance, refer to the official Seeed Studio documentation or community forums.