Frequency Generation: Crystals and Ring Oscillators

Crystal

 

In this episode Shahriar takes a look at the challenges associated with signal generation for the purposes of timekeeping. More specifically he digs deep into the workings of crystal oscillators and even takes apart some vintage crystals to reveal whats inside! He also shows how this type of circuits can be characterized and compares the performance of a crystal oscillator with that of a ring oscillator under temperature and power supply variations.

 

Part 1:

 

Part 2:

 

Part 3:

 

Part 4:

36 comments

  1. source says:

    Im having a teeny problem. I cant get my reader to pick-up your feed, Im using aol reader by the way.

  2. Saad Hassan says:

    Hello,
    im having problems designing my own crystal oscillator. I dont know where to begin with or what capacitances will be placed with a 4MHz crystal chip. Can you help me? plz

  3. Todd Carney says:

    Absolutely fabulous! All the Signal Path videos are.

    I’m guessing that an RC or an LC oscillator would be inferior even to the ring oscillator. Is that right? I also presume at least part of that lowered quality would result from the characteristic noise level from those discrete component. True?

    Again, Wow! Keep on keeping on!

    • Shahriar says:

      If you are talking about phase-noise as the criteria, it depends mostly on the quality factor of the resonance circuit and general noise from the active components of the oscillator. LC oscillators can be very good in terms of noise. An oscillator that uses an RC for its timing does not use resonance but rather a time constant for setting the frequency, like a ring oscillator or the PWM generator in the next video. Regardless, nearly all free-running VCOs and oscillators are generally used in a PLL with a clean crystal reference.

  4. Jeff says:

    Loved your tutorial. But the spectral analysis of the XO square wave, showed even and odd harmonics, and the amplitude did not decay as quickly as I would expect. A pure square wave has only odd harmonics (1F, 3F, 5F, etc) and the amplitudes drop off as 1/3, 1/5, 1/7, etc. Granted, the XO output wasn’t a pure square wave, but I’m surprised at what I saw. Comment please?

    Also, I’d like to see more about building a practical XO using a crystal and discrete components (or IC gates), rather than using the 4-pin XO in a can.

    Thanks!

    • Shahriar says:

      Dear Jeff,

      Thank you for your very observant remark! Yes, you are right about the spectral content of an ideal square wave. The spectrum should only contain odd-mode harmonics which decay as a Sinc function does with frequency. However, you must consider that the square wave generated by the crystal oscillator (although it looks visually close to being a square wave) contains other frequency components. Even so, you can see from the spectrum that the second harmonic is much weaker than the third harmonic. I suspect that the second harmonic is generated through self mixing and general non-linear effects from the final amplifier (or driver) in the crystal oscillator. To preserve strict spectral purity of a square wave, the driving circuit must be infinitely linear, which of course it is not.

      Great question Jeff!

  5. Viola says:

    I am a simple math and Physics teacher, and as I came across your website I just thought to have a look on it.
    I have to admit that I ended up following carefully every single instant of it, and I am literally amazed. It was on every sense a real lesson for me. I am sure I will come back to your website.
    Congratulations.

  6. thefekete says:

    I was an EE major for about 2 years before I dropped out to start a business, so I missed a few lectures… now heading down the electronics rabbit hole on my own, with help from guys like you.

    Thanks so much for the detailed explanation and examples. I can appreciate the amount of work that goes into making something like this, and just wanted to say thanks for doing it.

  7. Jonathan says:

    Great videos!! Your presentation is excellent and draws me in for more.

  8. Amber Heald says:

    My husband and i felt absolutely delighted when Chris managed to finish up his investigation through the entire ideas he acquired from your very own blog. It is now and again perplexing just to always be giving away information and facts some others may have been selling. And we all fully grasp we now have you to thank for this. The main explanations you made, the straightforward site menu, the friendships you will aid to foster – it’s got everything superb, and it’s assisting our son in addition to the family know that this content is thrilling, and that is very vital. Thanks for all!

    • Shahriar says:

      Thank you for taking the time to leave a comment. I feel that the dissemination of knowledge is a fundamental human responsibility. We stand on the shoulders of giants in order to reach a little higher, to comprehend the universe one step further. We owe it to ourselves to share what we have learned. I hope that you would find our future videos as useful.

  9. I precisely wished to thank you so much once more. I’m not certain the things I could possibly have made to happen without the ideas revealed by you on such area of interest. It was actually a frightful case in my opinion, however , understanding your specialised form you processed that took me to jump for gladness. Extremely happy for your help and even expect you really know what a great job you were putting in instructing the rest by way of your site. Most probably you’ve never met any of us.

  10. Wartex says:

    My question is this: what field do you work in so that you can afford these things??? There is literally $40,000+ of gear on that table. I understand ebay and all but that HP counter alone is $4500 on eBay. Damn.

    • Shahriar says:

      It really is not as much as you think. For example, the HP counter can be bought for less than 1k. Don’t look at those stores listing them for 4k, they are trying to sell you a calibrated one with warranty and so on. I also often buy my equipment as “broken” or “as is” on eBay and fix them up. My synthesizer for example was in bad shape when I got it, it took two weeks to find out what was wrong with it and fix it. Also, my lab has been 12 years in the making, it didn’t become like this overnight!

  11. Lance Jeffrey says:

    Ring oscillators can obviously be used for Voltage and temperature variant oscillators, useful if you want to convert changes in temp or voltage to frequency and Obviously they are cheap, Is there any other advantages to the ring? Also could you clean up the signal (make into a better square wave) generated with such a crude oscillator with something like a comparator with a sharper edge?

    • Shahriar says:

      It is true that ring oscillators change with temperature, but a good temperature controlled oscillator would need to be much more predictable and well modeled. Ring oscillators are simple, and can be used in PLLs to reduce their drift and phase noise. They also can be made in CMOS very easily and require no monolithic inductors.

  12. HH says:

    Very impressive – you have an amazing ability! Don’t stop.

  13. Agent24 says:

    A great presentation. I enjoyed watching the whole thing and learned quite a bit. I look forward to seeing more videos from you!

  14. Scott Harden says:

    That’s one heck of a workbench!

  15. Dale says:

    Fantastic video, I hope you keep them coming.

  16. Scott Smith says:

    Great video. I’m a software guy that gropes around in E.E. land from time to time. Nice that you covered the theory – I stayed glued to my screen for the entire duration. :-)

  17. Jose Marcal says:

    Excellent tutorial!

  18. tron9000 says:

    Very good. has helped my understand the little buggers finally! Also an interesting look at the lengths designing better end more stable oscillators are begin done!

    Bet its wierd powering up those oven controlled oscillators for the first time not knowing they heat up! “ahh its getting hot!! TURN IT OFF TURN IT OFF!”

  19. Anthony C. Roberts says:

    Thanks! Nice toys too.

  20. James Becwar says:

    Thank you so much for the great video! I found it very informative. That was a huge crystal at the end. Very cool! Thanks again.
    -James

    • Shahriar says:

      I am glad you found it informative. Yes, that huge crystal is pretty amazing! The fact that it can drive a 50Ohm load directly is very useful for RF application, it actually produces 20dBm of output power!

  21. Bob says:

    Very nice tutorial! Clear and concise with good quality audio and video. Thanks for sharing and I will be looking forward to more.

  22. Edda says:

    Reached your blog post through Stumbleupon. You already know I will be signing up to your rss feed.

  23. Roel says:

    Great episode, thanks!

  24. [...] sure your test equipment is handy, then give this video series about crystal oscillators a spin. [Shahriar] of the Signal Path Blog put together a four-part video blog post totaling about an [...]

  25. Shahriar says:

    Not at the moment, we are considering setting them up. You can also use the RSS and/or subscribe to our YouTube channel.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>