What Is a Comparator Circuit?
Comparing two or more data items to determine whether they are equal, or determining the size relationship and order between them is called comparison. A circuit or device capable of implementing such a comparison function is called a comparator. A comparator is a circuit that compares an analog voltage signal to a reference voltage. The two inputs of the comparator are analog signals, and the output is a binary signal of 0 or 1. When the difference between the input voltages increases or decreases and the positive and negative signs remain unchanged, its output remains constant.
- Think of the comparator as a 1-bit analog / digital
- Hysteresis voltage: When the voltage between the two input terminals of the comparator is zero crossing, the output state will be
- Zero-crossing voltage comparator: typical amplitude comparison circuit, its circuit diagram and transmission characteristics
- Common chips are LM324, LM358, uA741, TL081 \ 2 \ 3 \ 4, OP07, OP
- The working principle of a comparator is simple and straightforward. It has a positive foot and a negative foot. When the voltage on the positive pin is high, the output of the comparator "asserts" (or drives) a signal. When an open collector output is used, the output of the comparator is the collector of a transistor or the drain of a FET. When using a push-pull output, the comparator has a "totem pole" output, which is a complementary NPN / PNP stage, as in op amps. The open collector output is used when the load and the comparator use different power supplies. This solution enables a 12V solenoid, although the comparator may only work at 3.3V. Another function of the open collector output is to minimize the quiescent current when the output is turned off. In the totem pole stage, no base current flows through the N-type output transistor, and some base current always flows through one of the two output transistors. [1]
- Use four comparators to form a current detection circuit, which can be used to indicate the four states of the input current. The resistor "Shunt" is used to convert the input current into a voltage signal, and R1 and R2 are used to set
- The voltage comparator can be seen as having a magnification close to "infinity"
- The two inputs of the comparator are analog signals, and the output is a binary signal. When the difference between the input voltages increases or decreases, its output remains constant. From this perspective, the comparator can also be considered as a 1-bit analog-to-digital converter (ADC).
- Comparing comparators to operational amplifiers
- Window comparator circuit [2]
- The operational amplifier can be used as a comparator in principle when no negative feedback is added, but because the open-loop gain of the operational amplifier is very high, it can only process signals with very small input differential voltages. Moreover, in this case, the response time of the operational amplifier is much slower than the comparator, and it also lacks some special features, such as hysteresis, internal reference, and so on. Comparators cannot usually be used as operational amplifiers. Comparators can provide very small time delays after adjustment, but their frequency response characteristics are limited. Operational amplifiers take advantage of frequency response correction to become flexible and versatile devices. In addition, many comparators also have an internal hysteresis circuit, which avoids output oscillations, but also makes them unusable as op amps.