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

How to Use Seeed XIAO SAMD21: Examples, Pinouts, and Specs

Image of Seeed XIAO SAMD21
Cirkit Designer LogoDesign with Seeed XIAO SAMD21 in Cirkit Designer

Introduction

The Seeed XIAO SAMD21 is a compact microcontroller board designed by Seeed Studios. It is powered by the SAMD21 chip, which features a 32-bit ARM Cortex-M0+ core. This board is ideal for low-power applications and offers a small form factor, making it suitable for projects with space constraints. Its versatility allows seamless integration with various sensors and modules, making it a popular choice for IoT, wearable devices, and rapid prototyping.

Explore Projects Built with Seeed XIAO SAMD21

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
Image of godmode: A project utilizing Seeed XIAO SAMD21 in a practical application
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32C3-Based Environmental and Health Monitoring System with BME280 and MAX30102 Sensors
Image of Petora_protoboard_v1: A project utilizing Seeed XIAO SAMD21 in a practical application
This circuit features an XIAO ESP32C3 microcontroller interfaced with a BME/BMP280 sensor for environmental data and a MAX30102 sensor for heart rate and oxygen level monitoring. The microcontroller reads data from these sensors via I2C communication and includes a simple program to blink an LED and print a test message to the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Solar-Powered GSM/GPRS+GPS Tracker with Seeeduino XIAO
Image of SOS System : A project utilizing Seeed XIAO SAMD21 in a practical application
This circuit features an Ai Thinker A9G development board for GSM/GPRS and GPS/BDS connectivity, interfaced with a Seeeduino XIAO microcontroller for control and data processing. A solar cell, coupled with a TP4056 charging module, charges a 3.3V battery, which powers the system through a 3.3V regulator ensuring stable operation. The circuit likely serves for remote data communication and location tracking, with the capability to be powered by renewable energy and interfaced with additional sensors or input devices via the Seeeduino XIAO.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano-Controlled LED Display with RTC and Humidity Sensing
Image of Alarm Clock: A project utilizing Seeed XIAO SAMD21 in a practical application
This circuit features a Nano 3.0 ATmega328P microcontroller connected to an LED dot display, a real-time clock (RTC DS3231), and a humidity and temperature sensor (SHT21). The microcontroller communicates with the RTC and SHT21 via I2C (using A4 and A5 as SDA and SCL lines, respectively), and it controls the LED display through SPI-like signals (using D10, D11, and D12 for DIN, CS, and CLK). The circuit is designed to display time and environmental data on the LED display, with all components sharing a common power supply and ground.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Seeed XIAO SAMD21

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 godmode: A project utilizing Seeed XIAO SAMD21 in a practical application
I2C-Controlled OLED Display with External EEPROM and Interactive Pushbuttons
This is a microcontroller-based interactive device featuring a Wemos D1 Mini, an OLED display, external EEPROM, and an I/O expander. It includes user input buttons and status LEDs, with potential MIDI interface capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Petora_protoboard_v1: A project utilizing Seeed XIAO SAMD21 in a practical application
ESP32C3-Based Environmental and Health Monitoring System with BME280 and MAX30102 Sensors
This circuit features an XIAO ESP32C3 microcontroller interfaced with a BME/BMP280 sensor for environmental data and a MAX30102 sensor for heart rate and oxygen level monitoring. The microcontroller reads data from these sensors via I2C communication and includes a simple program to blink an LED and print a test message to the serial monitor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of SOS System : A project utilizing Seeed XIAO SAMD21 in a practical application
Solar-Powered GSM/GPRS+GPS Tracker with Seeeduino XIAO
This circuit features an Ai Thinker A9G development board for GSM/GPRS and GPS/BDS connectivity, interfaced with a Seeeduino XIAO microcontroller for control and data processing. A solar cell, coupled with a TP4056 charging module, charges a 3.3V battery, which powers the system through a 3.3V regulator ensuring stable operation. The circuit likely serves for remote data communication and location tracking, with the capability to be powered by renewable energy and interfaced with additional sensors or input devices via the Seeeduino XIAO.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Alarm Clock: A project utilizing Seeed XIAO SAMD21 in a practical application
Arduino Nano-Controlled LED Display with RTC and Humidity Sensing
This circuit features a Nano 3.0 ATmega328P microcontroller connected to an LED dot display, a real-time clock (RTC DS3231), and a humidity and temperature sensor (SHT21). The microcontroller communicates with the RTC and SHT21 via I2C (using A4 and A5 as SDA and SCL lines, respectively), and it controls the LED display through SPI-like signals (using D10, D11, and D12 for DIN, CS, and CLK). The circuit is designed to display time and environmental data on the LED display, with all components sharing a common power supply and ground.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • IoT devices and smart home applications
  • Wearable technology
  • Robotics and automation
  • Data logging and environmental monitoring
  • Prototyping for low-power embedded systems

