Introduction: DS1302 Clock With a 2.4 TFT LCD

Hello there!

Today i will show you how to make a simple clock with a RTC and a TFT LCD for Arduino.

Simple project for beginners, it can be assembled and set up for less than 30 minutes.

Step 1: Another Clock

A few months ago i decided to make myself a simple clock with this 2.4 inch LCD.

I am using it in the living room and it is a good night light. It prevents me from kicking in to the furniture by accident; and mom likes it too :)

This RTC module is relatively inexpensive and very easy to use with Arduino. It is not like the ones that uses the I2C protocol(DS3231, 1307) .

DS1302:

The module has 5 pins: VCC, Ground, RST, CLK, DAT The 3 pins can be connected to any digital pin of arduino.

The biggest advantage of the rtc is that it is not using the I2C(SCL,SDA) BUS.

The biggest disadvantage: The rtc chip is not heat compensated. What does it mean?? It means that the temperature most likely has an effect on the time drift. On room temperature the time drift was 2-4 minutes per month. Therefore we can not say this is a precise rtc.

This TFT LCD most commonly needs the A4 pin for RESET, and i have been trying to tweak this feature (A4 to reset pin) to use a DS3231 module. By so far i could not make it work, but i am still searching for a solution.

Step 2: Materials and Sketch

The parts needed for this project:

-Arduino Uno (Mega etc...)

-DS1302 RTC

-2.4 TFT LCD

-some jumper wires

-Arduino IDE, sketch, libraries and a little free time

Step 3: Connections

It is a very simple setup. Connect the LCD to Arduino. I soldered the pins the opposite way on arduino, so the rtc is connected on the backside of the board.

VCC: 3.3 or 5 volts

Ground: Ground

RST: Digital 10

DAT: Digital 11

CLK: Digital 12

Step 4: Finished

After connecting the parts upload the sketch to the board and you are done.

In the sketch you can easily set the time to the module.

//rtc.setDOW(FRIDAY);

//rtc.setTime(17, 15, 00);

//rtc.setDate(15, 3, 2018);

Firts uncomment the lines, then set the correct time, day and date.

Upload it, comment the lines again and upload.

That's it! Time is set and ready to go.

Step 5: Done!

You are done!

Use it as you like.

Have a nice day!