Skip to content

Simple Arduino based Alarm Clock with DS1302 RTC

                   Hello everyone, in this project we’ll try to make an easy alarm clock with Arduino UNO board, this project is a mix of different modules that I used before, if you’re stuck on something you can check in the website for the module tutorial, because that’s how I usually work: Do things separately and then start mixing :D.

For this project we will need:

Arduino UNO Board, or you can use what suits you:



DS1302 RTC module:

DS1302 RTC module

4*4 Matrix Keypad module:

4x4 matrix keypad

LCD i2c screen:

lcd i2c


Buzzer module, or the 2 pins buzzer:



In case you’re stuck on something you can check these previous tutorials about the modules above:

How to setup DS1302 RTC module with Keypad + Arduino + LCD

How to simply use DS1302 RTC module with Arduino board and LCD screen

Arduino LCD I2C simple use and direct write from serial monitorArduino LCD I2C simple use and direct write from serial monitor

Arduino uno + 4×4 Keypad Matrix + LCD i2c screen

How to use a buzzer/piezo speaker with Arduino





Libraries and Code:

LCD i2c library You can chose this or download your own

Keypad library Or you can download it from Arduino IDE

RTC DS1302 virtuabotix library

Code: RTC_alarm_clock.ino (Major changes were made 12/04/18)

              Code functionning is pretty simple, after wiring the module you can press “*” to set the time and date on the DS1302 RTC, the display will show then the current day and time if you want to set the alarm you press “A” and you can set which hour and minute, and you can deactivate it by pressing “B” before time or pressing any button while ringing.

I hope you like it, any problem you can contact me.

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

4 thoughts on “Simple Arduino based Alarm Clock with DS1302 RTC Leave a comment

  1. Hi, very interesting project, I’m beginner in this field. Could you tell me please, is it a lot to change the RTC module for another one (1307 or 3231)?

Leave a Reply

%d bloggers like this: