Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

XTAL frequency accuracy

Status
Not open for further replies.

RetiredHAL

New Member
Hi, I would like to know which would be the more accurate timekeeper.
I wish to make a clock using (well "almost" discrete) components using 4xxx cmos IC's .
I have looked at Oliverb's clock and would like to do something similar.
I would also like to incorporate a "failsafe" battery back up to keep the clock running and include a good am/fm wake up radio ic .
Yes i can buy all that for $90 , but that is not the point.

My first question is -- which is the more accurate , a 10Mhz Xtal at 30ppm error or a Tuning fork Xtal (32.768Khz) at 20ppm accuracy over a 6months or a year. I have tried to do the maths but unfortunately my math skills have deserted me to come to a definitive answer
 
20ppm is better than 30ppm. But if you intend using 'almost-discrete' logic I'd suggest you go for the 32kKz xtal anyway, since the frequency division will be much simpler.
 
Hello there,


I ran across some really accurate oscillators made specifically for real time clocks a while back when i found out that crystal oscillators drift a little too much for my clock tests. These oscillators are made just for clock time keeping, and have a temperature compensated internal oscillator. The accuracy over a year's time is amazing. I'd have to look up the chip numbers again though but you could do a quick search for "real time clock oscillator" or something like that. I dont think you can get any better than that unless you use an atomic clock synchronizer chip which receives signals from a radio station (depending where you live) and you adjust the time using those signals, but that requires a micro controller to interpret the received data.
 
https://www.electro-tech-online.com/custompdfs/2013/05/0900766b80f5a087.pdf

I have used this temp compensated real time clock chip in the past. It can be programmed to generate a compensated 1Hz pulse.

It needs a micro/PC to configure it, but once configured and stored to it's internal EEPROM configuration it can be put in a circuit and used without a micro or PC. The EEPROM settings are permanent unless changed. It does require a bit of knowledge on programming over SPI, but can be done with a PC using a printer port (if you can find one these days).

I used an 8051 development board to pre-program these devices for a short run for manufacturing.

The rest of the clock implemtation using logic is pretty straight forward.
 
I have some Dallas semi 32.768 kHz TCXO chips, they make <2 PPM year round straight out of the box. 1 PPM error is about 30 seconds error/year.

You can get a lot of SMD TCXO devices now for $5 to $10 price range.

Low freq xtals have less ageing that higher freq.

If you check out some of the code samples here;
https://romanblack.com/one_sec.htm

They show how to make perfect second timing from any value xtal, and using one constant number, so you can tweak that number as you like to "trim out" the xtal PPM error.

Also, since you are in Australia you can just use the 50Hz AC mains timing, it is known to be extremely accurate for long term accuracy, I thinkt he big power stations lock to an atomic clock reference.

There are some "mains clock" tests and ideas on this page;
https://romanblack.com/onesec/High_Acc_Timing.htm
:)
 
