
Vref
B
TIME.
Fig.
3 -The
charted
relationship
between
the comparator's
input and output
vol ages is shown
here.
The upper
graph (A)
shows
inputs to the comparators
and circuits
diagrammed
in Fig. 2. The
lower grEph (B) shows
the circuit's
output
response. qV
A
B
C
+9V
Vrel
Vin
V
RI
10K
R2
3905!
LEO
+9V
nt
2N2222
+9V
R1
68012
LED
Fig. 4 -Here are
th ee ways of using
a light- emitting
diode
(LED)
to indicate the electrical
output state
of a comparator.
In Fig. 4A,
when
Vin
is greater than
Vref, pin 2 goes high,
transistor
Q1 turns
on through pull
-up resistor R1, and the
collector
current through
Ql lights the LED. When
Vin
is
less
than
Vref, pin
2 is low and
Q1 is cut off, turning
the LED
off. Resistor
R2 limits the current
through the LED.
The circuit in Fig.
4B is similar to Fig.
4A, but this time
the comparator
controls a PNP transistor.
When
pin 2 goes
low, Q 1 turns
on and lights the
LED,
giving
the opposite
effect of the NPN
circuit in Fig.
4A.
Figure 4C shows
yet another option for connecting
an
LED.
Typical current -sink
capability of the LM339
is 16
milliamperes.
This is enough
current to light a
high -
efficiency
LED directly,
without using a
drive transistor.
The circuits
in Fig.
4
are
shown using one
of
the
four
identical comparators
in the LM339.
In
these
and the circuits
that
follow, inputs and
outputs to unused comparators
on
the chip
should be tied to ground.
Power supplies are
not
shown, but
should be connected at pins 3
and 12 as shown
in Fig. 2.
Achieving Snap -Action
The
circuits shown
so far all have limitations. If
Vin
has
noise riding on
it,
the
output may chatter
high and low as
Vin
approaches
V
ref
. And
a
slowly changing
input
may per-
mit the
output to oscillate as
Vin
nears the
trip
voltage.
Add-
ing a little positive
feedback can take care of both of
those
problems.
Figure 5 shows a temperature-
monitoring circuit
with posi-
tive feedback added
through resistor R6. The trip
voltage
is set with potentiometer
R4. The sensed voltage is taken
from a
voltage
divider
containing a thermistor
(temperature -
dependent
resistor) and resistor R2. As the temperature
of
thermistor
R I increases, its resistance decreases
because it
has a
negative temperature coefficient.
The resulting drop
in the network's (R1/R2)
resistance increases the current
through
R2, raising the
voltage
at pin
4 of the LM339.
Here's
how the positive
feedback
works.
When
the output
at pin
2 is high, a
small part
of
the
output
voltage feeds back
through R6 to
pin 5. This
raises the
voltage at pin 5 slightly
higher
than the
level set at R4.
When
rising temperatures
cause pin
4 to go higher
than pin 5, pin
2 goes low,
buzzer
BZI is energized,
and the
voltage at pin 5
drops, this time
to
a level slightly
lower than that
at R4.
The
buzzer remains
on until the
temperature falls enough
so that pin
4 is less than
pin 5 again.
Because the turn
-on
trip
voltage is higher than the
turn-off
voltage, the buzzer
snaps on decisively
at the desired
temperature
and remains
on until the temperature
drops. ,yy
R1
THERMISTOR
10K
AT
25'C
+9v
BZ1
PIEZOELECTRIC
BUZZER
Fig. 5 -The
piezoelectric
buzzer sounds
at and above
a temp-
erature selected
by
R4. Positive
feedback through
R6 ensures
that the buzzer
snaps on decisively
at
the trip voltage.
63
Comentarios a estos manuales