EmbeddedRelated.com
Forums

Crystal/Resonator Noob question

Started by amerdsp November 15, 2007
Ray Haddad <rhaddad@iexpress.net.au> writes:
> If both caps are exactly (and I do mean exactly) the same value, > there will be no oscillation. The first oscillation requires an > imbalance.
What about the resistor some oscillators use to add "thermal noise" to get the oscillator started?
Ray Haddad wrote:
> On Mon, 19 Nov 2007 09:42:26 +1300, I said, "Pick a card, any card" > and Jim Granville <no.spam@designtools.maps.co.nz> instead replied: > > >>Ray Haddad wrote: >> >> >>>On 18 Nov 2007 12:36:10 -0500, I said, "Pick a card, any card" and >>>DJ Delorie <dj@delorie.com> instead replied: >>> >>> >>>>amerdsp <amerdsp@hotmail.com> writes: >>>> >>>> >>>>>If I change the crystal to have a load capacitance of 20pF as the >>>>>manual says, I need a 38pF C1 and C2. It seems that these are >>>>>difficult to find. Can I use a 39pF instead? What would be the >>>>>consequences if I do? >>>> >>>>Slight changes in capacitance will cause slight changes in frequency. >>>>However, note that your circuit layout also causes slight changes in >>>>capacitance. If you need higher precision than these variances allow, >>>>design in a small variable cap to tune the resonant frequency. >>>> >>>>Also, the two caps don't *have* to be the same value. You can do some >>>>testing with different values to try to get closer to the desired >>>>frequency. >>> >>>In fact, if the caps are exactly the same, oscillation may not >>>occur. There needs to be a miniscule amount of difference in order >>>to get the crystal going. It's the physics of the thing. Fortunately >>>caps of the same value are never, ever precisely the same. >> >>Really ?! You do realise this is electronics, not physics ? >> >>Are you able to prove that in Spice ? (which will allow you to have >>identical Cap values) >> >>Tip: Oscillation is all about phase. >>Try it yourself, use a trimmer. > > > Theoretically what I stated is true. If both caps are exactly (and I > do mean exactly) the same value, there will be no oscillation. The > first oscillation requires an imbalance. Spice takes that into > account and simply allows oscillation to occur so forget proving it > in a Spice model. You do have to go back to basic physics to get to > the truth. But, it's a minor point. I mean that. It's not worth > arguing about because there can never, ever be two capacitors with > the exact same value. Period.
Hmmm, A hypothesis that can't be proven ? You have theorised a notch of 'infinite' Q, and a width narrower than spice can model ?. So, it's unobservable ? Sorry, no: Oscillation requires not an imbalance, but a gain above unity, and that gain includes a phase shift component. So, you can find a small Series OP R helps lower the power of the Osc, as well as non equal caps can also lower the Osc Power. In the presence of a crystal, all that the CAPs do, is determine the voltage ratio on the OP and IP nodes, and if you lower the OP C, you raise the IP voltage swing. Those nodes are out of phase, so equal caps are immaterial. Try it on the bench, and feel free to use a trimmer. Or use spice - properly set up, you can model 'Hi Q crystal' oscillators and show the startup. -jg
On Mon, 19 Nov 2007 19:53:41 +1300, I said, "Pick a card, any card"
and Jim Granville <no.spam@designtools.maps.co.nz> instead replied:

