Bee Data Logger NTP-Synced RTC Time Server - image 1
Tutorialbeginner

Bee Data Logger NTP-Synced RTC Time Server

Synchronize the Bee Data Logger's DS3231 RTC with an NTP time server over WiFi, then use the precise RTC timestamps for offline data logging. Ensures accurate timestamps even without internet access.

Boards:ESP32-S3
Firmware:Arduino
Use Cases:Data LoggingIoT Prototyping

Overview

The Bee Data Logger includes a DS3231 real-time clock with CR1220 battery backup that maintains accurate time even when the ESP32-S3 is in deep sleep or powered off. This project shows how to sync the RTC with an NTP time server over WiFi, then use the RTC for precise timestamps during offline data logging sessions.

How It Works

  1. On startup, the ESP32-S3 connects to WiFi and queries an NTP time server
  2. The DS3231 RTC is updated with the accurate network time
  3. The RTC maintains time independently with its CR1220 backup battery
  4. Subsequent data logging sessions use the RTC for timestamps without needing WiFi
  5. Files on the SD card can be automatically named using the RTC date/time

Hardware Required

  • Bee Data Logger (ESP32-S3 with DS3231 RTC)
  • CR1220 coin cell battery (for RTC backup)
  • WiFi network (for initial NTP sync)

Software

The Arduino Helper library includes the NTP_RTC example that handles the WiFi connection and NTP synchronization. Additional examples show how to use the RTC time for naming SD card files (Name-files-With-RTC) and saving timestamped data (Save-RTC-to-SD).

Links

Resources