Pages: [1]   Go Down
Author Topic: Clamp Comparator Output for Analog/Digital Input Pin  (Read 710 times)
0 Members and 1 Guest are viewing this topic.
Manchester, NH
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Faraday Member
**
Karma: 30
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

you should read 0v out then.
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 48
Posts: 2935
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

.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
Logged

--> 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

Manchester, NH
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Faraday Member
**
Karma: 30
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And why would a Diode not do the job?
Logged

Manchester, NH
Offline Offline
Full Member
***
Karma: 0
Posts: 116
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Where does the diode go?
Logged

Offline Offline
Faraday Member
**
Karma: 30
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"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?

Logged

Pages: [1]   Go Up
Jump to: