What are they doing!? xtal/osc/caps - Page 1
Forum section: electronics / beginners

author: PerranOak
author_rank: Frequent Contributor
timestamp: April 03, 2021, 05:36:29 pm
content: 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.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 03, 2021, 05:45:46 pm
content: 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

author: ledtester
author_rank: Super Contributor
timestamp: April 03, 2021, 06:44:35 pm
content: CuriousMarc made a good video on the workings of a crystal oscillator:https://youtu.be/ad8azNovsF8You can start watching at the 8:16 mark.

author: TimFox
author_rank: Super Contributor
timestamp: April 03, 2021, 06:58:48 pm
content: 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).

author: emece67
author_rank: Frequent Contributor
timestamp: April 03, 2021, 08:38:01 pm
content: .

author: MikeK
author_rank: Super Contributor
timestamp: April 03, 2021, 08:44:11 pm
content: Quote from: TimFox on April 03, 2021, 06:58:48 pmIt's a Pierce oscillator.

author: TimFox
author_rank: Super Contributor
timestamp: April 03, 2021, 08:58:43 pm
content: 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.

author: MikeK
author_rank: Super Contributor
timestamp: April 03, 2021, 10:00:42 pm
content: From wikip:

author: MikeK
author_rank: Super Contributor
timestamp: April 03, 2021, 10:05:09 pm
content: 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.

author: emece67
author_rank: Frequent Contributor
timestamp: April 04, 2021, 11:43:54 am
content: .

author: PerranOak
author_rank: Frequent Contributor
timestamp: April 04, 2021, 05:12:06 pm
content: Wow! Cheers all.I didn't realise it was so involved.emece67: I've copied your post and am going to study it tonight.

author: PerranOak
author_rank: Frequent Contributor
timestamp: April 08, 2021, 02:20:59 pm
content: I think I understood but for one part: I don’t quite get where Zr comes from?

author: TimFox
author_rank: Super Contributor
timestamp: April 08, 2021, 04:02:11 pm
content: In his drawing,Zris the ratio calculated from the indicated voltageVxapplied to that node divided by the current flowing into the circuit to the right induced by that voltage. Of course, the ratio is complex.

author: PerranOak
author_rank: Frequent Contributor
timestamp: April 10, 2021, 04:12:38 pm
content: Ah, I see. That's why the phase shift is zero as this element is from the resistor.