The DS3231 Module is one of the most widely used real-time clock solutions in embedded electronics because its high accuracy, low cost, and built-in temperature compensation. Design to keep precise time even when the main system power is turned off, making it ideal for microcontroller-based projects, data logging systems, and industrial devices.
4. DS3231 RTC Module Board Specifications
6. Where and How to use DS3231 RTC Module?
8. Frequently Asked Questions [FAQ]

The DS 3231 module is a low-cost, high-precision I2C real-time clock (RTC) device designed for accurate timekeeping in embedded systems. It integrates a temperature-compensated crystal oscillator (TCXO) and crystal, which significantly improves long-term stability and reduces external component requirements in circuit design. The module includes a battery backup input, allowing it to continue keeping accurate time even when disconnect the main power supply.
The module stores essential time and date information including seconds, minutes, hours, day, date, month, and year. It automatically adjusts for months with fewer than 31 days and includes leap-year correction up to the year 2100. The clock supports both 24-hour format and 12-hour format with AM/PM indication. It also provides two programmable calendar alarms and a configurable square-wave output for timing applications.
Handle communication through an I2C bidirectional serial interface, making it easy to connect with microcontrollers such as Arduino and ESP32. The device also features an internal temperature-compensated voltage reference and comparator circuit that monitors VCC, detects power failure, and switches automatically to backup battery mode when required.
In addition, the DS 3231 includes a highly accurate digital temperature sensor accessible via I2C, with ±3°C accuracy. When restore main power , the built-in reset circuitry helps restart the system microcontroller, ensuring reliable system recovery and continuous operation.

DS3231 RTC Pin Configuration
Pin Name | Description |
VCC | Connected to the positive power supply (typically 3.3V or 5V depending on module design) |
GND | Connected to ground (0V reference) |
SDA | Serial Data line used for I2C communication |
SCL | Serial Clock line used for I2C communication |
SQW | Square wave output pin, configurable for clock pulses or interrupts |
32K | 32.768 kHz oscillator output for precise timing reference |
The SDA and SCL pins form the I2C communication interface, allowing the DS3231 to send and receive time and configuration data with a microcontroller using only two wires. Can program the SQW pin to output a square-wave signal at different frequencies or act as an alarm interrupt signal. The 32K pin provides a stable 32.768 kHz reference clock output, which can use in timing-sensitive applications.
This pinout structure makes the clock module compact, flexible, and easy to use in real-time clock applications requiring high accuracy and reliable performance.
· High-precision TCXO-based RTC
· I2C communication interface
· Battery backup support (CR2032)
· Automatic leap year correction
· Two alarm functions
· Programmable square wave output
· Built-in temperature sensor
· Automatic power failure detection
· Low drift (±2 ppm typical accuracy)
The Module board is designed with stable hardware and integrated components, making it highly reliable for real-time clock applications.
Specification | Details |
Dimensions | 38mm (L) × 22mm (W) × 14mm (H) |
Weight | 8g |
Operating Voltage | 3.3V – 5.5V |
Clock Chip | High-precision DS3231SN RTC chip |
Time Accuracy | ±2ppm (0–40°C), approx. 1 minute/year error |
Alarms | 2 programmable calendar alarms |
Square Wave Output | Configurable frequency output supported |
Time Functions | Seconds, minutes, hours, weekday, date, month, year with leap year correction up to 2100 |
Temperature Sensor | Built-in sensor with ±3°C accuracy |
EEPROM Storage | AT24C32 with 32K capacity |
I2C Interface | Up to 400kHz transfer speed (at 5V operation) |
Expandability | Supports multiple I2C devices; EEPROM address adjustable via A0/A1/A2 (default 0x57) |
Battery Backup | CR2032 coin cell ensures continuous timekeeping during power loss |
The DS 3231 RTC module is a high-precision RTC, but several alternative RTC board are available depending on cost, power consumption, and design requirements.

The DS1302 module is a low-power real-time clock with calendar functions capable of counting seconds, minutes, hours, days, weeks, months, and years up to 2100 with leap year compensation. It includes 318 bytes of RAM storage and uses a simple 3-wire serial interface, reducing pin usage in embedded systems. The chip operates over a wide voltage range (2.0V–5.5V) and consumes extremely low current (below 300nA at 2.0V). It is available in 8-pin DIP and SOIC packages and supports both single-byte and burst data transfer modes. A dual power supply design allows switching between main power and backup battery.

The DS1307 is a widely used low-power RTC with 56 bytes of non-volatile RAM. It communicates via a two-wire I2C interface and provides standard timekeeping functions including seconds, minutes, and hours with automatic date adjustment and leap year correction. It supports both 12-hour (AM/PM) and 24-hour formats. The chip includes power-fail detection and automatic battery switching, ensuring continuous operation during power loss. Commonly use in low-cost embedded applications requiring basic timekeeping.

