1. Introduction
The Teyleten Robot DS3231SN Real Time Clock (RTC) module is a low-cost, highly accurate I2C RTC with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. It incorporates a battery input, and maintains accurate timekeeping when main power to the module is interrupted. The integrated AT24C32 EEPROM provides 32K of non-volatile memory. This module is suitable for use with microcontrollers such as Arduino and Raspberry Pi.
Key features include:
- Real-time clock generates seconds, minutes, hours, days of the week, date, month, and year timing.
- Automatic leap year compensation valid until 2100.
- Internal temperature sensor with an accuracy of ±3°C.
- Integrated AT24C32 EEPROM with 32K memory capacity.
- I2C bus interface with a maximum transmission speed of 400KHz (at 5V operating voltage).
- Two calendar alarms.
- Programmable square wave output.
2. Setup Instructions
2.1 Pinout and Connections
The module features standard header pins for easy connection to development boards. Refer to the image below for pin identification.

Figure 1: DS3231SN RTC Module showing pin labels (VCC, GND, SDA, SCL, SQW, 32K) and component layout.
- VCC: Power supply input (3.3V - 5.5V).
- GND: Ground connection.
- SDA: I2C Serial Data Line. Connect to the SDA pin of your microcontroller.
- SCL: I2C Serial Clock Line. Connect to the SCL pin of your microcontroller.
- SQW: Square Wave Output pin.
- 32K: 32KHz output pin.
2.2 Power Supply
The module operates within a voltage range of 3.3V to 5.5V. Ensure your power supply is stable and within this range to prevent damage and ensure proper operation.
2.3 Battery Installation and Considerations
The module includes a battery holder for a CR2032 coin cell battery (not included) to maintain timekeeping when main power is off. It is important to note that the module may include a trickle charging circuit. If using a non-rechargeable lithium coin cell (like a standard CR2032), this charging circuit can damage the battery or cause overheating. For safe operation with non-rechargeable batteries, it is recommended to remove the 1K resistor (marked '102') located near the diode on the module. Alternatively, use a rechargeable lithium coin cell compatible with trickle charging.

Figure 2: Close-up view of the DS3231SN module, highlighting the '102' resistor (often red or brown) that may need removal for non-rechargeable CR2032 batteries.
3. Operation
3.1 I2C Communication
The DS3231SN communicates via the I2C (Inter-Integrated Circuit) bus. The default I2C address for the DS3231 is 0x68. The AT24C32 EEPROM has a default address of 0x57, which can be modified by short-circuiting the A0/A1/A2 pins. The maximum I2C transmission speed is 400KHz when operating at 5V.
3.2 Real-Time Clock Functionality
The module provides precise timekeeping, tracking seconds, minutes, hours, day of the week, date, month, and year. It automatically adjusts for months with fewer than 31 days and includes leap year compensation up to the year 2100. Time data is stored in BCD (Binary-Coded Decimal) format.
3.3 Temperature Sensor
An integrated digital temperature sensor provides temperature readings with an accuracy of ±3°C. This sensor can be used for temperature monitoring or for temperature compensation of the crystal oscillator.
3.4 Alarms and Square Wave Output
The DS3231SN features two configurable time-of-day/date alarms. Additionally, it offers a programmable square wave output, which can be set to various frequencies (1Hz, 4KHz, 8KHz, 32KHz) or disabled.
3.5 AT24C32 EEPROM
The onboard AT24C32 is a 32K-bit (4KB) serial EEPROM. This non-volatile memory can be used to store configuration data, sensor readings, or other information that needs to persist even when power is removed from the module.
4. Maintenance
4.1 General Care
Keep the module clean and dry. Avoid exposing it to extreme temperatures, humidity, or static electricity. Handle with care to prevent damage to components or solder joints.
4.2 Battery Replacement
When the backup battery (CR2032) is depleted, replace it with a new one. Ensure correct polarity during installation. If you are using a non-rechargeable CR2032 and have not removed the trickle charging resistor, consider doing so to prolong battery life and prevent potential issues.
5. Troubleshooting
- Module not detected on I2C bus:
- Verify all connections (VCC, GND, SDA, SCL) are secure and correctly wired to your microcontroller.
- Ensure the module is receiving proper power (3.3V-5.5V).
- Check the I2C address in your code (default is 0x68 for DS3231, 0x57 for AT24C32).
- Use an I2C scanner sketch to confirm the module's presence on the bus.
- Time is inaccurate or drifts significantly:
- Ensure the module is a genuine DS3231SN. Some modules may use less accurate variants (e.g., DS3231M).
- Verify the backup battery is installed, charged, and making good contact.
- If using a non-rechargeable CR2032, ensure the trickle charging resistor has been removed as it can affect battery performance and timekeeping stability.
- Check for environmental factors like extreme temperature fluctuations, though the DS3231SN is temperature compensated.
- Backup battery drains quickly:
- This is often due to the trickle charging circuit attempting to charge a non-rechargeable CR2032 battery. Remove the '102' resistor as described in Section 2.3, or use a rechargeable LIR2032 battery.
- Ensure there are no short circuits on the module.
6. Technical Specifications
| Feature | Specification |
|---|---|
| RTC Chip | DS3231SN |
| Operating Voltage | 3.3V - 5.5V |
| Clock Accuracy | ±2ppm (0°C to 40°C range) |
| Temperature Sensor Accuracy | ±3°C |
| Memory Chip | AT24C32 (32K-bit EEPROM) |
| I2C Interface Speed | Up to 400KHz (at 5V) |
| RTC I2C Address | 0x68 |
| EEPROM I2C Address | 0x57 (default, configurable) |
| Alarms | 2 calendar alarms |
| Output | Programmable square wave output |
| Compatible Devices | Arduino, Raspberry Pi |
7. Warranty and Support
Teyleten Robot products are designed for reliability and performance. This product is covered by a standard manufacturer's warranty against defects in materials and workmanship. For specific warranty details, please refer to the product packaging or the official Teyleten Robot website.
For technical assistance, troubleshooting, or further inquiries, please contact Teyleten Robot customer support through their official channels or the retailer from whom the product was purchased. When contacting support, please provide your product model number (DS3231SN) and a detailed description of the issue.





