Schmitt Trigger Oscillators: A Simple Square Wave Generator

Schmitt trigger oscillator

Square waves are important waveforms that are sometimes taken for granted, but they are important in digital systems as clocks and analog systems as excitation sources. Analog systems often use square waves without a typical crystal oscillator, so they need an alternative method to source a waveform into a circuit. Oscillator circuits built from amplifiers, transistors, and charging/discharging RC circuits offer one simple way to create an oscillating waveform, which can then be tailored to your specific frequency of interest in your system.

One of the simplest analog waveform generator circuits is the Schmitt trigger oscillator. This oscillator uses either a dedicated Schmitt trigger circuit, or an op-amp with feedback applied to provide gain. The best part of a Schmitt trigger circuit is its configurability, where the frequency of the output signal is very easy to control with passive components. There is also a certain condition where the output has 50% duty cycle and thus it could be used as a clock.

How to Design a Schmitt Trigger Oscillator

A circuit diagram for a Schmitt trigger oscillator is shown below. In this diagram, the feedback resistor and the capacitor on the input combine to determine the repetition frequency of the output square wave, which is based on their time constant. The repetition frequency is proportional to the inverse time constant, but the actual value depends on some other factors.

Schmitt trigger oscillator circuit

The input/output waveforms are also shown; the input waveform is not being fed by an external generator. The input waveform is created through charging and discharging of the RC circuit formed by the feedback resistor (R) and the input capacitor (C). The feedback resistance is generally chosen to be very high with low (0 Ohms) resistance on the input feedline, so the circuit has high voltage gain. Therefore, it does not take much input voltage to excite the circuit and cause it to begin oscillating between two larger rail voltages.

Input and Output Waveforms

The resulting switching process in this oscillator circuit depends on the threshold voltages in the Schmitt trigger. The conversion between the exponential rising/falling waveform and a square wave is shown in the diagram below.

Schmitt trigger oscillator circuit

The conversion process is based on the same type of railing action that occurs in the typical usage of a Schmitt trigger or a high-gain op-amp.

  1. When the capacitor initially charges, its voltage rises above the low threshold (VTH-) and eventually reaches the high threshold (VTH+)
  2. During Step #1, the oscillator output is at VHI.
  3. Once the capacitor’s voltage reaches the high threshold (VTH+), the output switches states very quickly and saturates to VLO.
  4. Very quickly after switching output states, the capacitor begins to discharge, and its voltage drops to the low threshold (VTH-).
  5. Repeat (go to Step #1).

The output is continuously switching between its high and low rail voltages, so the output voltage levels can be controlled entirely with those connections. What’s left now is to determine the output frequency in terms of the threshold voltages in the circuit.

Output Frequency

Just like a standard Schmitt trigger circuit, there is a hysteresis window that will affect when the output switches between its high and low rail voltages. This is why the repetition frequency is not strictly the inverse of the RC time constant, and it is only proportional to this value. In addition, it is possible for the resulting square wave train to have a duty cycle that is not 50%. To see how this works, we can use the following formulas.

In the following derivation, we assume that VLO = 0 V; other values can be used by a linear transformation of VHI → VHI - VLO. The amount of time where the output signal is high depends on the value of VHI and the threshold voltages:

Schmitt trigger oscillator circuit clock frequency

The amount of time the output signal is low depends only on the threshold voltages:

Schmitt trigger oscillator circuit clock frequency

The sum of these two values is equal to the period of the output signal, and the inverse of the period is the repetition frequency.

In general, for practical situations and standard logic levels, the duty cycle is not always 50%, so the output could not always be used as a perfect clock pulse. However, it is possible to derive a condition on the threshold voltages where the output is exactly 50% duty cycle. To do this, set the high and low times above equal to each other, remove the RC value and the natural logarithm operation, and do some algebra.

You will arrive at the following condition on the threshold voltages that gives exactly 50% duty cycle on the output signal:

Schmitt trigger oscillator circuit clock frequency

50% duty cycle condition for a Schmitt trigger oscillator.

If you want to use the output square wave signal as a clock, then you will need to aim for this design condition to ensure consistency on the rising and falling clock edges.

When you’re ready to create and simulate your oscillator circuits, use the comprehensive set of simulation tools in PSpice from Cadence. PSpice users can access a powerful SPICE simulator as well as specialty design capabilities like model creation, graphing and analysis tools, and much more.

Subscribe to our newsletter for the latest updates. If you’re looking to learn more about how Cadence has the solution for you, talk to our team of experts.

About the Author

Cadence PCB solutions is a complete front to back design tool to enable fast and efficient product creation. Cadence enables users accurately shorten design cycles to hand off to manufacturing through modern, IPC-2581 industry standard.

Follow on Linkedin Visit Website More Content by Cadence PCB Solutions
Previous Article
How to Reduce Schmitt Trigger Oscillator Ringing
How to Reduce Schmitt Trigger Oscillator Ringing

Learn what causes Schmitt trigger oscillator ringing in your circuits and in measurements.

Next Article
Using the X-Band and Ka-Band Frequencies for Radar Applications
Using the X-Band and Ka-Band Frequencies for Radar Applications

Learn the advantages and challenges of X-band and Ka-band radar applications in this article.

OrCAD Free Trial

Try OrCAD Today