Author Topic: What are they doing!? xtal/osc/caps  (Read 1995 times)

0 Members and 1 Guest are viewing this topic.

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
What are they doing!? xtal/osc/caps
« on: April 03, 2021, 05:36:29 pm »
In the "standard" oscillator circuit (attached) for a crystal to use with a uC, what are the capacitors (C1 and C2) doing?

I mean, I know they're needed but what are they ACTUALLY doing that makes the xtal work whereas (I have found) without them or with the "wrong" caps the xtal does not "work".

I'd love an explanation of the application of the property of capacitance in this instance.

It's purely for education, thank you.
You can release yourself but the only way to go is down!
RJD
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21681
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: What are they doing!? xtal/osc/caps
« Reply #1 on: April 03, 2021, 05:45:46 pm »
The crystal is operating in the series resonant mode, while the oscillator needs a parallel resonant feedback network (180 degree phase shift at resonance, gain peak at resonance; whereas series resonant to ground would be gain minima).  The capacitors act to give a series-parallel transformation, thus giving the desired characteristic.

The network's characteristic impedance is approximately the reactance of the capacitors.  This allows some tuning to be done, e.g. using a somewhat lower ESR crystal on a weak oscillator (perhaps STM family MCUs?).  Mind that the capacitance also has a small effect on the tuned frequency (give or take a kHz or so), so this will also affect exact frequency.  (If capacitance is being reduced, additional capacitance can be connected in parallel with the crystal to maintain the same total capacitance as seen by the crystal; or if increased, some can be connected in series with the crystal.)

You might think to use a crystal in the parallel resonant mode, shunting to ground, with a series impedance to supply it, thus making an impedance divider which has gain peak at resonance; but this has 0 phase shift at resonance (for a resistive supply, or 90 for an inductive one), so won't work with the simplest oscillator (an inverting amplifier).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: What are they doing!? xtal/osc/caps
« Reply #2 on: April 03, 2021, 06:44:35 pm »
CuriousMarc made a good video on the workings of a crystal oscillator:

https://youtu.be/ad8azNovsF8

You can start watching at the 8:16 mark.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 7949
  • Country: us
  • Retired, now restoring antique test equipment
Re: What are they doing!? xtal/osc/caps
« Reply #3 on: April 03, 2021, 06:58:48 pm »
The two capacitors form a Colpitts oscillator (q.v.) with the crystal resonator.
There is a large literature about crystal oscillators.  My go-to reference book is R. J. Matthys:  "Crystal Oscillator Circuits", rev ed 1992, (orig. John Wiley, reprinted by Krieger Pub Co).
 
The following users thanked this post: oPossum, exe

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: What are they doing!? xtal/osc/caps
« Reply #4 on: April 03, 2021, 08:38:01 pm »
.
« Last Edit: August 19, 2022, 04:21:33 pm by emece67 »
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: What are they doing!? xtal/osc/caps
« Reply #5 on: April 03, 2021, 08:44:11 pm »
The two capacitors form a Colpitts oscillator (q.v.) with the crystal resonator.
There is a large literature about crystal oscillators.  My go-to reference book is R. J. Matthys:  "Crystal Oscillator Circuits", rev ed 1992, (orig. John Wiley, reprinted by Krieger Pub Co).

It's a Pierce oscillator.
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 7949
  • Country: us
  • Retired, now restoring antique test equipment
Re: What are they doing!? xtal/osc/caps
« Reply #6 on: April 03, 2021, 08:58:43 pm »
See pages 46 to 47 of the Mathis book on the distinction between Colpitts (more general than Pierce) and Pierce (specific for crystals) circuits.  The Pierce has a different ground point in an otherwise similar circuit, and can be considered as a (very useful) special case of the Colpitts.  Indeed, his circuit is a Pierce.
In the Pierce circuit, the capacitive loading on the crystal is good for Q and frequency stability, but requires higher amplifier gain than the basic Colpitts.
« Last Edit: April 03, 2021, 09:00:29 pm by TimFox »
 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: What are they doing!? xtal/osc/caps
« Reply #7 on: April 03, 2021, 10:00:42 pm »
From wikip:

 

Offline MikeK

  • Super Contributor
  • ***
  • Posts: 1314
  • Country: us
Re: What are they doing!? xtal/osc/caps
« Reply #8 on: April 03, 2021, 10:05:09 pm »
Also, from Microchip's AN826:

"The type of oscillator that appears on the PICmicro® microcontroller is the Pierce"

Anyway, the important thing is knowing what the caps do.
 

Offline emece67

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: What are they doing!? xtal/osc/caps
« Reply #9 on: April 04, 2021, 11:43:54 am »
.
« Last Edit: August 19, 2022, 05:56:10 pm by emece67 »
 
The following users thanked this post: Wolfram, PerranOak

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
Re: What are they doing!? xtal/osc/caps
« Reply #10 on: April 04, 2021, 05:12:06 pm »
Wow! Cheers all.

I didn't realise it was so involved.

emece67: I've copied your post and am going to study it tonight.  ;D
You can release yourself but the only way to go is down!
RJD
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
Re: What are they doing!? xtal/osc/caps
« Reply #11 on: April 08, 2021, 02:20:59 pm »
I think I understood but for one part: I don’t quite get where Zr comes from?
You can release yourself but the only way to go is down!
RJD
 

Online TimFox

  • Super Contributor
  • ***
  • Posts: 7949
  • Country: us
  • Retired, now restoring antique test equipment
Re: What are they doing!? xtal/osc/caps
« Reply #12 on: April 08, 2021, 04:02:11 pm »
In his drawing, Zr is the ratio calculated from the indicated voltage Vxapplied to that node divided by the current flowing into the circuit to the right induced by that voltage.  Of course, the ratio is complex.
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: gb
Re: What are they doing!? xtal/osc/caps
« Reply #13 on: April 10, 2021, 04:12:38 pm »
Ah, I see. That's why the phase shift is zero as this element is from the resistor.
You can release yourself but the only way to go is down!
RJD
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf