Seeed Studio XIAO ESP32-C5

Contents

Seeed Studio XIAO ESP32-C5 User Manual

Model: XIAO ESP32-C5

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.

Seeed Studio XIAO ESP32-C5 module highlighting Wi-Fi 6, Bluetooth, RISC-V, and communication protocols.
Figure 1: Seeed Studio XIAO ESP32-C5 with key features highlighted.
Detailed features of the Seeed Studio XIAO ESP32-C5 including RISC-V core, dual-band Wi-Fi, enhanced connectivity, security, ultra-low latency, and integrated battery management.
Figure 2: Overview of XIAO ESP32-C5 features.

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:

Comparison table of Seeed Studio XIAO ESP32-C5, ESP32-S3, ESP32-C3, and ESP32-C6 modules, detailing processor, wireless connectivity, memory, interfaces, and power consumption.
Figure 3: Specifications comparison across XIAO ESP32 series.

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
Seeed Studio XIAO ESP32-C5 module in its packaging with FPC antenna and pin headers.
Figure 4: XIAO ESP32-C5 standard set packaging.

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.

Close-up of the Seeed Studio XIAO ESP32-C5 module, showing its compact size and USB-C port.
Figure 5: Seeed Studio XIAO ESP32-C5 module.

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.

  1. 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.
  2. Launch Arduino Application: Open the Arduino IDE.
  3. Install ESP32 Board Package:
    1. Go to Tools > Board > Boards Manager...
    2. Search for "esp32".
    3. Install version 3.3.5 or higher of the "Arduino ESP32 Boards" package.
Screenshot of Arduino IDE showing the Boards Manager with ESP32 selected and version 3.3.5 installed.
Figure 6: Arduino IDE Boards Manager for ESP32.

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:

Diagram of the XIAO ESP32-C5 module with labels for USB Type-C port, Charge LED, User LED, Reset Button, User Button, and IPEX Antenna Connector.
Figure 7: XIAO ESP32-C5 Front Components.
Detailed pinout diagram for the XIAO ESP32-C5, showing both front and back pins with their labels and functions.
Figure 8: XIAO ESP32-C5 Pin Definition.
Table 1: XIAO ESP32-C5 Pin Map
XIAO Pin Function Chip Pin Alternative Functions Description
5VVBUSPower Input/Output
GNDGround
3V33V3_OUTPower Output
D0AnalogGPIO1LP_UART_DSRN, LP_GPIO1GPIO, ADC
D1GPIO0LP_UART_DTRN, LP_GPIO0GPIO
D2GPIO25GPIO
D3GPIO7SDIO_DATA1GPIO
D4SDAGPIO23GPIO, I2C Data
D5SCLGPIO24GPIO, I2C Clock
D6TXGPIO11GPIO, UART Transmit
D7RXGPIO12GPIO, UART Receive
D8SCKGPIO8TOUCH7GPIO, SPI Clock
D9MISOGPIO9TOUCH8GPIO, SPI Data
D10MOSIGPIO10TOUCH9GPIO, SPI Data
MTDOGPIO5LP_UART_TXD, LP_GPIO5JTAG
MTDIGPIO3LP_I2C_SCL, LP_GPIO3JTAG, ADC
MTCKGPIO4LP_UART_RXD, LP_GPIO4JTAG, ADC
MTMSGPIO2LP_I2C_SDA, LP_GPIO2JTAG, ADC
ADC_BATGPIO6Read battery voltage value
ADC_CRLGPIO26Controls (enables/disables) the measurement circuit to save power.
ResetCHIP_ENEnable
BootGPIO28Enter Boot mode
U.FL-R-SMT1LNA_INUFL Antenna
CHARGE_LEDVCC_3V3CHG-LED_RedRed Charge LED
USER_LEDGPIO27Yellow 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:

  1. Select Board and Port: In the Arduino IDE, go to Tools > Board and select "XIAO ESP32C5". Then, go to Tools > Port and 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.
  2. Paste the Code: Copy and paste the following code into your Arduino Sketch. The LED_BUILTIN constant 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);
}
                
            
  1. Upload: Click the "Upload" button (right arrow icon) in the Arduino IDE.
Screenshot of Arduino IDE showing the upload button and serial monitor output for a blinking LED program.
Figure 9: Arduino IDE Upload and Serial Monitor.

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.

Wiring diagram showing how to connect a 3.7V lithium battery to the XIAO ESP32-C5 module.
Figure 10: Battery Wiring Diagram.

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:

  1. Use qualified batteries that meet specifications.
  2. 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.
  3. 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.
  • 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

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.

Video 1: Seeed Studio XIAO ESP32-C5 Product Overview.

Ask a question about this manual

Ask about setup, troubleshooting, compatibility, parts, safety, or missing instructions. Manuals+ will review the question and use this page’s manual context to help answer it.

After a successful submission, we securely hash the supplied account or form email before sending it to Microsoft Advertising for conversion attribution. Privacy details.