Pages: 1 2 [3]   Go Down
Author Topic: Why are real-time clocks always 32.768khz?  (Read 3420 times)
0 Members and 1 Guest are viewing this topic.
texas
Offline Offline
God Member
*****
Karma: 27
Posts: 862
old, but not dead
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)?
Logged

Experience, it's what you get when you were expecting something else.

Northants - UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 602
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Facts just don't care if you ignore them.

Northants - UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
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
Logged

Windy City
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* Oscillator.jpg (85.66 KB, 1254x914 - viewed 35 times.)
Logged

Dirt Biker

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2073
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
« Last Edit: April 13, 2013, 10:19:11 am by pito » Logged

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2073
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: April 13, 2013, 10:09:30 am by pito » Logged

Windy City
Offline Offline
Jr. Member
**
Karma: 0
Posts: 90
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Dirt Biker

Rapa Nui
Offline Offline
Edison Member
*
Karma: 60
Posts: 2073
Pukao hats cleaning services
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley.
« Last Edit: April 13, 2013, 10:36:48 am by pito » Logged

Earth
Offline Offline
Edison Member
*
Karma: 52
Posts: 1804
My browser no longer is binding static IP, Floating is the way to go.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



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
Logged

Pages: 1 2 [3]   Go Up
Jump to: