Instructables

Clock ,RTC DS1307 SET AND SHOW THE TIME ON YOUR LCD.

Picture of Clock ,RTC DS1307  SET AND SHOW THE TIME ON YOUR LCD.
Based on my first Instructable.
Based on WWC SKETCH

Add Rtc(realtimeclock) to your Instructable .

Items
1 Arduino
1 Usb conector wire
1 RTC DS1307
1 Wires
1 Device to upload scetch.
1 time / DS1307RTC  libraries http://playground.arduino.cc/Code/time
 
Remove these adsRemove these ads by Signing Up

Step 1:

Picture of
conect rtc to arduino.

conect  SDA  to Arduino A4.
conect  SCL  to Arduino A5.
conect vcc to  +5v
conect gnd to gnd

Step 2: Conect lcd

LCD to Arduino
1 GND
2 +
3 center of potentiometer
4 pin 12 Arduino.
5 GND
6 Pin 11 Arduino
11 Pin 5 Arduino
12 Pin 4 Arduino
13 Pin 3 Arduino
14 Pin 2 Arduino
15 +
16 Gnd

Step 3: The set rtc sketch from member WWC. don't use this example where u change the time.

the serial input didn 't work for me so i ad the time to the sketch.
 
dont use this one . only for EXAMPLE where u have to enter the time .

// This set of codes is allows input of data
void setTime() {
  Serial.print("Please enter the current year, 00-99. - ");
  year = 13;
  Serial.println(year);
  Serial.print("Please enter the current month, 1-12. - ");
  month = 9;
  Serial.println(months[month-1]);
  Serial.print("Please enter the current day of the month, 1-31. - ");
  monthday = 20;
  Serial.println(monthday);
  Serial.println("Please enter the current day of the week, 1-7.");
  Serial.print("1 Sun | 2 Mon | 3 Tues | 4 Weds | 5 Thu | 6 Fri | 7 Sat - ");
  weekday = 6;
  Serial.println(days[weekday-1]);
  Serial.print("Please enter the current hour in 24hr format, 0-23. - ");
  hour = 13;
  Serial.println(hour);
  Serial.print("Please enter the current minute, 0-59. - ");
  minute = 51;
  Serial.println(minute);
  second = 15;
  Serial.println("The data has been entered.");
abadhe1 month ago

how to set alarm using same library on rtc arduino??or timed event?

plz helppp

nikhilbadhe112 months ago

Rtc again shows garbage values..i followed all steps..plz help.......

The current date and time is: 165, 20165 153:165 PM

Please change to newline ending the settings on the lower right of the Serial Monitor

Would you like to set the date and time now? Y/N

Please enter the current year, 00-99. - 14

Please enter the current month, 1-12. - September

Please enter the current day of the month, 1-31. - 17

Please enter the current day of the week, 1-7.

1 Sun | 2 Mon | 3 Tues | 4 Weds | 5 Thu | 6 Fri | 7 Sat - Wednesday

Please enter the current hour in 24hr format, 0-23. - 13

Please enter the current minute, 0-59. - 13

The data has been entered.

The current date and time is now: 165, 20165 153:165 PM

Thank you.

DSC_0275.JPGDSC_0274.JPG
citin (author) 2 months ago

@ nikhilbadhe11

conect it to 5 volt not to 3volt,

pherhaps it is broken? check your soldering , and take a look at this http://www.instructables.com/id/Setting-the-DS1307... they have the same trouble.

nikhilbadhe112 months ago

my rtc shows this garbage value time . 165/165/165 45:165:165

after setting it also shows same wrong time ..plz help me..

citin (author) 3 months ago

dear ash124.

step 3 is only an exemple there´s a bug in it. iwalked around it by entering the time at the big letters year,month,monthday.weekday,hour,minute direct in the skript. than i uploadet it. you have to take step 4 enter your time like shown in step 3 and upload it.

ash1243 months ago

Hi!

I am facing the same problem as stuartsjg faced ...i-e when i pressed "Y" i got the message of thank you in the serial monitor ,and during this action i had disabled the newline ,still i got the same problem it looks like that the program is not jumping to the setTime() loop... here is the picture of serial monitor..plz help me out in this

oops.png
Oliverhall8 months ago

Nice tutorial. Very helpful!

They sell the DS1307 on this webstore: http://voltatek.com/en/sensors/34-i2c-rtc-ds1307-a...

citin (author)  Oliverhall8 months ago
thx they sell it to http://www.amazon.de/s/?ie=UTF8&keywords=rtc+ds1307&tag=googhydr08-21&index=aps&hvadid=28697841386&hvpos=1t1&hvexid=&hvnetw=g&hvrand=17162271407903030750&hvpone=&hvptwo=&hvqmt=b&hvdev=t&ref=pd_sl_4rfh8wen50_b