Selecting the Right Comparator This application note describes

Dec 13, 2001 - www.maxim-ic.com/an88. Page 1 of 6 ... An op amp running without negative feedback can serve as a comparator, because its high.
240KB taille 107 téléchargements 229 vues
AMPLIFIER AND COMPARATOR CIRCUITS

Application Note 886: Dec 13, 2001

Selecting the Right Comparator This application note describes comparator features and specifications as well as the differences between comparators and op amps. It also includes circuits that combine comparators and an internal reference, dual comparators used in window applications and a quad comparator used to resolve a voltage or current measurement into one of four ranges.

The comparator often stands in the shadow of its big brother, the op amp. Its humble status is offset by the features which distinguish modern comparators and make them ideal for their basic task, comparing two voltages. This article explains these features and describes the parameters to be considered when selecting comparators. The Comparator's Function A comparator accepts two analog signals and produces a binary signal at the output, a function of which input voltage is higher. The output signal remains constant as the differential input voltage changes. When described that way, the comparator resembles a 1-bit ADC. Comparing Comparators and Op Amps An op amp running without negative feedback can serve as a comparator, because its high voltage gain enables it to resolve very small differences in input voltage. Op amps used this way are generally slower than comparators and lack other special features, such as hysteresis and internal references. Comparators cannot generally be used as operational amplifiers. They are trimmed to provide excellent switching times at the expense of the frequency-response correction that makes op amps so versatile. The internal hysteresis employed in many comparators, which prevents oscillation at the output, also prevents their use as op amps. Supply Voltage Comparators operate with the same supply voltages used by operational amplifiers. Many older comparators require bipolar (e.g., ±15V) or unipolar supply voltages as high as 36V. These supply voltages are still used in industrial applications. For most new applications, however, the comparator operates within the range of low unipolar voltages typically found in battery-operated devices. Modern applications for comparators require low current consumption, small packages, and (in some cases) a shutdown function. As an example, the MAX919 comparator works with voltages from 1.8 to 5.5V, draws a maximum of 1.2µA over the entire temperature range, and is available in a SOT23 package. The MAX965 family of comparators operates with supply voltages as low as 1.6V.

www.maxim-ic.com/an88

Page 1 of 6

Features A comparator normally changes its output state when the voltage between its inputs crosses through approximately zero volts. Small voltage fluctuations always present on the inputs produce very small difference voltages, which in turn cause undesirable changes in the comparator's output state when the difference voltage is near zero volts. To prevent this output oscillation, a small hysteresis of a few millivolts is integrated into many modern comparators. In place of one switching point, hysteresis introduces two: one for rising voltages, and one for falling voltages (Figure 1). The difference between the higher-level trip value (VTRIP+) and the lower-level trip value (VTRIP-) equals the hysteresis voltage (VHYST). For comparators with hysteresis, the offset voltage (VOS) is simply the mean value of VTRIP+ and VTRIP-.

Figure 1. Switch thresholds, hysteresis, and offset voltage.

For comparators without hysteresis, the difference voltage between the inputs needed to switch the comparator is the offset voltage rather than the zero voltage required by an ideal comparator. However, the offset voltage (and consequently the switching voltage) changes with temperature and supply voltage. One measurement of that dependence is the power-supply rejection ratio (PSRR), which shows the relationship between a change in the nominal supply voltage and the resulting change in offset voltage. The inputs of an ideal comparator exhibit infinitely high input resistance, and thus no current flows into its inputs. For actual comparators, however, the currents that flow into their inputs also flow through the internal resistance of any voltage source that's attached to them, generating an error voltage. Bias current (IBias) is defined as the median value of the two comparator-input currents. For the MAX917 comparator family, for example, the maximum IBias current is 2nA. As lower supply voltages become common, Maxim wished to expand the input voltage range of comparators beyond the supply voltages. Some Maxim comparators employ the parallel switching of two npn/pnp input stages, which has allowed input voltages as high as 250mV

www.maxim-ic.com/an88

Page 2 of 6

beyond each supply rail. Such devices are called Beyond-the-Rail comparators. The range of input common-mode voltages available can be found in the comparator's data sheet. Comparator Outputs Because comparators have only two output states, their outputs dwell 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-toemitter voltage of a saturated transistor. Output voltages of CMOS Rail-to-Rail comparators, which rely on a saturated MOSFET, range closer to the rails than their bipolar counterparts when output currents are light. One criterion for selecting a comparator is the time its output takes to alter its state after a signal has been applied at its input. This propagation time must account for propagation delay through the component and rise/fall times in the output driver as well. A very fast comparator like the MAX961, for example, has a typical propagation delay of only 4.5ns and a rise time of 2.3ns (bear in mind that the propagation delay measurement includes a portion of the rise time). One should heed the different influences that affect propagation time (Figure 2). These include temperature, load capacitance, and voltage drive in excess of the switching threshold (input overdrive). Propagation time is called tPD- for the inverting input and tPD+ for the noninverting input, and the difference between tPD+ and tPD- is called skew. Supply voltage also has a strong effect on propagation time.

