GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing en.wikipedia.org — Comparator - Wikipedia For other uses, see Comparator (disambiguation).
In electronics, a comparator is an electronic component that compares two input 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 should be bistable and is ideally where and are nominally the positive and negative supply voltages. 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. Comparators are closely related to operational amplifiers, but a comparator is designed to operate with positive feedback and with its output saturated at one power rail or the other. If necessary, an op-amp can be pressed into service as a poorly performing comparator, but its slew rate will be impaired. Differential voltageThe 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 comparatorAn 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.[5] 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.[5] In practice, this circuit can be improved by incorporating a hysteresis voltage range to reduce its sensitivity to noise.[5] 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.[6]
Design
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.[7] 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.[8] 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.[9]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.[10] Open collector outputMain 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 specificationsWhile 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: Power and SpeedWhile 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.[11] 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,[12] LTC1540,[13] LPV7215,[14] MAX9060,[15] and MCP6541,[16] 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),[17] LMH7220 (LVDS Output),[18] MAX999 (CMOS output / TTL output),[19] LT1719 (CMOS output / TTL output),[20] MAX9010 (TTL output),[21] and MAX9601 (PECL output),[22] are examples of some good high speed comparators. HysteresisA 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.[23] For example, the LTC6702,[24] MAX9021,[25] and MAX9031,[26] 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,[27] LTC1540,[13] MAX931,[28] MAX971,[29] and ADCMP341,[30] 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.[31] When hysteresis is added then a comparator cannot resolve signals within the hysteresis band. Output typeBecause 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.[32] 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.[33] Internal referenceThe 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.[32] ICs with wide range of references are available such as MAX9062 (200 mV reference),[15] LT6700 (400 mV reference),[34] ADCMP350 (600 mV reference),[35] MAX9025 (1.236 V reference),[12] MAX9040 (2.048 V reference),[36] TLV3012 (1.24 V reference),[37] and TSM109 (2.5 V reference).[38] Continuous versus clockedA 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.[39] This is in contrast to a continuous comparator, which can only employ weak positive feedback since there is no reset period. ApplicationsNull detectorsA 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.[40] 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.[41] Zero-crossing detectorsA zero crossing detector is a comparator with the reference level set at zero. It is used for detecting the zero crossings of AC signals. 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.[42] When the input voltage is positive, the output voltage is a positive value; when the input voltage is negative, the output voltage is a negative value. The magnitude of the output voltage is a property of the operational amplifier and its power supply. Applications include converting an analog signal into a form suitable for frequency measurements, in phase locked loops, or controlling power electronics circuits that must switch with a defined relationship to an alternating current waveform. An example detector could exploit the property that the instantaneous frequency of an FM wave is approximately given by where is the time difference between adjacent zero crossings of FM wave.[43] Relaxation oscillatorMain article: 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.[44] By using an RC network to add slow negative feedback to the inverting Schmitt trigger, a relaxation oscillator is formed. The feedback through the RC network causes the Schmitt trigger output to oscillate in an endless symmetric square wave (i.e., the Schmitt trigger in this configuration is an astable multivibrator). Level shifterThis circuit requires only a single comparator with an open-drain output as in the LM393,[45] TLV3011,[46] or MAX9028.[12] 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.[29][32] Analog-to-digital convertersWhen a voltage comparator is used to determine whether an input voltage is above or below a particular threshold (known as the threshold voltage[47]), it is essentially performing a one-bit quantization. This function is used in nearly all types of analog to digital converters (including flash, successive approximation, delta-sigma modulation and dual-slope) in combination with other circuitry to achieve a multi-bit quantization.[48] Window detectorsComparators 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 detectorsComparators 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.[49] Threshold detectorThe threshold detector with hysteresis consists of an operational amplifier and a series of resistors that provide hysteresis.[50]: 5 [51]: 7 [52] Like other detectors, this device functions as a voltage switch, but with an important difference. The state of the detector output is not directly affected by input voltage, but instead by the voltage drop across its input terminals (here, referred to as Va). From Kirchhoff's Current Law, this value depends on Vin and the output voltage of the threshold detector itself, both multiplied by a resistor ratio. Unlike the zero crossing detector, the detector with hysteresis does not switch when Vin is zero; rather the output becomes Vsat+ when Va becomes positive and Vsat- when Va becomes negative. Further examination of the Va equation reveals that Vin can exceed zero (positive or negative) by a certain magnitude before the output of the detector is caused to switch. By adjusting the value of R1, the magnitude of Vin that will cause the detector to switch can be increased or decreased. Hysteresis is useful in various applications. It has better noise immunity than the level detector, which is used in interface circuits. Its positive feedback has a faster transition, so it is used in timing applications such as frequency counters. It is also used in astable multivibrators found in instruments such as function generators. Schmitt triggerMain article: Schmitt trigger
A bistable multivibrator implemented as a comparator with hysteresis. In this configuration, the input voltage is applied through the voltage divider formed by and (which may be the source internal resistance) to the non-inverting input and the inverting input is grounded or referenced. The hysteresis curve is non-inverting and the switching thresholds are where is the greatest output magnitude of the operational amplifier. Alternatively, the input source and the ground may be swapped. Now the input voltage is applied directly to the inverting input, and the non-inverting input is grounded or referenced. The hysteresis curve is inverting and the switching thresholds are . This configuration is used in the relaxation oscillator shown below. See alsoReferences
External linksLook up comparator in Wiktionary, the free dictionary. | ||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |