Pages: [1]   Go Down
Author Topic: About crystal load capacitor  (Read 2736 times)
0 Members and 1 Guest are viewing this topic.
Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7247
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm under the impression that the 16MHz crystal oscillator needs two 22pF capacitors, like this one I'm using:
http://www.sparkfun.com/commerce/product_info.php?products_id=536

Today I found out their datasheet (in comments) says 20pF. I'm a bit confused. I thought all parallel(right?) HC49/US crystals at 16MHz need 22pF. Can someone clarify this?

By the way, I did some crude testing and my standalone arduino with this crystal and 22pF caps and timing seems good, not off by like 10% or something. Thanks.
Logged


Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5592
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Generally, from what I've read, for most crystals anything between 18-33pF will work, but you typically want to keep it somewhere around 22pF...
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Left Coast, USA
Offline Offline
Sr. Member
****
Karma: 7
Posts: 499
Sometimes I just can't help myself.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

From the crystal's point of view, the two 22 pF capacitors look like they are in series, so they present a total parallel load of 11 pF.  There are a few pF more (typically 5-10 pF), due to stray "wiring" capacitance and due to the input pin capacitance on the CPU.

Bottom line: If the crystal is rated for a 20 pF load, and you have 22 pF caps, the actual frequency will (probably) be a little high.  In my experience, this will be a few tens of parts per million; maybe as much as a hundred or so parts per million.  If you require 50 parts per million or better, then you will probably require some "padding" (small values of capacitors in parallel with the 22 pF caps) to bring the frequency down.  Note that the crystals themselves are rated with certain error tolerances that may be on the order of 50 ppm.  Note also that the crystal frequency will vary with temperature, so if you confirm its calibration at 20C, it might be somewhat different at 35 C or 5C.

For many (most?) applications, a few hundred parts per million won't create any practical problems.  If you want to use an ATmega timer to create a time-of-day clock that remains accurate for many days note that an error of one second per day turns out to be something like 11.5 parts per million.

Bottom line: Just to get the thing up and running, you can use just about anything from 10 pF to 50 pF.  If you require extreme accuracy, you will probably have to experiment.  You will also need some test equipment that is at least as accurate (probably several times as accurate) as whatever it is that you are testing.


Regards,

Dave

Footnote:
Sixteen MHz crystals are commonly available (off-the shelf) with parallel resonance specifications anywhere from 7 pF through 32 pF.  They are also available ground for series resonance (designed to work in a circuit that is not the same as the ATmega's crystal oscillator circuitry).  Any of these will "work" with an ATMega chip (yes, even the series-ground one), but the actual frequency may be a little different than what is marked on the device.

If you really require something in the neighborhood of 10 ppm accuracy, the easiest way would be to buy an oscillator and not a crystal.  The fuse settings for oscillator use are different than for crystals for the ATmega chips, so your modus operandi might be a little different than the "Pure Arduino Way." (Different bootloader settings for example. Or use the ICSP connection with some external programmer to upload sketches rather than the bootloader going through the ATmega UART.  Stuff like that.)
« Last Edit: September 19, 2010, 01:42:49 pm by davekw7x » Logged

0
Offline Offline
Faraday Member
**
Karma: 24
Posts: 3495
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You may want to have a look at this thread:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1270573737

And especially
http://www.crystekcrystals.com/crystal/appnotes/PierceGateLoadCap.pdf
and
http://www.foxonline.com/pdfs/xtaldesignnotes.pdf

If you need reasonable good precision go for the DS3231like used in the Chrono Dot http://macetech.com/store/index.php?main_page=product_info&cPath=5&products_id=8.

If you need really really good precision go to ebay and search for "Efratom" or "Thunderbolt GPS". This will be more than enough precision for your Arduino smiley

With regard to the standard crystals: crystal deviation is measured in ppm and not in % (1%=10000ppm). The crystal oscillators are usually temperature sensitive. This is because both the crystal and the caps are temperature sensitive. Getting precision below 10ppm is not as trivial as it seems unless you compensate for temperature changes (or control temperature as in in OCXO).

Udo
Logged

Check out my experiments http://blog.blinkenlight.net

USA
Offline Offline
Full Member
***
Karma: 2
Posts: 213
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

davekw7x

Very good explanation, thanks

Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 74
Posts: 7247
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks davekw7x, Udo Klein, and cr0sh. I've ordered some of those crystals.
Logged


Pages: [1]   Go Up
Jump to: