RTC real time clock for the Pi

Talk about Adafruit Raspberry Pi® accessories!

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/

RTC real time clock for the Pi

Postby pennypacker » Sat Oct 06, 2012 3: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 3:15 am

Re: RTC real time clock for the Pi

Postby MrZhi » Tue Oct 09, 2012 11:54 am

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 1:24 pm

Re: RTC real time clock for the Pi

Postby pennypacker » Thu Oct 11, 2012 1: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 3:15 am

Re: RTC real time clock for the Pi

Postby pennypacker » Thu Nov 15, 2012 2: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 3:15 am

Re: RTC real time clock for the Pi

Postby pennypacker » Thu Nov 15, 2012 4: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 3:15 am


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [100]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[108]
 
Wireless[14]
Cables[60]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[69]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]