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

How to Use Seeed Studio XIAO Logger HAT: Examples, Pinouts, and Specs

Image of Seeed Studio XIAO Logger HAT
Cirkit Designer LogoDesign with Seeed Studio XIAO Logger HAT in Cirkit Designer

Introduction

The Seeed Studio XIAO Logger HAT is a compact and versatile data logging module designed specifically for the Seeed Studio XIAO series of microcontrollers. It features an onboard SD card slot for data storage, a real-time clock (RTC) for precise timekeeping, and multiple sensor interfaces to facilitate environmental data collection. This HAT is ideal for applications requiring reliable data logging, such as environmental monitoring, IoT projects, and scientific experiments.

Explore Projects Built with Seeed Studio XIAO Logger HAT

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi 4B-Based Multi-Sensor Interface Hub with GPS and GSM
Image of Rocket: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
This circuit features a Raspberry Pi 4B interfaced with an IMX296 color global shutter camera, a Neo 6M GPS module, an Adafruit BMP388 barometric pressure sensor, an MPU-6050 accelerometer/gyroscope, and a Sim800l GSM module for cellular connectivity. Power management is handled by an MT3608 boost converter, which steps up the voltage from a Lipo battery, with a resettable fuse PTC and a 1N4007 diode for protection. The Adafruit Perma-Proto HAT is used for organizing connections and interfacing the sensors and modules with the Raspberry Pi via I2C and GPIO pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32C3-Based Multi-Sensor Data Logger with Wi-Fi and SD Card Storage
Image of Petora_v1: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
This circuit is a data logging and transmission system that collects environmental and positional data from various sensors (BME/BMP280, HMC5883L, MAX30102, GPS NEO 6M) and records it to an SD card. The data is also sent over WiFi to a specified server using an ESP32 microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Battery-Powered Weather Station with LoRa and GPS
Image of bme280-sd-openlog-MPU6050: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
This circuit is a data logging and communication system powered by a Li-ion battery, featuring an ESP32 microcontroller. It includes sensors (BME280 and MPU-6050) for environmental and motion data, a GPS module for location tracking, and a LoRa radio for long-range communication. The system logs data to a SparkFun OpenLog and is managed by a TP4056 battery charger with power regulation components.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Battery-Powered Environmental Monitoring System with LoRa and GPS
Image of Mi proyecto 24-25: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
This circuit is a data logging and communication system powered by a Li-ion 18650 battery, featuring an ESP32 microcontroller. It includes sensors (BME280 and MPU-6050) for environmental and motion data, a GPS module for location tracking, and a LoRa radio for long-range communication. The SparkFun OpenLog module is used for data logging, and the TP4056 module manages battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Seeed Studio XIAO Logger HAT

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 Rocket: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
Raspberry Pi 4B-Based Multi-Sensor Interface Hub with GPS and GSM
This circuit features a Raspberry Pi 4B interfaced with an IMX296 color global shutter camera, a Neo 6M GPS module, an Adafruit BMP388 barometric pressure sensor, an MPU-6050 accelerometer/gyroscope, and a Sim800l GSM module for cellular connectivity. Power management is handled by an MT3608 boost converter, which steps up the voltage from a Lipo battery, with a resettable fuse PTC and a 1N4007 diode for protection. The Adafruit Perma-Proto HAT is used for organizing connections and interfacing the sensors and modules with the Raspberry Pi via I2C and GPIO pins.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Petora_v1: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
ESP32C3-Based Multi-Sensor Data Logger with Wi-Fi and SD Card Storage
This circuit is a data logging and transmission system that collects environmental and positional data from various sensors (BME/BMP280, HMC5883L, MAX30102, GPS NEO 6M) and records it to an SD card. The data is also sent over WiFi to a specified server using an ESP32 microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of bme280-sd-openlog-MPU6050: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
ESP32-Based Battery-Powered Weather Station with LoRa and GPS
This circuit is a data logging and communication system powered by a Li-ion battery, featuring an ESP32 microcontroller. It includes sensors (BME280 and MPU-6050) for environmental and motion data, a GPS module for location tracking, and a LoRa radio for long-range communication. The system logs data to a SparkFun OpenLog and is managed by a TP4056 battery charger with power regulation components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Mi proyecto 24-25: A project utilizing Seeed Studio XIAO Logger HAT in a practical application
ESP32-Based Battery-Powered Environmental Monitoring System with LoRa and GPS
This circuit is a data logging and communication system powered by a Li-ion 18650 battery, featuring an ESP32 microcontroller. It includes sensors (BME280 and MPU-6050) for environmental and motion data, a GPS module for location tracking, and a LoRa radio for long-range communication. The SparkFun OpenLog module is used for data logging, and the TP4056 module manages battery charging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Environmental data logging (e.g., temperature, humidity, air quality)
  • IoT-based data collection and storage
  • Scientific experiments requiring time-stamped data
  • Prototyping and development of data-driven applications
  • Educational projects involving real-time data acquisition

Technical Specifications