Figure 2. The effect of external influences on propagation time.

For a given application, select either a comparator with high speed or one that saves power. Maxim offers a spread of performance for this purpose: from the MAX919 (800nA, 30µs) to the MAX9075 (6µA, 540ns) and from the MAX998 (600µA, 20ns) to the MAX961 (11mA, 4.5ns). The recent MAX9010 (in a SC70-package) represents a useful compromise in these parameters, with a 5ns propagation time and 900µA supply current. Particular Comparators

www.maxim-ic.com/an88

Page 3 of 6

The most frequent application for comparators is the comparison of a voltage and a stable reference. Maxim offers various comparators in which a reference voltage is integrated on the chip. Combining the reference and comparator in one chip not only saves space, but also draws less supply current than does a comparator with external reference. The MAX918, for example, requires only 1.6µA maximum (including reference) over the entire temperature range. The precision of an integrated reference typically ranges from 1% to 4%. For high accuracy, however, references in the MAX9040 family of comparators offer 0.4% initial accuracy and a maximum 30ppm/°C temperature drift. The MAX923 and MAX933 dual comparators and the open-drain-output MAX973 and MAX983 dual comparators are ideally suited for window-comparator applications. Because the integrated reference within all four of these devices can connect to the comparator's inverting or noninverting input, overvoltage and undervoltage thresholds can be implemented with just three external resistors. These components also provide a hysteresis pin. By adding two additional external resistors, this pin allows the addition of a hysteresis threshold, as shown in Figure 1. Some comparators such as the MAX912/913 offer complementary outputs - i.e., two outputs that transition in the opposite direction of each other for a change of relative input polarity. Applications This section introduces three applications that require comparators. The first is a level shifter, from 3V logic to 5V logic. As shown in Figure 3, this circuit requires only a single comparator with an open-drain output, like the MAX986. The circuit provides great flexibility in choosing the voltages to be translated. It also allows the translation of bipolar ±5V logic to unipolar 3V logic - using the MAX972, for example. In that application, take care that no voltage exceeds the maximum-allowed voltage on any pin and that current into the output is limited by a sufficiently large-valued pull-up resistor (see the IC's Absolute Maximum Ratings).

Figure 3. Level translation from 3V to 5V logic.

www.maxim-ic.com/an88

Page 4 of 6

The circuit of Figure 4 solves another frequently encountered problem. Configured as shown, a single unipolar comparator converts a bipolar input signal (a sinewave in this case) to a unipolar digital output signal. The required offset voltage is calculated as follows:

Figure 4. Unipolar comparator with bipolar input signal.

Two equal-valued resistors (labeled R4) establish the comparator's trip threshold at half the supply voltage. In the circuit of Figure 5, four comparator outputs form a thermometer gauge indicating one of four ranges for the input-current level. The shunt resistor converts the input current to a voltage, and resistors R1-R2 set the op-amp gain as required for the desired level of reference voltage. Resistors R4-R7 denote thresholds for the desired digital outputs.

www.maxim-ic.com/an88

Page 5 of 6

Figure 5. Resolving a current measurement into one of four ranges.

A similar version of this article appeared in the July 1, 2001 issue of ECN magazine.

MORE INFORMATION MAX9010: QuickView -- Full (PDF) Data Sheet (344k) -- Free Sample MAX9075: QuickView -- Full (PDF) Data Sheet (200k) -- Free Sample MAX917:

QuickView -- Full (PDF) Data Sheet (160k) -- Free Sample

MAX919:

QuickView -- Full (PDF) Data Sheet (160k) -- Free Sample

MAX923:

QuickView -- Full (PDF) Data Sheet (152k) -- Free Sample

MAX933:

QuickView -- Full (PDF) Data Sheet (176k) -- Free Sample

MAX961:

QuickView -- Full (PDF) Data Sheet (192k) -- Free Sample

MAX973:

QuickView -- Full (PDF) Data Sheet (336k) -- Free Sample

MAX983:

QuickView -- Full (PDF) Data Sheet (336k) -- Free Sample

MAX986:

QuickView -- Full (PDF) Data Sheet (464k) -- Free Sample

MAX998:

QuickView -- Full (PDF) Data Sheet (136k) -- Free Sample

www.maxim-ic.com/an88

Page 6 of 6