8

In all sources I've seen about quartz crystal oscillators using CMOS inverters there's a note like this:

schmitt inverter note

But why Schmitt inverter is needed? Won't classic 74HC04 work?

bokjezd
  • 105
  • 1
  • 1
  • 5
  • It depends on what you want. If your goal is nice and clean square waves or just something. – PlasmaHH Feb 19 '16 at 13:41
  • @PlasmaHH Yes, my goal is a clean square wave – bokjezd Feb 19 '16 at 14:44
  • We have seen this circuit previously: http://electronics.stackexchange.com/questions/214907/need-help-in-creating-and-debugging-a-8mhz-clk-circuit/214913#214913 – Steve G Feb 19 '16 at 16:52

3 Answers3

14

A Schmitt trigger inverter is a bad idea for the first inverter which is driving the crystal directly. It may not even oscillate at all as shown, or oscillate at some undesired frequency. Note resistor R1. That is supposed to bias the inverter as a linear amplifier close to the middle of its output range. The little bit of noise generated by the inverter will be filtered by the crystal so that the part of the noise at the crystal frequency makes it back to the input of the inverter with a phase shift. It gets amplified by the inverter, filtered thru the crystal again, etc. Eventually oscillations build up to a steady level, which can take 100s of cycles or more.

This assumes the first inverter is roughly a linear amplifier. A Schmitt trigger makes it highly non-linear. It will introduce frequencies of its own, and possibly overdrive the crystal. Crystals are highly tuned filters, but giving them crap to filter is not going to result in good frequency accuracy, and may allow for stable oscillations at other than the desired frequency.

The second inverter being a Schmitt trigger does make some sense. The first inverter really produces a analog signal. It will be more of a sine wave than a square wave, and probably not full rail to rail amplitude. Normally, amplifying and clipping this by running thru another inverter is good enough. The Schmitt trigger should make the digital output signal a little cleaner.

Usually Schmitt triggers aren't used in crystal drivers. This is because they can't be used for the first inverter, and it's easier to use multiple inverters on the same chip. The 74HC04 you mention has 6 of them on a chip, for example.

Again, most of the time following the first stage with just another inverter gets you a good enough square wave. If you really need fast edges and the crystal frequency is low, then a Schmitt trigger can help. You can still do that with a 74HC04. I'd use one inverter to run the crystal, a second just as a buffer, then two with a little DC feedback around them to make the Schmitt trigger. The reason that takes two inverters is that you need positive gain.

Here is what I'm talking about:

Again, for many applications the output from IC1B will be good enough.

Note also that this circuit requires a parallel resonant crystal. This means its frequency is specified where the phase shift is right for feedback around a amplifier with negative gain. A series resonant crystal will work but the frequency will be off a little.

Olin Lathrop
  • 310,974
  • 36
  • 428
  • 915
  • 1
    +1 for don't use a schmitt to actually sustain the crystal. – Neil_UK Feb 19 '16 at 14:18
  • I found that all crystals are the same, but sometimes parallel frequency is stamped and sometimes series. However I couldn't find which frequency is most often stamped on the crystal. – bokjezd Feb 19 '16 at 14:39
  • A series resistor between the inverter and the crystal may make things reasonably reliable, and may be useful in some cases if the inverter is within a CPLD or other such device. I would expect power efficiency to be poor, but I don't know about frequency accuracy or crystal stress. – supercat Feb 19 '16 at 23:54
  • 2
    In the past I have had issues with using the 74hc04, but I have found that the unbuffered version 74hcu04 to work very well. – Mumbles Oct 13 '16 at 18:13
4

Beware that "Schmitt Trigger Action" (sharp cross-over comparator-based input) is often confused with a "Schmitt Trigger" (amplifier with positive feedback yielding hysteresis).

Example: The 74HCU04 is a part with hex un-buffered inverters specifically designed for creating oscillators. It has "Schmitt Trigger Action" inputs, hence the inverter symbol doesn't have the hysteresis symbol.

Amateur designers may lock-in on the word "Schmitt" and assume the input has hysteresis, and wrongly add the symbol.

DON'T use buffered parts for constructing oscillators, as their extremely high-gain (on the order of a thousand or more, vs. 100 or less for un-buffered) makes them very sensitive to any parametric variation, i.e. supply voltage, temperature change, part tolerance, wafer-to-wafer & gate-to-gate variations, etc.

Dave Null
  • 41
  • 2
2

Crystal quartz oscillators generate sinusoidal waves, which is not appropriate for a clock signal since we want rising & falling edges as clean as possible.

The Schmitt trigger is used to generate a square wave from this sinusoidal wave. Its hysteresis properties makes it robust against false triggering.

The output signal will be cleaner, and the clock generator is immediately able to drive a digital high-Z input.

MaximGi
  • 1,051
  • 8
  • 20