Technical Specifications

The Seeed XIAO SAMD21 is packed with features that make it a powerful yet compact microcontroller board. Below are its key technical specifications:

Specification Details
Microcontroller Microchip SAMD21G18 (ARM Cortex-M0+ 32-bit processor)
Operating Voltage 3.3V
Input Voltage (VIN) 5V (via USB-C)
Digital I/O Pins 11 (including 1 analog pin and 1 I2C pin)
PWM Pins 11
Analog Input Pins 1 (12-bit ADC)
Flash Memory 256 KB
SRAM 32 KB
Clock Speed 48 MHz
Interfaces I2C, UART, SPI
USB Interface USB-C (supports programming and power supply)
Dimensions 20mm x 17.5mm
Weight 1g

Pin Configuration and Descriptions

The Seeed XIAO SAMD21 has a total of 14 pins, including power, digital, and analog pins. Below is the pinout description:

Pin Type Description
3.3V Power 3.3V output for powering external components.
GND Power Ground connection.
A0/D0 Analog/Digital Analog input (12-bit ADC) or digital I/O.
D1 Digital Digital I/O with PWM support.
D2 Digital Digital I/O with PWM support.
D3 Digital Digital I/O with PWM support.
D4 Digital Digital I/O with PWM support.
D5 Digital Digital I/O with PWM support.
D6 Digital Digital I/O with PWM support.
D7 Digital Digital I/O with PWM support.
D8 Digital Digital I/O with PWM support.
D9 Digital Digital I/O with PWM support.
I2C Communication I2C interface (SDA and SCL).
RX/TX Communication UART interface for serial communication.

Usage Instructions

The Seeed XIAO SAMD21 is easy to use and can be programmed using the Arduino IDE or other compatible development environments. Below are the steps to get started and some best practices for using the board.

Getting Started

  1. Install the Arduino IDE: Download and install the Arduino IDE from the official website.
  2. Add the Seeed SAMD21 Board Package:
    • Open the Arduino IDE and go to File > Preferences.
    • In the "Additional Board Manager URLs" field, add the following URL:
      https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
    • Go to Tools > Board > Boards Manager, search for "Seeed SAMD21," and install the package.
  3. Connect the Board:
    • Use a USB-C cable to connect the Seeed XIAO SAMD21 to your computer.
    • Select the correct board (Seeed XIAO SAMD21) and port under the Tools menu.
  4. Upload a Sketch:
    • Write or load a sketch in the Arduino IDE.
    • Click the "Upload" button to program the board.

Example Code: Blinking an LED

The following example demonstrates how to blink an LED connected to pin D1.

// Define the pin for the LED
const int ledPin = 1; // D1 pin on the Seeed XIAO SAMD21

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 and Best Practices

  • Power Supply: Ensure the board is powered via USB-C or a regulated 3.3V source.
  • Voltage Levels: The board operates at 3.3V logic levels. Avoid connecting 5V signals directly to the pins.
  • Heat Management: While the board is efficient, avoid prolonged high-current operations to prevent overheating.
  • Pin Usage: Refer to the pinout diagram to avoid conflicts when using multiple peripherals.

Troubleshooting and FAQs

Common Issues and Solutions

  1. The board is not detected by the Arduino IDE:

    • Ensure the USB-C cable is a data cable (not just a charging cable).
    • Check if the correct board and port are selected in the Tools menu.
    • Try reinstalling the Seeed SAMD21 board package.
  2. Sketch upload fails:

    • Double-check the connections and ensure the board is in bootloader mode (double-tap the reset button if necessary).
    • Verify that no other application is using the COM port.
  3. The board is not powering on:

    • Confirm that the USB-C cable is properly connected and the power source is functional.
    • Check for any visible damage to the board.
  4. I/O pins are not working as expected:

    • Ensure the pins are configured correctly in the code (e.g., pinMode).
    • Verify that the connected peripherals are compatible with 3.3V logic levels.

FAQs

Q: Can I use the Seeed XIAO SAMD21 with 5V sensors?
A: The board operates at 3.3V logic levels. Use a level shifter to interface with 5V sensors.

Q: How do I reset the board?
A: Press the reset button once to reset the board. Double-tap the reset button to enter bootloader mode.

Q: What is the maximum current output of the 3.3V pin?
A: The 3.3V pin can supply up to 200mA, depending on the power source.

Q: Can I use the board for battery-powered applications?
A: Yes, the low-power design makes it suitable for battery-powered projects. Use a 3.7V LiPo battery with a suitable regulator if needed.