Go Down

Topic: Why are real-time clocks always 32.768khz? (Read 4077 times) previous topic - next topic

afremont


I have a question, 2 infact.

What is the best oscilator circuit for a "clock crystal". circuits for 8+MHz crystals abund, can the same topologies be used for clock crystals ? I'm designing a clock circuit to drive an old firestation stncro clock but I'm having trouble keep my clock source stable.

Can the arduino be burned with a "watch crystal" bootloader ? it would be great for clock and timing applications where speed is not problem and low power is needed,


What frequency do you need to generate?  Yes, you can use a micro such as the arduino to generate a much more accurate signal than what you are working with right now.  It will be as accurate as the crystal that clocks the micro.

Do you have the master clock too, or just slave(s)?
Experience, it's what you get when you were expecting something else.

sparkylabs

I'm working with a 32.768 KHz clock crystal

I'm asking for the arduino from an academic point of view. Of course having a secondary clock oscillator on the board that connects to an input pin with interrupt would be a better way of doing it so that the arduino can do plenty between clocks if needed.
My shop: www.sparkylabs.co.uk/shop

BillO


Right, well we did but mine was a bit unstable so I'm avoiding it.


Well then, it did not work in that situation did it?  My guess is, if it had worked adequately, you'd still be using it.  Perhaps Dr. Dave was right after all.

What you could try is constructing an external crystal oscillator circuit, optimized for the type of crystal you want to use, or use a pre-built oscillator, then feed the output of that into the Rs input of the MC14541B.
Facts just don't care if you ignore them.

sparkylabs

Well I am messing about on a breadboard and with what looks like "transmission central" even using an external clock the timer chip does some funny stuff so I'm wondering if my instability is due to the mess of wiring or the part not being suitable. The chip will oscillate with the crystal but it was unstable, the lower frequency sections are also unstable though and I'm guessing that the higher in frequency I go the more unstable it becomes more quickly, that's all.

I can try wirig it up nice on some vero board to try and eliminate the long wires being a problem. Yes I could do with a diagram suited for a 32.768 KHz crystal and someone previously described one.
My shop: www.sparkylabs.co.uk/shop

retrolefty


Quote
Wristwatch  is Wrist watch.  The temperature range should be ~37°C and not 0°C to +40°C.

The 32kHz tuning fork crystal for watches has been chosen as a compromise of size and the fact it has a most stable region at 25-28degC, what is a typical temperature at your wrist. The ratio of wearing the watches on the wrist, afaik, is 16h/8h. So the watches crystal frequency is set. I have got a cheap kitchen clock with 4.194M crystal and it does a few seconds a year (!), what is a matter of luck, of course. Pls consider the capacitance used with the crystal as well, as it has a huge effect. For example a 1-2 pF change with a 32kHz watch crystal makes few seconds a day.
PS: pls mind the terms "stability", "precision" and "accuracy" are tricky when talking timekeeping  :)
A clock might be perfectly precise but inaccurate..
http://literature.agilent.com/litweb/pdf/5965-7984E.pdf


Nice article. I particularly liked this paragraph:

Quote

The most accurate measurement known to humanity is the measure-
ment of the duration of the second. The peak of the pyramid for accu-
rate time and frequency is the international reference, UTC. The current
best accuracy for the determination of the second results in a time error
of ±0.3 nanoseconds (billionths of a second) per day. This is equivalent
to ±1 second in 10 million years.


As the article may be somewhat dated the current time error may be even less?

Lefty

DirtBiker

Yes I could do with a diagram suited for a 32.768 KHz crystal and someone previously described one.


You really need clean breadboard techniques for something like this.  Follow dc42's recommendations and make sure your breadboard is making good contact with the wires (no worn contacts, no corroded wires).  You can try the attached circuit.
Dirt Biker

pito

#36
Apr 13, 2013, 04:34 pm Last Edit: Apr 13, 2013, 05:19 pm by pito Reason: 1
Quote
As the article may be somewhat dated the current time error may be even less?

10y back I messed with OCXOs and I did measurements with a counter which used the cesium standard (connected to w-w cesium network) as the time base. The guy operating the stuff told me the 10^-14 to 10^-15 long term stability was the status at that time. With better networks today the UTC might be determined even better.. I have to call him again :)

pito

#37
Apr 13, 2013, 04:45 pm Last Edit: Apr 13, 2013, 05:09 pm by pito Reason: 1
Quote
You can try the attached circuit.

The 32khz watch crystals are provided for a specific load capacitance, usually a single capacitor connected to the oscillator's input against the gnd. The typical capacitance is 6pF or 12.5pF - you have to check the datasheet of the crystal. Not sure the loading with 2x18pF (those basically connected in series give you 9pF, plus stray capacitance) will give you good results when the crystal is intended ie. for 6pF, though.

DirtBiker


Not sure the loading with 2x18pF (those basically connected in series give you 9pF, plus stray capacitances) will give you good results when the crystal is intended ie. for 6pF, though.


http://www.foxonline.com/appnotes.htm

The values I show in my circuit are what worked for me.  Like the link says, you can try  R1=20M, r2=500K and caps between 10 and 20 pF.

I may have had a stubborn crystal, hence the 330K I used, and it's the only thing that really concerns me as these watch crystals do not like too much drive.  However, if it shatters or ages too much, I'll try a new crystal with 500K but will keep everything else the same.
Dirt Biker

pito

#39
Apr 13, 2013, 05:27 pm Last Edit: Apr 13, 2013, 05:36 pm by pito Reason: 1
I would use an RTC chip (my favorite is the pcf8563t - 200nA operation) as, afaik, all have a programmable square wave available at the clock out pin. The default output (open drain, enabled at power on) is 32kHz and you may set it to ie. 1024 Hz, 32 Hz, and 1 Hz at least with above chip. The chip is fine-tuned for 32khz crystals, and, as a bonus, you'll get an RTC as well :).

sonnyyu




Quote

The most accurate measurement known to humanity is the measure-
ment of the duration of the second. The peak of the pyramid for accu-
rate time and frequency is the international reference, UTC. The current
best accuracy for the determination of the second results in a time error
of ±0.3 nanoseconds (billionths of a second) per day. This is equivalent
to ±1 second in 10 million years.

As the article may be somewhat dated the current time error may be even less?
Lefty


off by one second 3.7 billion years from now or New Strides Toward Better Clocks, Accurate to One Second in 32 Billion Years, 5/2011

off by one second 3.7 billion years from now

Go Up