0

real time clock Question
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.

real time clock Question

by rick_sroka on Sat Jan 19, 2019 9:12 pm

I looking for some advice. I need a unit that won’t lose time , but I would like it to plug into the raspberry pi

rick_sroka
 
Posts: 12
Joined: Thu Nov 12, 2015 3:54 pm

Re: real time clock Question

by adafruit_support_mike on Sun Jan 20, 2019 2:06 am

RTCs come in different grades.

The simplest ones are software based, and usually aren't accurate for timekeeping to less than +/-5%.

The next step up are simple crystal-based timers like the DS1307 and PCF8523:

https://www.adafruit.com/product/3296
https://www.adafruit.com/product/3386

Crystal oscillators are stable to about +/-30ppm, so they provide a useful timebase for measuring events that last up to a few hours. They still aren't great for actual timekeeping, because they can drift a couple of seconds per day.

The next step up from those are temperature-compensated crystal oscillators like the DS3231:

https://www.adafruit.com/product/3013

Those are good enough for actual timekeeping, and are accurate to within a few seconds per year.

There are even better crystal oscillators than that, and once you hit the limits of crystal oscillators you get into atomic clocks like rubidium time standards and the atomic clock system. There are actually a few of those designs that are small enough to eventually work as consumer products, but nothing is on the market yet.

You can tap into the atomic clock system with a GPS module though. The GPS satellites sync to the atomic clock system periodically, and by specification, the beginning of any two GPS seconds are within 20ns of an integer number of seconds, no matter how much delay is between them:

https://www.adafruit.com/product/746

Many people use GPS modules and the NTP system to make stratum-1 local time servers.. stratum-0 is the global array of synchronized atomic clocks themselves, stratum-1 are clocks that sync to stratum-1 sources, stratum-2 are clocks that sync to stratum-1 sources, etc.

All of the versions listed above will work with a RasPi, and all of them operate from a coin cell while the RasPi is powered down.

adafruit_support_mike
 
Posts: 56406
Joined: Thu Feb 11, 2010 2:51 pm

Re: real time clock Question

by rick_sroka on Sun Jan 20, 2019 8:48 am

Thanks mike .

rick_sroka
 
Posts: 12
Joined: Thu Nov 12, 2015 3:54 pm

Please be positive and constructive with your questions and comments.