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

How to Use Adafruit Adalogger FeatherWing: Examples, Pinouts, and Specs

Image of Adafruit Adalogger FeatherWingDesign with Adafruit Adalogger FeatherWing in Cirkit Designer

Introduction

The Adafruit Adalogger FeatherWing is a versatile add-on board designed for the Adafruit Feather series of microcontroller boards. It features an SD card slot for data logging, a real-time clock (RTC) for precise timekeeping, and compatibility with various sensors for environmental monitoring. This compact and efficient board is ideal for projects requiring data storage, timestamping, and sensor integration.

Explore Projects Built with Adafruit Adalogger FeatherWing

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 Solar-Powered Environmental Data Logger with Adafruit Feather M0 Express: A project utilizing Adafruit Adalogger FeatherWing in a practical application
Solar-Powered Environmental Data Logger with Adafruit Feather M0 Express

This circuit is designed for environmental data collection and logging, utilizing an Adafruit Feather M0 Express microcontroller as the central processing unit. It interfaces with a BME280 sensor for atmospheric temperature, humidity, and pressure measurements, an SGP30 sensor for monitoring air quality (eCO2 and TVOC), and a STEMMA soil sensor for detecting soil moisture and temperature. The system is powered by a solar panel and a 3.7v LiPo battery, managed by an Adafruit BQ24074 Solar-DC-USB Lipo Charger, and provides easy access to the microcontroller's connections through an Adafruit Terminal Breakout FeatherWing.

Open Project in Cirkit Designer
Image of Multi-Sensor Health Monitoring System with Adafruit Feather M0 Adalogger: A project utilizing Adafruit Adalogger FeatherWing in a practical application
Multi-Sensor Health Monitoring System with Adafruit Feather M0 Adalogger

This circuit is designed to interface multiple sensors with an Adafruit Feather M0 Adalogger microcontroller for data logging purposes. The sensors include a MAX30205 temperature sensor, a body dehydration sensor, a MAX30102 pulse oximeter, an Adafruit LSM6DSOX 6-axis accelerometer and gyroscope, and an Adafruit BME680 environmental sensor. All sensors are connected to the microcontroller via an I2C bus, sharing the SDA and SCL lines for communication.

Open Project in Cirkit Designer
Image of ESP32-Based Vibration Feedback System with Quad Alphanumeric Display and ADXL343 Accelerometer: A project utilizing Adafruit Adalogger FeatherWing in a practical application
ESP32-Based Vibration Feedback System with Quad Alphanumeric Display and ADXL343 Accelerometer

This circuit features an Adafruit HUZZAH32 ESP32 Feather board as the central microcontroller, which is connected to an Adafruit Quad AlphaNumeric Featherwing display and an Adafruit ADXL343 accelerometer via I2C communication (SCL and SDA lines). The ESP32 controls a vibration motor connected to one of its GPIO pins (A5_IO4) and shares a common power supply (3.3V) and ground (GND) with the other components. The purpose of this circuit is likely to read acceleration data, display information on the alphanumeric display, and provide haptic feedback through the vibration motor.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

The Adalogger FeatherWing connects to the Feather board via its headers. Below is the pin configuration:

Pin Name Description
1 3V 3.3V power input/output
2 GND Ground connection
3 SCL I2C clock line for RTC communication
4 SDA I2C data line for RTC communication
5 MOSI SPI Master Out Slave In (used for SD card communication)
6 MISO SPI Master In Slave Out (used for SD card communication)
7 SCK SPI clock line (used for SD card communication)
8 CS Chip Select for SD card
9 BAT Connection for CR1220 coin cell battery (RTC backup)

Usage Instructions

How to Use the Component in a Circuit

  1. Attach the FeatherWing: Solder the included headers to the Adalogger FeatherWing and attach it to your Feather board.
  2. Insert the SD Card: Ensure the microSD card is formatted as FAT16 or FAT32 before inserting it into the SD card slot.
  3. Connect a Battery: Insert a CR1220 coin cell battery into the RTC backup holder to maintain timekeeping when the main power is off.
  4. Connect Sensors (Optional): If using external sensors, connect them to the Feather board's GPIO pins as needed.
  5. Power the Circuit: Supply power to the Feather board via USB or a LiPo battery.

Important Considerations and Best Practices

Example Code for Arduino UNO

Below is an example of how to use the Adalogger FeatherWing with an Arduino-compatible Feather board to log data to an SD card and read the RTC.

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

// Initialize RTC and SD card
RTC_DS3231 rtc;
const int chipSelect = 10; // CS pin for SD card

void setup() {
  Serial.begin(9600);
  while (!Serial); // Wait for Serial Monitor to open

  // Initialize RTC
  if (!rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);
  }

  // Check if RTC lost power and set the time if needed
  if (rtc.lostPower()) {
    Serial.println("RTC lost power, setting the time!");
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  }

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

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

  // Open a file on the SD card
  File dataFile = SD.open("datalog.txt", FILE_WRITE);

  // If the file is available, write data to it
  if (dataFile) {
    dataFile.print("Time: ");
    dataFile.print(now.year(), DEC);
    dataFile.print('/');
    dataFile.print(now.month(), DEC);
    dataFile.print('/');
    dataFile.print(now.day(), DEC);
    dataFile.print(" ");
    dataFile.print(now.hour(), DEC);
    dataFile.print(':');
    dataFile.print(now.minute(), DEC);
    dataFile.print(':');
    dataFile.println(now.second(), DEC);
    dataFile.close(); // Close the file
    Serial.println("Data written to SD card.");
  } else {
    // If the file isn't available, print an error
    Serial.println("Error opening datalog.txt");
  }

  delay(1000); // Wait 1 second before logging again
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. SD Card Not Detected

    • Ensure the SD card is properly inserted into the slot.
    • Verify the SD card is formatted as FAT16 or FAT32.
    • Check the wiring and ensure the CS pin is correctly defined in the code.
  2. RTC Not Responding

    • Confirm the CR1220 battery is installed for RTC backup.
    • Check the I2C connections (SCL and SDA) and ensure no address conflicts on the I2C bus.
  3. Data Not Logging

    • Verify the SD card has sufficient free space.
    • Ensure the file is being opened in write mode (FILE_WRITE).
    • Check for errors in the code and ensure the SPI pins are not being used for other purposes.
  4. Incorrect Time

    • If the RTC lost power, reinitialize it with the correct time using rtc.adjust().

Tips for Troubleshooting