The PCF8563 is a low-power CMOS real-time clock and calendar with a wide operating voltage range of 1.0V–5.5V. It features low current consumption (typically 0.25µA) and supports I2C communication. The chip offers programmable clock outputs (32.768 kHz, 1024 Hz, 32 Hz, and 1 Hz), along with alarm and timer functions. It also includes internal oscillator capacitors, power-fail detection, reset circuitry, and an open-drain interrupt output. Its design makes it suitable for compact, battery-powered systems requiring efficient timekeeping and low energy usage.
Widely used in embedded systems that require accurate and reliable timekeeping even when remove power. Commonly find in data loggers, digital clocks, automation systems, industrial controllers, and IoT devices where maintaining correct date and time is important.
Where to Use
The DS 3231 module is suitable for applications such as smart home systems, robotics, GPS data logging, server time synchronization, utility meters, and electronic measurement devices. It is especially useful in projects where need timestamps for recorded data or scheduled operations.
How to Use
To use the DS 3231, connect it to a microcontroller using the I2C interface. The SDA pin connects to the data line, and the SCL pin connects to the clock line. Connect VCC to a 3.3V or 5V power supply, and connect GND to ground. Should install a CR2032 backup battery to ensure continuous operation when main power is off.
After wiring, can program the module using libraries such as RTClib (Arduino). The user can set the current time once, and the module will automatically keep tracking time accurately. It can also trigger alarms or output square-wave signals for timing control applications.
Widely used in many electronic and embedded system applications where require accurate and stable timekeeping.
In robotics systems, used for task scheduling, motion timing, and synchronized operations. It helps robots execute actions at precise intervals, improving automation accuracy and coordination between sensors and actuators.
In gaming devices and arcade systems, the DS 3231 maintains system time for event tracking, score logging, and time-based gameplay functions. It ensures consistent timing even when the system is powered off.
In servers and data acquisition systems, used to timestamp logs, monitor system events, and maintain synchronization. Its high accuracy ensures reliable record keeping for system diagnostics and data tracking.
In computer peripherals such as printers, embedded controllers, and smart devices, the DS 3231 provides real-time clock functions for scheduling tasks, managing operations, and maintaining system time.
In GPS and navigation systems, used for precise timing reference and data logging. Accurate timestamps are essential for location tracking, route history, and signal processing.
In utility power meters, the DS 3231 records energy usage with accurate timestamps. It supports time-based billing, load analysis, and long-term energy consumption monitoring, even during power outages thanks to its battery backup capability.
The DS3231 Module is a high-precision real-time clock device used to keep accurate date and time in electronic systems. It uses a built-in temperature-compensated crystal oscillator and I2C interface, and it continues running with a backup battery even when main power is off.
An RTC module provides real-world timekeeping (seconds, minutes, hours, date, month, year) for microcontroller systems. It ensures devices can track time accurately, schedule tasks, timestamp data, and maintain time even during power loss using a backup battery.
The DS 3231 offers high accuracy with about ±2 ppm drift from 0–40°C, which equals roughly 1 minute per year error. Its built-in temperature compensation system helps maintain stable time even under changing environmental conditions.
Compared to DS1307 or DS1302, the DS3231 is more accurate because it includes a temperature-compensated oscillator. Other RTCs rely on external crystals and are more affected by temperature changes, leading to higher time drift over long periods.
Connect SDA and SCL pins to the microcontroller’s I2C pins. Connect VCC to 3.3V or 5V depending on the module, and GND to ground. Insert a CR2032 battery for backup power so the clock continues running when remove main power.
Yes. The DS3231 automatically switches to the backup CR2032 battery when main power is lost. This allows it to continue keeping accurate time and storing date information without interruption until power is restored.
Yes, common alternatives include DS1302, DS1307, and PCF8563 RTC modules. However, these alternatives generally offer lower accuracy or fewer features compared to the DS3231, especially in temperature stability and long-term drift performance.
The DS3231 offers high accuracy, low time drift, built-in temperature compensation, easy I2C interface, and reliable battery backup. It also includes alarms, square wave output, and automatic power switching, making it suitable for professional and embedded applications.
The DS3231 RTC module is a highly reliable and accurate real-time clock solution widely used in embedded electronics and industrial systems. Its integrated temperature-compensated crystal oscillator ensures stable long-term performance with minimal time drift, making it far superior to many traditional RTC chips.
With features such as I2C communication, battery backup support, dual alarms, and programmable square wave output, the DS 3231 is easy to integrate into microcontroller-based projects. It continues operating even during power failures, ensuring uninterrupted timekeeping and data accuracy.
Overall, the DS 3231 is an excellent choice for applications that require precise timing, data logging, scheduling, and system reliability, offering a strong balance between performance, simplicity, and cost-effectiveness.
1. DS1302 Real Time Clock IC Chip
2. LR41 Battery Guide: Specifications, Equivalents, and Uses
2025-05-29
2025-05-06
2025-09-04
2025-06-05
2025-07-28
2025-04-23
2025-05-14
2026-01-23
2025-08-17
2025-05-12