Triangular and Square Wave Generator

There are many types of oscillators, and many different circuit configurations that produce oscillations. Some oscillators produce sinusoidal signals, others produce nonsinusoidal signals. Nonsinusoidal oscillators, such as pulse and ramp (or sawtooth) oscillators, find use in timing and control applications. Pulse oscillators are commonly found in digital-systems clocks, and ramp oscillators are found in the horizontal sweep circuit of oscilloscopes and television sets. The basic components in a feedback oscillator are the amplifier, an amplitudelimiting component, a frequency-determining network, and a (positive) feedback network. Usually the amplifier also acts as the amplitude-limiting component, and the frequency-determining network usually performs the feedback function. The feedback circuit is required to return some of the output signal back to the input. Positive feedback occurs when the feedback signal is in phase with the input signal and, under the proper conditions, oscillation is possible.

VF1 is the triangular wave output and VoSq is the square wave output:

Initially, when power is not applied the voltage across the capacitor C1 is 0. When the power supply is switched ON, the C1 starts charging through the variable resistor P1 and the output of the OPAMP will be at +V positive rail. A fraction of this high voltage is fed back to the non-inverting pin by the resistor network R1, R2. V+ = +V (R2/(R1+R2)) + Vbias

Measuring V+ waveform (the non-inverting input of the OPAMP)

When the voltage across the charging capacitor is increased to a point where the voltage at the inverting pin is higher than the non-inverting pin, the output of the OPAMP swings to negative saturation or 0 V. The capacitor quickly discharges through P1.

time = P1 C1

Now a fraction of the output 0V is fed back to the non-inverting pin by the feedback network R1, R2. When the voltage across the capacitor has become so close to 2.5V that the voltage at the inverting pin is less than the voltage at the non-inverting pin, the output of the OPAMP swings back to the positive saturation. Now the capacitor discharges trough P1 and starts charging in positive direction. This cycle is repeated over time and the result is a square wave swinging between +V and 0V at the output of the OPAMP.