Electronic – Is there such a thing as a circuit that outputs 1 if the input is high-impedance, and 0 otherwise

cpudigital-logichigh-impedance

I am trying to design a circuit that outputs a logical 1 if the input is high-impedance, and a 0 otherwise.

Any idea how I might implement this? I would prefer to use off-the-shelf parts (no programming).

Truth table:

I|O
---
X|1
0|0
1|0

I was thinking something along the lines of a pull up resistor with an NPN transistor. Thoughts?

Best Answer

A simple window comparator will do what you want.

The input is tied to midvoltage by the two 1Mohm resistors. The references are set at 1/3 and 2/3rds of the supply voltage. LM339 is open-collector output, so can be OR'ed together to get the desired truth table.

enter image description here

Google for "window comparator" to get more detail about this circuit.

Please notice that this circuit will not detect a low-impedance connection to half the supply voltage, only low impedances to high or low levels.