Clock Oscillator / Xtal - What is realistic for the highest precision RTC?? - Page 1
Forum section: electronics / general

author: aurmer
author_rank: Regular Contributor
timestamp: September 22, 2016, 10:12:59 pm
content: I am stumped. I am trying to make as tight a clock spec as I can with my PIC24F. I am trying to select an external oscillator with a stability range as small as possible, but the spec sheets aren't clear. Here is an example.This partis labeled at 5 PPM. But the Spec Sheet (mysteriously absent) and Description say "5+/-23ppm" stability.Another example is theASTMTXK-32.768kHz-LG-T. This also quotes 5 PPM on the front, but thedatasheetsays "5ppm without initial offset" and "10ppm with initial offset" (footnote reads: "Initial offset is defined as the frequency deviation from the ideal 32.768kHz at room temperature, past reflow").So I come to you, hat in hand, to ask these questions.-What is the best "ppm" spec that i can get for $10 or less? $20? I couldn't find anything at 32KiHz which claimed better than 5ppm.-Can I use a 10MHz 1ppm oscillator as a source for my RTCC? I assume not because I haven't found anyone talk about it.-How do I wade through the "5ppm...but not really" junk?

author: helius
author_rank: Super Contributor
timestamp: September 22, 2016, 10:16:03 pm
content: Depending on your requirements for manufacturability, etc, you may get better stability from crystals by not soldering them, but relying on press-fit or conductive epoxy bonds. The high temperature experienced during soldering is a major cause of stress for crystals.You can make your own press-fit leads by forming them into a kinked shape with pliers. But to prevent fretting corrosion it would be smart to use a drop of Deoxit S100 or similar contact protectant.Edit: and of course I forgot the most obvious and common approach which is using a socket.

author: aurmer
author_rank: Regular Contributor
timestamp: September 23, 2016, 01:29:16 am
content: I didn't even consider the heat during soldering to be an issue. This will be a hand-soldered device in (low volume) production. Meant for students to learn soldering techniques along with other embedded concepts/skills.I will look into it, thank you.

author: XFDDesign
author_rank: Frequent Contributor
timestamp: September 23, 2016, 04:25:42 pm
content: Given that no datasheet is available on the Epson part, I'd skip that outright.So lets go with Abracon for my discussion.What does it mean by "without initial offset"? It means that when you 'zero' your value to subtract out the initial offset, you have ±5ppm (±163.84mHz) uncertainty over temperature. So at 85C, you might be at 32.76783kHz or 32.76816kHz.With initial offset, then means an uncertainty of actual value when you put the part down. Suppose the crystal was 'well known' to have a 0ppm error at 25C for stability. Its initial offset is then ±5ppm. At room temp, it will be some value between 32.76783kHz to 32.76816kHz.Then as well, over temperature on the real device, if you don't "tune" it to 32.7680000000000000kHz at room temp, your absolute uncertainty is ±327.68mHz.Now, if you had anincrediblystable and reliable source clock, you could actually develop a profile of the crystal. You could adjust it down to 32.768000000kHz (or close enough to it), and then sweep it over temperature. Measuring each step point, you could build a profile to have reasonable knowledge on where it sits at a given temperature. From this, you could sometimes compensate it.But then you need to factor in aging. Even with your profile, you will obtain drift in time.What exactly are you doing that needs <1ppm precision?

author: 22swg
author_rank: Frequent Contributor
timestamp: September 23, 2016, 06:08:33 pm
content: PIC24F RTCC has a calibration register for secondary osc not sure how you would achieve this ....When properly calibrated,the RTCC can provide an error of less than 3 secondsper month. This is accomplished by finding the numberof error clock pulses and storing the value into thelower half of the RCFGCAL register. The 8-bit signedvalue, loaded into the lower half of RCFGCAL, is multipliedby four and will be either added or subtracted fromthe RTCC timer, once every minute.

author: aurmer
author_rank: Regular Contributor
timestamp: September 24, 2016, 02:57:09 am
content: Quote from: XFDDesign on September 23, 2016, 04:25:42 pmWell this is an academic assignment from my professor. My device will maintain an accurate time, and the professor's words were, "I have a $8 digital clock from Walmart. For 5 years, I have never had to correct the time. Cheap, accurate clocks are possible, and I want you to find out how to make one."My research has shown that hisanecdotal"evidence" is a false hope, but I am just trying to be thorough. I am pretty sure that for $10, we will be at best around 5ppm stability. I imagine that if I was missing some standard practice for higher precision, this community would be able to point me in the right direction.

