ZS-042 Real Time Alarm Clock(RTC) DS3231 and EEPROM

From Visuino
Jump to navigation Jump to search

File:TArduinoRTCZS042.png

Summary

Provides real-time clock functionality with dual alarms, temperature-compensated accuracy, onboard EEPROM, and temperature output using the DS3231 RTC chip (ZS-042 module).

Description

The ZS-042 Real Time Alarm Clock (RTC) DS3231 and EEPROM component interfaces with the DS3231 RTC chip over I²C, providing highly accurate, temperature-compensated timekeeping. It supports two independent alarms with flexible match modes, making it suitable for calendar-based alerts, periodic interrupts, and scheduled events. The module also includes onboard EEPROM for persistent data storage and outputs the internal temperature reading of the DS3231 chip as an analog value.

This component is useful for:

Projects requiring precise long-term timekeeping with minimal drift

Applications needing scheduled alarms (daily, hourly, minute-based, or per-second triggers)

Low-power designs that rely on battery-backed RTC

Monitoring ambient temperature (via the RTC’s internal sensor)

Storing calibration data or small persistent values in EEPROM alongside the clock

Diagram:

Categories

Properties

  • Clock – RTC configuration:
    • Address – I²C address of the DS3231 chip.
    • Alarm [1] – Alarm channel 1 configuration:
      • Date – Target date.
      • Enabled – Boolean; enable/disable alarm.
      • Hour, Minute, Second – Time values for the alarm.
      • Week Day – Optional weekday match.
      • Interrupt Enabled – Boolean; enables interrupt output when alarm triggers.
      • Mode – Enum defining alarm behavior:
        • rtc3231a1mOncePerSecond
        • rtc3231a1mOnSeconds
        • rtc3231a1mOnMinutesSeconds
        • rtc3231a1mOnHoursMinutesSeconds
        • rtc3231a1mOnDateHoursMinutesSeconds
        • rtc3231a1mOnWeekDayHoursMinutesSeconds
    • Alarm [2] – Alarm channel 2 configuration:
      • Date – Target date.
      • Enabled – Boolean; enable/disable alarm.
      • Hour, Minute – Time values for the alarm.
      • Week Day – Optional weekday match.
      • Interrupt Enabled – Boolean; enables interrupt output when alarm triggers.
      • Mode – Enum defining alarm behavior:
        • rtc3231a2mOncePerMinute
        • rtc3231a2mOnMinutes
        • rtc3231a2mOnHoursMinutes
        • rtc3231a2mOnDateHoursMinutes
        • rtc3231a2mOnWeekDayHoursMinutes
  • Elements – Initial time/date values: Set Second, Minute, Hour, Day, Week Day, Month, Year.
  • Enabled – Boolean; enables or disables the RTC component.
  • Halt – Boolean; halts the oscillator (used to stop/start the RTC).
  • EEPROM – Onboard EEPROM configuration:
    • Address – I²C address of the EEPROM.
    • Elements – Defines stored values.
    • Enabled – Boolean; enables/disables EEPROM access.

Pins

  • Clock – External clock input.
  • Set – Date/Time input used to initialize the RTC.

Outputs:

  • Out – Date/Time output from the DS3231 RTC.
  • Control (I²C) – Communication interface with the RTC and EEPROM.
  • Alarm 1 (Clock) – Clock output when Alarm 1 condition is met.
  • Alarm 2 (Clock) – Clock output when Alarm 2 condition is met.
  • Temperature – Analog output representing the DS3231’s internal temperature sensor.