Thank you for your replies. I have done part one (to prove the cct) I have a 2 Hz pulse from a 32.768 Khz Tuning Fork Xtal connected to a 4060 ic. The Xtal output is almost a perfect sine wave and starts on its own. My ultimate aim is to mount all the circuitry behind clear plexiglass and show all the "guts". As for accuracy I will try to use a lm355z or similar to create an oven effect by placing a resistor on either side of the Xtal. just like a wristwatch on your skin. ( I haven't figured that out exactly yet) . I know I can buy a very accurate oven controlled xtal. I enclose a photo of my completed 2HZ clock tick workings. NB the LED is there as a visual to show my 2 tick/sec counter is working when I start on the counters.
@Mr RB Yes, our (Australia) 50 Hz is very accurate but I live in the country and I have infrequent power outages. Just enough to always have an analogue alarm clock if you really need to wake at a certain time. My next step is the oven control part to give accuracy its best shot with these components.
IMG_4454reduced.jpg
 
Without an accurate freq reference to adjust the setting you will likely have several minutes of drift every few months. PCB stray capacitance in your layout must be taken into account and adjusted out to get crystal oscillator on correct frequency.

+/- 20 ppm is +/- 20 seconds for every million seconds, or +/- 20 seconds every 277.8 hours, or +/- 20 seconds every 11.57 days. The +/- 20 ppm pertain to manufacturing tolerance of the crystal if the crystal is loaded with its design capacitance externally by your circuit. There is also temp drift and aging drift over time.

The attached 32.768 crystal spec's +/- 20 ppm initial freq accuracy if circuit loads it with 12.5 pF and it is at 25 degs C. At 40 degs C it will drop in freq from initial 25 deg setting by almost another 10 ppm.

You are likely dealing with a parallel resonate mode crystal which spec's it initial frequency accuracy to some number, +/-, based on having the crystal's design reference load capacitance. The reference capacitance from the enbedded circuit may be 10 to 32 pF depending on crystal.

High quality wrist watch manufacturers set their initial freq adjustment with the watch warmed to about 85 degs F to better represent the temp of the watch on your arm.

If you really want very high accuracy there are GPS modules relatively cheap that provide 1 pps output with a long term accuracy of better then 1 part per billion (assuming you keep GPS reception).
 

Attachments

  • 32 khz Xtal spec.pdf
    756.2 KB · Views: 361
Mr RB I tried your cct for the oven effect but I could not get it to work, Where I live I could only get a 4.7K thermistor. I shall order a 100k thermistor and see if I can get a working cct with that. I found I could get another cct to work but there are too many components. So Ill do some more homework and brush up on transistor biassing.

RcinFLA, thank you for showing the error calculations. I had derived at the same figures , but I wasn't sure I was right. Ofcourse I would like a very accurate clock but I do not mind if it is not accurate to GPS standards.
I will construct the clock and set the clock by the computer internet clock. I will note the delta time in a month's time and adjust the counter to add or subtract clock ticks after an epoch event (such as a day or week) That should give a reasonably accurate clock.
 
hi Hal,
I agree with RCinFLA, even though the xtal is at a fairly constant oven temperature it will still be subject to long term drift as will the supporting components.

All the oven does is is to keep the xtal at a steady temperature which is higher than the highest expected ambient temperature and so avoids the change in xtal frequency due to changes in ambient temperature.

With regard to any software program claiming to make a xtal PIC clock super accurate, that is only effective if the xtal remains on a precise frequency.

Also presetting the xtal frequency at a precise frequency for long term time keeping is not easy.

I would go for a simple GPS unit for accurate time keeping.

I was building and using xtal ovens for equipment back in the 1970's.

E.
 
Hi Eric
hi Hal,

I agree with RCinFLA, even though the xtal is at a fairly constant oven temperature it will still be subject to long term drift as will the supporting components.

>>Yes and I may have to manually reset the clock to Internet time if the error gets too much.

All the oven does is is to keep the xtal at a steady temperature which is higher than the highest expected ambient temperature and so avoids the change in xtal frequency due to changes in ambient temperature.

>>But if I understand correctly, it will probably run fairly true to its frequency with a constant error. The constant error should be able to be averaged and adjusted with a adding or subtracting ticks with a resettable input to a cmos 4029 (this may require a bit of hokey pokey with anding or norring but should be doable) once a time error is established and quantified.

With regard to any software program claiming to make a xtal PIC clock super accurate, that is only effective if the xtal remains on a precise frequency.

>>Not applicable, I have never used a pic.

Also presetting the xtal frequency at a precise frequency for long term time keeping is not easy.

>>I do not think that bending/tuning the frequency of a TF xtal is an easy option so I think it is easier to work with the natural frequency of the xtal (whatever it is with its inherent errors in the oven) and use the 4029 presets to adjust the actual “read out” time leds

I would go for a simple GPS unit for accurate time keeping.

>>The clock will be indoors and I thought that GPS requires a satelite view. Perhaps there are other ways to introduce a GPS signal that I am not aware off. I do not want a computer connection.

I was building and using xtal ovens for equipment back in the 1970's.

>>I was working on Weapons Radar sets in the RAN in 1970 (mainly valves)
Which makes us around the same ripe age of 60 + some or a lot :)
Eric, thank you and others very much for your advice. I really do appreciate it..

My next step is to order some parts and work on the oven part.

There will be plenty of questions later .

This project may take quite a bit of time, but thats Ok I'm retired.



Cheers RH
 
Last edited:
...
I would go for a simple GPS unit for accurate time keeping.
...

Agreed, OR use his Australian mains frequency which has excellent average error. The OP said he was worried about blackouts etc, but one of the web pages I linked has solutions for syncing the PIC xtal to the mains freq when the mains is present, and running from the xtal in those short periods when the mains is lost.
 
Agreed, OR use his Australian mains frequency which has excellent average error. The OP said he was worried about blackouts etc, but one of the web pages I linked has solutions for syncing the PIC xtal to the mains freq when the mains is present, and running from the xtal in those short periods when the mains is lost.
Hi RB thank you for replying. I do not wish to use an eprom /pic to adjust ticks in a clock cct. But I will try your oven cct again with a 100khz thermistor. I think the problem with my 4.7Khz thermistor is the biassing of the bd691 darlington .
 
