1. Introduction
The Seeed Studio XIAO ESP32-C5 is a compact and powerful development board, marking the first XIAO module to support 5 GHz Wi-Fi. It integrates dual-band (2.4 GHz and 5 GHz) Wi-Fi 6, Bluetooth 5 (LE), and IEEE 802.15.4 connectivity, supporting protocols like Zigbee, Thread, Matter, HomeKit, and MQTT. This versatile module is designed for next-generation IoT projects, offering smoother, faster, and more reliable wireless performance within an ultra-compact form factor.
2. Specifications
2.1. Key Features
- Powerful CPU: ESP32-C5, single-core 32-bit RISC-V processor operating up to 240 MHz.
- Complete Wi-Fi Subsystem: Dual-band (2.4 GHz and 5 GHz) Wi-Fi 6 subsystem compatible with IEEE 802.11 a/b/g/n/ac/ax, supporting Station, SoftAP, concurrent SoftAP+Station operation, and promiscuous mode (monitor).
- Bluetooth LE Subsystem: Supports Bluetooth 5 and Bluetooth mesh functions.
- Improved RF Performance: External RF antenna included.
- Battery Charging Chip: Supports charging and discharging management for lithium batteries.
- Rich On-chip Resources: 384 KB on-chip SRAM, 320 KB ROM.
- Ultra-small Size: As small as a thumb (21x17.8mm), classic XIAO series form factor for portable devices and small projects.
- Reliable Security Features: Cryptographic hardware accelerators supporting AES-128/256, SHA family hash, HMAC, a dedicated digital signature peripheral, and Secure Boot (V2).
- Rich Interfaces: 1×I2C, 1×SPI, 2×UART, up to 11×GPIO (PWM compatible), 5×ADC channels, and a JTAG connection pad interface (pads on the reverse side).
- Single-sided components, designed for surface mounting.
2.2. Technical Specifications Comparison
The following table provides a comparison of the XIAO ESP32-C5 with other Seeed Studio XIAO ESP32 series modules:
For detailed specifications, please refer to the official user manual PDF: XIAO ESP32-C5 User Manual (PDF).
3. Package Contents
The standard package includes:
- 1 x Seeed Studio XIAO ESP32-C5 module
- 1 x FPC Antenna
- 2 x Pin Headers
4. Getting Started (Setup)
To begin using your XIAO ESP32-C5, follow these hardware and software preparation steps:
4.1. Hardware Preparation
You will need the following items:
- 1 x Seeed Studio XIAO ESP32-C5
- 1 x Computer
- 1 x USB Type-C Cable
TIP: Some USB cables can only supply power and cannot transfer data. If you don't have a data-capable USB cable or are unsure, please refer to Seeed USB Type-C support USB 3.1 for more information.
4.2. Software Preparation (Arduino IDE)
The recommended programming tool for the XIAO ESP32-C5 is the Arduino IDE. Complete the following steps to set up your software environment:
TIP: If this is your first time using Arduino, we strongly recommend you consult the official Getting Started with Arduino guide.
- Download and Install Arduino IDE: Download and install the stable version of the Arduino IDE compatible with your operating system from the official Arduino website.
- Launch Arduino Application: Open the Arduino IDE.
- Install ESP32 Board Package:
- Go to
Tools > Board > Boards Manager... - Search for "esp32".
- Install version 3.3.5 or higher of the "Arduino ESP32 Boards" package.
- Go to
5. Operating Instructions
5.1. Pin Definition
The XIAO ESP32-C5 features a compact layout with various pins for different functionalities. Below is a diagram and table detailing the pin definitions:
| XIAO Pin | Function | Chip Pin | Alternative Functions | Description |
|---|---|---|---|---|
| 5V | VBUS | Power Input/Output | ||
| GND | Ground | |||
| 3V3 | 3V3_OUT | Power Output | ||
| D0 | Analog | GPIO1 | LP_UART_DSRN, LP_GPIO1 | GPIO, ADC |
| D1 | GPIO0 | LP_UART_DTRN, LP_GPIO0 | GPIO | |
| D2 | GPIO25 | GPIO | ||
| D3 | GPIO7 | SDIO_DATA1 | GPIO | |
| D4 | SDA | GPIO23 | GPIO, I2C Data | |
| D5 | SCL | GPIO24 | GPIO, I2C Clock | |
| D6 | TX | GPIO11 | GPIO, UART Transmit | |
| D7 | RX | GPIO12 | GPIO, UART Receive | |
| D8 | SCK | GPIO8 | TOUCH7 | GPIO, SPI Clock |
| D9 | MISO | GPIO9 | TOUCH8 | GPIO, SPI Data |
| D10 | MOSI | GPIO10 | TOUCH9 | GPIO, SPI Data |
| MTDO | GPIO5 | LP_UART_TXD, LP_GPIO5 | JTAG | |
| MTDI | GPIO3 | LP_I2C_SCL, LP_GPIO3 | JTAG, ADC | |
| MTCK | GPIO4 | LP_UART_RXD, LP_GPIO4 | JTAG, ADC | |
| MTMS | GPIO2 | LP_I2C_SDA, LP_GPIO2 | JTAG, ADC | |
| ADC_BAT | GPIO6 | Read battery voltage value | ||
| ADC_CRL | GPIO26 | Controls (enables/disables) the measurement circuit to save power. | ||
| Reset | CHIP_EN | Enable | ||
| Boot | GPIO28 | Enter Boot mode | ||
| U.FL-R-SMT1 | LNA_IN | UFL Antenna | ||
| CHARGE_LED | VCC_3V3 | CHG-LED_Red | Red Charge LED | |
| USER_LED | GPIO27 | Yellow User LED |
5.2. Uploading a Program (Blinking LED Example)
Let's use a simple blinking LED program as an example to demonstrate uploading code:
- Select Board and Port: In the Arduino IDE, go to
Tools > Boardand select "XIAO ESP32C5". Then, go toTools > Portand select the correct serial port for your device. If you are unsure which port to select, you can unplug and re-plug the XIAO ESP32-C5 to see which new port appears. - Paste the Code: Copy and paste the following code into your Arduino Sketch. The
LED_BUILTINconstant refers to the onboard L LED.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(LED_BUILTIN, LOW);
Serial.print("LED ON \n");
delay(1000);
digitalWrite(LED_BUILTIN, HIGH);
Serial.print("LED OFF \n");
delay(1000);
}
- Upload: Click the "Upload" button (right arrow icon) in the Arduino IDE.
Effect Demonstration: After uploading the program, you will observe the onboard L LED blinking at 1-second intervals. Simultaneously, the Serial Monitor (accessible via Tools > Serial Monitor) will display "LED ON" and "LED OFF" messages.
5.3. Deep Sleep Mode
The XIAO ESP32-C5 supports deep sleep and wake-up functionalities. The following example demonstrates using a high-level trigger on pin D0 to wake the device from deep sleep. This is a configurable option, as the hardware supports both high-level and low-level triggers to suit different circuit designs.
#include <Arduino.h>
#include <esp_sleep.h>
#define WAKEUP_PIN D0 // LP_GPIO1
RTC_DATA_ATTR int bootCount = 0;
void print_wakeup_reason() {
esp_sleep_wakeup_cause_t wakeup_reason = esp_sleep_get_wakeup_cause();
switch (wakeup_reason) {
case ESP_SLEEP_WAKEUP_EXT0: Serial.println("Wakeup caused by external signal using RTC_IO"); break;
case ESP_SLEEP_WAKEUP_EXT1: Serial.println("Wakeup caused by external signal using RTC_CNTL"); break;
case ESP_SLEEP_WAKEUP_TIMER: Serial.println("Wakeup caused by timer"); break;
case ESP_SLEEP_WAKEUP_TOUCHPAD: Serial.println("Wakeup caused by touchpad"); break;
case ESP_SLEEP_WAKEUP_ULP: Serial.println("Wakeup caused by ULP program"); break;
case ESP_SLEEP_WAKEUP_GPIO: Serial.println("Wakeup caused by GPIO"); break;
default: Serial.printf("Wakeup was not caused by deep sleep: %d\n", wakeup_reason); break;
}
}
void setup() {
Serial.begin(115200);
delay(1000);
++bootCount;
Serial.println("Boot number: " + String(bootCount));
print_wakeup_reason();
pinMode(WAKEUP_PIN, INPUT_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
uint64_t mask = 1ULL << WAKEUP_PIN;
esp_deep_sleep_enable_gpio_wakeup(mask, ESP_GPIO_WAKEUP_GPIO_HIGH);
digitalWrite(LED_BUILTIN, LOW);
delay(100);
digitalWrite(LED_BUILTIN, HIGH);
delay(2000); // Delay time depends on the serial port / Give the PC time to stabilize
Serial.println("Going to sleep now");
esp_deep_sleep_start();
}
void loop() {}
If you open the serial monitor quickly enough before the XIAO enters deep sleep, you will see output messages indicating its state. The device will then enter deep sleep. You can wake it up by pressing the button, and the L LED's blinking will confirm it has woken up.
CAUTION: The XIAO ESP32-C5 supports wake-up by GPIO and timer. To avoid losing hardware debugging capabilities and increased difficulty in firmware burning during low-power development, it is strongly recommended that JTAG pins (MTMS, MTDI, MTCK, MTDO) be reserved for exclusive use and not used as wake-up sources for deep sleep mode.
5.4. Battery Usage
The XIAO ESP32-C5 can be powered by a 3.7V lithium battery. Refer to the diagram below for the wiring method.
CAUTION: Be careful not to short-circuit the positive and negative terminals, which could burn out the battery and equipment when soldering.
Battery Usage Instructions:
- Use qualified batteries that meet specifications.
- The XIAO can be connected to your computer via a data cable while using the battery. The XIAO has a built-in circuit protection chip for safety.
- When the XIAO ESP32-C5 is powered by a battery, the C LED will light up, indicating that charge management is active.
Check Battery Voltage:
The XIAO ESP32-C5 is equipped with the SGM40567 battery charging chip and the TPS22916CYFPR battery voltage acquisition chip. You can enable BAT_VOLT_PIN_EN to activate the battery voltage acquisition function and read the battery voltage via BAT_VOLT_PIN.
TIP: On the XIAO ESP32C5, BAT_VOLT_PIN corresponds to GPIO6, and BAT_VOLT_PIN_EN corresponds to GPIO26.
#include <Arduino.h>
void setup() {
Serial.begin(115200);
pinMode(BAT_VOLT_PIN, INPUT); // Configure A0 as ADC input
pinMode(BAT_VOLT_PIN_EN, OUTPUT);
digitalWrite(BAT_VOLT_PIN_EN, HIGH);
}
void loop() {
uint32_t Vbatt = 0;
for (int i = 0; i < 16; i++) {
Vbatt += analogReadMilliVolts(BAT_VOLT_PIN); // Read and accumulate ADC voltage
}
float Vbattf = 2 * Vbatt / 16 / 1000.0; // Adjust for 1:2 divider and convert to volts
Serial.println(Vbattf, 3); // Output voltage to 3 decimal places
delay(1000); // Wait for 1 second
}
The analogReadMilliVolts() function reads the current analog voltage from the BAT_VOLT_PIN and returns a calibrated voltage value in millivolts (mV). Unlike the conventional analogRead(), this function automatically applies the integrated factory calibration parameters, resulting in higher accuracy and better linearity. The voltage sampling process involves 16 repeated samples, accumulated to suppress transient noise and discrete errors, improving measurement stability. The accumulated value is then divided by 16 to obtain a smoother, more reliable average voltage.
6. Maintenance
- Keep the module clean and free from dust and moisture.
- Avoid exposing the module to extreme temperatures or direct sunlight.
- Ensure proper ventilation when operating, especially in enclosed spaces.
- Regularly check connections for any loose wires or components.
- When not in use, store the module in an anti-static bag to prevent electrostatic discharge damage.
7. Troubleshooting
7.1. Common Issues and Solutions
- Module not recognized by computer:
- Ensure you are using a data-capable USB Type-C cable. Some cables are charge-only.
- Check if the correct drivers are installed.
- Try a different USB port or computer.
- Verify the board is correctly selected in the Arduino IDE (
Tools > Board).
- Program upload fails:
- Confirm the correct serial port is selected in the Arduino IDE (
Tools > Port). - Ensure no other application is using the serial port.
- Check for syntax errors in your code.
- Try pressing the BOOT button while uploading if the module doesn't enter programming mode automatically.
- Confirm the correct serial port is selected in the Arduino IDE (
- Wi-Fi/Bluetooth connectivity issues:
- Ensure the external FPC antenna is securely connected.
- Check your code for correct Wi-Fi/Bluetooth initialization and credentials.
- Verify that the module is within range of the Wi-Fi access point or Bluetooth device.
- Ensure there is no interference from other 2.4GHz or 5GHz devices.
- Battery not charging or incorrect voltage reading:
- Verify the battery is correctly wired (positive to positive, negative to negative).
- Ensure the battery is a qualified 3.7V lithium battery.
- Check the
BAT_VOLT_PIN_EN(GPIO26) is set to HIGH in your code to enable voltage acquisition. - Inspect solder joints for any shorts or cold joints.
8. User Tips
- For optimal performance, especially with 5GHz Wi-Fi, ensure the external FPC antenna is properly positioned and not obstructed.
- When working with low-power applications, utilize the deep sleep mode effectively. Remember the caution regarding JTAG pins as wake-up sources.
- Leverage the rich set of interfaces (I2C, SPI, UART, GPIO, ADC) for diverse sensor and peripheral integration in your IoT projects.
- Always double-check your wiring and code before powering on, especially when dealing with battery connections, to prevent damage.
9. Warranty and Support
Thank you for choosing Seeed Studio products. We are committed to providing comprehensive support to ensure a smooth experience with our products. We offer various communication channels to cater to different preferences and needs.
For technical assistance, product discussions, and additional resources, please visit the official Seeed Studio Wiki page for the XIAO ESP32-C5:
9.1. Additional Resources
- Hardware Design:
- Mechanical Design:
For further inquiries, please contact Seeed Studio customer support through their official website.
10. Product Video Overview
Watch this video for a visual overview of the Seeed Studio XIAO ESP32-C5 module, including its features and potential applications.