EmbeddedRelated.com
Forums

Crystal/Resonator Noob question

Started by amerdsp November 15, 2007
Ray Haddad wrote:

> 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.
I'm more than happy with my understanding. I see you have not been able to reply to any of my questions, so noob's reading this can makeup their own minds. I was more worried about their (mis)understanding than yours. Tip for Noobs: Good engineers always work with numbers. -jg
On Mon, 19 Nov 2007 10:26:03 +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 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.
We are clearly not discussing the same thing. Believe what you wish. I have other things to do. -- Ray
John Devereux wrote:
> 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. >
Exactamente. Noise is what starts an oscillation. No noise = no oscillation, regardless of capacitors or whatever. That is why younger EEs sometimes bang their heads on the table when their fancy new circuit doesn't work in SPICE. Ray: The typical connection for a crystal or other frequency determining component in the case of a uC is from an output to an input, often called XOUT and XIN. Then (ideally) the crystal is the only feedback path between them and the capacitors only matter with respect to frequency and stability of oscillation. You can test it: Make one of the caps variable via a really fine vernier, for example using an old UHF tuner trim-cap in parallel with a cap that's a pF smaller than the fixed cap on the other side. Now tune it slowly. The oscillation won't stop. -- Regards, Joerg http://www.analogconsultants.com/
Jim Granville wrote:
> Ray Haddad wrote: > >> 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. > > I'm more than happy with my understanding. > I see you have not been able to reply to any of my questions, > so noob's reading this can makeup their own minds. > I was more worried about their (mis)understanding than yours. > > Tip for Noobs: Good engineers always work with numbers. >
And really good ones work with numbers and soldering irons :-) Seriously, it is quite possible that an oscillator does not start up in SPICE or a noiseless mathematical environment. -- Regards, Joerg http://www.analogconsultants.com/
On Mon, 19 Nov 2007 23:33:26 +1300, I said, "Pick a card, any card"
and Jim Granville <no.spam@designtools.maps.co.nz> instead replied:

>I'm more than happy with my understanding. >I see you have not been able to reply to any of my questions,
Your questions don't relate to what I was discussing. They relate only to some unrelated point you were making. -- Ray
Joerg wrote:
> Jim Granville wrote: >> >> Tip for Noobs: Good engineers always work with numbers. >> > > And really good ones work with numbers and soldering irons :-)
Yes, I nearly added that. You certainly should reality-check your spice results, against the real world. Seen some clangers out there, from the '..but it worked in spice?!' novices....
> Seriously, it is quite possible that an oscillator does not start up in > SPICE or a noiseless mathematical environment.
True, but in practise it's easy to avoid. With the very hi Q's of crystals, you can get good results from spice with care and patience. You do need to watch the step size, and being able to tell a flakey run resulting from wrong settings, helps as well :) So I should add : Tip for Noobs: Craftsmen know their tools, and what they can, and cannot do.
Jim Granville wrote:
> Joerg wrote: >> Jim Granville wrote: >>> >>> Tip for Noobs: Good engineers always work with numbers. >>> >> >> And really good ones work with numbers and soldering irons :-) > > Yes, I nearly added that. You certainly should reality-check > your spice results, against the real world. > Seen some clangers out there, from the '..but it worked in spice?!' > novices.... >
Or "But I've clearly demonstrated in SPICE that this doesn't work!". One of those was a PIN diode circuit of the esoteric kind which then rolled off the fab at 30k/year for a few years. They all worked :-)
>> Seriously, it is quite possible that an oscillator does not start up >> in SPICE or a noiseless mathematical environment. > > True, but in practise it's easy to avoid. With the very hi Q's > of crystals, you can get good results from spice with care > and patience. > You do need to watch the step size, and being able to tell a flakey run > resulting from wrong settings, helps as well :) >
Nowadays you can be pretty liberal with step size, reltol and all that. Back in the DOS days that was different. It could mean that the sims ran all night.
> So I should add : > > Tip for Noobs: Craftsmen know their tools, and what they can, and cannot > do. >
And make some of your own tools, too. Like near field sniffers, FET probes etc. Just think about it: A few hundred years ago many folks had to make all their tools because the next Home Depot was, well, it didn't exist. -- Regards, Joerg http://www.analogconsultants.com/
Jim Granville wrote:
>
... snip ...
> > I'm thinking here I should have taken Joerg's offer of feng shui! > :)
That showed up in a crossword the other day, and I still have no idea what it is or means. Kindly provide a clue. -- Chuck F (cbfalconer at maineline dot net) <http://cbfalconer.home.att.net> Try the download section. -- Posted via a free Usenet account from http://www.teranews.com
On Mon, 19 Nov 2007 18:13:00 -0500, the renowned CBFalconer
<cbfalconer@yahoo.com> wrote:

>Jim Granville wrote: >> >... snip ... >> >> I'm thinking here I should have taken Joerg's offer of feng shui! >> :) > >That showed up in a crossword the other day, and I still have no >idea what it is or means. Kindly provide a clue.
feng = wind shui = water It's all about the qi. Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
CBFalconer wrote:

> Jim Granville wrote: > > ... snip ... > >>I'm thinking here I should have taken Joerg's offer of feng shui! >>:) > > > That showed up in a crossword the other day, and I still have no > idea what it is or means. Kindly provide a clue.
http://en.wikipedia.org/wiki/Feng_shui -jg