Recent from talks
Nothing was collected or created yet.
Comparator
View on Wikipedia
In electronics, a comparator is a device that compares two voltages or currents and outputs a digital signal indicating which is larger. It has two analog input terminals and and one binary digital output . The output is ideally
A comparator consists of a specialized high-gain differential amplifier. They are commonly used in devices that measure and digitize analog signals, such as analog-to-digital converters (ADCs), as well as relaxation oscillators.
Differential voltage
[edit]
The differential voltages must stay within the limits specified by the manufacturer. Early integrated comparators, like the LM111 family, and certain high-speed comparators like the LM119 family, require differential voltage ranges substantially lower than the power-supply voltages (±15 V vs. 36 V).[1] Rail-to-rail comparators allow any differential voltages within the power-supply range. When powered from a bipolar (dual rail) supply,
or when powered from an unipolar TTL/CMOS power supply,
- .
Specific rail-to-rail comparators with p–n–p input transistors, like the LM139 family, allow the input potential to drop 0.3 volts below the negative supply rail, but do not allow it to rise above the positive rail.[2] Specific ultra-fast comparators, like the LMH7322, allow the input signal to swing below the negative rail and above the positive rail, although by a narrow margin of only 0.2 V.[3] Differential input voltage (the voltage between two inputs) of a modern rail-to-rail comparator is usually limited only by the full swing of power supply.
Op-amp voltage comparator
[edit]
An operational amplifier (op-amp) has a well balanced difference input and a very high gain. This parallels the characteristics of comparators and can be substituted in applications with low-performance requirements.[4]
A comparator circuit compares two voltages and outputs either a 1 (the voltage at the plus side) or a 0 (the voltage at the negative side) to indicate which is larger. Comparators are often used, for example, to check whether an input has reached some predetermined value. In most cases a comparator is implemented using a dedicated comparator IC, but op-amps may be used as an alternative. Comparator diagrams and op-amp diagrams use the same symbols.
A simple comparator circuit made using an op-amp without feedback simply heavily amplifies the voltage difference between Vin and VREF and outputs the result as Vout. If Vin is greater than VREF, then voltage at Vout will rise to its positive saturation level; that is, to the voltage at the positive side. If Vin is lower than VREF, then Vout will fall to its negative saturation level, equal to the voltage at the negative side.
In practice, this circuit can be improved by incorporating a hysteresis voltage range to reduce its sensitivity to noise.
Because of the difference in characteristics of an operational amplifier and comparator, using an operational amplifier as a comparator presents several disadvantages as compared to using a dedicated comparator.[5]
- Op-amps are designed to operate in the linear mode with negative feedback. Hence, an op-amp typically has a lengthy recovery time from saturation. Almost all op-amps have an internal compensation capacitor which imposes slew rate limitations for high frequency signals. Consequently, an op-amp makes a sloppy comparator with propagation delays that can be as long as tens of microseconds.
- Since op-amps do not have any internal hysteresis, an external hysteresis network is always necessary for slow moving input signals.
- The quiescent current specification of an op-amp is valid only when the feedback is active. Some op-amps show an increased quiescent current when the inputs are not equal.
- A comparator is designed to produce well-limited output voltages that easily interface with digital logic. Compatibility with digital logic must be verified while using an op-amp as a comparator.
- Some multiple-section op-amps may exhibit extreme channel-channel interaction when used as comparators.
- Many op-amps have back to back diodes between their inputs. Op-amp inputs usually follow each other so this is fine. But comparator inputs are not usually the same. The diodes can cause unexpected current through inputs.
Design
[edit]A comparator consists of a high gain differential amplifier whose output is compatible with the logic gates used in the digital circuit. The gain is high enough that a very small difference between the input voltages will saturate the output, the output voltage will be in either the low logic voltage band or the high logic voltage band of the gate input. Analogue op amps have been used as comparators, however a dedicated comparator chip will generally be faster than a general-purpose operational amplifier used as a comparator, and may also contain additional features such as an accurate, internal reference voltage, adjustable hysteresis, and a clock gated input.
A dedicated voltage comparator chip such as LM339 is designed to interface with a digital logic interface (to a TTL or a CMOS). The output is a binary state often used to interface real world signals to digital circuitry (see analog-to-digital converter). If there is a fixed voltage source from, for example, a DC adjustable device in the signal path, a comparator is just the equivalent of a cascade of amplifiers. When the voltages are nearly equal, the output voltage will not fall into one of the logic levels, thus analog signals will enter the digital domain with unpredictable results. To make this range as small as possible, the amplifier cascade is high gain. The circuit consists of mainly bipolar transistors. For very high frequencies, the input impedance of the stages is low. This reduces the saturation of the slow, large p–n junction bipolar transistors that would otherwise lead to long recovery times. Fast small Schottky diodes, like those found in binary logic designs, improve the performance significantly though the performance still lags that of circuits with amplifiers using analog signals. Slew rate has no meaning for these devices. For applications in flash ADCs the distributed signal across eight ports matches the voltage and current gain after each amplifier, and resistors then behave as level-shifters.
Open collector output
[edit]Some comparators (e.g. LM339) use open collector output to help interface to different logic families. When the inverting input is at a higher voltage than the non inverting input, the output of the comparator connects to the negative power supply. When the non inverting input is higher than the inverting input, the output is high impedance, so the output voltage in this state can be set by an external pull-up resistor to a different voltage supply.
Key specifications
[edit]While it is easy to understand the basic task of a comparator, that is, comparing two voltages or currents, several parameters must be considered while selecting a suitable comparator:
Speed and power
[edit]While in general comparators are "fast," their circuits are not immune to the classic speed-power tradeoff. High speed comparators use transistors with larger aspect ratios and hence also consume more power.[6] Depending on the application, select either a comparator with high speed or one that saves power. For example, nano-powered comparators in space-saving chip-scale packages (UCSP), DFN or SC70 packages such as MAX9027,[7] LTC1540,[8] LPV7215,[9] MAX9060,[10] and MCP6541,[11] are ideal for ultra-low-power, portable applications. Likewise if a comparator is needed to implement a relaxation oscillator circuit to create a high speed clock signal then comparators having few Nanoseconds of propagation delay may be suitable. ADCMP572 (CML output),[12] LMH7220 (LVDS Output),[13] MAX999 (CMOS output / TTL output),[14] LT1719 (CMOS output / TTL output),[15] MAX9010 (TTL output),[16] and MAX9601 (PECL output),[17] are examples of some good high speed comparators.
Hysteresis
[edit]A comparator normally changes its output state when the voltage between its inputs crosses through approximately zero volts. Small voltage fluctuations due to noise, always present on the inputs, can cause undesirable rapid changes between the two output states when the input voltage difference is near zero volts. To prevent this output oscillation, a small hysteresis of a few millivolts is integrated into many modern comparators.[18] For example, the LTC6702,[19] MAX9021,[20] and MAX9031,[21] have internal hysteresis desensitizing them from input noise. In place of one switching point, hysteresis introduces two: one for rising voltages, and one for falling voltages. The difference between the higher-level trip value (VTRIP+) and the lower-level trip value (VTRIP-) equals the hysteresis voltage (VHYST).
If the comparator does not have internal hysteresis or if the input noise is greater than the internal hysteresis then an external hysteresis network can be built using positive feedback from the output to the non-inverting input of the comparator. The resulting Schmitt trigger circuit gives additional noise immunity and a cleaner output signal. Some comparators such as LMP7300,[22] LTC1540,[8] MAX931,[23] MAX971,[24] and ADCMP341,[25] also provide the hysteresis control through a separate hysteresis pin. These comparators make it possible to add a programmable hysteresis without feedback or complicated equations. Using a dedicated hysteresis pin is also convenient if the source impedance is high since the inputs are isolated from the hysteresis network.[26] When hysteresis is added then a comparator cannot resolve signals within the hysteresis band.
Output type
[edit]
Because comparators have only two output states, their outputs are either near zero or near the supply voltage. Bipolar rail-to-rail comparators have a common-emitter output that produces a small voltage drop between the output and each rail. That drop is equal to the collector-to-emitter voltage of a saturated transistor. When output currents are light, output voltages of CMOS rail-to-rail comparators, which rely on a saturated MOSFET, range closer to the rail voltages than their bipolar counterparts.[27]
On the basis of outputs, comparators can also be classified as open-drain or push–pull. Comparators with an open-drain output stage use an external pull-up resistor to a positive supply that defines the logic high level. Open-drain comparators are more suitable for mixed-voltage system design. Since the output has high impedance for logic high level, open-drain comparators can also be used to connect multiple comparators to a single bus. Push–pull output does not need a pull-up resistor and can also source current, unlike an open-drain output.
Internal reference
[edit]The most frequent application for comparators is the comparison between a voltage and a stable reference. TL431 is widely used for this purpose. Most comparator manufacturers also offer comparators in which a reference voltage is integrated on to the chip. Combining the reference and comparator in one chip not only saves space, but also draws less supply current than a comparator with an external reference.[27] ICs with wide range of references are available such as MAX9062 (200 mV reference),[10] LT6700 (400 mV reference),[28] ADCMP350 (600 mV reference),[29] MAX9025 (1.236 V reference),[7] MAX9040 (2.048 V reference),[30] TLV3012 (1.24 V reference),[31] and TSM109 (2.5 V reference).[32]
Continuous versus clocked
[edit]A continuous comparator will output either a "1" or a "0" any time a high or low signal is applied to its input and will change quickly when the inputs are updated. However, many applications only require comparator outputs at certain instances, such as in A/D converters and memory. By only strobing a comparator at certain intervals, higher accuracy and lower power can be achieved with a clocked (or dynamic) comparator structure, also called a latched comparator. Often latched comparators employ strong positive feedback for a "regeneration phase" when a clock is high, and have a "reset phase" when the clock is low.[33] This is in contrast to a continuous comparator, which can only employ weak positive feedback since there is no reset period.
Applications
[edit]
Null detectors
[edit]A null detector identifies when a given value is zero. Comparators are ideal for null detection comparison measurements, since they are equivalent to a very high gain amplifier with well-balanced inputs and controlled output limits. The null detector circuit compares two input voltages: an unknown voltage and a reference voltage, usually referred to as vu and vr. The reference voltage is usually on the non-inverting input (+), while the unknown voltage is usually on the inverting input (−). (A circuit diagram would display the inputs according to their sign with respect to the output when a particular input is greater than the other.) Unless the inputs are nearly equal (see below), the output is either positive or negative, for example ±12 V. In the case of a null detector the aim is to detect when the input voltages are nearly equal, which gives the value of the unknown voltage since the reference voltage is known.
When using a comparator as a null detector, accuracy is limited; an output of zero is given whenever the magnitude of the voltage difference multiplied by the gain of the amplifier is within the voltage limits. For example, if the gain is 106, and the voltage limits are ±6 V, then an output of zero will be given if the voltage difference is less than 6 μV. One could refer to this as a fundamental uncertainty in the measurement.[34]
Zero-crossing detectors
[edit]For this type of detector, a comparator detects each time an AC pulse changes polarity. The output of the comparator changes state each time the pulse changes its polarity, that is the output is HI (high) for a positive pulse and LO (low) for a negative pulse squares the input signal.[35]
Relaxation oscillator
[edit]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.[36]
Level shifter
[edit]
This circuit requires only a single comparator with an open-drain output as in the LM393,[37] TLV3011,[38] or MAX9028.[7] 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.[24][27]
Analog-to-digital converters
[edit]When a comparator performs the function of telling if an input voltage is above or below a given threshold, it is essentially performing a 1-bit quantization. This function is used in nearly all analog to digital converters (such as flash, pipeline, successive approximation, delta-sigma modulation, folding, interpolating, dual-slope and others) in combination with other devices to achieve a multi-bit quantization.[39]
Window detectors
[edit]Comparators can also be used as window detectors. In a window detector, a comparator is used to compare two voltages and determine whether a given input voltage is under voltage or over voltage.
Absolute-value detectors
[edit]Comparators can be used to create absolute-value detectors. In an absolute-value detector, two comparators and a digital logic gate are used to compare the absolute values of two voltages.[40]
See also
[edit]References
[edit]- ^ "LM111, LM211, LM311 Differential Comparators" (PDF). Texas Instruments. August 2003. Retrieved 2014-07-02.
- ^ "LM339B, LM2901B, LM339, LM239, LM139, LM2901 Quad Differential Comparators" (PDF). Texas Instruments. August 2012. Retrieved 2014-07-02.
- ^ "LMH7322 Dual 700 ps High Speed Comparator with RSPECL Outputs" (PDF). Texas Instruments. March 2013. Retrieved 2014-07-02.
- ^ Malmstadt, Howard V.; Enke, Christie G.; Crouch, Stanley R. (1981). "Chapter 5". Electronics and Instrumentation for Scientists. The Benjamin/Cummings Publishing Co. ISBN 978-0-8053-6917-5.
- ^ Ron Mancini (March 29, 2001). "Designing with comparators". EDN.
- ^ Rogenmoser, R.; Kaeslin, H. (July 1997). "The impact of transistor sizing on power efficiency in submicron CMOS circuits". IEEE Journal of Solid-State Circuits. 32 (7): 1142–1145. Bibcode:1997IJSSC..32.1142R. doi:10.1109/4.597307. S2CID 15703793.
- ^ a b c "MAX9025, MAX9026, MAX9027, MAX9028: UCSP, 1.8V, Nanopower, Beyond-the-Rails Comparators With/Without Reference". Maxim Integrated Products. Archived from the original on 2008-05-04.
- ^ a b "LTC1540 - Nanopower Comparator with Reference". Linear Technology. Archived from the original on 2011-01-03.
- ^ "LPV7215 - Micropower, CMOS Input, RRIO, 1.8V, Push-Pull Output Comparator from the PowerWise® Family". National Semiconductor Corporation. Archived from the original on 2009-05-03.
- ^ a b "MAX9060, MAX9061, MAX9062, MAX9063, MAX9064: Ultra-Small, Low-Power Single Comparators in 4-Bump UCSP and 5-SOT23". Maxim Integrated Products. Archived from the original on 2008-05-17.
- ^ "MCP6541: In Production". Microchip Technology Inc. Archived from the original on 2014-02-13.
- ^ "ADCMP572: Ultrafast 3.3 V Single-Supply Comparator w/CML Output Drivers". Analog Devices, Inc.
- ^ "LMH7220: High Speed Comparator with LVDS Output". Texas Instruments.
- ^ "MAX961, MAX962, MAX963, MAX964, MAX997, MAX999: Single/Dual/Quad, Ultra-High-Speed, +3V/+5V, Beyond-the-Rails Comparators". Maxim Integrated Products. Archived from the original on 2010-04-14.
- ^ "LT1719 - 4.5ns Single/Dual Supply 3V/5V Comparator with Rail-to-Rail Output". Linear Technology. Archived from the original on 2011-01-02.
- ^ "MAX9010, MAX9011, MAX9012, MAX9013: SC70, 5ns, Low-Power, Single-Supply, Precision TTL Comparators". Maxim Integrated Products. Archived from the original on 2009-12-28.
- ^ "MAX9600, MAX9601, MAX9602: Dual ECL and Dual/Quad PECL, 500ps, Ultra-High-Speed Comparators". Maxim Integrated Products. Archived from the original on 2010-03-28.
- ^ Ron Mancini (May 3, 2001). "Adding Hysteresis to comparators". EDN.
- ^ "LTC6702 - Tiny Micropower, Low Voltage Dual Comparators". Linear Technology. Archived from the original on 2011-01-02.
- ^ "MAX9021, MAX9022, MAX9024: Micropower, Ultra-Small, Single/Dual/Quad Single-Supply Comparators". Maxim Integrated Products. Archived from the original on 2009-03-30.
- ^ "MAX9030, MAX9031, MAX9032, MAX9034: Low-Cost, Ultra-Small, Single/Dual/Quad Single-Supply Comparators". Maxim Integrated Products. Archived from the original on 2009-03-31.
- ^ "LMP7300 - Micropower Precision Comparator and Precision Reference with Adjustable Hysteresis from the PowerWise® Family". National Semiconductor Corporation. Archived from the original on 2009-05-03.
- ^ "MAX931, MAX932, MAX933, MAX934: Ultra-Low-Power, Low-Cost Comparators with 2% Reference". Maxim Integrated Products. Archived from the original on 2010-03-30.
- ^ a b "MAX971, MAX972, MAX973, MAX974, MAX981, MAX982, MAX983, MAX984: Ultra-Low-Power, Open-Drain, Single/Dual-Supply Comparators". Maxim Integrated Products. Archived from the original on 2009-03-30.
- ^ "ADCMP341: Dual 0.275% Comparator and Reference with Programmable Hysteresis". Analog Devices, Inc. Archived from the original on 2009-08-15.
- ^ "Adding Extra Hysteresis to Comparators". Maxim Integrated Products. AN3616. Archived from the original on 2008-05-09.
- ^ a b c "Selecting the Right Comparator". Maxim Integrated Products. AN886. Archived from the original on 2008-05-01.
- ^ "LT6700 - Micropower, Low Voltage, Dual Comparator with 400mV Reference". Linear Technology. Archived from the original on 2016-05-18.
- ^ "ADCMP350: Comparator & 0.6V Reference in 4-SC70 w/ Open-Drain Active-Low Output". Analog Devices, Inc. Retrieved 2023-07-01.
- ^ "MAX9039, MAX9040, MAX9041, MAX9042, MAX9042A, MAX9042B, MAX9043, MAX9043A, MAX9050, MAX9051, MAX9052, MAX9052A, MAX9052B, MAX9053, MAX9053A, MAX9053B: Micropower, Single-Supply, UCSP/SOT23 Comparator + Precision Reference ICs". Maxim Integrated Products. Archived from the original on 2009-12-21.
- ^ "TLV3012: Low-power comparator with reference (push-pull)". Texas Instrument.
- ^ "TSM109/A: DUAL COMPARATOR AND VOLTAGE REFERENCE" (PDF). STMicroelectronics.
- ^ Pedro M. Figueiredo, João C. Vital (2009). Offset Reduction Techniques in High-Speed Analog-to-Digital Converters: Analysis, Design and Tradeoffs. Springer. pp. 54–62. ISBN 978-1-4020-9715-7.
- ^ Malmstadt, Howard V.; Enke, Christie G.; Crouch, Stanley R. (1981). Electronics and Instrumentation for Scientists. The Benjamin/Cummings Publishing Co. pp. 108–110. ISBN 978-0-8053-6917-5.
- ^ Malmstadt, Howard V.; Enke, Christie G.; Crouch, Stanley R. (1981). Electronics and Instrumentation for Scientists. The Benjamin/Cummings Publishing Co. p. 230. ISBN 978-0-8053-6917-5.
- ^ Paul Horowitz; Winfield Hill (1989). The Art of Electronics (2nd ed.). Cambridge: Cambridge University Press. pp. 284–285.
- ^ "LM393: Dual differential comparator, commercial grade". Texas Instrument.
- ^ "TLV3011: Low-power comparator with reference (open-drain)". Texas Instrument.
- ^ Phillip Allen; Douglas Holberg (2002). CMOS Analog Circuit Design (2nd ed.). Oxford: Oxford University Press.
- ^ Iranmanesh, S.; Rodriguez-Villegas, E. (June 2016). "CMOS implementation of a low power absolute value comparator circuit". 2016 14th IEEE International New Circuits and Systems Conference (NEWCAS). IEEE Newcas. pp. 1–4. doi:10.1109/NEWCAS.2016.7604807. ISBN 978-1-4673-8900-6. S2CID 10810576.
This article incorporates public domain material from Federal Standard 1037C. General Services Administration. Archived from the original on 2022-01-22.
External links
[edit]Comparator
View on GrokipediaFundamentals
Basic Operation
A comparator is an electronic circuit that compares two input voltages and produces a binary digital output signal indicating which input is greater.[13] This output is typically a high logic level (often near the positive supply voltage) when the non-inverting input exceeds the inverting input, and a low logic level (near ground or the negative supply) otherwise.[13] Comparators serve as fundamental building blocks in analog-to-digital interfaces, such as within analog-to-digital converters (ADCs), where they enable the quantization of continuous analog signals into discrete digital representations.[14] The core operation of a comparator centers on threshold comparison, where the output state changes abruptly when the relative magnitudes of the two inputs cross a decision point—specifically, when the voltage at the non-inverting input (denoted ) surpasses that at the inverting input (denoted ), or vice versa depending on the configuration.[13] In its ideal form, this comparison yields a perfect step function response, with no transition region or delay, though real devices approximate this behavior with finite gain and speed limits.[13] The comparison relies on the differential voltage between the inputs, amplifying any difference to drive the output to one of its saturated states.[13] The basic block diagram of a comparator consists of two input terminals for receiving and , an internal comparison logic stage that evaluates their difference, and a single digital output terminal that reflects the binary result of the comparison.[13] Transistorized comparators emerged in the 1950s alongside the development of transistor technology, facilitating their integration into early computing and measurement systems during the shift from vacuum tube-based electronics to solid-state designs.[14] The voltage transfer characteristic of an ideal comparator is a discontinuous step function, mathematically expressed as: where and represent the supply rail voltages defining the output logic levels.[13]Differential Input Stage
The differential input stage of a comparator processes the difference between the two input voltages, defined as , which serves as the primary parameter determining the output logic state.[15] This stage amplifies even minute differences in to drive the output to its full rail-to-rail swing, such as from ground to the supply voltage, enabling a binary decision.[15] In contrast to linear amplifiers, where the output scales proportionally with the input difference within the linear region, the comparator's input stage pushes the signal into saturation for rapid switching, prioritizing decision speed over proportional fidelity.[16] The core architecture of the differential input stage typically employs a differential pair of matched transistors, such as NPN or PNP bipolar junction transistors (BJTs), with their emitters (or sources in MOSFET variants) connected to a constant current source.[17] This configuration provides high differential gain while achieving excellent common-mode rejection, as common-mode signals applied equally to both inputs produce balanced currents that cancel out at the output.[18] The unbalanced currents resulting from are then converted to a voltage difference, often via active loads like current mirrors, to initiate the amplification process.[17] In an ideal comparator, the output transitions at , but the high open-loop gain ensures that the output voltage approximates for small , rapidly saturating to the supply rails as exceeds a few millivolts.[17] Here, is the differential voltage gain, often on the order of 200 V/mV or higher, determined by the transconductance of the input transistors and the load impedance, though exact values depend on the specific implementation without requiring detailed derivation.[15] However, practical limitations arise from input offset voltage and common-mode input range. The input offset voltage , typically a few millivolts, represents the inherent needed to balance the stage and trigger switching, arising from transistor mismatches and biasing errors.[15] Additionally, the common-mode input range defines the allowable voltage span for both inputs where the stage maintains proper operation and rejection, often limited by transistor saturation or breakdown, such as from near ground to near the positive supply in rail-to-rail designs.[17] Exceeding this range can lead to phase inversion or undefined behavior.[16]Circuit Implementations
Operational Amplifier-Based Comparators
Operational amplifiers (op-amps) can be configured as comparators by operating them in open-loop mode, where the high gain amplifies the differential input voltage to produce a binary output that switches between the supply rails based on whether the input signal exceeds a reference threshold.[19] In this setup, no feedback is applied, allowing the op-amp to function as a decision-making element for voltage comparison tasks.[20] The non-inverting configuration applies the input signal to the non-inverting (+) terminal and the reference voltage to the inverting (-) terminal; the output goes high (positive saturation) when the input exceeds the reference and low (negative saturation) otherwise.[19] Conversely, the inverting configuration connects the input signal to the inverting (-) terminal and the reference to the non-inverting (+) terminal, resulting in the output going high when the input is below the reference and low when above, thereby inverting the comparison logic.[19] A basic schematic for setting the threshold uses a two-resistor voltage divider on the reference input. For the non-inverting setup, connect resistor from the reference voltage to the inverting input and from the inverting input to ground; the threshold voltage is given by This divides to create a precise comparison level at the inverting terminal.[20] One key advantage of op-amp-based comparators is their low cost, as general-purpose op-amps are ubiquitous and readily available for prototyping or low-volume applications without needing specialized components.[19] However, they suffer from slower response times compared to dedicated comparators, primarily due to internal compensation capacitors designed for stable closed-loop operation, which introduce phase lag and limit slew rates to around 0.5 V/μs in typical devices.[21] Additionally, potential instability can arise from input overdrive or capacitive loading, and the output swing may not directly interface with digital logic levels without buffering.[19] In the inverting configuration, phase inversion occurs because the output polarity is opposite to the input signal's relation to the threshold, which can complicate downstream logic.[20] This can be mitigated by adding an additional inverter stage, such as a second op-amp in a simple inverting buffer configuration, to restore the desired output polarity without significantly impacting speed.[19] The μA741 op-amp, introduced by Fairchild Semiconductor in 1968, exemplifies early use of general-purpose op-amps in comparator applications during the late 1960s and 1970s, where its internal compensation and offset null capability made it suitable for basic voltage detection in analog systems despite its modest 1 MHz bandwidth.[22][23]Dedicated Integrated Comparators
Dedicated integrated comparators represent purpose-built integrated circuits optimized specifically for voltage comparison tasks, offering superior performance in speed and efficiency compared to adapting general-purpose operational amplifiers. The LM339, introduced by National Semiconductor in the early 1970s, marked a significant milestone as one of the first dedicated quad comparator ICs, designed for multi-channel applications with low power consumption and compatibility with TTL logic levels.[24] This development addressed the limitations of earlier discrete or op-amp-based designs by integrating multiple independent comparators on a single chip, enabling compact and cost-effective solutions for signal processing.[25] Internally, these ICs employ optimized differential input stages, typically using bipolar transistor pairs for high input impedance and gain, followed by output stages without the frequency compensation capacitors required in op-amps for stability in closed-loop operation.[26] This absence of compensation allows for rapid signal transitions, as the circuit prioritizes open-loop gain and slew rate over linear amplification, resulting in switching speeds unsuitable for feedback but ideal for binary decisions.[27] Key examples include the LM311 single comparator, the LM393 dual comparator, and the LM339 quad comparator, all part of the enduring LMx39 family originally from National Semiconductor (now Texas Instruments). The LM311 features an 8-pin DIP package with pin 1 as balance, pin 2 as the inverting input, pin 3 as the non-inverting input, pin 4 as V- / strobe, pin 5 as balance / strobe, pin 6 as emitter output, pin 7 as collector output (open-collector), and pin 8 as V+.[27] In a basic application, the inputs connect to the voltages to be compared, the output pulls low when the non-inverting input exceeds the inverting, and a pull-up resistor (e.g., 10 kΩ to V+) converts the open-collector to a logic-high signal. The LM393, in an 8-pin package, has dual channels with pins 1 and 7 as outputs, pins 2/3 and 5/6 as inverting/non-inverting inputs for each, pin 4 for GND, and pin 8 for VCC; a simple circuit mirrors the LM311 but supports two comparisons per IC. The LM339 extends this to four channels in a 14-pin package with the following pinout: pin 1 (output 1), pin 2 (output 2), pin 3 (V+), pin 4 (inverting input 2), pin 5 (non-inverting input 2), pin 6 (inverting input 1), pin 7 (non-inverting input 1), pin 8 (inverting input 3), pin 9 (non-inverting input 3), pin 10 (inverting input 4), pin 11 (non-inverting input 4), pin 12 (GND), pin 13 (output 4), pin 14 (output 3). Basic circuit uses similar input connections and pull-ups on each output for multi-comparison setups.[28] These dedicated ICs provide advantages such as higher switching speeds, lower quiescent power (often under 1 mA total), and wide common-mode input ranges approaching rail-to-rail operation in many variants, facilitating direct interfacing without level shifters. Unlike op-amp configurations requiring external components for speed optimization, dedicated designs minimize propagation delay through streamlined architecture. Propagation delay (t_pd) is the time from the input differential voltage crossing zero to the output reaching 50% of its transition; for the LM339, it typically measures 1.3 μs under 5 mV overdrive.[28] A representative timing diagram for this metric is shown below, where the inputs cross at t=0, and the output transitions after t_pd:Time axis →
V_IN+ ───┐ ┌──
│ │
└─────────┘ (rising edge)
V_IN- ───┴ └─
│ │
└──┐ └── (falling edge, cross at t=0)
V_DIFF ───────┐ (overdrive starts)
│
└─
V_OUT ───────┴────────── (falls after t_pd)
│
│
└ (50% point defines t_pd)
Time axis →
V_IN+ ───┐ ┌──
│ │
└─────────┘ (rising edge)
V_IN- ───┴ └─
│ │
└──┐ └── (falling edge, cross at t=0)
V_DIFF ───────┐ (overdrive starts)
│
└─
V_OUT ───────┴────────── (falls after t_pd)
│
│
└ (50% point defines t_pd)
| IC | Channels | Supply Voltage Range (V) | Input Offset Voltage (mV, max) | Propagation Delay (ns, typ) |
|---|---|---|---|---|
| LM311 | 1 | 5 to 30 (single) | 4 | 200 |
| LM393 | 2 | 2 to 36 | 9 | 1300 |
| LM339 | 4 | 2 to 36 | 9 | 1300 |
Design Features
Output Configurations
Comparators employ various output configurations to interface with subsequent circuitry, each offering distinct electrical characteristics and trade-offs in drive capability, speed, and compatibility. These configurations determine how the comparator drives the output high or low in response to input comparisons, influencing factors such as voltage swing, current handling, and the ability to connect multiple devices.[12] The standard push-pull output, also known as totem-pole, utilizes complementary transistors—one to source current (pull up) and another to sink current (pull down)—enabling full rail-to-rail voltage swing without an external pull-up resistor. This configuration provides symmetrical rise and fall times, typically under 100 ns, and supports both sourcing and sinking currents up to several milliamperes, making it suitable for driving logic gates or loads directly from the supply rails. In totem-pole implementations, often using two NPN transistors in a stacked arrangement for the upper stage, the output actively drives to V+ (high) or ground (low), achieving low output impedance for both states but preventing direct tying of multiple outputs due to potential short-circuit risks.[12][29] Quasi-complementary outputs represent a variant of push-pull where the complementary stages are asymmetric, such as using a Darlington pair of NPN transistors for the upper (sourcing) stage paired with a single NPN for the lower (sinking) stage, to simplify fabrication while approximating full complementary performance. This approach offers advantages in cost and integration for bipolar processes but may introduce slight nonlinearity or reduced sourcing efficiency compared to true complementary push-pull, though it still provides rail-to-rail swing and active drive in both directions.[29] In contrast, the open-collector (or open-drain in CMOS equivalents) output relies on a single NPN transistor whose collector is left open, allowing the output to sink current to ground when low but float high when off, necessitating an external pull-up resistor to define the high state. Schematically, the output transistor connects between the output pin and ground, with the pull-up resistor tied from the output to a termination voltage, enabling level-shifting if the pull-up voltage exceeds the comparator's supply (e.g., up to 36 V for devices like the LM139). The pull-up resistor value is selected as , where is the low output voltage (typically 0.4 V) and is the required drive current, balancing speed against power dissipation and rise time influenced by load capacitance. This configuration excels in wired-OR logic, where multiple open-collector outputs can be tied together to a single pull-up, allowing any active low to pull the bus low while inactive outputs float, facilitating multi-device connections like error detection buses or window comparators without additional gating.[12][12] Open-collector outputs gained popularity in 1970s TTL-compatible designs, such as the SN54/7400 series, due to their versatility in wired-OR applications and compatibility with expanding digital systems, as detailed in early TTL design guides. For protection, many comparators incorporate output clamping diodes or ESD structures to limit voltage excursions, preventing damage from overvoltage on open-collector pins (e.g., clamping to VCC + 0.3 V) or shorts in push-pull stages. Similar to dedicated comparator outputs, operational amplifier-based designs often use push-pull stages for comparable drive but may lack the optimized speed of specialized comparators.[30][12][31]Hysteresis Mechanisms
Hysteresis in comparators is introduced through positive feedback, which establishes two distinct switching thresholds: a lower threshold (Vth-) for rising input signals and an upper threshold (Vth+) for falling signals. This mechanism prevents rapid output oscillations caused by noise around a single threshold, as the output remains stable until the input crosses the appropriate threshold in the opposite direction.[5][32] The implementation typically involves a resistor network that feeds a portion of the output voltage back to one of the comparator inputs. In a basic inverting configuration, the input signal is applied to the inverting input (with V_ref also considered at the inverting input or adjusted); a feedback resistor (R1) connects the output to the non-inverting input, while a second resistor (R2) connects the non-inverting input to ground (or a reference voltage). The hysteresis voltage (Vhys) is given by: where is the output voltage swing (e.g., from 0 V to the supply voltage). The thresholds are derived as follows: for a rising input, when the output is low (0 V), ; for a falling input, when the output is high (), , assuming a reference voltage effectively at the inverting input. This positive feedback shifts the effective reference based on the output state, creating the dual-threshold behavior.[5][33] Two primary configurations exist: non-inverting and inverting Schmitt triggers. In the non-inverting type, the input signal is applied to the non-inverting terminal, and feedback adjusts the threshold there, resulting in an output that follows the input logic with hysteresis. The inverting configuration applies the input to the inverting terminal, with feedback to the non-inverting terminal, inverting the logic while providing the same threshold separation. Both types achieve noise rejection but differ in signal polarity handling.[34][5] The primary benefit of hysteresis is enhanced noise immunity, particularly for slowly varying or noisy input signals, where it avoids false triggering and ensures clean transitions. However, it introduces a drawback of reduced resolution, as the effective input range is narrowed by the hysteresis width, potentially limiting precision in applications requiring fine detection.[5][32] For example, consider R1 = 1 MΩ (feedback), R2 = 10 kΩ (to ground), and V, with V. Then, V, yielding V and V.[33]Performance Specifications
Speed and Power Characteristics
Propagation delay in comparators is defined as the time interval from the midpoint (50%) of the input voltage transition to the midpoint (50%) of the corresponding output voltage transition.[35] This metric quantifies the device's response speed to input changes and is influenced by factors such as input overdrive voltage (the excess beyond the threshold) and the input signal's slew rate. For instance, lower overdrive increases delay due to reduced differential input, while slower input transitions can extend the effective delay by limiting the rate at which the internal differential stage responds. In the LM393 dual comparator, typical propagation delay is 300 ns under conditions of TTL logic swing input, 1.4 V reference, and 5 V supply with a 5.1 kΩ load.[36] Faster bipolar comparators like the LM311 achieve around 200 ns propagation delay with similar overdrive.[37] Slew rate for comparators refers to the maximum rate of change of the output voltage (dV/dt), typically expressed in V/µs, which determines how quickly the output can swing between logic levels during transitions. Rise and fall times, measured from 10% to 90% of the output swing, are closely related and often limited by this slew rate; for example, rise time can be approximated as 0.8 × (output voltage swing) / slew rate. To avoid errors from slew limiting or noise integration during slow inputs, the minimum input transition time should exceed the comparator's inherent delay but remain fast enough to minimize offset from thermal noise—ideally, input slew rates above 1 V/µs for high-speed devices to ensure accurate threshold crossing without prolonged uncertainty. Bipolar comparators like the LM311 exhibit slew rates around 30 V/µs, resulting in rise/fall times of ~0.2 µs for full 5 V swings, while modern CMOS designs can achieve higher rates up to 10 V/µs in optimized processes.[38] Power consumption in comparators comprises quiescent current (Iq, the steady-state draw with no input switching) and dynamic power from output transitions, calculated as P_dynamic ≈ V_supply × I_switch × f_switch, where I_switch is the switching current and f_switch is the transition frequency. Low-power CMOS comparators prioritize minimal Iq, often in the nA to µA range, enabling battery-operated applications; for example, the LMC6762 draws 12 µA typical total (6 µA per comparator) at 5 V. In contrast, traditional bipolar designs like the LM393 consume 0.4 mA typical Iq (2 mW at 5 V), with dynamic contributions adding during high-frequency operation.[39][36] A fundamental trade-off exists between speed and power in comparator design: faster propagation delays require higher bias currents, increasing both quiescent and dynamic power, while low-power variants sacrifice speed. Bipolar processes excel in speed due to higher transconductance but incur higher power (e.g., several mA Iq for ns delays), whereas CMOS offers superior efficiency with µA Iq but typically slower responses (µs range) unless scaled to advanced nodes. BiCMOS hybrids mitigate this by combining bipolar speed for critical paths with CMOS low-power logic, achieving sub-100 ns delays at mW levels.[40]| IC Family/Example | Typical Propagation Delay | Typical Iq (at 5 V) | Notes/Source |
|---|---|---|---|
| Bipolar (LM393) | 300 ns | 0.4 mA | Standard dual comparator[36] |
| Bipolar (LM311) | 200 ns | 5.1 mA | High-speed single[37] |
| CMOS (LMC6762) | 0.42 µs | 6 µA (per comparator) | Micropower rail-to-rail[39] |
| CMOS (MCP65R41) | 4 µs | 2.5 µA | Low-power push-pull output[41] |
| BiCMOS (LT1011) | 150 ns | 3.2 mA | Ultrafast with adjustable offset[42] |