author: jmsigler
author_rank: Regular Contributor
timestamp: September 24, 2016, 02:59:22 am
content: Quote from: zetharx on September 24, 2016, 02:57:09 amYou could possibly incorporate a WWVB receiver into the design, which could sync the clock with atomic time standards.

author: kwass
author_rank: Frequent Contributor
timestamp: September 24, 2016, 07:35:00 am
content: I make small, accurate alarm clocks by using cheap 32KHz crystals (typically 30ppm) and trimming them with a tiny variable cap. These are used as the primary oscillator in a AVR, PIC or similar chip (I really like the old Parallax SX chip the best). Since it's designed to be an alarm clock I assume that it will be used at room temperature and so doens't need temperature compensation. After construction (I let them stabilize for a while then tweak the cap to read 1.00000000 pps out of a special pin (you don't want to probe the oscillator pins). I've found that I get better than 30 seconds per year accuracy for several years in a row.I'll bet that the $8 Walmart clock is made the same way.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: September 24, 2016, 07:53:25 am
content: You will get maximum accuracy if you add a gps receiver. This can now be done below 10 $.You should also be cautious about your professor affirmation. He probably never precisely measured the time offset. Nevertheless it is a good assignement.

author: tggzzz
author_rank: Super Contributor
timestamp: September 24, 2016, 08:01:45 am
content: Quote from: zetharx on September 24, 2016, 02:57:09 amIt is useful that you quote the context, since in general that enables more pointed answers.However, I'll merely note that is a good question and assignment: answering it will cause you to investigate many technical and non-technical aspects to the problem. Your answers will reveal a lot about your engineering skills: how widely you have thought about the problem plus how well you have understood what you have discovered.

author: westfw
author_rank: Super Contributor
timestamp: September 25, 2016, 10:37:18 am
content: Cheap accurate clocksthatuse the ac timing of his the ac line cab achieve phenomenal accuracy, because the ac line is not only very accurate, but also corrections are sent out to fix it later.

author: SL4P
author_rank: Super Contributor
timestamp: September 25, 2016, 11:02:31 am
content: If you read the datasheet for the DS323x RTC chips, they gave quite an interesting description of the TCXO methodolgy used in those clocks.They explain the basic compensation methods, and of course allowing the crystal to stabilise after first power on (warm up).

author: XFDDesign
author_rank: Frequent Contributor
timestamp: September 27, 2016, 12:43:33 pm
content: Ok so model the assignment into a problem."Never had to adjust it in 5 years."This means:1. It has always been within ±1 minute of error (just slightly less than).2. In 5 years, how many minutes are there? 5years * 365 days/yr * 24 hrs/day * 60min/hr = 2.628*10^6 minutes.3. Error tolerance is then ±1/2628000 or ±380ppb.What goes into affecting a crystal clock's frequency?- Time- TemperatureFor $8, it's doubtful its a TCXO. It's unlikely to be GPS. What it is, is a statistically insufficient sample size. On a sample size of 1...- Did he just get a golden unit, where every parameter fell into place just right to exhibit minimum effects? (Out of millions of units, a few being better than others isn't unlikely)- Was his home kept at a constant temperature?- Maybe the design disregarded power consumption and ovenized the crystal?- Has he never moved it?But as well...They could have been cheap sons-of-bitches, and simply incorporated power-line IEEE 1588 into the thing. (https://en.wikipedia.org/wiki/Precision_Time_Protocol) or just leveraged the power-line's 60Hz as someone else has said.

author: CJay
author_rank: Super Contributor
timestamp: September 27, 2016, 12:49:02 pm
content: Quote from: jmsigler on September 24, 2016, 02:59:22 amMy thoughts almost exactly, I in the UK and have a couple of MSF radio clocks that came from a retailer called Argos, they're exactly in sync with each other and also with pretty much any 'accurate' time I can find, the only time they've lost time is when I've reset or changed the batteries.They cost £4.99 each, roughly eight dollars.I'd be investigating simple WWVB receiver circuits and software decoding.

author: dannyf
author_rank: Super Contributor
timestamp: September 27, 2016, 02:05:48 pm
content: "-Can I use a 10MHz 1ppm oscillator as a source for my RTCC?"Yes and better yet you can run your entire chip off of that oscillator and keep time via the isr there.The value of mist rtc implementation is its separate power domain so it runs without vcc to the chip itself -vbat is all it needs. Some exceptions here.So if that's not important, run your chip off of that oscillator.