Maker Pro
Maker Pro

Unwanted Comparator Offset

Raven Luni

Oct 15, 2011
798
Joined
Oct 15, 2011
Messages
798
Greetings,

I'm having a bit of a problem with a simple comparator setup. Here's what I've got
- TL084 op amp
- 9V battery (currently reading about 8V)
- Inverting input biased at the midpoint using 2 68K resistors, correctly reading about 4V.
- Everything else unconnected for testing purposes

Both the non-inverting input and the output seem to be held at about 1.2V (theres a very small difference consistent with the output / rail difference). This 1.2V is obviously a problem for subsequent logic inputs. I also noticed that a high output was in the region of 5-6V.

Am I doing something wrong here?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Can you show us the circuit.

What is the non-inverting input connected to?

edit: the device is specced not to be able to swing the output closer than about 1.5V to either supply rail (that's at +/-15V supply). So maybe it's just pulled as hard as it can to ground. That would be the case if the input voltage is as you say.
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
5-6V for a high output is about right, depending on the load on the output. You need a rail-to-rail opamp to get closer to V+.

Bob
 

Raven Luni

Oct 15, 2011
798
Joined
Oct 15, 2011
Messages
798
Ah - didnt expect the difference to be as big as that - always thought it would be about half a volt or something - and not something I'd have looked through a spec for. Thanks. I guess its just a matter of 'boost and shrink' to get useful logic levels ;)
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
A comparator output will swing nearly all the way to the rails. Something like an LM311 (single), LM393 (dual) or LM339 (quad). These have open collector outputs and need pullup resistors. Op-amps are designed to be used as amplifiers, where rail-to-rail output swing is often not needed. Some modern op-amps can swing pretty close though. Often they need to, because they're designed for use with low supply voltages. So if you decide to use a modern one, check its maximum supply voltage!
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Op-amps ideally should not be used for comparators, they are designed to be used with negative feedback. Open loop op-amps can oscillate quite easily if their gain is not tamed. There are other issues also, comparators original spec involved driving logic gates and being used in open loop mode. Comparators are also faster than op-amps but their inputs are not so refined as far as offset voltage, input current and CM noise rejection so they are a bit less sensitive than op-amps, but if your not amplifying anything then that's all you need. At this early point if you can use the correct part for the job you need it to do.
Thanks
Adam
 
Top