Multisim or ME?

Thread Starter

gusmas

Joined Sep 27, 2008
239
well guys i am trying to simulate a voltage comparator in multisim using a LM324N. now i am pretty sure i connected everythin correctyl in multisim but the outputs i am getting are really crazy. so i am posting pics of my circuit diagram in multisim and the outputs that i am getting.

My Vref for the Comparator comes from the POT and , and the input voltage is the AC signal generator. my output voltages are not making sense
Channel A: Vref
Channel B: Vin - but that is not the amplitude of my signal, it should be 1Vp
Channel C: Vout - which does not make sense to me at all.

So any suggestions where the problem might be. thanx for taking the time to read this.
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
You have the inverting input at +6v and the non-inverting input at almost 0V so the output of the opamp will always be low, at about +15mV.

You are damaging the non-inverting input by feeding it more negative voltage than is allowed. It is allowed -0.3V max and you are feeding it -1V peak.

Multisim doesn't know if it is coming or going.
 

SgtWookie

Joined Jul 17, 2007
22,230
Along with what Audioguru said,

An LM324 is an operational amplifier (opamp), not a comparator.
While some people (ab)use opamps as comparators, they are really not designed to be used as such. It's hard on their outputs, as they will be in constant saturation; either high or low.

Try using a real comparator, such as an LM339, LM311, LM319, LM393, LM2903, and many others. They generally have open-collector outputs, so you will need to use a pull-up resistor to Vcc. For starters, plan on a resistor that will result in a maximum of 5mA current when the comparator's output is sinking current, or roughly 200 Ohms per volt. Since you're using a Vcc of 15v, use a 3k pull-up resistor.
 

MikeML

Joined Oct 2, 2009
5,444
Along with what Audioguru said,

An LM324 is an operational amplifier (opamp), not a comparator.
While some people (ab)use opamps as comparators, they are really not designed to be used as such. It's hard on their outputs, as they will be in constant saturation; either high or low.
Wookie,

Can you provide a reference that being driven to saturation is "hard on their outputs"?

I though that the only issue with using an op-amp as a comparator is how long it takes the opamp to switch vs the switching time of a comparitor.
 

SgtWookie

Joined Jul 17, 2007
22,230
I don't have the reference handy; I ran across it a couple of years ago. It was a reference to a notation in a Texas Instruments application note that they recommended against using opamps in open loop due to the excessive heating caused by constant saturation of the outputs.

I'm afraid that I can't remember exactly WHERE I read that; but that is the gist of what I'd read. If I happen to remember in the next few days, I'll post it.

But as you say, the rise/fall time for the output of a typical opamp will be far slower than that of a HS comparator.

By the same token, comparators don't make very good opamps as they lack internal compensation.
 

MikeML

Joined Oct 2, 2009
5,444
Analog Devices has a nice reference about opamps as comparators.

http://www.analog.com/static/importe...6493AN_849.pdf
After reading this, I have not changed my preconception: For applications where speed is no issue, where you understand the common mode input range limits of the opamp, where you understand the output voltage range swing of the opamp, and where you provide a modicum of hysteresis with positive feedback from the output to the non-inverting input, an opamp CAN be used as a comparator...
 

SgtWookie

Joined Jul 17, 2007
22,230
Sure, opamps can be used as a comparator, just like a hammer can be used to install screws. It'll work, but your results would be much better if you used a drill and a screwdriver.

The whole point is that if a person is considering operating an opamp in open loop mode (maximum gain; essentially a logical yes or no output), they should really be looking at comparators.
 

Audioguru

Joined Dec 20, 2007
11,248
The output transistor of an opamp does not get hot when it is saturated. Instead it gets cooler.
There is no problem with a saturated output transistor in an opamp except it takes additional time to come out of saturation.
 
Top