Electronic – circuit where output signal is high ONLY when at a specified input voltage

voltagevoltage measurement

Is there a circuit where the output is high (or on) when the input voltage is at a specific voltage range? For example, if the input voltage is 4.5 V or lower than the circuit output is low (or off). And if the input voltage is 5.5 V or higher than the circuit output is low (or off). However, if the input voltage is between 4.5 V and 5.5 V then the circuit output is high (or on). I've tried various ways using Zener diodes and transistors but keep running into dead ends. Any help is appreciated.

Best Answer

You are looking for a window comparator. It can be implemented easily with a dedicated window comparator IC (like the TPS3700) or a dual comparator IC (or two single comparators). The two comparators should be open collector (i.e. not push-pull) so that the two outputs don't fight each other. Here's an example from the TLV170x comparator datasheet:

enter image description here

Since the two thresholds (you're using 4.5 V and 5.5 V) connect to the high impedance inputs of the comparators you don't have to buffer them. You can use a resistor divider, composed of three resistors in order to set two thresholds, from your supply voltage to ground. The datasheet for the aforementioned TPS3700 shows this:

enter image description here

In the event that the comparator supply voltage \$V_\text{S}\$ is less than your input thresholds you can divide down your the thresholds and your signal to less than \$V_\text{S}\$. For example, if you have \$V_\text{S} = 2\text{ V}\$ then you can divide your 4.5 V and 5.5 V thresholds by, say, 4 -- that would give you thresholds of 1.125 V and 1.375 V.