>Ray Haddad wrote: >> On Mon, 19 Nov 2007 09:42:26 +1300, I said, "Pick a card, any card" >> and Jim Granville <no.spam@designtools.maps.co.nz> instead replied: >> >>>Ray Haddad wrote: >>> >>>>On 18 Nov 2007 12:36:10 -0500, I said, "Pick a card, any card" and >>>>DJ Delorie <dj@delorie.com> instead replied: >>>> >>>>>amerdsp <amerdsp@hotmail.com> writes: >>>>> >>>>>>If I change the crystal to have a load capacitance of 20pF as the >>>>>>manual says, I need a 38pF C1 and C2. It seems that these are >>>>>>difficult to find. Can I use a 39pF instead? What would be the >>>>>>consequences if I do? >>>>> >>>>>Slight changes in capacitance will cause slight changes in frequency. >>>>>However, note that your circuit layout also causes slight changes in >>>>>capacitance. If you need higher precision than these variances allow, >>>>>design in a small variable cap to tune the resonant frequency. >>>>> >>>>>Also, the two caps don't *have* to be the same value. You can do some >>>>>testing with different values to try to get closer to the desired >>>>>frequency. >>>> >>>>In fact, if the caps are exactly the same, oscillation may not >>>>occur. There needs to be a miniscule amount of difference in order >>>>to get the crystal going. It's the physics of the thing. Fortunately >>>>caps of the same value are never, ever precisely the same. >>> >>>Really ?! You do realise this is electronics, not physics ? >>> >>>Are you able to prove that in Spice ? (which will allow you to have >>>identical Cap values) >>> >>>Tip: Oscillation is all about phase. >>>Try it yourself, use a trimmer. >> >> Theoretically what I stated is true. If both caps are exactly (and I >> do mean exactly) the same value, there will be no oscillation. The >> first oscillation requires an imbalance. Spice takes that into >> account and simply allows oscillation to occur so forget proving it >> in a Spice model. You do have to go back to basic physics to get to >> the truth. But, it's a minor point. I mean that. It's not worth >> arguing about because there can never, ever be two capacitors with >> the exact same value. Period. > >Hmmm, A hypothesis that can't be proven ? >You have theorised a notch of 'infinite' Q, and a width narrower than >spice can model ?. So, it's unobservable ? > >Sorry, no:
Sorry, yes.
>Oscillation requires not an imbalance, but a gain above unity, and >that gain includes a phase shift component.
Read your own sentence and see that you just agreed with me.
>So, you can find a small Series OP R helps lower the power of the Osc, >as well as non equal caps can also lower the Osc Power.
Show me any two capacitors that are exactly equal and I'll eat them both. I mean equal to an infinite number of decimal places not just the ink printed on them. Get busy. We'll both have to live another few millennia to get two that come to within 500 places.
>In the presence of a crystal, all that the CAPs do, is determine the >voltage ratio on the OP and IP nodes, and if you lower the OP C, you >raise the IP voltage swing.
You know those oscillator cans? Inside those are capacitors that come as close to being exactly equal as any on earth. They're grown on the substrate normally. Now, in testing, if they don't begin to oscillate, one of the capacitors is scratched to change the value.
>Those nodes are out of phase, so equal caps are immaterial. >Try it on the bench, and feel free to use a trimmer.
Take a crystal and make it oscillate without caps.
>Or use spice - properly set up, you can model 'Hi Q crystal' oscillators >and show the startup.
No, you can't. Spice takes into account that capacitors have unequal value even if they are numbered alike. It's the nature of imperfection in manufacture. Are you of the opinion that a simple ink marking makes the values the same because the ink states they are the same? Please tell me you know better. -- Ray
Ray Haddad wrote:
>>>Theoretically what I stated is true. If both caps are exactly (and I >>>do mean exactly) the same value, there will be no oscillation. The >>>first oscillation requires an imbalance. Spice takes that into >>>account and simply allows oscillation to occur so forget proving it >>>in a Spice model. You do have to go back to basic physics to get to >>>the truth. But, it's a minor point. I mean that. It's not worth >>>arguing about because there can never, ever be two capacitors with >>>the exact same value. Period. >> >>Hmmm, A hypothesis that can't be proven ? >>You have theorised a notch of 'infinite' Q, and a width narrower than >>spice can model ?. So, it's unobservable ? >> >>Sorry, no: > > > Sorry, yes. > > >>Oscillation requires not an imbalance, but a gain above unity, and >>that gain includes a phase shift component. > > > Read your own sentence and see that you just agreed with me.
Ah, so you think Equal Caps somehow nulls the gain ? :) How unequal do you think they need to be, to magically recover the gain ? Got a formula for that ?
> >>So, you can find a small Series OP R helps lower the power of the Osc, >>as well as non equal caps can also lower the Osc Power. > > > Show me any two capacitors that are exactly equal and I'll eat them > both. I mean equal to an infinite number of decimal places not just > the ink printed on them. Get busy. We'll both have to live another > few millennia to get two that come to within 500 places. > > >>In the presence of a crystal, all that the CAPs do, is determine the >>voltage ratio on the OP and IP nodes, and if you lower the OP C, you >>raise the IP voltage swing. > > > You know those oscillator cans? Inside those are capacitors that > come as close to being exactly equal as any on earth. They're grown > on the substrate normally. Now, in testing, if they don't begin to > oscillate, one of the capacitors is scratched to change the value. > > >>Those nodes are out of phase, so equal caps are immaterial. >>Try it on the bench, and feel free to use a trimmer. > > > Take a crystal and make it oscillate without caps. > > >>Or use spice - properly set up, you can model 'Hi Q crystal' oscillators >>and show the startup. > > > No, you can't. Spice takes into account that capacitors have unequal > value even if they are numbered alike. It's the nature of > imperfection in manufacture. Are you of the opinion that a simple > ink marking makes the values the same because the ink states they > are the same? Please tell me you know better.
I'm not sure what you are claiming - but I have used spice for just that. Have you ? If what you claimed were true, designers would avoid equal caps, because thermal and age drifts would mean field failures, whenever the caps hit your magic value. Same with VCOs, with trimmer caps : Oh NO!! Ci = Co = Drop dead time !. You have confused equality with a null. -jg
On Mon, 19 Nov 2007 20:39:43 +1300, I said, "Pick a card, any card"
and Jim Granville <no.spam@designtools.maps.co.nz> instead replied:

