Most digital systems require some kind of a timing waveform, for instance, a source of trigger pulses is required for all clocked sequential systems. In digital systems, a rectangular waveform is most desirable (unlike analog systems where sinusoidal signals are often used). The generators of rectangular waveforms are referred to as multivibrators. Multivibrators are of three types viz astable (or free-running) multivibrators, monostable multivibrators (or one-shot) and bistable multivibrators (or flip-flops). All these multivibrators have already been discussed.
Until a few years ago, multivibrators used to be designed using discrete devices, such as vacuum triodes, bipolar junction transistors (BJTs), field-effect transistors (FETs) etc, which have become obsolete now because of the availability of various integrated circuits (ICs). The ICs used in multivibrators are (i) op-amps (ii) timers (iii) logic gates and (iv) monostable multivibrators (MMVs).
Here we will be dealing with use of op-amps in non-sinusoidal waveform generators orrelaxation oscillators.
How to make a comparator using Op-Amp
741 IC Non-Inverting Comparator Circuit
Often two voltage signals are to be compared and to be distinguished which is stronger. For such situations, a comparator may be the perfect solution. It also forms the basic building block required for non-sinusoidal waveform generators or relaxation oscillators, so it deserves priority in discussion over relaxation oscillators.
We have studied that when the op-amp is used in open-loop configuration (or without feedback) any input signal (differential or single) which even slightly exceeds zero drives the output into saturation because of very high open-loop voltage gain (nearly infinity) of op-amp. It means that the application of a small differential input signal of appropriate polarity causes the ‘ output to switch to its either saturation. Thus op-amp comparator is a circuit with two inputs and one output. The two inputs can be compared with each other i.e. one of them can be considered a reference voltage, Vref.
Figure shows an op-amp comparator circuit. A fixed reference voltage Vref is applied to the inverting (-) input terminal and sinusoidal signal uin is applied to the non-inverting (+) input terminal. When vin exceeds Vref the output voltage goes to positive saturation because the voltage at the (-) input is smaller than at the (+) input. On the other hand, when vin is less than Vref the output voltage goes to negative saturation. Thus output voltage uout changes from one saturation level to another whenever vin = Vref ,.as illustrated in figure. In short, the comparator is a type of an analog-to-digital converter (ADC). At any given time the output voltage waveform shows whether vin is greater or less than Vref. The comparator is sometimes referred to as a volt-level detector because for a desired value of Vref, the voltage level of the input voltage vin can be detected.
Diodes D1 and D2 are provided in the circuit to protect the op-amp against damage due to excessive input voltage. Because of these diodes, the differential input voltage vd is clamped to either + 0.7 V or -0.7 V, hence the diodes are called clamp diodes. There are some op-amps with built-in input protection. Such op-amps need not to be provided with protection diodes. The resistance R1 in series with vin is used to limit the current through protection diodes D1 and D2 while resistance R is connected between the inverting (-) input terminal and Vref to reduce the offset problem.
When the reference voltage Vref is negative with respect to ground, with a sinusoidal signal applied to the non-inverting input terminal, the output voltage will be as illustrated in figure.Obviously, the amplitude of vin must be large enough to pass through Vref for switching action to take place.Since the sinusoidal input signal is applied to the non-inverting terminal, this circuit is called the non-inverting op-amp comparator.
Similarly an inverting op-amp comparator can be had by applying the sinusoidal input to the inverting (-) input terminal to the op-amp.
Figure shows the circuit for an inverting comparator in which the sinusoidal input signal vin is applied to the inverting (-) input terminal while the reference voltage Vref is applied to the non-inverting (+) input terminal. In this circuit Vref is obtained by the use of a potentiometer forming a potential divider arrangement with dc supply voltage + Vcc and – VEE. As the wiper connected to (+) terminal is moved toward + Vcc, Vref becomes more positive, while if it is moved toward – VEE, Vref becomes more negative.
The input and output waveforms are shown in figures.Comparators are used in circuits such as discriminators, voltage level detectors, oscillators, digital interfacing, Schmitt trigger etc.