Home › Parts › Microcontrollers & modules › DS3231 RTC module (ZS-042)

DS3231 RTC module (ZS-042) (DS3231SN, AT24C32)

Microcontrollers & modules · I²C · TCXO · coin cell

DS3231SN real-time clock, ±2 ppm TCXO · AT24C32 EEPROM · CR2032 (3 V lithium, NOT rechargeable)

DS3231 RTC module (ZS-042) (DS3231SN, AT24C32) on the simulator's bench

Try it on the benchThe lab drops it on an empty bench and opens its datasheet card.

Typical part: ZS-042 RTC module: Maxim DS3231SN + AT24C32 EEPROM + CR2032 holder

Pins

Ratings and limits

Accuracy±2 ppm from 0 to 40 °C (about ±1 minute a year): a temperature-compensated crystal (TCXO) inside the chip
SupplyVCC 2.3–5.5 V; about 200 µA active. On the coin cell (VBAT) it keeps time at about 3 µA: a CR2032 lasts years
InterfaceI²C at 0x68 (the EEPROM at 0x57), up to 400 kHz; 4.7 kΩ pull-ups on the module
OutputsSQW/INT open drain: 1 Hz–8 kHz square wave, or the alarm interrupt (LOW until the flag is cleared). 32K: 32.768 kHz open drain
Alarmstwo: alarm 1 to the second, alarm 2 to the minute; each matches per second / minute / hour / date / day of week
Lost-power flagOSF (status bit 7) is set whenever the oscillator stopped: new module, flat or missing cell. RTClib: rtc.lostPower()
Charging circuitthe ZS-042 charges the cell from VCC through 200 Ω and a diode. That is meant for a rechargeable LIR2032 and is unsafe with a CR2032 (a primary cell): remove the resistor (marked 201) or the diode when you fit a CR2032

How to use it

Time and date for a logger with no network. With RTClib: RTC_DS3231 rtc; rtc.begin(); if (rtc.lostPower()) rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); then DateTime now = rtc.now();

More in microcontrollers & modules

Sources: Maxim DS3231 datasheet (19-5170, registers, alarms, OSF, VBAT current); Adafruit RTClib (RTC_DS3231, DateTime, alarm modes); ZS-042 board schematic (charging resistor and diode).