Go Down

Topic: Clamp Comparator Output for Analog/Digital Input Pin (Read 777 times) previous topic - next topic

rickso234

I have an opamp as a comparator whose output I want to read with a digital or analog input pin and trigger an action when the comparator output goes high and a different action when low. Currently using +9v/-9v supplies for the opamp and want the comparator output to be compatible with the analog/digital pin (0 - 5v). A 5.1v zener from the comparator output to Gnd clamps the high output to around 5.1v but the low level is -0.7v. Is this -0.7v bad for an analog/digital input and how could I better the circuit to more accurately yield 0-5v comparator output for the analog/digital input?

cjdelphi

Use a diode to only allow a + voltage through (via the anode)

you should read 0v out then.

Docedison

.7 volts negative isn't enough to worry about but If you are really concerned use a 1K series resistor as a current limiter.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

rickso234

By "in series" I assume you mean with the comparator output into the digital input.

I found (and have a few) comparators with TTL outputs which should work.

cjdelphi



cjdelphi

"but the low level is -0.7v. Is this -0.7v bad for an analog/digital input and how could I better the circuit to more accurately yield 0-5v comparator output for the analog/digital input?"

How did you get a -0.7v reading? Where?... well, the same place you take a reading, place a Diode in series there, you should now have a 0v reading there....  is there a circuit here?


Go Up