Introduction to DS3231 RTC Module
Hello friends! Welcome back to ElectroDuino. This blog is base on Introduction to DS3231 RTC Module. Here we will discuss Introduction to DS3231 RTC Module, module pin diagram, Hardware Overview, Specification/Features, and applications.
The DS3231 RTC module is a time tracking device that gives the current time and date. The word RTC is meant Real Time Clock. The RTC module made of clock chip DS3231. This module is generally used in computers, laptops, mobiles, embedded system applications devices, etc. to provide time and date. RTC module works on the I2C protocol. The module provides details such as second, minute, hour, day of the week, day of the month, month, and year including correction for leap year. One more interesting thing It can operate either in 12 Hour or in 24 Hour format. It’s can be used in projects like containing data-logging, clock-building, time stamping, timers, and alarms.
DS3231 RTC Module Pin Diagram
|32K||32K oscillator output. This pin outputs the stable(temperature compensated) and accurate reference clock.|
|SQW||The SQW pin has a cool feature, it can produce outputs one of four square-wave frequency 1 Hz, 4 kHz, 8 kHz or 32 kHz and can be possible programmatically.|
|SCL||This is a clock input I2C serial communication pin.|
|SDA||This pin is used to the data input/output for the I2C serial interface.|
|VCC||It is a positive power input pin of the module in range 3.3V to 5.5V.|
|GND||GND is a negative(ground) power input pin|
DS3231 RTC Module Hardware Overview
The bottom side of the module has a battery holder for a 20mm 3V lithium coin cell. Any CR2032 battery can fit in the battery holder. The DS3231 incorporates a battery input and maintains accurate timekeeping when the main power to the device is interrupted.
The built-in power-sense circuit continuously monitors the status of the input (VCC) power supply to detect power failures and automatically switches to the backup supply. So, it can continue to maintain the time and date while device power is incorrect.
DS3231 RTC chip
The DS3231 chip is a low-cost accurate Real Time Clock IC with communication over I2C Interface. The DS3231 is 16 pin IC, Although it needs only 8 pins off the available 16 pins to function. The IC is operated on low power consumption when it operated on a battery then it consumes less than 500 nA power. It manages all timekeeping functions.
This Chip clock/calendar can provide seconds, minutes, hours, day, date, month, and year information. This IC clock operates in the format of either the 24-hour or 12-hour with AM/PM indicator. The end of the month date is automatically adjusted the months which has less than 31 days. It can corrections for leap years.
Temperature Compensated Crystal Oscillator(TCXO)
The DS3231 is driven by a 32kHz temperature compensated crystal oscillator (TCXO). It’s highly immune to external temperature changes. So the external temperature can not affect the oscillation frequency of this crystal.
Temperature Compensated Crystal Oscillator(TCXO) is packaged inside the RTC chip, making the whole package bulky.
Also a temperature sensor inside the IC package.
Which compensates the frequency changes by adding or removing clock ticks so that the timekeeping stays on track.
That’s the reason Temperature Compensated Crystal Oscillator provides a stable and accurate reference clock and maintains the RTC to within ±2 minutes per year accuracy.
24C32 EEPROM chip
RTC module also comes with a 32 bytes Atmel 24C32 EEPROM chip which having limited read-write cycles. It can be used to save settings or clock/calendar. It uses the I2C interface for communication and shares the same I2C bus as DS3231.
EEPROM I2C address set jumpers
We can be changed easily the EEPROM I2C address using the three A0, A1, and A2 solder jumpers. Each one of these is used to hardcode in the address and we can set the address by shorting the jumper in the proper way.
According to the 24C32 EEPROM chip’s datasheet, these 3 bits are placed at the end of the 7-bit I2C address, just before the Read/Write bit. These 3 address inputs can take 2 states, either HIGH/LOW. So, we can create 8 (23) different combinations(addresses).
The address set by shorting the jumper,
By default, all the 3 address inputs are pulled HIGH using onboard pullups, giving 24C32 a default I2C address of 1010111Binary or 0x57Hex.
Module Specifications and Features
|Range of Operating Voltage||3.3V – 5V|
|Typical voltage supply||5V|
|Maximum voltage at SDA, SCL||VCC + 0.3V|
|Operating temperature||-45ºC to +80ºC|
|Real Time lock chip||DS3231 I2C|
|EEPROM Chip||AT24C32 32K I2C EEPROM memory|
|Configurable I2C device Address for AT24C32||Using SMD jumpers on PCB (A0, A1, A2)|
|Battery type||LIR2032 rechargeable lithium battery|
|Digital temperature sensor accuracy||±3ºC|
|Clock Provide||Hour, Minutes, Seconds, AM/PM.|
|Calendar provides||Day, Date, Month, Year.|
|Accuracy||+2ppm to -2ppm for 0ºC to +40ºC , +3.5ppm to -3.5ppm for -40ºC to +85ºC|
|PCB Size||38mm (length) * 22mm (W) * 14mm (height)|
- To design real time clock.
- DIY projects.
- Robotics projects.
- Arduino projects.
- Raspberry-Pi projects.
- Electrical/Electronic projects.