A square wave generator's output oscillates between two unstable states with a constant frequency prescribed by the circuit parameters. An op-amp implementation of square wave generator is shown in the following circuit diagram.
Working and Circuit Analysis
Square Wave Generator Using Op-Amp |
Here the op-amp is wired up as a comparator at the non-inverting input. If V+ is greater than V- then the output voltage Vout will swing to +Vcc and to -Vcc if V+ is less than V- . When the circuit is switched on assume the output voltage is +Vcc and the capacitor C begins charging through the feedback resistor R with the time constant RC. As a result V- increases with time and when it becomes greater than V+ the output voltage swings to the negative rail voltage -Vcc. Now the capacitor is is discharged through R. When the voltage becomes less than -Vcc the output voltage swings back to +Vcc and the cycle begins again generating square wave. The capacitor charging and discharging cycles and output waveforms are sketched below:
Square Wave Generator Waveforms |
Voltage at the non-inverting input is given by the divider equation: