Arduino uno Real time clock RTC

The Arduino Uno Real Time Clock (RTC) module keeps track of the current time and date even when the Arduino Uno board is powered off. It is used in timekeeping applications, data logging, and systems that require accurate time information.

Arduino Uno Real Time Clock

This project utilizes an Arduino Uno and the DS3231 Real Time Clock (RTC) module to accurately keep track of date and time.

The DS3231 module communicates with the Arduino via I2C protocol to provide precise timekeeping capabilities.

Components Needed

  • Arduino UNO
  • DS3231 RTC Module
  • Jumper Wires
  • Breadboard

Block Diagram

Hardware Wiring Explanation:

Connect DS3231 RTC Module to Arduino Uno:

Connect the SDA pin of the DS3231 module to Arduino's A4 pin.

Connect the SCL pin of the DS3231 module to Arduino's A5 pin.

Connect VCC and GND of the DS3231 module to +5V and GND on the Arduino, respectively.

Wire up the DS3231 RTC module to the Arduino Uno as per the circuit setup section.

Software (Arduino IDE):

Open the Arduino IDE and create a new sketch.

Copy and paste the provided Arduino code into the sketch.

Upload the code to the Arduino Uno.

Project Operation:

Open the serial monitor with a baud rate of 9600.

Observe the current date and time printed on the Serial Monitor, which updates every second.

Applications

Notes

Ensure the DS3231 module is correctly wired to the Arduino and powered.

The RTC maintains accurate time even when the Arduino is powered off, thanks to its backup battery.

Customize the code to add alarm functionalities or adjust time formats as needed.