3–309
Motorola Sensor Device Data
For More Information On This Product,
Go to: www.freescale.com
The user should be aware hat VREF, VREFH and VREFL are
chosen for each application, depending on the desired
switching point and hysteresis values. Also, the user must
specify which range (either above or below the reference
voltage) is the desired normal state (see
Figure 3). Referring
to
Figure 3, if the normal state is below the reference voltage
then VREFL (VREFH is only used to calculate a more precise
value for VREF as explained above) is below VREF by the
desired amount of hysteresis (use VREFL to calculate RH).
Alternately, if the normal state is above the reference voltage
then VREFH (VREFL is only used to calculate a more precise
value for VREF) is above VREF by the desired amount of
hysteresis (use VREFH to calculate RH).
An illustration of hysteresis and the relationship between
these voltages is shown in Figure 3.
VREF (VREFUW)
VREFL
Hysteresis
Hysteresis
VREFH
VREF (VREFLW)
Normal State
Figure 3. Setting the Reference Voltages
LM358 Op Amp Used in a Comparator Circuit
Figure 4 shows the schematic for the LM358 op amp
comparator stage, and Table 2 shows its performance. Since
the LM358 is an operational amplifier, it does not have the fast
slew–rate of a comparator IC nor the open collector output.
Comparing the LM358 and the LM311 (Table 2), the LM311 is
better for logic/switching applications since its output nearly
extends from rail to rail and has a sufficiently high switching
speed. The LM358 will perform well in applications where the
switching speed and logic–state levels are not critical (LED
output, etc.). The design of the LM358 comparator is
accomplished by using the same equations and procedure
presented for the LM311. This circuit is also reverse logic.
LM358 Op Amp with a Transistor Output Stage
Used in a Comparator Circuit
The LM358 with a transistor output stage is shown in Figure
5. This circuit has similar performance to the LM311
comparator: its output reaches the upper rail and its switching
speed is comparable to the LM311’s. This enhanced
performance does, however, require an additional transistor
and base resistor. Referring to Figure 1, note that this
comparator topology was chosen for the pressure switch
design. The LM324 is a quad op amp that has equivalent
amplifier characteristics to the LM358.
Figure 4. LM358 Comparator Circuit Schematic
RH
R2
Vin
R1
Vout
U1
LM358
VCC
Figure 5. LM358 with a Transistor Output Stage
Comparator Circuit Schematic
RH
R2
Vin
R1
RPU
Vout
U1
LM358
RB
Q1
MMBT3904LT1
VCC
Like the other two circuits, this comparator circuit can be
designed with the same equations and procedure. The values
for RB and RPU are chosen to give a 5:1 ratio in Q1’s collector
current to its base current, in order to insure that Q1 is
well–saturated (Vout can pull down very close to ground when
Q1 is on). Once the 5:1 ratio is chosen, the actual resistance
values determine the desired switching speed for turning Q1
on and off. Also, RPU limits the collector current to be within the
maximum specification for the given transistor (see example
values in Figure 1). Unlike the other two circuits, this circuit is
positive logic due to the additional inversion created at the
output transistor stage.
F
Freescale Semiconductor, Inc.
n
.