Pages: [1]   Go Down
Author Topic: SMD crystals for Arduino?  (Read 784 times)
0 Members and 1 Guest are viewing this topic.
South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 583
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all, I'm making another homebrew Arduino board. I want to use a SMD xtall this time.

I have found some of these that look promising http://uk.farnell.com/txc/7a-16-000maaj-t/xtal-16-000mhz-18pf-smd-5-0x3-2/dp/1841946RL

What is the load capacitance on the standard Arduino crystal? This states 18pf so will I still have to use the same 22pf caps as a load?

Thanks
Logged

Canada
Offline Offline
Sr. Member
****
Karma: 0
Posts: 318
Sometimes teaching, always learning,
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've always used 22pF. I don't think the exact value is important, anything from 18-22pF is acceptable. I have read of people not using caps at all  smiley-roll

Here's that thread: http://arduino.cc/forum/index.php?topic=130003.0
« Last Edit: November 13, 2012, 09:23:10 am by John_S » Logged


Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Older crystals tend to specify higher load capacitance and newer crystals are generally in the 6pf - 12pf range.

Unless you require super accurate timing, pay no attention to the load capacitance specification - most high speed crystals (4Mhz or over) will run without those capacitors.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Unless you need better than 0.5% frequency accuracy, you can use a 3-terminal ceramic resonator instead, such as http://uk.farnell.com/abracon/awscr-16-00mtd-t/ceramic-resonator-16mhz-smd/dp/2101362?in_merch=New%20Products. These have the caps built in.

If you do use a crystal, the 2 caps are in series as seen by the resonator. So 2x22pf gives 11pF, and when you add the stray capacitance and mcu pin capacitance you will have close to 18pF.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Always aim to provide the load capacitance specified on the crystal's datasheet.  I use the formula on page 2 here, which is pretty standard.

Turning the formula around, and assuming the two load capacitors are equal gives:

C = 2(CL - CS)

Where C is the load capacitor value, CL is the load capacitance specified in the crystal's datasheet, and CS is stray capacitance.

When I do the maths, assuming CL of 18pF and CS of 5pF, I get 26pF, so I use 27pF (standard value) caps with 18pF crystals.

Many crystals will run without load capacitors, and that might be OK on a breadboard in a pinch, but anything else is just Bad Design. When something isn't working, I don't know why I'd want to have to worry about whether the oscillator is running correctly. I can create more than enough of my own problems in other areas, so I figure I might as well get the oscillator right and not have to add that to the list of possible causes smiley-grin
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

South UK
Offline Offline
God Member
*****
Karma: 5
Posts: 583
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for all the useful info guys!

The resonators sound like a good option, I don't need a great level of accuracy, and I'm using a RTC for the longer term time management anyhow smiley

Thanks for the info Jack! It's one thing answering a question for someone but telling them how to answer it themselves is great smiley one thing I'm not sure about is how you calculate the 'stray resistance'?

Thanks again
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The resonators sound like a good option, I don't need a great level of accuracy,

Let me flip that coin for you. If you are OK with the (in)accuracy of a resonator, you are going to be more than OK with the (in)accuracy caused by no load capacitance or out-of-spec load capacitance. A crystal without no capacitance will beat out a resonator and provides you the option to obtain accurate timing in the future if you decide to solder in the capacitor(s).

With that, it is very difficult, in my view, to justify a resonator over a crystal, and that's why you rarely see them used in well designed products.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The resonators sound like a good option, I don't need a great level of accuracy,

Let me flip that coin for you. If you are OK with the (in)accuracy of a resonator, you are going to be more than OK with the (in)accuracy caused by no load capacitance or out-of-spec load capacitance. A crystal without no capacitance will beat out a resonator and provides you the option to obtain accurate timing in the future if you decide to solder in the capacitor(s).

With that, it is very difficult, in my view, to justify a resonator over a crystal, and that's why you rarely see them used in well designed products.

There is nothing intrinsically wrong with a the design that uses a resonator, if the frequency tolerance and drift of the resonator are within the required parameters. You might just as well say that well-designed products don't use 1% tolerance resistors, because 0.1% tolerance resistors are available.

On the other hand, a circuit using an atmega328p and crystal with no capacitors is definitely not well-designed, because it's running the mcu outside its recommended operating conditions (C1, C2 = 12 to 22pF, see sections 9.3 - 9.4 of the datasheet).
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the info Jack! It's one thing answering a question for someone but telling them how to answer it themselves is great smiley one thing I'm not sure about is how you calculate the 'stray resistance capacitance'?

Sure thing! As for stray capacitance, that might take some doing to actually measure, and test equipment that I don't have, so I don't calculate it, I just assume 5pF. Note that the Fox document says

Quote
As a rule of thumb, Cstray may be assumed to equal 5.0 pF.

so I just go with that in absence of any better estimate.

For most purposes, resonators are fine too, as noted. The Uno actually uses a resonator I believe.
« Last Edit: November 13, 2012, 02:27:01 pm by Jack Christensen » Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is also the pin capacitance.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is also the pin capacitance.

Indeed. But in the datasheet (ATmega328 et al), I can only find pin capacitance listed for the low-frequency oscillator.
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I use 7pf as an estimate.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I use 7pf as an estimate.

Then add something on top of that for stray capacitance, or would 7pF be pin + stray?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For pin alone.

Those guys didn't just pick 6pf/12pf load capacitance for no reason.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 93
Posts: 3968
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For pin alone.

Those guys didn't just pick 6pf/12pf load capacitance for no reason.

Sorry, what guys are those?
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Pages: [1]   Go Up
Jump to: