9
\$\begingroup\$

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?

\$\endgroup\$
3
  • \$\begingroup\$ It depends on what you want. If your goal is nice and clean square waves or just something. \$\endgroup\$
    – PlasmaHH
    Feb 19, 2016 at 13:41
  • \$\begingroup\$ @PlasmaHH Yes, my goal is a clean square wave \$\endgroup\$
    – bokjezd
    Feb 19, 2016 at 14:44
  • \$\begingroup\$ We have seen this circuit previously: electronics.stackexchange.com/questions/214907/… \$\endgroup\$
    – Steve G
    Feb 19, 2016 at 16:52

4 Answers 4

15
\$\begingroup\$

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.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ +1 for don't use a schmitt to actually sustain the crystal. \$\endgroup\$
    – Neil_UK
    Feb 19, 2016 at 14:18
  • \$\begingroup\$ 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. \$\endgroup\$
    – bokjezd
    Feb 19, 2016 at 14:39
  • \$\begingroup\$ 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. \$\endgroup\$
    – supercat
    Feb 19, 2016 at 23:54
  • 2
    \$\begingroup\$ In the past I have had issues with using the 74hc04, but I have found that the unbuffered version 74hcu04 to work very well. \$\endgroup\$
    – Mumbles
    Oct 13, 2016 at 18:13
4
\$\begingroup\$

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.

\$\endgroup\$
2
\$\begingroup\$

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.

\$\endgroup\$
0
0
\$\begingroup\$

I think you guys are over complicating the subject of Schmidt trigger inverter oscillators (with or without a crystal) IMHO

Consider the Schmitt trigger inverter as a comparator with hysteresis built into it's input. So it behaves as if it has infinite inverting gain when it transitions. Connect it's output back to it's input and it MUST Oscilate as it has no stable state. The frequency depends on the timing (eg RC) on it's input. Without any C, it will be very high, MHz. Even with a high value feedback resistor.

Now consider this like the escapement in a clock mechanism? Without any timing, it would oscillate back and forth very fast. So typically a pendulum is used to control the escapement. The pendulum only needs a little kick to keep it swinging. It has a high "Q" and it only needs to swing enough to flip the escapement. The thresholds on a cmos schmitt gate are very close together by the way,

This applies to a very simple Cmos schmitt trigger Crystal Oscillator. I have only tried this with tiny 32Khz watch crystal, but it seems to work well. The inverter (In my experiment, I'm using CD4093 Nand schmitt triggers) has a 4.7Mohm feedback resistor. Without the crystal, it oscillates at roughly 130Khz, With the crystal connected from input to ground, it locks in at 32Khz. It gets enough of the signal to energise it from the 4.7Mohm feedback. So it's in parallel resonance mode. and it's certainly not being driven hard. If I connect the crystal from output back to input, it still locks in, and the input is being driven harder, So thats' one resistor to bias the input and the crystal to resonante and allow the input to wiggle at 32Khz..... I have not explored this extensively, or with other crystals.... but it works..... I can envisage some extra RC filtering to reduce "no crystal" oscillator to below 60Khz, I would like to look with my 'scope, at the input signal but it's very sensative to capacitance, but I'll figure out a way..

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I think this is more a comment than answer to the original question. Anyway, I firmly believe a Schmitt trigger has no use as the active element driving the crystal, and neither a buffered inverter. As you said yourself, the oscillator is very sensitive e.g. to capacitance, so while it might oscillate at some frequency near the rated crystal frequency, it might be way off so unusable for most purposes you wanted a crystal oscillator to begin with. For simple RC oscillator the Schmitt trigger is fine. The original question was just why the final buffer stage needs to be a Schmitt buffer. \$\endgroup\$
    – Justme
    Jan 10 at 15:08
  • \$\begingroup\$ I take your point.. That diagram that pops up when googling IS miss-leading, it isn't correct. Hard to get things removed from google The cmos Schmitt trigger is very useful device to make an oscialltor. You don't need extra two capacitors to introduce 180 phase shift! All you need is the crystal and the feedback resistor with which one can "tune" the input response. 32kHz crystal is happy with > 1MOhm. Lower and one needs need to add a an input capacitor. If I can find a TTL Scmitt inverter, I might try it again... :-) \$\endgroup\$ Jan 12 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.