Looking at Window Comparator Circuits
by Lewis Loflin
The circuit above is what is called a "window comparator." This will out a digital "HIGH" at "X" and a digital "LOW" at pin 2 of the 74LS04 covering a preset voltage range. This 74LS04 can be any inverter or buffer such as a 74LS07 which has an open-collector output.
Looking at the 4N29 or similar opto-coupler, we use this to change the analog voltages on the left side of the circuit to a digital logic level on the right side of the circuit. The output at either pin 1 (X) or pin 2 can drive any number of driver circuits to switch on motors fans, etc.
Just what does a window comparator do?
A conventional voltage comparator circuit is simply OFF or ON. A window comparator is ON in a fixed voltage rage and OFF outside that voltage range.
This circuit uses an LM358 dual op-amp. This is a single supply device that operates well at 5-volts and comes in a single 8-pin package. In fact the same circuit will work with 12-volt sensors by changing the supply voltage (only) on the left side of the opto-coupler. The potentiometer connected to pins 3 and 6 simulates the voltage output of an analog sensor.
The voltage dividers at pins 2 and 5 set the upper and lower limits for the comparator. As I adjust the potentiometer LED1 will come on when the voltage is between the points set by the HIGH and LOW reference points at pins 2 and 5. Make sure the voltage at pin 2 is higher than pin 5, otherwise the values can be selected.
In fact the two voltage dividers using fixed resistors can be changed to 10K potentiometers for precise adjustment of the "window" of operation.
In Fig. 2 I used two LM311 comparators. The circuit operates in the identical manner as Fig. 1 and the opto-coupler section and the two 5K potentiometers will work just fine in Fig. 1.
To test the circuit adjust the HIGH set control (TP1) to 4-volts and set the LOW set control (TP3) to 2-volts. Measure TP2 and the LED will come on from 2 to 4 volts.
In either circuit above LED1 and its resistor can be replaced with Solid State AC Relays with Triacs or an electromechanical relay or contactor.
You Tube Videos
The next groups of links below go to specific electronic/electrical devices on how to use and test them.
If using this material on another site, please provide a link back to my site.