>Ray Haddad wrote: >>>>Theoretically what I stated is true. If both caps are exactly (and I >>>>do mean exactly) the same value, there will be no oscillation. The >>>>first oscillation requires an imbalance. Spice takes that into >>>>account and simply allows oscillation to occur so forget proving it >>>>in a Spice model. You do have to go back to basic physics to get to >>>>the truth. But, it's a minor point. I mean that. It's not worth >>>>arguing about because there can never, ever be two capacitors with >>>>the exact same value. Period. >>> >>>Hmmm, A hypothesis that can't be proven ? >>>You have theorised a notch of 'infinite' Q, and a width narrower than >>>spice can model ?. So, it's unobservable ? >>> >>>Sorry, no: >> >> Sorry, yes. >> >>>Oscillation requires not an imbalance, but a gain above unity, and >>>that gain includes a phase shift component. >> >> Read your own sentence and see that you just agreed with me. > >Ah, so you think Equal Caps somehow nulls the gain ? :)
How do you suggest that? Unequal is necessary to start oscillation. Once it's going, it keeps going as long as power is applied and no components fail. Remember, this is a theoretical model. Unequal capacitance is needed to start the oscillation. Period.
>How unequal do you think they need to be, to magically >recover the gain ? Got a formula for that ? > >>>So, you can find a small Series OP R helps lower the power of the Osc, >>>as well as non equal caps can also lower the Osc Power. >> >> Show me any two capacitors that are exactly equal and I'll eat them >> both. I mean equal to an infinite number of decimal places not just >> the ink printed on them. Get busy. We'll both have to live another >> few millennia to get two that come to within 500 places. >> >>>In the presence of a crystal, all that the CAPs do, is determine the >>>voltage ratio on the OP and IP nodes, and if you lower the OP C, you >>>raise the IP voltage swing. >> >> You know those oscillator cans? Inside those are capacitors that >> come as close to being exactly equal as any on earth. They're grown >> on the substrate normally. Now, in testing, if they don't begin to >> oscillate, one of the capacitors is scratched to change the value. >> >>>Those nodes are out of phase, so equal caps are immaterial. >>>Try it on the bench, and feel free to use a trimmer. >> >> Take a crystal and make it oscillate without caps. >> >>>Or use spice - properly set up, you can model 'Hi Q crystal' oscillators >>>and show the startup. >> >> No, you can't. Spice takes into account that capacitors have unequal >> value even if they are numbered alike. It's the nature of >> imperfection in manufacture. Are you of the opinion that a simple >> ink marking makes the values the same because the ink states they >> are the same? Please tell me you know better. > >I'm not sure what you are claiming - but I have used spice for just >that. Have you ?
Baloney. There's no possible way to do it. You rely too much on the tool. Think theory of oscillation. Forget Spice. It has flaws in it to make it work. If you really did use a formula for oscillation with exactly equal capacitance it would fail. That's why no formulae out there use it. Instead they rely on crystal cut to determine frequency. We're discussing oscillation here. What it is that makes the crystal resonate to start. Not what it is that is required in a circuit. Look, the power is applied and one cap MUST charge up faster than the other. That's an absolute for making the crystal resonate. There's no choice or no Spice model to show you that. It really is down to the physics of it all.
>If what you claimed were true, designers would avoid equal caps, >because thermal and age drifts would mean field failures, whenever >the caps hit your magic value. Same with VCOs, with trimmer caps : >Oh NO!! Ci = Co = Drop dead time !. > >You have confused equality with a null.
The printing on the caps doesn't make them equal. Just because they both read 38pf or 100uf doesn't make the exactly equal. There are enough differences to allow them to be used without concern to create an oscillator. -- Ray
Ray Haddad <rhaddad@iexpress.net.au> writes:

