I am trying to set the voltage levels for the Positive Voltage Window Detector configuration of the MC34161. See attached image.
The formulas only provide a ratio for the 3 resistors, so I select a standard resistor value for R1 and use the ratio to calculate R2 & R3. I then take these 3 resistor values and use the reverse formulas that calculate the thresholds from the resistor values.
The thresholds I picked are:
V1 = 4.6V
V2 = 4.8V
V3 = 5.4V
V4 = 5.6V
Vth = 1.27V (comparator threshold voltage)
Vh = 25mV (comparator hysteresis)
There are two formulas for R2/R1, and another two for R3/R1
This gives me R2/R1 =0.174, and 0.1667, then R3/R1 = 3.163, and 3.243
I chose R1 = 5.7K, R2 = 1K, R3 18K
Placing those resistor values back into the voltage formulas returns:
V1 = 4.590V
V2 = 4.682V
V3 = 5.395V
V4 = 5.503V
V1 & V3 are good, but V2 & V4 are 100mV too low.
How do I change the resistors to get the correct voltages?