Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Comparator
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Device that compares two voltages or currents}} {{other uses}} [[File:DOV-1X - National Semiconductor LM393N on printed circuit board-9800.jpg|thumb|LM393 dual comparator, a common comparator [[integrated circuit]] chip, shown on a circuit board]] In [[electronics]], a '''comparator''' is a device that compares two [[voltage]]s or [[Electric current|currents]] and outputs a digital signal indicating which is larger. It has two analog input terminals <math>V_+</math> and <math>V_-</math> and one binary digital output <math>V_\text{o}</math>. The output is ideally : <math>V_\text{o} = \begin{cases} 1, & \text{if }V_+ > V_-, \\ 0, & \text{if }V_+ < V_-. \end{cases}</math> A comparator consists of a specialized high-[[gain (electronics)|gain]] [[differential amplifier]]. They are commonly used in devices that measure and digitize analog signals, such as [[analog-to-digital converter]]s (ADCs), as well as [[relaxation oscillator]]s. ==Differential voltage== [[File:Opamp105.gif|thumb|upright=1.15|Illustration of how a comparator works]] 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).<ref>{{cite web |url=http://www.ti.com/lit/ds/symlink/lm111.pdf |title=LM111, LM211, LM311 Differential Comparators |publisher=Texas Instruments |date=August 2003 |access-date=2014-07-02}}</ref> ''Rail-to-rail'' comparators allow any differential voltages within the power-supply range. When powered from a bipolar (dual rail) supply, : <math>V_{S-} \le V_+, V_- \le V_{S+},</math> or when powered from an unipolar [[Transistor-transistor logic|TTL]]/[[CMOS]] power supply, : <math>0 \le V_+, V_- \le V_\text{cc}</math>. Specific rail-to-rail comparators with [[bipolar junction transistor#PNP|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.<ref>{{cite web |url=http://www.ti.com/lit/ds/symlink/lm139.pdf |title=LM339B, LM2901B, LM339, LM239, LM139, LM2901 Quad Differential Comparators |publisher=Texas Instruments |date=August 2012 |access-date=2014-07-02}}</ref> 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.<ref>{{cite web |url=http://www.ti.com/lit/ds/symlink/lmh7322.pdf |title=LMH7322 Dual 700 ps High Speed Comparator with RSPECL Outputs |publisher=Texas Instruments |date=March 2013 |access-date=2014-07-02}}</ref> 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== [[image:Op-Amp Comparator.svg|frame|right|A simple op-amp comparator]] An [[operational amplifier]] (op-amp) has a well balanced difference input and a very high [[gain (electronics)|gain]]. This parallels the characteristics of comparators and can be substituted in applications with low-performance requirements.<ref>{{cite book |last1=Malmstadt |first1=Howard V. |last2=Enke |first2=Christie G. |last3=Crouch |first3=Stanley R. |title=Electronics and Instrumentation for Scientists |publisher=The Benjamin/Cummings Publishing Co |year=1981 |isbn=978-0-8053-6917-5 |chapter=Chapter 5 |url-access=registration |url=https://archive.org/details/electronicsinstr0000malm}}</ref> 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.<ref>{{cite web |author=Ron Mancini |url=http://www.edn.com/design/analog/4353925/Designing-with-comparators |title=Designing with comparators |website=EDN |date=March 29, 2001}}</ref> # 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 delay]]s 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== {{Unreferenced section|date=February 2022}} A comparator consists of a [[gain (electronics)|high gain]] [[differential amplifier]] whose output is compatible with the [[logic gate]]s 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 amp]]s 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 [[Transistor-transistor logic|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 transistor]]s. For very high frequencies, the input [[Electrical impedance|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 diode]]s, 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 ADC]]s 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 === {{Main article|Open collector}} 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== 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=== 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.<ref>{{cite journal |last1=Rogenmoser |first1=R. |last2=Kaeslin |first2=H. |title=The impact of transistor sizing on power efficiency in submicron CMOS circuits |journal=IEEE Journal of Solid-State Circuits |volume=32 |issue=7 |date=July 1997 |pages=1142–1145|doi=10.1109/4.597307 |bibcode=1997IJSSC..32.1142R |s2cid=15703793 }}</ref> 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,<ref name=qv_pk/4268>{{cite web |title=MAX9025, MAX9026, MAX9027, MAX9028: UCSP, 1.8V, Nanopower, Beyond-the-Rails Comparators With/Without Reference |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4268 |url-status=dead |archive-date=2008-05-04 |archive-url=https://web.archive.org/web/20080504155318/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/4268}}</ref> LTC1540,<ref name=LTC1540>{{cite web |title=LTC1540 - Nanopower Comparator with Reference |publisher=Linear Technology |url=http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1154,C1002,C1463,P1593 |archive-url=https://web.archive.org/web/20110103043546/http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1154,C1002,C1463,P1593 |archive-date=2011-01-03 |url-status=dead}}</ref> LPV7215,<ref>{{cite web |title=LPV7215 - Micropower, CMOS Input, RRIO, 1.8V, Push-Pull Output Comparator from the PowerWise® Family |publisher=National Semiconductor Corporation |url=http://www.national.com/pf/LP/LPV7215.html |archive-url=https://web.archive.org/web/20090503133424/http://www.national.com/pf/LP/LPV7215.html |archive-date=2009-05-03 |url-status=dead}}</ref> MAX9060,<ref name=qv_pk/5823>{{cite web |title=MAX9060, MAX9061, MAX9062, MAX9063, MAX9064: Ultra-Small, Low-Power Single Comparators in 4-Bump UCSP and 5-SOT23 |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5823 |url-status=dead |archive-date=2008-05-17 |archive-url=https://web.archive.org/web/20080517010639/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5823}}</ref> and MCP6541,<ref>{{cite web |title=MCP6541: In Production |publisher=Microchip Technology Inc. |url=http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010414 |archive-url=https://web.archive.org/web/20140213033924/http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010414 |archive-date=2014-02-13 |url-status=dead}}</ref> 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 nano seconds of propagation delay may be suitable. ADCMP572 (CML output),<ref>{{cite web |title=ADCMP572: Ultrafast 3.3 V Single-Supply Comparator w/CML Output Drivers |publisher=Analog Devices, Inc. |url=https://www.analog.com/en/products/adcmp572.html}}</ref> LMH7220 (LVDS Output),<ref>{{cite web |title=LMH7220: High Speed Comparator with LVDS Output |publisher=Texas Instruments |url=http://www.ti.com/product/lmh7220}}</ref> MAX999 (CMOS output / TTL output),<ref>{{cite web |title=MAX961, MAX962, MAX963, MAX964, MAX997, MAX999: Single/Dual/Quad, Ultra-High-Speed, +3V/+5V, Beyond-the-Rails Comparators |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1481 |url-status=dead |archive-url=https://web.archive.org/web/20100414060742/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1481 |archive-date=2010-04-14}}</ref> LT1719 (CMOS output / TTL output),<ref>{{cite web |title=LT1719 - 4.5ns Single/Dual Supply 3V/5V Comparator with Rail-to-Rail Output |publisher=Linear Technology |url=http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1154,C1004,C1012,P1817 |archive-url=https://web.archive.org/web/20110102135645/http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1154,C1004,C1012,P1817 |archive-date=2011-01-02 |url-status=dead}}</ref> MAX9010 (TTL output),<ref>{{cite web |title=MAX9010, MAX9011, MAX9012, MAX9013: SC70, 5ns, Low-Power, Single-Supply, Precision TTL Comparators |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2490/t/al |url-status=dead |archive-url=https://web.archive.org/web/20091228173145/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2490/t/al |archive-date=2009-12-28}}</ref> and MAX9601 (PECL output),<ref>{{cite web |title=MAX9600, MAX9601, MAX9602: Dual ECL and Dual/Quad PECL, 500ps, Ultra-High-Speed Comparators |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3400/t/al |url-status=dead |archive-url=https://web.archive.org/web/20100328173649/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3400/t/al |archive-date=2010-03-28}}</ref> are examples of some good high speed comparators. ===Hysteresis=== 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.<ref>{{cite web |author=Ron Mancini |title=Adding Hysteresis to comparators |url=https://www.edn.com/adding-hysteresis-to-comparators/ |website=EDN |date=May 3, 2001<!--Correct date from https://web.archive.org/web/20050221054157/http://edn.com/article/CA84881.html-->}}</ref> For example, the LTC6702,<ref>{{cite web |title=LTC6702 - Tiny Micropower, Low Voltage Dual Comparators |publisher=Linear Technology |url=http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1154,C1004,C1012,P38930 |archive-url=https://web.archive.org/web/20110102140904/http://www.linear.com/pc/productDetail.jsp?navId=H0,C1,C1154,C1004,C1012,P38930 |archive-date=2011-01-02 |url-status=dead}}</ref> MAX9021,<ref>{{cite web |title=MAX9021, MAX9022, MAX9024: Micropower, Ultra-Small, Single/Dual/Quad Single-Supply Comparators |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2411/t/al |archive-url=https://web.archive.org/web/20090330140406/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2411/t/al |archive-date=2009-03-30 |url-status=dead}}</ref> and MAX9031,<ref>{{cite web |title=MAX9030, MAX9031, MAX9032, MAX9034: Low-Cost, Ultra-Small, Single/Dual/Quad Single-Supply Comparators |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2363/t/al |archive-url=https://web.archive.org/web/20090331134510/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2363/t/al |archive-date=2009-03-31 |url-status=dead}}</ref> 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,<ref>{{cite web |title=LMP7300 - Micropower Precision Comparator and Precision Reference with Adjustable Hysteresis from the PowerWise® Family |publisher=National Semiconductor Corporation |url=http://www.national.com/pf/LM/LMP7300.html |url-status=dead |archive-date=2009-05-03 |archive-url=https://web.archive.org/web/20090503133351/http://www.national.com/pf/LM/LMP7300.html}}</ref> LTC1540,<ref name=LTC1540/> MAX931,<ref>{{cite web |title=MAX931, MAX932, MAX933, MAX934: Ultra-Low-Power, Low-Cost Comparators with 2% Reference |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1219 |url-status=dead |archive-url=https://web.archive.org/web/20100330215239/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1219 |archive-date=2010-03-30}}</ref> MAX971,<ref name=qv_pk/1279>{{cite web |title=MAX971, MAX972, MAX973, MAX974, MAX981, MAX982, MAX983, MAX984: Ultra-Low-Power, Open-Drain, Single/Dual-Supply Comparators |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1279/t/al |url-status=dead |archive-url=https://web.archive.org/web/20090330185135/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1279/t/al |archive-date=2009-03-30}}</ref> and ADCMP341,<ref>{{cite web |title=ADCMP341: Dual 0.275% Comparator and Reference with Programmable Hysteresis |publisher=Analog Devices, Inc. |url=http://www.analog.com/en/power-management/battery-management/adcmp341/products/product.html |archive-url=https://web.archive.org/web/20090815095219/http://www.analog.com/en/power-management/battery-management/adcmp341/products/product.html |archive-date=2009-08-15 |url-status=dead}}</ref> 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.<ref>{{cite web |id=AN3616 |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/appnotes.cfm/an_pk/3616/ |title=Adding Extra Hysteresis to Comparators |url-status=dead |archive-url=https://web.archive.org/web/20080509160549/http://www.maxim-ic.com/appnotes.cfm/an_pk/3616/ |archive-date=2008-05-09}}</ref> When hysteresis is added then a comparator cannot resolve signals within the hysteresis band. ===Output type=== [[File:Dynamic Comparator.png|thumb|right|upright=1.35|A low-power CMOS clocked comparator]] 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.<ref name="test">{{cite web |id=AN886 |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/appnotes.cfm/an_pk/886/ |title=Selecting the Right Comparator |url-status=dead |archive-url=https://web.archive.org/web/20080501144538/http://www.maxim-ic.com/appnotes.cfm/an_pk/886/ |archive-date=2008-05-01}}</ref> On the basis of outputs, comparators can also be classified as [[open-drain]] or [[push–pull output|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=== 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.<ref name="test"/> ICs with wide range of references are available such as MAX9062 (200 mV reference),<ref name=qv_pk/5823/> LT6700 (400 mV reference),<ref>{{cite web |title=LT6700 - Micropower, Low Voltage, Dual Comparator with 400mV Reference |publisher=Linear Technology |url=http://www.linear.com/product/LT6700 |archive-url=https://web.archive.org/web/20160518160612/http://www.linear.com/product/LT6700 |archive-date=2016-05-18 |url-status=dead}}</ref> ADCMP350 (600 mV reference),<ref>{{cite web |title=ADCMP350: Comparator & 0.6V Reference in 4-SC70 w/ Open-Drain Active-Low Output |publisher=Analog Devices, Inc. |url=https://www.analog.com/en/products/adcmp350.html#product-overview |access-date=2023-07-01}}</ref> MAX9025 (1.236 V reference),<ref name=qv_pk/4268/> MAX9040 (2.048 V reference),<ref>{{cite web |title=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 |publisher=Maxim Integrated Products |url=http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2122/t/al |url-status=dead |archive-url=https://web.archive.org/web/20091221015430/http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2122/t/al |archive-date=2009-12-21}}</ref> TLV3012 (1.24 V reference),<ref>{{cite web |title=TLV3012: Low-power comparator with reference (push-pull) |publisher=Texas Instrument |url=https://www.ti.com/product/TLV3012}}</ref> and TSM109 (2.5 V reference).<ref>{{cite web |title=TSM109/A: DUAL COMPARATOR AND VOLTAGE REFERENCE |publisher=STMicroelectronics |url=https://pdf.datasheetcatalog.com/datasheet/stmicroelectronics/9208.pdf}}</ref> ===Continuous versus clocked=== 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.<ref> {{cite book | title = Offset Reduction Techniques in High-Speed Analog-to-Digital Converters: Analysis, Design and Tradeoffs | author = Pedro M. Figueiredo, João C. Vital | publisher = Springer | year = 2009 | isbn = 978-1-4020-9715-7 | pages = 54–62 | url = https://books.google.com/books?id=El9Ki0spMEwC&q=%22output+voltages+of+the+latched+comparator%22+regeneration+reset+phase&pg=PA55 }}</ref> This is in contrast to a continuous comparator, which can only employ weak positive feedback since there is no reset period. ==Applications== {{main|Comparator applications}} [[File:Calibration Comparator (7504822476).jpg|thumb|right|A precision calibration comparator]] ===Null detectors=== 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 v<sub>u</sub> and v<sub>r</sub>. 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 10<sup>6</sup>, 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.<ref>{{cite book |title=Electronics and Instrumentation for Scientists |last1=Malmstadt |first1=Howard V. |last2=Enke |first2=Christie G. |last3=Crouch |first3=Stanley R. |publisher=The Benjamin/Cummings Publishing Co |year=1981 |isbn=978-0-8053-6917-5 |pages=[https://archive.org/details/electronicsinstr0000malm/page/108 108–110] |url-access=registration |url=https://archive.org/details/electronicsinstr0000malm}}</ref> ===Zero-crossing detectors=== For this type of detector, a comparator detects each time an [[Alternating Current|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.<ref>{{cite book |title=Electronics and Instrumentation for Scientists |last1=Malmstadt |first1=Howard V. |last2=Enke |first2=Christie G. |last3=Crouch |first3=Stanley R. |publisher=The Benjamin/Cummings Publishing Co |year=1981 |page=[https://archive.org/details/electronicsinstr0000malm/page/230 230] |isbn=978-0-8053-6917-5 |url-access=registration |url=https://archive.org/details/electronicsinstr0000malm}}</ref> ===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]].<ref>{{cite book |author1=Paul Horowitz |author2=Winfield Hill |title=The Art of Electronics |publisher=Cambridge University Press |edition=2nd |place=Cambridge |year=1989 |pages=284–285}}</ref> ===Level shifter=== [[File:DOV-1X - National Semiconductor LM393N on printed circuit board-9800.jpg|thumb|National Semiconductor LM393]] This circuit requires only a single comparator with an open-drain output as in the LM393,<ref>{{cite web |title=LM393: Dual differential comparator, commercial grade |publisher=Texas Instrument |url=http://www.ti.com/product/lm393}}</ref> TLV3011,<ref>{{cite web |title=TLV3011: Low-power comparator with reference (open-drain) |publisher=Texas Instrument |url=https://www.ti.com/product/TLV3011}}</ref> or MAX9028.<ref name=qv_pk/4268/> 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.<ref name=qv_pk/1279/><ref name="test"/> ===Analog-to-digital converters=== 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 (signal processing)|quantization]]. This function is used in nearly all analog to digital converters (such as [[Flash ADC|flash]], pipeline, [[Successive-approximation ADC|successive approximation]], [[delta-sigma modulation]], folding, interpolating, [[Integrating ADC|dual-slope]] and others) in combination with other devices to achieve a multi-bit quantization.<ref>{{cite book |author1=Phillip Allen |author2=Douglas Holberg |title=CMOS Analog Circuit Design |publisher=Oxford University Press |edition=2nd |place=Oxford |year=2002}}</ref> ===Window detectors=== 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=== 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.<ref>{{cite book |last1=Iranmanesh |first1=S. |last2=Rodriguez-Villegas |first2=E. |title=2016 14th IEEE International New Circuits and Systems Conference (NEWCAS) |chapter=CMOS implementation of a low power absolute value comparator circuit |publisher=IEEE Newcas |date=June 2016 |pages=1–4 |doi=10.1109/NEWCAS.2016.7604807 |isbn=978-1-4673-8900-6 |s2cid=10810576}}</ref> ==See also== * [[Constant fraction discriminator]] * [[Digital comparator]] * [[Flash ADC]] * {{Section link|List of LM-series integrated circuits|Differential_comparators}} * [[Sorting network]] * [[Voltage regulator]] * [[Zero crossing threshold detector]] ==References== {{reflist}} {{refbegin}} *{{FS1037C}} {{refend}} ==External links== {{Wiktionary}} * [http://circuitous.ca/Comparators.html IC Comparator reference page at http://circuitous.ca] * [http://www.labbookpages.co.uk/electronics/resNetworks/comparator.html A Java based resistor value search tool for analysing an inverting comparator circuit with hysteresis] {{Authority control}} [[Category:Electronic circuits]] [[Category:Comparison (mathematical)]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Authority control
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:FS1037C
(
edit
)
Template:Main
(
edit
)
Template:Main article
(
edit
)
Template:Other uses
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:Section link
(
edit
)
Template:Short description
(
edit
)
Template:Unreferenced section
(
edit
)
Template:Wiktionary
(
edit
)