> On Mon, 19 Nov 2007 20:39:43 +1300, I said, "Pick a card, any card" > and Jim Granville <no.spam@designtools.maps.co.nz> instead replied: > >>Ray Haddad wrote: >>>>>Theoretically what I stated is true. If both caps are exactly (and I >>>>>do mean exactly) the same value, there will be no oscillation. The >>>>>first oscillation requires an imbalance. Spice takes that into >>>>>account and simply allows oscillation to occur so forget proving it >>>>>in a Spice model. You do have to go back to basic physics to get to >>>>>the truth. But, it's a minor point. I mean that. It's not worth >>>>>arguing about because there can never, ever be two capacitors with >>>>>the exact same value. Period.
I don't accept your premise that "oscillation requires an imbalance". But even if true, the two pins of a microcontroller crystal oscillator circuit are usually connected internally to the input and output of an amplifier. So one pin is at very high impedance, and one at very low. Does this not constitute an enormous "imbalance"?
>>>> >>>>Hmmm, A hypothesis that can't be proven ? >>>>You have theorised a notch of 'infinite' Q, and a width narrower than >>>>spice can model ?. So, it's unobservable ? >>>> >>>>Sorry, no: >>> >>> Sorry, yes. >>> >>>>Oscillation requires not an imbalance, but a gain above unity, and >>>>that gain includes a phase shift component. >>> >>> Read your own sentence and see that you just agreed with me. >> >>Ah, so you think Equal Caps somehow nulls the gain ? :) > > How do you suggest that? Unequal is necessary to start oscillation. > Once it's going, it keeps going as long as power is applied and no > components fail. Remember, this is a theoretical model. Unequal > capacitance is needed to start the oscillation. Period.
Oscillation can be started by the amplification of thermal noise (in the absence of other disturbances). You could think of it as a very high gain tuned circuit - noise at the tuned frequency is amplified. No "imbalance" required. [...] -- John Devereux
On Mon, 19 Nov 2007 09:30:58 +0000, I said, "Pick a card, any card"
and John Devereux <jdREMOVE@THISdevereux.me.uk> instead replied:

