Components Required:
To design Arduino & DS3231 Based Real Time Clock (RTC) & Temperature Monitor, we need the following components.
- Arduino board
- DS3231 RTC Module
- 16 x 2 LCD
- 3V coin cell battery
- Breadboard
- Jumper wires
DS3231 RTC Module:
Introduction:
The DS3231 is a low-cost, extremely accurate I²C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input and maintains accurate timekeeping when main power to the device is interrupted.
The RTC maintains seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an active-low AM/PM indicator. Two programmable time-of-day alarms and a programmable square-wave output are provided.
A precision temperature-compensated voltage reference and comparator circuit monitors the status of VCC to detect power failures, to provide a reset output, and to automatically switch to the backup supply when necessary. Additionally, the active-low RST pin is monitored as a pushbutton input for generating a µP reset.
Key Features:
- Highly Accurate RTC Completely Manages All Timekeeping Functions
- Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month,
Day of the Week, and Year, with Leap-Year Compensation Valid Up to 2100 - Accuracy ±2ppm from 0°C to +40°C
- Accuracy ±3.5ppm from -40°C to +85°C
- Digital Temp Sensor Output: ±3°C Accuracy
- Register for Aging Trim
- Active-Low RST Output/Pushbutton Reset Debounce Input
- Two Time-of-Day Alarms
- Programmable Square-Wave Output Signal
- Simple Serial Interface Connects to Most Microcontrollers
- Fast (400kHz) I2C Interface
- Battery-Backup Input for Continuous Timekeeping
- Low Power Operation Extends Battery-Backup Run Time
- 3.3V Operation
- Operating Temperature Ranges: Commercial (0°C to +70°C) and Industrial (-40°C to +85°C)
- Underwriters Laboratories® (UL) Recognized
Circuit Diagram:
Connect SDA and SCL pins of DS3231 with SDA & SCL pin, i.e A4 & A5 of Arduino.
To connect LCD: Connect Pin 12, 11, 5, 4, 3, 2 of Arduino with Pin 4, 6, 11, 12, 13, 14 of LCD.
Working:
To make this project work first add the library for DS3231 which is given below. After that upload the code. Once the code is uploaded the project starts working.
On the first row, Real-Time Clock will be displayed. But on the 2nd-row date, time day and temperature will be displayed each after the interval of 3 seconds.