DS3231 RTC Module with Arduino Leave a comment

About DS3231 RTC Module:

It is a precise I2C based Real-Time Clock module which is integrated with a temperature compensated crystal oscillator(TCXO) and a crystal. An onboard battery is present on the module to maintain accurate timekeeping when the main power of the module is interrupted. It also consists of 32KbEEPROM and a 10-bit temperature which has a resolution of 0.25 degree Celsius.

Pinout of DS3231 RTC Module

Features of DS3231 RTC Module:

  • Operating voltage: 2.3-5.5 volt
  • Time Format: HH:MM:SS
  • Date Format: YY-MM-DD
  • Low power consumption
  • On-board battery backup

Components Needed fr this Project:

  • Arduino UNO
  • DS3231 RTC Module
  • Jumper wires 
  • Coin Cell

Pin Connection of DS3231 RTC Module with Arduino

  • VCC-5v
  • CLK/SCL-A5
  • DAT/SDA-A4

Circuit Diagram of DS3231 RTC Module with Arduino

Arduino Code for DS3231 RTC Module

#include "DS3231.h"
DS3231  rtc(SDA, SCL);
void setup()
 //uncomment bellow code to set dat, day and time 
void loop() { 
 Serial.print("Time:  ");
 Serial.print("Date: ");

Download DS3231 Library from: www.rinkydinkelectronics.com

Replace #include “DS3231.h” with #include <DS3231.h>

Leave a Reply