Hi RB thank you for replying. I do not wish to use an eprom /pic to adjust ticks in a clock cct. But I will try your oven cct again with a 100khz thermistor. I think the problem with my 4.7Khz thermistor is the biassing of the bd691 darlington .

hi Hal,
This Tool may help you work out the biassing for your transistor when used in conjunction with a Thermistor.

https://www.electro-tech-online.com/tools/ThermPlotV3.php

Coincidence I worked on R.A.F. ground Radar in the early 1950's..:D

E
 
I have admit I am amazed about the new GPS engines that can get a fix and give a good time output indoors.

I learnt GPS programming stuff in the early 90's using Rockwell's Navcore V that needed to be outdoors to get a basic fix with a decent patch aerial.

Now my android phone locates me inside the house with no clear view to the sky, not using a high gain patch but a bit of wire.

How things have moved on.
 
Ovenized oscillator usually use 3rd order Bessel curve AT cut crystals held at their high temp inflection point around 50 to 70 degs C. The inflection point knee gives the most tolerance to small temp excursion with little freq change. Crystals are pre-aged at high temp for several months to minimize aging drift, although most modern manufacturing processes with attention to cleanliness has reduced aging drift. Aging is primarily due to material, like quartz dust from polishing quartz blank, vibrating off crystal raising the freq over time.

Many power utilities (nearly all in U.S.) keep a running track of their deviation from center line freq and gradually compensate rotational speed of alternators to bring the average long term very accurate. In my opinion, the best way to go is to use the utility line freq and only jump over to internal oscillator during power outage. If you want to get a little picky, put in a pulse stretcher circuit for switchover so you don't get an extra second tic due to a sliver pulse when it switches over between the two freq reference sources.
 
Hi, after a lot of experimentation with "stuff" I had and your advice, I have decided to go with a 50 Hz mains frequency source through Ic 4017's backed up with 32.768 Khz 1 sec pulses through IC 4060 /4528 . The project is not dead! I should be able to show some actual pics shortly. I am also trying to make a cct diagram but am having problems getting /using a free drawing program. I am using Linux Mint and /or Win 7. Some advice regarding free (easy) schematic drawing programs would be helpful.
As an aside I have compared the Xtal Frequency with the 50 Hz (mains derived) and cannot see a difference on my old scope (TeK 2235) . I was amazed at this as I did not expect the Xtal to coincide with the mains frequency (except for pulse length). Somehow the xtal seems to be in "sympathetic" rhythm with the mains.
I do wish to acknowledge an article on clocks by Rod Elliott regarding clocks. Some good stuff in there !
What I am doing is making small parts of the cct on separate boards but connected to the same power source to "prove" the mechanics of the cct before incorporating into the main board.
Cheers RetiredHal
 
Congrats on finalising a design and getting a result. :)

Re drawing the schematic, one easy way is to draw it with paper and pen and take a clear photo (or scan it) to make a GIF.

Not sure about your xtal running in sync with the 50Hz mains, as the mains can "wander" by 1000 or 2000 PPM for minutes at a time its sync compared to a xtal will be constantly changing. It was likely just a coincidence they seemed to match at the time you measured them. :)
 
It is very easy to get a crystal to lock to another frequency, so when you go comparing two waveforms on an oscilloscope to see if they are at the same frequency, the scope leads etc may be forcing them to the same frequency, if their natural frequencies are close.

The turnover temperature of a crystal is the temperature where the frequency is not going up or down. Crystals designed for a single temperature will have their turnover at that temperature. Watch crystals are designed like that for approximately wrist temperature.

Oven oscillator crystals are often AT cut, which has a cubic response. The upper turnover temperature is designed to be around 60 - 90 °C. The oven temperature is often tweaked by the manufacturer to the turnover temperature of the particular crystal it contains.

(I don't think that "3rd order Bessel" is right in this context. Also the inflection temperature of AT crystals is around 25 °C, but the inflection temperature is where the rate of change of the slope is zero, rather than where the slope is zero http://en.wikipedia.org/wiki/Inflection_point )

SC cut crystals have a much higher inflexion temperature, and so are better suited to use in oven oscillators, even if they are more difficult to use.http://laptech.com/pdfs/SC_cut_crystals_tfc.pdf?gclid=CMmI_LHz47cCFXLLtAodai0Amg
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top