There are different types of comparators such as electrical comparators, electronic comparators, mechanical comparators, optical comparators, sigma comparators, pneumatic comparators, and digital comparators, etc., which are used for different types of applications. Consider the comparators that are used in designing electrical and electronics projects circuits. The op amp comparator circuit is frequently used in many applications. In this article, we will discuss about how to use an op amp as a comparator. But, primarily we must know what is a comparator.
What is a Comparator?
In general, a comparator can be defined as a device that consists of two input terminals, one terminal is fed with the reference input signal and the other input is fed with the actual value of the signal. Then, based on the difference between these two inputs, it generates an output signal as either 0 (low) or 1 (high).
In electrical and electronic terminology, a device that is used to compare two voltages or currents fed to the two analog input terminals and produces one binary digital output signal that indicates which is the larger is called as a comparator.
The two analog input terminals are V+ & V- and digital output is V0. This output signal can be defined as
V0 = 1, if V+ > V- and
V0 = 0, if V+ < V-
Comparators are frequently used in the devices that are used to measure analog signals, relaxation oscillators, and analog to digital converters (ADCs). These comparators comprise of high-gain differential amplifier and the comparators can be built using operational amplifiers.
It is a DC coupled high gain electronic voltage amplifier that consists of two input terminals; a differential input is fed to these input terminals and produces a single output potential. The potential difference between its input terminals is amplified to produce an output that is hundred thousands times the difference between the input signals.
If the open loop gain of the amplifier is AOL and V+ is non-inverting input and V- is inverting input, then the output of the amplifier can be represented as
Vout = AOL (V+ – V-).
There are different types of operational amplifiers, but 741 op amps are frequently used as comparators.
Op Amp as Comparator
741 op amp is a basic operational amplifier that can be used to perform operations of a comparator in simple electrical and electronic circuits. For example, consider a temperature controlled switch; this switch is used to switch on or off a circuit which is to be controlled based on the temperature. If the temperature exceeds the preset reference value, then the temperature sensor produces an output voltage (low or high) accordingly.
Standard operational amplifiers are designed for low-power amplification purposes. They need some time to recover their output voltage and the Op amp to start operating again in a linear manner in case Op amps are driven into out of saturation. Input signals rapidly change in specific comparator applications such as audio level sensors or analog to digital converters. The Op amps that are designed as amplifiers are not predominantly suited to use as comparators.
There is one more problem with the basic comparator arrangement, that is high frequency voltage variations caused by noise. It is to be considered with op amps that are specially designed as comparators rather than amplifiers. If the input signal voltage is close to the reference voltage, then there will be a significant noise on the input signal. This random nature of the noise will cause high frequency voltage variations, due to this, in rapid successions, the input signal voltage will go higher or lower than the reference voltage.
This will result in temporary oscillations of output between its maximum and minimum voltage levels. But, hysteresis can be applied to overcome these types of problems. In Schmitt trigger circuit arrangement hysteresis gap can be adjusted using positive feedback by applying hysteresis to an op amp comparator circuit. The figure shows op amp comparator circuit with hysteresis.
Op Amp Comparator Circuit
In general, the output of the op amp swings positive and negative to a maximum voltage that is close to supply potentials. If we connect a typical 741 op amp to a +/-18V, then the maximum output voltage is +/-15V. This is because of extreme high open loop gain of the op amp (10,000 to 1 million). If the voltage difference of +/-150microvolts is created by any input, then it may be amplified by one million times and output will be driven into saturation. Thus, the output stocks at its maximum value or minimum value.
This maximum open loop can be used in case of instrumentation or for comparing two voltages while using op amp as a comparator. Thus, the output will be maximizing high or minimum low value based on the difference between the input voltage and reference voltage (input voltage that is few micro volts greater or less than reference voltage).
The reference voltage is applied to non-inverting input pin of the op amp and variable voltage is applied to the inverting input terminal of the op amp. From the op amp comparator circuit shown in the figure, if the voltage applied to pin 2 is greater than the reference voltage applied at pin 3, then the output will be at low voltage and it is slightly greater than –Vs. If the voltage applied to pin 2 is less than the reference voltage applied at pin 3, then the output will be at high voltage and it is slightly less than +Vs.
There are many op amp comparators dedicated that are used for high speed comparisons; these op amp comparator circuit changes their output state in less than 1 microsecond. But these fast comparing op amp comparator circuits will consume more power based on the speed of comparison. There are different types of comparators that are classified based on speed of comparisons and the amount of power consumption. The specific op amp comparator is used for a particular application based on required speed and important parameter such as speed or power consumption.
Disadvantages of Op Amp Comparator
There are some disadvantages with op amp comparators compared with the performance of dedicated comparators:
- These op amp comparator circuits are typically used in applications where low performance is acceptable.
- Op amps takes more time to recover from saturation, as these are designed to operate in linear mode with negative feedback.
- An external hysteresis is always required for slow moving inputs, op amps doesn’t have any internal hysteresis.
- There will be diodes connected back to back between inputs of many op amps, that may cause unpredicted current at inputs.
Comparator is used for comparing two inputs and thus gives a digital output low or 0 and high or 1 based on the difference between two inputs. 741 op amp can be used as a comparator, as discussed above in this article. Share your opinion on comparator circuits and op amp comparator by posting your comments in the comments section below.