RTC real time clock for the Pi
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

RTC real time clock for the Pi

by pennypacker on Sat Oct 06, 2012 4:20 am

I am trying to install the RTC module for the raspberry pi.

I think I have followed the instruction from adafruit correctly. I left off both resistors. Then, I hooked it up according to the pinout instructions and when I first booted, I was able to get the 68 in the little table by running i2cdetect to show that the system was recognizing it. However, by the time I went through the rest of the instructions, it was already not working, the system said something about not being able to access the hardware clock. so I ran i2cdetect again and it was not showing up. I tried rebooting, and saw it there again for a moment, then ran it again and it was gone. I have unhooked and rehooked everything into the gpio pins of the rapi with no luck. Now I can't get i2cdetect to recognize it at all. I am using the 5v pin on the rpi as I think the instructions say to do that (they are a little fuzzy in some places).

Any ideas? Has anyone had any trouble with these failing?
pennypacker
 
Posts: 4
Joined: Sat Oct 06, 2012 4:15 am

Re: RTC real time clock for the Pi

by MrZhi on Tue Oct 09, 2012 12:54 pm

I used the adafruit breakout for DS1307 with great success on my Pi. I also have the GPIO breakout board for the Pi as well, so that made it a lot more clear when connecting the pins. Honestly, if I had to guess, I would say that you need to check to see if the module is still loaded on your PI and check the physical connections again, or even post a picture of your setup for some extra clarity into your problem.
MrZhi
 
Posts: 4
Joined: Wed Sep 05, 2012 2:24 pm

Re: RTC real time clock for the Pi

by pennypacker on Thu Oct 11, 2012 2:09 am

What do you mean "check to see if the module is still loaded"?

I will try to post some pics tomorrow of my setup. I have checked and rechecked and I am pretty sure it is setup correctly. Especially since I am getting the 68 showing in the table off and on now. It will show for a bit, then after a few seconds I will run the i2cdetect again and it will be gone.
pennypacker
 
Posts: 4
Joined: Sat Oct 06, 2012 4:15 am

Re: RTC real time clock for the Pi

by pennypacker on Thu Nov 15, 2012 3:33 pm

After much trial and error, I finally discovered that my rtc was defective. I now have another and installation was a breeze. I have gone through the instructions provided on adafruit to install the real time clock on the raspberry pi. I can successfully push the time to the rtc from the system time using sudo hwclock -w I can also read the time off the rtc with sudo hwclock -r However, the last thing I am having difficulty with is getting the raspberry to automatically sync to the rtc on bootup. It continues to use the fake hwclock and seemingly ignores the rtc. I have tried lots of things included a rather complex set of instructions on a forum post at raspberrypi.org. None seem to work. After making changes, I have started from a fresh install each time to avoid confusion. This time, I have followed the tutorial exactly. I tried as is, and I also tried modifying it a bit and putting rtc-ds1307 rather than rtc-1307 into the modules file.

Has anyone here had success setting up the rtc from adafruit using the tutorial on the site? I am using the occidentalis 0.2 image. any more help would be much appreciated.
pennypacker
 
Posts: 4
Joined: Sat Oct 06, 2012 4:15 am

Re: RTC real time clock for the Pi

by pennypacker on Thu Nov 15, 2012 5:04 pm

SOLUTION!

After a month of on and off trying to get the rtc to work on the ra pi with occidentalis 0.2, I ended up following the instructions listed in the tutorial by adafruit and then adding "sudo hwclock -s" in the rc.local file right after the "echo ds1307..." statement. This seems to work fine. I'm sure there may be some issues if some programs load before that, but this is a good enough solution for me. Perhaps some more expert linuxers could elaborate on whether this is an ok solution or not... but all I know is that my ra pi is syncing time to the real time clock on boot.
pennypacker
 
Posts: 4
Joined: Sat Oct 06, 2012 4:15 am

Re: RTC real time clock for the Pi

by ekimrolyat on Fri Aug 28, 2015 9:00 pm

Re: anybody had success using the rtc 1307 tutorial? NO, no success. Have followed all the directions carefully and repeatedly and still hwclock will not find the 1307. i2cdetect finds the clock at 86 like it's supposed to. In addition, I have gone all over the Internet, tried dozens of different approaches, without success. Updated my distro (took almost 2 hours!). Updated raspi-config. Commented out the lines in blacklist.conf. Etc, lots of etc. Still no working realtime clock. At my wit's end. Ready to throw it away. Do I really need to buy another one to find out if this one is defective?

ekimrolyat
 
Posts: 1
Joined: Fri Aug 28, 2015 8:53 pm

Please be positive and constructive with your questions and comments.