Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #565454

Re: A bit of help with a crystal oscillator

From "Tim Williams" <tiwill@seventransistorlabs.com>
Newsgroups sci.electronics.design
Subject Re: A bit of help with a crystal oscillator
Date 2019-11-06 19:54 -0600
Organization A noiseless patient Spider
Message-ID <qpvt6o$l67$1@dont-email.me> (permalink)
References <qpudmu$47b$1@dont-email.me> <qpukus$eo8$1@dont-email.me> <qpureh$efn$1@dont-email.me>

Show all headers | View raw


"Peter" <nospam@nospam9876.com> wrote in message 
news:qpureh$efn$1@dont-email.me...
> The branded Kyocera one
> CL=8pF
> ESR=60R
> Pmax=100uW
> C0=?
>
> I think the chip pin and PCB capacitance is about 5pF, so what should
> the two caps be?
>
> If the load caps are 10pF, then both are really 15pF. Two 15pF in
> series = 7.5pF so an 8pF xtal is right.
>
> So for my "10pF" chinese one I should be used two 15pF caps. Is this
> right? It seems weird.

Yup, that is correct!


> Presumably getting this wrong doesn't change the starting conditions
> for the oscillator; it just makes the frequency slightly off, a few
> ppm?

Getting the capacitors wrong, also changes what impedance the crystal is 
transformed into -- you're actually making a parallel resonant tank, that's 
what the oscillator needs, but the crystal is series.  There's some RF / 
impedance network magic that occurs, converting the crystal's series 
resonance into effectively a parallel resonance.  The conversion factor, in 
part, is the capacitors' reactance.

So, if the capacitors are too small, the impedance may be too high and, 
well, that would probably be fine actually, but what you don't know is 
whether the oscillator's input pin has any loading resistance.

In the general case, the input has a finite resistance -- like the base 
resistance in a BJT Pierce oscillator.  Clearly you're making an impedance 
divider between the crystal and that input resistance, and you don't want to 
end up on the wrong side of that.

In this case, the CMOS input probably does have a high impedance, so it 
probably will still work.  It's not obvious how much internal feedback or 
loss there may be, and so at what point it will fail.  But given that 
there's only a factor of 4 between proper loading and no external loading 
(pin capacitance alone), you might not be able to reach that point in this 
case. :)  The only downside then would be the shift in frequency.

As for higher capacitance, that lowers the resonator impedance, and the 
oscillator only has so much output power and gain, and at some point it 
won't oscillate, it will be damped instead.  That's well in the marginal 
range, of course.


> The series resistor is more tricky.
>
> Normally with oscillators around chips I have seen a swing on the
> driving pin of almost GND to VCC, and perhaps 1/3 of that on the other
> side of the xtal. Most people never bother with this resistor.
>
> But I have seen some weird things on 32768Hz oscillators. Years ago I
> had a design which would mysteriously gain maybe a minute per week. I
> never worked out why. The RTC was a DS11302 - perhaps the lowest power
> RTC ever. I reckoned that some RF was getting in.

Yeah, there are different kinds of oscillators; some are literally just what 
they say, a couple inverters, biased logic level input, logic level output. 
CMOS or what have you.

These, you need a series resistor to limit the power into the crystal, and 
to match its impedance -- you have a filter network, and it needs a 
termination resistor somewhere.  You could perhaps put the resistor at the 
other side (to ground, through a coupling capacitor so as not to affect the 
DC bias), but that puts more power through the crystal, which may be too 
much.

Others are constant current drivers, or at least higher impedance.  The 
current may be switched (CMOS logic into something that I guess would look 
much like half an LVDS output stage), or it may be a fully analog circuit 
(as with a typical unbuffered CMOS inverter).  These, the damping is 
provided by the crystal ESR, which needs to be appropriate; again, that's 
transformed by CL to the resonator impedance.  These can be the most 
efficient, because the least loss is present in the circuit.

It may also be that they use really long transistors (high Rds(on)), or 
literally just use the big series resistor but put it inside instead.  These 
work similarly, but as some power is dissipated internally by that damping 
resistance, the power consumption should be higher.

As for what's out there -- several families of MCUs have selectable drive 
strength.  I think some STM32s offer this, and MSP430s, and I think even 
some AVRs for example.  You need enough drive (in terms of power at a 
typical crystal voltage or current, or in terms of gain versus resonator 
attenuation) for the crystal in question, and if you're having problems, you 
can potentially just select the next level up, maybe adjust CL, and be set.

Regarding 32kHz crystals -- spooky things can happen, because the impedance 
is quite high.  CL is similar (10s pF) but the frequency is a fraction of 
the other case.  So the resonator impedance is huge, like 100kohms or more. 
It doesn't take much interference, say in the electric field from a nearby 
wire, at just the right frequency, to screw that up.

Good layout isn't so much of a problem, it's more about overall physical 
size, and having ground around it.  Place the crystal beside the oscillator, 
not at a distance.  Provide backside or internal ground plane.  Don't route 
other signals beside or underneath it.  Some say to put guard traces around 
it on top as well, but that's kind of silly to be honest.  If you use a 
4-pin crystal with case/shield/ground connections, ground it.  Worst case, 
put an RF shield over everything.

Tim

