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

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
- 32K (32.768 kHz, open drain)
- SQW / INT (1 Hz or alarm, open drain, active LOW)
- SCL
- SDA
- VCC (2.3–5.5 V)
- GND
Ratings and limits
| Accuracy | ±2 ppm from 0 to 40 °C (about ±1 minute a year): a temperature-compensated crystal (TCXO) inside the chip |
|---|---|
| Supply | VCC 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 |
| Interface | I²C at 0x68 (the EEPROM at 0x57), up to 400 kHz; 4.7 kΩ pull-ups on the module |
| Outputs | SQW/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 |
| Alarms | two: alarm 1 to the second, alarm 2 to the minute; each matches per second / minute / hour / date / day of week |
| Lost-power flag | OSF (status bit 7) is set whenever the oscillator stopped: new module, flat or missing cell. RTClib: rtc.lostPower() |
| Charging circuit | the 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
- Arduino Uno R3
- Arduino Nano
- ESP32 DevKit
- ESP32-S3 DevKitC-1
- Raspberry Pi Pico 2
- LILYGO T-SIM A7670E R2
- Orange Pi One
- Coin acceptor
- Coin slot (₱5 only)
- I2C LCD
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).