Multisim or ME?

Discussion in 'General Electronics Chat' started by gusmas, Oct 17, 2009.

  1. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    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.
     
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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.
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  6. StayatHomeElectronics

    Well-Known Member

    Sep 25, 2008
    864
    40
  7. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    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...
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  9. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    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.
     
Loading...