-- 
Seven Transistor Labs, LLC
Electrical Engineering Consultation and Design
Website: https://www.seventransistorlabs.com/ 

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-06 12:18 +0000
  Re: A bit of help with a crystal oscillator "Tim Williams" <tiwill@seventransistorlabs.com> - 2019-11-06 08:27 -0600
    Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-06 16:13 +0000
      Re: A bit of help with a crystal oscillator "Tim Williams" <tiwill@seventransistorlabs.com> - 2019-11-06 19:54 -0600
  Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-06 08:02 -0800
    Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-06 16:14 +0000
      Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-06 09:28 -0800
    Re: A bit of help with a crystal oscillator mpm <mpmillard@aol.com> - 2019-11-06 08:17 -0800
      Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-06 09:18 -0800
        Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-06 17:27 +0000
          Re: A bit of help with a crystal oscillator John Larkin <jlarkin@highland_atwork_technology.com> - 2019-11-06 10:54 -0800
            Re: A bit of help with a crystal oscillator mpm <mpmillard@aol.com> - 2019-11-06 18:05 -0800
              Re: A bit of help with a crystal oscillator Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-11-07 08:16 +0000
                Re: A bit of help with a crystal oscillator "Don Kuenz, KB7RPU" <g@crcomp.net> - 2019-11-07 15:28 +0000
                Re: A bit of help with a crystal oscillator Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-11-08 08:14 +0000
                Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-08 17:56 +0000
                Re: A bit of help with a crystal oscillator Jan Panteltje <pNaOnStPeAlMtje@yahoo.com> - 2019-11-09 07:28 +0000
          Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-07 01:52 +0000
            Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-07 02:56 +0000
            Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-06 19:41 -0800
              Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-07 10:52 +0000
                Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-07 09:48 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-07 18:36 +0000
                Re: A bit of help with a crystal oscillator John Larkin <jlarkin@highland_atwork_technology.com> - 2019-11-07 10:47 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-07 21:10 +0000
                Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-07 18:57 +0000
                Re: A bit of help with a crystal oscillator John Larkin <jlarkin@highland_atwork_technology.com> - 2019-11-07 11:41 -0800
                Re: A bit of help with a crystal oscillator Jeroen Belleman <jeroen@nospam.please> - 2019-11-08 09:47 +0100
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-08 12:00 +0000
                Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-08 07:21 -0800
                Re: A bit of help with a crystal oscillator Rick C <gnuarm.deletethisbit@gmail.com> - 2019-11-08 07:39 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-08 16:14 +0000
                Re: A bit of help with a crystal oscillator John Larkin <jlarkin@highland_atwork_technology.com> - 2019-11-08 10:20 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-08 18:32 +0000
                Re: A bit of help with a crystal oscillator John Larkin <jlarkin@highland_atwork_technology.com> - 2019-11-08 10:58 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-08 19:34 +0000
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-09 03:04 +0000
                Re: A bit of help with a crystal oscillator upsidedown@downunder.com - 2019-11-09 07:08 +0200
                Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-08 22:05 -0800
                Re: A bit of help with a crystal oscillator upsidedown@downunder.com - 2019-11-09 10:08 +0200
                Re: A bit of help with a crystal oscillator upsidedown@downunder.com - 2019-11-09 14:07 +0200
                Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-09 08:59 -0800
                Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-09 10:01 +0000
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-09 13:51 +0000
                Re: A bit of help with a crystal oscillator upsidedown@downunder.com - 2019-11-09 13:45 +0200
                Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-09 09:03 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-09 17:27 +0000
                Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-09 09:59 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-09 19:53 +0000
                Re: A bit of help with a crystal oscillator jlarkin@highlandsniptechnology.com - 2019-11-09 12:08 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-09 23:45 +0000
                Re: A bit of help with a crystal oscillator Jeroen Belleman <jeroen@nospam.please> - 2019-11-08 20:27 +0100
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-08 21:16 +0000
                Re: A bit of help with a crystal oscillator Jeroen Belleman <jeroen@nospam.please> - 2019-11-08 22:43 +0100
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-08 22:21 +0000
                Re: A bit of help with a crystal oscillator Rick C <gnuarm.deletethisbit@gmail.com> - 2019-11-08 15:10 -0800
                Re: A bit of help with a crystal oscillator Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-11-09 18:35 +0200
                Re: A bit of help with a crystal oscillator keith wright <keith@kjwdesigns.com> - 2019-11-08 20:30 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-09 05:07 +0000
                Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-09 10:04 +0000
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-09 13:41 +0000
                Re: A bit of help with a crystal oscillator Rick C <gnuarm.deletethisbit@gmail.com> - 2019-11-08 14:46 -0800
                Re: A bit of help with a crystal oscillator Steve Wilson <no@spam.com> - 2019-11-08 23:31 +0000
                Re: A bit of help with a crystal oscillator Rick C <gnuarm.deletethisbit@gmail.com> - 2019-11-08 17:35 -0800
    Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-06 16:54 +0000
  Re: A bit of help with a crystal oscillator Peter <nospam@nospam9876.com> - 2019-11-14 21:48 +0000
  Re: A bit of help with a crystal oscillator John Larkin <jlarkin@highland_atwork_technology.com> - 2019-11-14 14:57 -0800
  Re: A bit of help with a crystal oscillator LM <sala.nimi@mail.com> - 2019-11-13 17:30 +0200

csiph-web