Thursday, 20 November 2014

Crystals, Oscillators, and Resonators. What the difference?



I am trying to figure out the difference between crystals, oscillators, and resonators. I'm starting to grasp it but I still have some questions.


From my understanding, an oscillator is built from a crystal and two capacitors. What is a resonator then? Is it a difference in terminology?


If an oscillator and a resonator are similar, why do these two items:


http://www.digikey.com/product-detail/en/HWZT-16.00MD/535-9379-ND/675574


http://www.digikey.com/product-detail/en/FCR16.0M2G/445-1646-ND/653108


have two pins out and no ground. Whereas this one


http://www.digikey.com/product-detail/en/ZTT-16.00MX/X908-ND/170095


has three pins one of which is a ground?


Will any of these three devices work as an external clock for a microcontroller?


PS: Bonus points for an explanation of how the capacitors help the crystal work properly. :)




Answer



Both ceramic resonators and quartz crystals work on the same principle: the vibrate mechanically when an AC signal is applied to them. Quartz crystals are more accurate and temperature stable than ceramic resonators. The resonator or crystal itself has two connections. On the left the crystal, right the ceramic resonator.


enter image description here enter image description here


Like you say the oscillator needs extra components, the two capacitors. The active part which makes the oscillator work is an amplifier which supplies the energy to keep the oscillation going.


enter image description here


Some microcontrollers have a low-frequency oscillator for a 32.768 kHz crystal, which often has the capacitors built-in, so that you only need two connections for the crystal (left). Most oscillators, however, need the capacitors externally, and then you have thee connections: input from the amplifier, output to the amplifier, and ground for the capacitors. A resonator with three pins has the capacitors integrated.


The function of the capacitors: in order to oscillate the closed loop amplifier-crystal must have a total phase shift of 360°. The amplifier is inverting, so that's 180°. Together with the capacitors the crystal takes care of the other 180°.


edit
When you switch a crystal oscillator on it's just an amplifier, you don't get the desired frequency yet. The only thing that's there is a low-level noise over a wide bandwidth. The oscillator will amplify that noise and pass it through the crystal, upon which it enters the oscillator again which amplifies it again and so on. Shouldn't that get you just very much noise? No, the crystal's properties are such that it will pass only a very small amount of the noise, around its resonance frequency. All the rest will be attenuated. So in the end it's only that resonance frequency which is left, and then we're oscillating.


You can compare it with a trampoline. Imagine a bunch of kids jumping on it randomly. The trampoline doesn't move much and the kids have to make a lot of effort to jump just 20cm up. But after some time they will start to synchronize and the trampoline will follow the jumping. The kids will jump higher and higher with less effort. The trampoline will oscillate at its resonance frequency (about 1Hz) and it will be hard to jump faster or slower. That's the frequencies that will be filtered out.

The kid jumping on the trampoline is the amplifier, she supplies the energy to keep the oscillation going.


Further reading
MSP430 32 kHz crystal oscillators


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...