Decoding Comparators and their importance in computer logic
- Get link
- X
- Other Apps
Comparators are devices that compare two voltages or currents and output a digital signal indicating which is larger. The output value of the comparator indicates which of the inputs is greater or lesser. A comparator compares the two inputs applied to it and produces the comparison as the output. It has two analog input terminals and one binary digital output. They are commonly used in devices that measure and digitize analog signals, such as successive-approximation ADCs and relaxation oscillators.
The most frequent application for comparators is the comparison between a voltage and a stable reference. Comparators have many applications, including threshold detectors/discriminators, zero-crossing detectors, and oscillators.
Principles of Operation
At its core, a comparator compares two input voltages and produces an output based on their relative levels. Typically, comparators consist of two inputs: a non-inverting input (+) and an inverting input (-), along with one output. When the voltage at the non-inverting input exceeds that at the inverting input, the output switches to a high state, and vice versa. This behavior forms the basis for voltage comparison in electronic systems.
How do you make a comparator?
A simple comparator can be achieved using an op amp without negative feedback. Its high voltage gain enables it to resolve very small differences in input voltage. Comparators can improve upon this basic design with added features, such as hysteresis and internal references.
Main Two Types of Comparators
The two basic types of voltage comparator are inverting and non-inverting, depending on which terminal the input signal is applied to.
Inverting Comparator
An inverting comparator is an op-amp based comparator for which a reference voltage is applied to its non-inverting terminal and the input voltage is applied to its inverting terminal. This comparator is called as inverting comparator because the input voltage, which has to be compared is applied to the inverting terminal of op-amp.
The operation of an inverting comparator is very simple. It produces one of the two values, +Vsat and −Vsat at the output based on the values of its input voltage Vi and the reference voltage Vref.
The output value of an inverting comparator will be −Vsat, for which the input Vi voltage is greater than the reference voltage Vref.
The output value of an inverting comparator will be +Vsat, for which the input Vi is less than the reference voltage Vref.
The operation of the inverting comparator:
During the positive half cycle of the sinusoidal input signal, the voltage present at the inverting terminal of op-amp is greater than zero volts. Hence, the output value of the inverting comparator will be equal to −Vsat during positive half cycle of the sinusoidal input signal.
Similarly, during the negative half cycle of the sinusoidal input signal, the voltage present at the inverting terminal of the op-amp is less than zero volts. Hence, the output value of the inverting comparator will be equal to +Vsat during negative half cycle of the sinusoidal input signal.
We can observe that the output transitions either from −Vsat to +Vsat or from +Vsat to −Vsat whenever the sinusoidal input signal is crossing zero volts. In other words, output changes its value when the input is crossing zero volts. Hence, the above circuit is also called as inverting zero crossing detector.
Non-Inverting Comparator
A non-inverting comparator is an op-amp based comparator for which a reference voltage is applied to its inverting terminal and the input voltage is applied to its non-inverting terminal. This op-amp based comparator is called as non-inverting comparator because the input voltage, which has to be compared is applied to the non-inverting terminal of the op-amp.
The operation of a non-inverting comparator is very simple. It produces one of the two values, +Vsat and −Vsat at the output based on the values of input voltage Vi and the reference voltage +Vref.
The output value of a non-inverting comparator will be +Vsat, for which the input voltage Vi is greater than the reference voltage +Vref.
The output value of a non-inverting comparator will bee −Vsat, for which the input voltage Vi is less than the reference voltage +Vref.
The operation of a non-inverting comparator:
During the positive half cycle of the sinusoidal input signal, the voltage present at the non-inverting terminal of op-amp is greater than zero volts. Hence, the output value of a non-inverting comparator will be equal to +Vsat during the positive half cycle of the sinusoidal input signal.
Similarly, during the negative half cycle of the sinusoidal input signal, the voltage present at the non-inverting terminal of op-amp is less than zero volts. Hence, the output value of non-inverting comparator will be equal to −Vsat during the negative half cycle of the sinusoidal input signal.
We can observe that the output transitions either from +Vsat to −Vsat or from −Vsat to +Vsat whenever the sinusoidal input signal crosses zero volts. That means, the output changes its value when the input is crossing zero volts. Hence, the above circuit is also called as non-inverting zero crossing detector.
Different Types of Comparators
Voltage Comparators: These are the most basic type of comparators, featuring high-speed operation and simple circuitry. They are widely used in applications requiring rapid voltage comparison, such as threshold detection and signal conditioning.Operational Amplifiers (Op-amps) as Comparators: Op-amps can be configured to function as comparators by operating in an open-loop configuration with positive feedback. While not as fast as dedicated comparators, op-amps offer versatility and can serve as comparators in certain low-speed applications.
Window Comparators: Window comparators compare an input voltage to two reference voltages, defining a voltage window within which the input signal must fall. They are commonly employed in applications requiring detection of signals within a specific voltage range.
Hysteresis Comparators: Hysteresis comparators feature two threshold levels, one for rising input voltages and another for falling input voltages. This hysteresis prevents oscillation around the threshold voltage, enhancing noise immunity and stability in the comparator's output.
Counter-Type Analog-to-Digital Converter (ADC) |
Comparator ICs: Integrated circuits specifically designed for comparison tasks, which often include multiple comparators with additional features like built-in voltage references, hysteresis, and rail-to-rail inputs and outputs.
Relaxation oscillator: A comparator can be used to build a relaxation oscillator. It uses both positive and negative feedback. The positive feedback is a Schmitt trigger configuration. Alone, the trigger is a bistable multivibrator. However, the slow negative feedback added to the trigger by the RC circuit causes the circuit to oscillate automatically. That is, the addition of the RC circuit turns the hysteretic bistable multivibrator into an astable multivibrator.
Level shifter: This circuit requires only a single comparator with an open-drain output as in the LM393, TLV3011, or MAX9028. The circuit provides great flexibility in choosing the voltages to be translated by using a suitable pull up voltage. It also allows the translation of bipolar ±5 V logic to unipolar 3 V logic by using a comparator like the MAX972.
- Speed requirements
- Input offset voltage
- Hysteresis
- Noise immunity
- Power supply voltage range
- Output drive capability
- Temperature stability
- Get link
- X
- Other Apps
Comments
Post a Comment
For any correction, doubts or suggestion, please let me know