The following table outlines the key technical details of the Seeed Studio XIAO Logger HAT:

Parameter Specification
Manufacturer Seeed Studio
Part Number XIAO Logger HAT
Dimensions 21 x 17.5 mm
Power Supply Voltage 3.3V (via XIAO microcontroller)
SD Card Slot MicroSD (up to 32GB, FAT32 format)
RTC DS3231 (battery-backed real-time clock)
Sensor Interfaces I2C, UART, and GPIO
Battery Backup CR1220 coin cell (for RTC, not included)
Operating Temperature -40°C to 85°C

Pin Configuration and Descriptions

The XIAO Logger HAT connects directly to the Seeed Studio XIAO microcontroller via its pin headers. Below is the pin configuration:

Pin Name Description
1 3.3V Power supply input (from XIAO microcontroller)
2 GND Ground connection
3 SDA I2C data line (for RTC and sensors)
4 SCL I2C clock line (for RTC and sensors)
5 TX UART transmit line (for external devices)
6 RX UART receive line (for external devices)
7 GPIO General-purpose input/output
8 SD_CS Chip select for the SD card module

Usage Instructions

How to Use the Component in a Circuit

  1. Attach the HAT to the XIAO Microcontroller: Align the pins of the XIAO Logger HAT with the corresponding headers on the Seeed Studio XIAO microcontroller and press them together gently.
  2. Connect Power: Ensure the XIAO microcontroller is powered via USB or an external power source.
  3. Insert an SD Card: Use a FAT32-formatted microSD card (up to 32GB) and insert it into the SD card slot on the HAT.
  4. Connect Sensors: Attach external sensors to the I2C, UART, or GPIO interfaces as needed.
  5. Set Up RTC: Insert a CR1220 coin cell battery into the RTC battery holder to enable timekeeping even when the main power is off.

Important Considerations and Best Practices

  • SD Card Formatting: Ensure the SD card is formatted to FAT32 before use. Unformatted or incompatible cards may cause errors.
  • RTC Battery: Use a CR1220 coin cell battery to maintain RTC functionality during power loss.
  • Sensor Compatibility: Verify that connected sensors are compatible with the I2C or UART interfaces of the XIAO Logger HAT.
  • Power Supply: Avoid exceeding the 3.3V power supply limit to prevent damage to the HAT or microcontroller.
  • Code Libraries: Use the appropriate Arduino libraries for SD card and RTC functionality (e.g., SD and RTClib).

Example Code for Arduino UNO

Below is an example Arduino sketch to log temperature data from a sensor to the SD card with a timestamp from the RTC:

#include <Wire.h>
#include <RTClib.h>
#include <SD.h>

// Define SD card chip select pin
const int chipSelect = 10;

// Initialize RTC and SD card objects
RTC_DS3231 rtc;

void setup() {
  Serial.begin(9600);

  // Initialize SD card
  if (!SD.begin(chipSelect)) {
    Serial.println("SD card initialization failed!");
    while (1);
  }
  Serial.println("SD card initialized.");

  // Initialize RTC
  if (!rtc.begin()) {
    Serial.println("RTC initialization failed!");
    while (1);
  }
  if (rtc.lostPower()) {
    Serial.println("RTC lost power, setting time...");
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  }
}

void loop() {
  // Get current time from RTC
  DateTime now = rtc.now();

  // Simulate reading temperature from a sensor
  float temperature = 25.0; // Replace with actual sensor reading

  // Open file on SD card
  File dataFile = SD.open("datalog.txt", FILE_WRITE);
  if (dataFile) {
    // Write timestamp and temperature to file
    dataFile.print(now.timestamp());
    dataFile.print(", ");
    dataFile.println(temperature);
    dataFile.close();
    Serial.println("Data logged.");
  } else {
    Serial.println("Error opening datalog.txt");
  }

  delay(1000); // Log data every second
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. SD Card Not Detected

    • Ensure the SD card is properly inserted and formatted to FAT32.
    • Verify the SD card is compatible (up to 32GB).
    • Check the SD_CS pin connection and ensure the correct pin is defined in the code.
  2. RTC Not Keeping Time

    • Confirm that a CR1220 coin cell battery is installed in the RTC battery holder.
    • Use the rtc.adjust() function to set the correct time if the RTC lost power.
  3. Sensor Data Not Logging

    • Verify the sensor connections to the I2C or UART pins.
    • Check that the correct libraries and initialization code for the sensor are included.
  4. Power Issues

    • Ensure the XIAO microcontroller is receiving sufficient power (via USB or external source).
    • Avoid exceeding the 3.3V power supply limit.

FAQs

Q: Can I use an SD card larger than 32GB?
A: No, the XIAO Logger HAT supports microSD cards up to 32GB formatted in FAT32.

Q: What happens if the RTC battery is not installed?
A: The RTC will lose timekeeping functionality when the main power is disconnected.

Q: Can I use this HAT with other microcontrollers?
A: The XIAO Logger HAT is designed for the Seeed Studio XIAO series. Compatibility with other microcontrollers may require additional modifications.