Comparator

Thread Starter

Mazaag

Joined Oct 23, 2004
255
Hey guys,

I have a question about comparators..

Is the transition from high to low (or vice versa) abrupt? or does it gradually decrease (or increase) ?

I'm using a LM324..

Thanks
 

beenthere

Joined Apr 20, 2004
15,819
Well, an LM324 is a quad op amp, but it can be used as a comparator. Something like the LM311 is really more like it.

A comparator should make a very abrupt switch from high to low, or the opposite. The idea is to instantly signal when the voltage level has got to the setpoint.
 

Distort10n

Joined Dec 25, 2006
429
Comparator datasheets should have a specified response time based on supply, and input voltage overdrive.

Using op-amps as comparators is really a cookbook idea, and should not be used in precision applications.
 

Thread Starter

Mazaag

Joined Oct 23, 2004
255
Does anyone know of a Dual or Quad version of the LM311 IC ?

Why is a quad op-amp IC like the LM324 inefficient to implement comparators?
 

Papabravo

Joined Feb 24, 2006
21,225
Look at the slew rate of the opamp, and then look at the large signal performance.

Ideally a comparator output should be digital. It's is really hard to make the output of an opamp look like a logic signal.

Some of the newer comparators from OnSemi and others give you a choice of open collector or complementary outputs.

The LM311 is a sensitive beastie. I would suggest the LM393(dual) and the LM339(quad) or their single piece equivalents to get your feet wet. On the scope you will notice the rapid tranition of the open collector output when it goes low. The size of the pullup will determine the rise time in the other direction.
 

Thread Starter

Mazaag

Joined Oct 23, 2004
255
hey guys,

I just got a LM311N .. i'm planning on using a 5V single supply ...

There is a ground and a V- pin... do i have to short those? or do i just connect the negative termainal of my battery to V- ? or ground ?

Thanks guys
 

SgtWookie

Joined Jul 17, 2007
22,230
Did you download datasheet(s) for it?

I suggest you go to National Semiconductor's website and get it.

There are some application notes in the sheet.

You could also go to other websites like alldatasheet.com, datasheet4u.com and many others; see the Resources thread elsewhere on this site.

Life would be so much easier if we could just find the manual for it ;)
 

Distort10n

Joined Dec 25, 2006
429
Some comparators are open collector where you need a pull up resistor to some voltage. This allows the comparator to operate at higher voltages than operating Vcc, but not higher than the devices ABS MAX rating on Vcc.
The LM311 is also has an open emitter to allow you to have a pull down resistor as well. If not, you can simply ground the emitter, and use a pull up on the collector output to Vcc.
 
Top