Application Info
Basic Comparators
A comparator is quite often used to convert an analog signal
to a digital signal. The comparator compares an input volt-
age (V
IN
) at the non-inverting pin to the reference voltage
(V
REF
) at the inverting pin. If V
IN
is less than V
REF
the output
(V
) is low (V
). However, if V
IN
is greater than V
REF
, the
output voltage (V
O
) is high (V
OH
).
Hysteresis
The basic comparator configuration may oscillate or produce
a noisy output if the applied differential input is near the
comparator’s input offset voltage. This tends to occur when
the voltage on the input is equal or very close to the other
input voltage. Adding hysteresis can prevent this problem.
Hysteresis creates two switching thresholds (one for the
rising input voltage and the other for the falling input volt-
age). Hysteresis is the voltage difference between the two
switching thresholds. When both inputs are nearly equal,
hysteresis causes one input to effectively move quickly pass
the other. Thus, effectively moving the input out of region that
oscillation may occur.
Hysteresis can easily be added to a comparator in a
non-inverting configuration with two resistors and positive
feedback Figure 3 The output will switch from low to high
when V
IN
rises up to V
IN1
, where V
IN1
is calculated by
V
IN1
= (V
REF
(R1 + R2))/ R2
The output will switch from high to low when V
IN
falls to V
IN2
,
where V
IN2
is calculated by
V
IN2
= (V
REF
(R1 + R2) - V
CC
R1) / R2
The Hysteresis is the difference between V
IN1
and V
IN2
.
V
= V
IN1
- V
= ((V
REF
(R1 + R2)) / R2) - ((V
REF
(R1 +
R2) - V
CC
R1) / R2) = V
CC
R1/ R2.
For an inverting configured comparator, hysteresis can be
added with a three resistor network and positive feedback.
When input voltage (V
IN
) at the inverting node is less than
non-inverting node (V
T
), the output is high. The equivalent
circuit for the three resistor network is R1 in parallel with R3
and in series with R2. The lower threshold voltage V
T1
is
calculated by:
V
T1
= ((V
CC
R2) / ((R1 R3) / (R1+ R3)) + R2)
When V
is greater than V
, the output voltage is low. The
equivalent circuit for the three resistor network is R2 in
parallel with R3 and in series with R1. The upper threshold
voltage V
T2
is calculated by:
V
= V
CC
((R2 R3) / (R2 + R3)) / ((R1 + ((R2 R3) / (R2 +
R3))
The hysteresis is defined as
V
IN
= V
- V
= ((V
R2) / ((R1 R3) / (R1+ R3)) + R2) –
(V
CC
((R2 R3) / (R2 + R3)) / ((R1 + ((R2 R3) / (R2 + R3)))
LMV7251
DS200057-15
LMV7255
DS200057-16
Input/Output
DS200057-17
FIGURE 2. Basic Comparator
DS200057-18
DS200057-19
FIGURE 3. Non-Inverting Comparator Configuration —
LMV7251
L
www.national.com
7