Practical_Electronics-May_2019

([email protected]) #1

is not centred exactly on the 1.6V reference.
If the comparator is run from a single
supply the output (ideally) switches be-
tween +VO and 0V rather than +VO and



  • VO. The formula for VTH is the same, but
    the zero removes the –VO term from the
    VTL equation, so it becomes:


If R 2 is much larger than R 1 the lower
threshold (VTL) is close to Vref, rather than
Vref being approximately the centre be-
tween the two thresholds, as it is with
the split supply circuit. This may be a
source of confusion with single-supply
versions of the circuit.


Potential dividers
Vref in Fig.12 can be obtained from a po-
tential divider connected between the
supplies. Ideally, in order to prevent
the threshold setting network (R 1 and
R 2 in Fig.12) from loading the potential
divider and infl uencing the reference volt-
age, the potential resistors should have
relatively low resistance. Alternatively,
interaction between a potential divider
and feedback resistor can be used to set
the two threshold voltages using the cir-
cuit shown in Fig.13.

If we run the circuit in Fig.13 from a
single supply, and assume the comparator’s
output voltage is ‘rail to rail’(+VCC or 0V),
then it is reasonably straightforward to fi nd
the two thresholds. When the comparator
output is 0V, R 3 is effectively connected
to ground in parallel with R 1. The parallel
value of these resistors, RP13, is, using the
formula for two parallel resistors:

This resistance forms a potential divider
with R 2 to set the lower threshold:

When the comparator output is VCC, R 3
is effectively connected to the supply in
parallel with R 2. The parallel value of
these resistors, RP23, is given by:

This resistance forms a potential divider
with R 1 to set the upper threshold:

If the output is not perfectly rail to rail
then we need more complex equations
which include the two comparator output
voltages as well as VCC.
The switching points for the circuit in
Fig.13 are not necessarily symmetrical
around the open circuit voltage of the R1-R 2
potential divider. For example, if we have
VCC = 5V and choose R 1 = 5kΩ and R 2 =
25kΩ we get a potential divider voltage of
833mV, with nothing else connected to it.
If we have a feedback resistor R 3 = 100kΩ
then RP13 is 4.762kΩ, RP23 is 20kΩ and the
threshold voltages are VTL = 0.800V, and
VTH = 1.00V (using the above formula).
We have a total hysteresis of 200mV, but
the lower threshold (in this example) is
much closer to the open-circuit potential
divider voltage than the upper threshold.

Fig.9. LTspice simulation schematic using a simple generic op amp model as a comparator
to show the difference between circuits with and without hysteresis. The setup of this
simulation will be discussed next month.


Fig.10. Response of the two comparators from simulation
schematic in Fig.8.


Fig.11. A zoomed in view of one of the threshold crossings from
Fig.10 to show the waveform at the switching point in more detail.

+


  • Vout


R 2
VRef

Vin
Vcomp
R 1

+


  • Vout


R 3

R 2

R 1

VRef

Gnd

VCC Vin

Fig.12. Using positive feedback to apply
hysteresis to a comparator.


Fig.13. A potential divider can be used in
conjunction with a feedback resistor to
set comparator thresholds. (Single supply
circuit shown.)






␀!"=


᐀!


᐀!+᐀!


␀!"#+


᐀!


᐀!+᐀!


␀!


␀!"=


᐀!


᐀!+᐀!


␀!"#−


᐀!


᐀!+᐀!


␀!


␀"=␀!"−␀!"=


2 ᐀!


᐀!+᐀!


␀!


᐀!


᐀!+᐀!


␀!"


␀!"=


᐀!


᐀!+᐀!


␀!"


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!!"


᐀!!"+᐀!


␀!!


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!


᐀!+᐀!!"


␀!!







␀!"=


᐀!


᐀!+᐀!


␀!"#+


᐀!


᐀!+᐀!


␀!


␀!"=


᐀!


᐀!+᐀!


␀!"#−


᐀!


᐀!+᐀!


␀!


␀"=␀!"−␀!"=


2 ᐀!


᐀!+᐀!


␀!


᐀!


᐀!+᐀!


␀!"


␀!"=


᐀!


᐀!+᐀!


␀!"


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!!"


᐀!!"+᐀!


␀!!


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!


᐀!+᐀!!"


␀!!







␀!"=


᐀!


᐀!+᐀!


␀!"#+


᐀!


᐀!+᐀!


␀!


␀!"=


᐀!


᐀!+᐀!


␀!"#−


᐀!


᐀!+᐀!


␀!


␀"=␀!"−␀!"=


2 ᐀!


᐀!+᐀!


␀!


᐀!


᐀!+᐀!


␀!"


␀!"=


᐀!


᐀!+᐀!


␀!"


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!!"


᐀!!"+᐀!


␀!!


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!


᐀!+᐀!!"


␀!!







␀!"=


᐀!


᐀!+᐀!


␀!"#+


᐀!


᐀!+᐀!


␀!


␀!"=


᐀!


᐀!+᐀!


␀!"#−


᐀!


᐀!+᐀!


␀!


␀"=␀!"−␀!"=


2 ᐀!


᐀!+᐀!


␀!


᐀!


᐀!+᐀!


␀!"


␀!"=


᐀!


᐀!+᐀!


␀!"


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!!"


᐀!!"+᐀!


␀!!


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!


᐀!+᐀!!"


␀!!







␀!"=


᐀!


᐀!+᐀!


␀!"#+


᐀!


᐀!+᐀!


␀!


␀!"=


᐀!


᐀!+᐀!


␀!"#−


᐀!


᐀!+᐀!


␀!


␀"=␀!"−␀!"=


2 ᐀!


᐀!+᐀!


␀!


᐀!


᐀!+᐀!


␀!"


␀!"=


᐀!


᐀!+᐀!


␀!"


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!!"


᐀!!"+᐀!


␀!!


᐀!!"=


᐀!᐀!


᐀!+᐀!


␀!"=


᐀!


᐀!+᐀!!"


␀!!

Free download pdf