Arduino Alarm Clock with DS1302 RTC Module

Arduino 24-02-26
22 0

Tutorial plan

1- Objective of the project

2- Required Components

3- Circuit Connections of system

4- Arduino Alarm Clock program

 

Objective of the project

The objective of this project is to build a digital alarm clock using an Arduino, a DS1302 Real Time Clock (RTC) module, an I2C LCD display, and a buzzer. The system displays the current time in real time on the LCD and allows a predefined alarm time, such as 07:00:00, to be set in the program. When the alarm time is reached, the system alerts the user by displaying a warning message on the screen and activating the buzzer. This project demonstrates how to use an RTC module for accurate timekeeping and how to create a practical and interactive embedded system.

The functioning of the system is based on the Arduino continuously reading the current time from the DS1302 RTC module and displaying it on the LCD I2C screen. The Arduino compares the current time with the preset alarm time stored in the program. When both times match, the buzzer is activated and the LCD displays the message "Alarm 07:00 !!!" to notify the user. The RTC module ensures accurate timekeeping even when the main power is off, thanks to its backup battery, and the system continues to monitor and display the time continuously.

 

Required Components

1. Arduino UNO

Arduino Uno

The Arduino Uno is the main controller of the system. It reads the current time from the RTC module, compares it with the preset alarm time, controls the LCD display, and activates the buzzer when the alarm time is reached. It acts as the brain of the entire alarm clock system.

2. DS1302 RTC Module

The Maxim Integrated DS1302 RTC (Real-Time Clock) module is used to keep track of the current time and date. It can store seconds, minutes, hours, day, month, and year. The module has a backup battery, which allows it to continue keeping time even when the Arduino is turned off. This ensures accurate and continuous timekeeping.

3. Buzzer

The buzzer is an output device that produces sound when the alarm time is reached. It alerts the user with an audible signal to indicate that the preset alarm time has occurred.

4. LCD Display with I2C Module

The LCD display shows the current time and the alarm message.

5. Jumper Wires

Jumper wires

Jumper wires are used to connect the Arduino, RTC module, and LCD display together. They allow electrical signals and power to flow between the components.

6. Breadboard

plaque d'essai

The breadboard is used to assemble the circuit without soldering. It allows easy connection of components and wires for prototyping.

 

Circuit Connections of system

 

1- Connection of DS1302 RTC Module to Arduino UNO

DS1302 RTC Arduino UNO
CLK pin 5
DAT pin 6
RST pin 7
VCC 5V
GND GND

 

2- Connection of LCD I2C display to Arduino UNO

LCD display Arduino UNO
VCC 5V
GND GND
SDA pin A4
SCL pin A5

 

3- Conneciton of Buzzer to Arduino UNO

Buzzer Arduino UNO
Pin + Pin 2
Pin - GND

 

 

Arduino Alarm Clock program

This Arduino program implements a digital alarm clock using a DS1302 Real Time Clock (RTC) module, an I2C LCD display, and a buzzer.

You need to install this libraries :

LiquidCrystal_I2C for I2C LCD screen

ErriezDS1302-master for DS1302 RTC module

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by Mohamed Ali Haj Salah - Teacher info