RTC Ds1307 Arduino Based Alarm System

16,282

25

20

The hardware is the standard setup and is as follows.

DS1307 IC x1.

32MHz crystal x1.

3v battery for backup supply x1.

0.1uf capacitor x1.

Arduino Uno x1.

Jumper wires

Speaker x1

Step 1: Making an Arduino Prototype Board

Step 2: Making DS1307 Circuit

Step 3: Assembling Arduino, LCD and DS1307 :)

Step 4: Code

First compile and upload the code inside rtc_code 1.txt file. After uploading, compile and burn the second code inside LCD rtc_code.txt file.
Note the LCD pin configuration in the code. I have changed the default settings. You can change it by yourself

Step 5: Final Working Hardware

Share

    Recommendations

    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Sensors Contest

      Sensors Contest

    20 Discussions

    0
    None
    me_zainShaheenM4

    Reply 1 year ago

    https://github.com/adafruit/RTClib

    0
    None
    MohamedE146ShaheenM4

    Reply 1 year ago

    you can download it from Github:

    https://github.com/adafruit/RTClib

    0
    None
    JonathanC25

    2 years ago

    Hi, How do you make it work only for particular days of the week... I've tried and failed.

    1 reply
    0
    None
    JonathanC25JonathanC25

    Reply 2 years ago

    I've Tried

    if (now.day()=="Tuesday" && now.hour()==14 && now.minute()>=13 && now.second()<=34 )

    0
    None
    crixus_markus

    3 years ago

    Great work sir..

    sir, do you know how to set an alarm using push button??

    0
    None
    me_zainArpitPatel

    Reply 4 years ago on Introduction

    check your LCD data pins and compare them with the code. I also got such outputs but after lil troubleshooting LCD started working.

    0
    None
    ArpitPatelme_zain

    Reply 4 years ago on Introduction

    Ok dear.. Will try but you have mentioned that first compile and upload the code inside rtc_code 1.txt file and than after compile and burn the second code inside LCD rtc_code.txt file. So, what is the need of compile first code i.e. rtc_code 1.txt.??

    0
    None
    me_zainArpitPatel

    Reply 4 years ago on Introduction

    When you upload the first code i.e. rtc_code 1.txt in the arduino, it will start communicating with the RTC ds1307 chip(means your current time will start running inside the chip). In order to display this time on the LCD upload the 2nd file named LCD rtc_code.txt to arduino.

    0
    None
    ArpitPatelme_zain

    Reply 4 years ago on Introduction

    Thanks a lot for explain. I am electronics students and in learning stage in Arduino. I am making college alarm. Here i am attaching my project pic which is having problems in output. As you said i have tried all the possible ways to troubleshoot LCD output but i can't succeed in that. First i run code 1 to start communication and after that i run code 2 for LCD and all the ways of operation attached herewith in which LCD shows weird output. Please help...

    Code 1 Output.JPGCode 1.JPGCode 2 Diagram.JPGCode 2 Output.JPGDSC_0861.JPG
    0
    None
    me_zainArpitPatel

    Reply 4 years ago on Introduction

    you are doing everything right..

    Just change the pin config of lcd on hardware as

    LCD RS pin to digital pin 12
    LCD Enable pin to digital pin 11

    LCD D4 pin to digital pin 2
    LCD D5 pin to digital pin 3
    LCD D6 pin to digital pin 4
    LCD D7 pin to digital pin 5

    i am sorry i should have mentioned that clearly.

    0
    None
    ArpitPatelme_zain

    Reply 4 years ago on Introduction

    Thanks a lot dear... Finally it is done... Very cool and clear output with very good representation. One more correction is you have shown pin 13 for alarm in your circuit diagram and you have mentioned pin 8 in your program. So there are some mismatching but overall its good idea and very good project. Very appreciable...


    0
    None
    me_zainArpitPatel

    Reply 4 years ago on Introduction

    That is great :D Good JOB :) Happy to hear that...

    Oh yes you are right. Actually i posted the circuit diagrams first and then during troubleshooting i changed the pins in the code and upload them. Thanks for pointing that all mistakes. I will update them soon :D

    0
    None
    ArpitPatel

    4 years ago on Introduction

    Thanks for sharing...

    I tried this project but LCD shows weird output.

    0
    None
    me_zain

    4 years ago on Introduction

    Hi everyone! I am new on instructable, this is my first upload. If anybody wants to learn or ask anything about this project please make your comments i will try my best to make you understand :)

    2 replies
    0
    None
    seamsterme_zain

    Reply 4 years ago on Introduction

    Nice first project! Thanks for sharing it.

    The only tip I'd give is to only use all original photos, taken by you. Projects will be much more likely to get featured to the home page that way. :)

    Keep up the good work!