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.
-
1\$\begingroup\$ google window comparitor. \$\endgroup\$– owg60Commented Apr 11, 2017 at 21:41
-
\$\begingroup\$ Try a couple of analog open collector output comparators with their outputs tied together. perhaps an lm393 \$\endgroup\$– Trevor_GCommented Apr 11, 2017 at 21:43
1 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:
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:
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.
-
\$\begingroup\$ ADDITION : Good answer but it assumes Vs > Vin. He may need a divider and a voltage reference device if this needs this to be powered from the same Vin voltage. \$\endgroup\$– Trevor_GCommented Apr 11, 2017 at 21:54
-
1\$\begingroup\$ @Trevor Good point. I've added that information. \$\endgroup\$– Null ♦Commented Apr 11, 2017 at 22:02
-
\$\begingroup\$ That looks suspiciously like a 555. \$\endgroup\$– Bryan BCommented Apr 11, 2017 at 22:13