Let's say the voltage swing (of the phototransistor output) is
between 1.8V and 4V. We want to make the switch-over point centered
at 2.9V with 0.5V of hysteresis. This means that we want the comparator
to output high when the voltage drops below 2.4V, and output low when the
voltage exceeds 3.4V. There should be no change when the voltage is
between 2.4V and 3.4V.
This can be achieved by 130k for R2, 200k for R3 and 330k for R5. Once
one of the three resistor values is fixed (R5, for example), the other
two can be solved in closed form. It is the ratio among the resistor
values that is important.
Copyright © 2006-02-15 by Tak Auyeung