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

How to Use Adafruit Precision RTC FeatherWing: Examples, Pinouts, and Specs

Image of Adafruit Precision RTC FeatherWingDesign with Adafruit Precision RTC FeatherWing in Cirkit Designer

Introduction

The Adafruit Precision RTC FeatherWing is an essential electronic component for projects requiring accurate timekeeping. It utilizes the high-precision DS3231 Real-Time Clock (RTC) chip, which maintains seconds, minutes, hours, day, date, month, and year information with a built-in temperature-compensated crystal oscillator (TCXO) and crystal. The module is designed to be stackable and easily integrates with the Feather ecosystem of development boards, making it ideal for applications such as data logging, clocks, timers, and alarms.

Explore Projects Built with Adafruit Precision RTC 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 Precision RTC 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 Biometric and RFID Security System with Dual Adafruit Feather nRF52840 Controllers: A project utilizing Adafruit Precision RTC FeatherWing in a practical application
Biometric and RFID Security System with Dual Adafruit Feather nRF52840 Controllers

This circuit features two Adafruit Feather nRF52840 microcontrollers, each interfaced with an RFID-RC522 module for RFID communication and an AT24C256 external EEPROM for additional memory storage. One of the microcontrollers is also connected to an R307 Fingerprint Sensor for biometric input, and both microcontrollers are powered by a shared power supply and a coin cell breakout for backup or RTC power. The circuit is likely designed for secure access control or identification purposes, utilizing both RFID and fingerprint authentication, with data storage capabilities.

Open Project in Cirkit Designer
Image of ESP32-Based Digital Clock with TFT Display and RTC Module: A project utilizing Adafruit Precision RTC FeatherWing in a practical application
ESP32-Based Digital Clock with TFT Display and RTC Module

This circuit features an ESP32 microcontroller connected to an Adafruit TFT 1.8 inch display and a Real-Time Clock (RTC) module. The ESP32 is configured to communicate with the RTC to keep track of the current time and to control the display, which shows the time updated every second. The connections between the ESP32 and the peripherals facilitate data transfer for timekeeping and display purposes, with the ESP32 also providing power to the RTC.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Description
GND Ground connection
3V 3.3V power supply
SCL I2C clock signal
SDA I2C data signal
RST Reset pin (optional use)
SQW Square wave output (configurable)
32K 32.768 kHz output (for external use)

Usage Instructions

Integrating with a Circuit

  1. Powering the Module: Connect the 3V pin to a 3.3V supply from your Feather board, and the GND pin to ground.
  2. I2C Communication: Connect SCL and SDA to the corresponding I2C pins on your Feather board.
  3. Battery Backup: Insert a CR1220 coin cell battery into the holder to maintain timekeeping during power loss.

Important Considerations and Best Practices

Example Code for Arduino UNO

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

RTC_DS3231 rtc;

void setup() {
  Serial.begin(9600);
  
  // Check if the RTC is connected correctly
  if (!rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);
  }

  // Check if the RTC lost power and if so, set the time
  if (rtc.lostPower()) {
    Serial.println("RTC lost power, setting the time!");
    // The following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  }
}

void loop() {
  DateTime now = rtc.now();
  
  // Print the current date and time
  Serial.print(now.year(), DEC);
  Serial.print('/');
  Serial.print(now.month(), DEC);
  Serial.print('/');
  Serial.print(now.day(), DEC);
  Serial.print(" ");
  Serial.print(now.hour(), DEC);
  Serial.print(':');
  Serial.print(now.minute(), DEC);
  Serial.print(':');
  Serial.print(now.second(), DEC);
  Serial.println();
  
  // Wait for a second
  delay(1000);
}

Troubleshooting and FAQs

Common Issues

Solutions and Tips for Troubleshooting

FAQs

Q: Can I use this module with a 5V system? A: Yes, the module is 5V compliant for power and logic levels.

Q: How long will the RTC keep time with the battery backup? A: With a fresh CR1220 coin cell battery, the RTC can keep time for several years.

Q: Is it necessary to use the reset pin? A: No, the RST pin is optional and is typically not required for normal operation.

Q: Can I set alarms with this RTC? A: Yes, the DS3231 chip supports two programmable time-of-day alarms.

Q: How do I set the time on the RTC? A: You can set the time using the rtc.adjust(DateTime(__DATE__, __TIME__)); function in your setup code, as shown in the example above. This sets the RTC to the time when the sketch was compiled.