>Ray Haddad <rhaddad@iexpress.net.au> writes: > >> On Mon, 19 Nov 2007 20:39:43 +1300, I said, "Pick a card, any card" >> and Jim Granville <no.spam@designtools.maps.co.nz> instead replied: >> >>>Ray Haddad wrote: >>>>>>Theoretically what I stated is true. If both caps are exactly (and I >>>>>>do mean exactly) the same value, there will be no oscillation. The >>>>>>first oscillation requires an imbalance. Spice takes that into >>>>>>account and simply allows oscillation to occur so forget proving it >>>>>>in a Spice model. You do have to go back to basic physics to get to >>>>>>the truth. But, it's a minor point. I mean that. It's not worth >>>>>>arguing about because there can never, ever be two capacitors with >>>>>>the exact same value. Period. > >I don't accept your premise that "oscillation requires an >imbalance". But even if true, the two pins of a microcontroller >crystal oscillator circuit are usually connected internally to the >input and output of an amplifier. So one pin is at very high >impedance, and one at very low. Does this not constitute an enormous >"imbalance"?
You don't have to "accept it." Just ignore it. Because there can never, ever be two capacitors of exactly equal value you needn't worry your pretty head about it. See how that works?
>>>>>Hmmm, A hypothesis that can't be proven ? >>>>>You have theorised a notch of 'infinite' Q, and a width narrower than >>>>>spice can model ?. So, it's unobservable ? >>>>> >>>>>Sorry, no: >>>> >>>> Sorry, yes. >>>> >>>>>Oscillation requires not an imbalance, but a gain above unity, and >>>>>that gain includes a phase shift component. >>>> >>>> Read your own sentence and see that you just agreed with me. >>> >>>Ah, so you think Equal Caps somehow nulls the gain ? :) >> >> How do you suggest that? Unequal is necessary to start oscillation. >> Once it's going, it keeps going as long as power is applied and no >> components fail. Remember, this is a theoretical model. Unequal >> capacitance is needed to start the oscillation. Period. > >Oscillation can be started by the amplification of thermal noise (in >the absence of other disturbances). You could think of it as a very >high gain tuned circuit - noise at the tuned frequency is >amplified. No "imbalance" required.
Yes, but to start it on power up in a circuit does require a different set of circumstances. You're moving into irrelevance. -- Ray
Ray Haddad wrote:

> On Mon, 19 Nov 2007 20:39:43 +1300, I said, "Pick a card, any card" > and Jim Granville <no.spam@designtools.maps.co.nz> instead replied: >>>No, you can't. Spice takes into account that capacitors have unequal >>>value even if they are numbered alike. It's the nature of >>>imperfection in manufacture. Are you of the opinion that a simple >>>ink marking makes the values the same because the ink states they >>>are the same? Please tell me you know better. >> >>I'm not sure what you are claiming - but I have used spice for just >>that. Have you ? > > > Baloney. There's no possible way to do it. You rely too much on the > tool. Think theory of oscillation. Forget Spice. It has flaws in it > to make it work. If you really did use a formula for oscillation > with exactly equal capacitance it would fail. That's why no formulae > out there use it. Instead they rely on crystal cut to determine > frequency. We're discussing oscillation here. What it is that makes > the crystal resonate to start. Not what it is that is required in a > circuit. Look, the power is applied and one cap MUST charge up > faster than the other.
and you believe Cap matching is all that determines that ?
> That's an absolute for making the crystal > resonate. There's no choice or no Spice model to show you that. It > really is down to the physics of it all.
So I'll take that as a no, you have not used Spice to model crystal oscillators amd startup. Still waiting on just how precisely matched the caps must be, for this effect to show, and the formula. I'm thinking here I should have taken Joerg's offer of feng shui! :) -jg
On Mon, 19 Nov 2007 23:00:13 +1300, I said, "Pick a card, any card"
and Jim Granville <no.spam@designtools.maps.co.nz> instead replied:

>Ray Haddad wrote: > >> On Mon, 19 Nov 2007 20:39:43 +1300, I said, "Pick a card, any card" >> and Jim Granville <no.spam@designtools.maps.co.nz> instead replied: >>>>No, you can't. Spice takes into account that capacitors have unequal >>>>value even if they are numbered alike. It's the nature of >>>>imperfection in manufacture. Are you of the opinion that a simple >>>>ink marking makes the values the same because the ink states they >>>>are the same? Please tell me you know better. >>> >>>I'm not sure what you are claiming - but I have used spice for just >>>that. Have you ? >> >> Baloney. There's no possible way to do it. You rely too much on the >> tool. Think theory of oscillation. Forget Spice. It has flaws in it >> to make it work. If you really did use a formula for oscillation >> with exactly equal capacitance it would fail. That's why no formulae >> out there use it. Instead they rely on crystal cut to determine >> frequency. We're discussing oscillation here. What it is that makes >> the crystal resonate to start. Not what it is that is required in a >> circuit. Look, the power is applied and one cap MUST charge up >> faster than the other. > >and you believe Cap matching is all that determines that ? > >> That's an absolute for making the crystal >> resonate. There's no choice or no Spice model to show you that. It >> really is down to the physics of it all. > >So I'll take that as a no, you have not used Spice to model crystal >oscillators amd startup. > >Still waiting on just how precisely matched the caps must be, >for this effect to show, and the formula. > >I'm thinking here I should have taken Joerg's offer of feng shui! >:)
I have other things to do. Believe what you wish. -- Ray
Ray Haddad <rhaddad@iexpress.net.au> writes:

