4

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?

Codeman
  • 143
  • 5
  • 3
    What is it when it isn't high impedance? A lightning bolt? An open collector pulling to ground? A 5mA current source? – Phil Frost Jun 06 '13 at 21:24
  • 1
    pull-up resistor. [The question is vague, though. What are you testing the impedance of? And why?] – Nick Alexeev Jun 06 '13 at 21:26
  • I added a truth table. – Codeman Jun 06 '13 at 21:31
  • @PhilFrost this is in CPU terms, so it would likely be somewhere in the realm of 0V-1.8V to 0V-5V – Codeman Jun 06 '13 at 21:32
  • @Pheonixblade9 Ah. Makes sense now, with a bit more context to get me thinking about the right kind of electronics. – Phil Frost Jun 06 '13 at 21:41
  • @PhilFrost cool :) is it answerable in its current form? – Codeman Jun 06 '13 at 21:42
  • I'm the guy that came up with this question, and all I really want to know is the name of such a circuit. – Kendall Frey Jun 06 '13 at 21:48
  • 1
    I guess you could call it: "floating input detector". You could put a resistive voltage divider that pulls to Vcc/2, and with two comparators and an AND gate implement something like: OUTPUT = (lower_than_2/3_Vcc) AND (greater_than_1/3_Vcc) – apalopohapa Jun 06 '13 at 21:56

1 Answers1

3

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.

markrages
  • 19,905
  • 7
  • 59
  • 96
  • Interesting. This might be tough to scale, as this is for a microprocessor, but I appreciate the effort, and I'll check this in my sim to make sure it's what I'm looking for. Thanks! – Codeman Jun 06 '13 at 23:23
  • LM339 is cheap ($0.33 in *single pieces*) and you get four comparators (two copies of this circuit) per chip. – markrages Jun 06 '13 at 23:24
  • Does your microcontroller have ADC inputs? You can do the same trick in software, just the 1M+1M midpoint supply is all the hardware you need. If your micro has switchable pull-up / pull-down resistors, you could use those in succession and avoid any extra components. – markrages Jun 06 '13 at 23:26
  • the circuit is designed to be part of a CPU pipeline, so I'm not sure that will work. I am going to explore this, though. – Codeman Jun 06 '13 at 23:27
  • Also, the 10k+10k+10k divider chain can be shared among any number of comparator circuits. – markrages Jun 06 '13 at 23:36