> On Mon, 19 Nov 2007 09:30:58 +0000, I said, "Pick a card, any card" > and John Devereux <jdREMOVE@THISdevereux.me.uk> instead replied: > >>Ray Haddad <rhaddad@iexpress.net.au> writes: >> >>> On Mon, 19 Nov 2007 20:39:43 +1300, I said, "Pick a card, any card" >>> and Jim Granville <no.spam@designtools.maps.co.nz> instead replied: >>> >>>>Ray Haddad wrote: >>>>>>>Theoretically what I stated is true. If both caps are exactly (and I >>>>>>>do mean exactly) the same value, there will be no oscillation. The >>>>>>>first oscillation requires an imbalance. Spice takes that into >>>>>>>account and simply allows oscillation to occur so forget proving it >>>>>>>in a Spice model. You do have to go back to basic physics to get to >>>>>>>the truth. But, it's a minor point. I mean that. It's not worth >>>>>>>arguing about because there can never, ever be two capacitors with >>>>>>>the exact same value. Period. >> >>I don't accept your premise that "oscillation requires an >>imbalance". But even if true, the two pins of a microcontroller >>crystal oscillator circuit are usually connected internally to the >>input and output of an amplifier. So one pin is at very high >>impedance, and one at very low. Does this not constitute an enormous >>"imbalance"? > > You don't have to "accept it." Just ignore it. Because there can > never, ever be two capacitors of exactly equal value you needn't > worry your pretty head about it. See how that works?
I see you have no answer.
>>>>>>Hmmm, A hypothesis that can't be proven ? >>>>>>You have theorised a notch of 'infinite' Q, and a width narrower than >>>>>>spice can model ?. So, it's unobservable ? >>>>>> >>>>>>Sorry, no: >>>>> >>>>> Sorry, yes. >>>>> >>>>>>Oscillation requires not an imbalance, but a gain above unity, and >>>>>>that gain includes a phase shift component. >>>>> >>>>> Read your own sentence and see that you just agreed with me. >>>> >>>>Ah, so you think Equal Caps somehow nulls the gain ? :) >>> >>> How do you suggest that? Unequal is necessary to start oscillation. >>> Once it's going, it keeps going as long as power is applied and no >>> components fail. Remember, this is a theoretical model. Unequal >>> capacitance is needed to start the oscillation. Period. >> >>Oscillation can be started by the amplification of thermal noise (in >>the absence of other disturbances). You could think of it as a very >>high gain tuned circuit - noise at the tuned frequency is >>amplified. No "imbalance" required. > > Yes, but to start it on power up in a circuit does require a > different set of circumstances. You're moving into irrelevance.
Not at all irrelevant, this is exactly how many crystal circuits start up. You can easily see it on a scope for microcontrollers that use watch crystal oscillators (32768Hz). It can take several hundred milliseconds for the oscillations to build up to full amplitude. For the first few tens of milliseconds the oscillations are undetectable since they are buried in thermal (and other) noise. The oscillations grow exponentially until they reach circuit-limited normal operating amplitude. The exact time taken to complete this process can vary each time the circuit starts - it is noise that kicks things off. This can lead to unreliable microcontroller startup if you are not careful. I got bitten in just this way recently with the ADUC7000 series, switching to the external crystal oscillator before it was ready. You don't tend to notice this so much with MHz range crystals since everything happens so much faster. -- John Devereux