Connect with us

Op amp vs. comparator

Discussion in 'Electronic Design' started by Michael, Sep 7, 2006.

Scroll to continue with content
  1. Michael

    Michael Guest

    I have a system with op. amp. -based comparator (AD8051; 5V single
    supply; 2.5V reference 1.2V wide hysteresis loop made of 1k and 4k
    resistors). The thing oscillates every once in a while (100+MHz) when
    input signal approaches "switching point". I am not suspecting the
    layout.
    :eek:(
    Here is the question.
    Aside from the built-in hysteresis, what do comparators (e.g. LMV7239)
    have that op-amps (e.g.: AD8051) do not?

    Yes, I understand that there are tons of OA topologies. There are
    probably quite a few comparator topologies too....................
    :eek:?
    Thanks
    Michael

    datasheets:
    http://www.analog.com/productSelection/pdf/AD8051_2_4_b.pdf#search="ad8051"
    http://www.national.com/ds/LM/LMV7235.pdf
     
  2. Do you have a bypass capacitor right by the IC? What size and type?

    It might help to add some extra hi-freq hysteresis with say a 5pF
    capacitor across the feedback resistor.

    I dunno what the differences are between op-amps and comparators. As a
    wild guess, comparators are optimized for speed at the detriment of
    phase shift, op amps otherwise.
     
  3. Ken Smith

    Ken Smith Guest

    In general:

    An op-amp is slower to react to the inputs passing each other. The output
    starts moving later and ramps more slowly to its final value.

    Comparitors are designed to have a largish difference between the inputs.
    Some op-amps have clamps on the inputs at a few diode drops.
     
  4. Michael

    Michael Guest

     
  5. John  Larkin

    John Larkin Guest

    And at least one comparator has back-to-back input diodes, the
    Max9691. If anybody knows of a stupider linear design idea, let me
    know.

    John
     
  6. "switching point"="grey"/"undefined" value. Your input signal is too
    stable and stays in this place too long so the amplifier tries to make
    sense of your order by looking at output voltage which will feedback
    values compatible with this input. And it does it at "feel spud" as
    there is no stable point. It is NOT DC amplifier.
    Disregard it and feed it from fast input signal.

    Have fun

    Stanislaw
    Slack user from Ulladulla.
     
  7. Ken Smith

    Ken Smith Guest

    And at least one comparator has back-to-back input diodes, the
    Max9691. If anybody knows of a stupider linear design idea, let me
    know.[/QUOTE]

    Do you mean that Maxim really made such a thing or that they published a
    datasheet to see if they got any bites?
     
  8. John  Larkin

    John Larkin Guest

    Do you mean that Maxim really made such a thing or that they published a
    datasheet to see if they got any bites?
    [/QUOTE]


    Oh, they made them, and still do. They even sampled me 2500 pieces.

    http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2342


    John
     
  9. Hi Michael
    Comparators don't have built in hysteresis.
    The main differences:

    Comparators are designed to have exact two possible output values, HI and
    LOW. Opamps are designed to have analog output voltage, normally not HI or
    LOW. Only R2R Output reaches the rails. The design of such output stages
    differs very much. The input design is very similar.

    Some OPAmps have a ugly behaviour if the inputs are too different. Some
    types inverts then the Out-Signal. May be there is such situation in your
    design. In general: Use the devices in that mode that they are designed for.
    Use a comparator if you need one, not a Opamp ;-)

    Regards

    Marte
     
  10. Ken Smith

    Ken Smith Guest


    Oh, they made them, and still do. They even sampled me 2500 pieces.

    http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2342[/QUOTE]

    Yuck.

    I think I just came up with an idea dumber than making a comparitor with
    clamp diodes. it is <drum roll> designing in a comparitor with clamp
    diodes.
     
  11. That's odd, the data sheet says in the Absolute Maximum Ratings:
    "Differential Input Voltage +-5V..."

    Jorgen
    dj0ud
     
  12. John  Larkin

    John Larkin Guest

    Yuck.

    I think I just came up with an idea dumber than making a comparitor with
    clamp diodes. it is <drum roll> designing in a comparitor with clamp
    diodes.
    [/QUOTE]

    I designed in the Max9690, which didn't have clamp diodes. Maxim
    subcontracted the fab to a small foundry in Minnesota, and they had a
    process problem. Seems that some oxide layer was dirty or something,
    and, over time, a pinch resistor would creep up in value. The symptom
    was that units would fail at high temperature and, over time, that
    temperature would creep down, eventually hitting room temp. It took
    over a year of production until we started seeing field failures.
    Interestingly, heating the boards would anneal out the defect and make
    the boards work again for a few months, which confused the hell out of
    us at first. After months of stonewalling and less than candid
    behavior, I finally found someone honest at Maxim who told me the
    truth and got me free replacements, but they added the clamp diodes in
    the redesign. We had to make an adapter board that soldered into an
    SO-8 footprint, that carried a tiny Max9691 and a few other parts, and
    recall/rework about a hundred products. At least we're not R*******,
    who used millions of the 9690's in defense systems.

    The dumb thing was probably designing in a Maxim sole-source part in
    the first place. But there wasn't anything close to it in performance
    at the time. That situation remains the Maxim Dilemma.

    John
     
  13. John  Larkin

    John Larkin Guest

    Look at the datasheet some more. There are current-limiting resistors
    ahead of the diodes, roughly 500 ohms total. It still makes big
    trouble in the majority of comparator apps.

    John
     
  14. John  Larkin

    John Larkin Guest

    Many do. JT's classic ecl design, with a shared latch/hysteresis
    function, is still popular.
    Actually, no. They are designed to have high gain and no compensation.
    Most do actually have linear transfer functions, if you ignore
    oscillation.

    Opamps are designed to have analog output voltage, normally not HI or
    Opamps make excellent comparators if you don't need speed. They are
    far less liable to oscillate or to have their external hysteresis
    loops teased. One gotcha is that some opamps don't behave well if
    railed.

    John
     
  15. Comparators don't have built in hysteresis.
    OK, there are OP available with fixed gain etc. I mean general purpose
    comparators, there i would not expect included hysteresis. At least I
    wouldn't want to have it, because I want define the hysteresis tha I need.
    What else than HI or LOW should anyone want on an output of a comparator.
    That's exactly the point they are designed to.
    I aggree, but that is not the goal, this is one way to go there.
    Great linear transfer fuction with oscillatoins :)
    No they don't do it generally. Many of them are not capable to drive good
    digital levels. Mostly they take too much time to slew up or down. Almost
    every comparator have to detect a time that one voltage reaches a reference
    voltage or other condition. Then you want to detect it imediately.
    Sure you can tahe a R2R videoOPAMP for $2 to get the performance of good old
    lm311 :)
    Well I do this with standard comparators, too. I don't see the advantage of
    any misused OPAMP for comparing voltages.

    Marte
     
  16. Ken Smith

    Ken Smith Guest

    The LM339 can be compensated by adding a capacitor on the output to make
    it work like an op-amp. I have done this when using the LM339 in a DC-DC
    converter. The circuit is sort of like this:

    Vcc
    !
    Vref----/\/\---- /
    ! \
    FB --/\/\--+--/\/\--!!--+-+-----!-\ !
    ! ! ! >--+----!+\
    --!-\ ! Is-!+/ ! ! >-- Gate driver
    ! >------+ --- !-/
    Vref-----!+/ ! ---
    --- !
    --- GND
    !
    GND


    Some parts are left to the reader, but you can see how being able to make
    one section look linear, reduces the parts count. Also unlike a typical
    op-amp circuit, the up swing is limited to Vref even though the LM339 is
    running on a higher non-reference voltage.

    [...]
    You can also take advantage of the limited slew rate of an op-amp. If you
    use an op-amp as a comparitor to drive the gate of a MOSFET, the switching
    of the MOSFET won't make quite so much RF noise. As a result the circuit
    won't quit working each time it tries to run on the "I'm working" LED.
     
  17. On Fri, 8 Sep 2006 13:17:23 +0000 (UTC),
    What's the problem with clamp diodes in a comparator?

    robert
     
  18. On Fri, 08 Sep 2006 07:45:17 -0700,
    Why?

    robert
     
  19. Ken Smith

    Ken Smith Guest

    They load the signal source with a non-linear loading.

    If you are thinking in the frequency domain, this reflects all sorts of
    harmonics and intermixing products back into the circuit driving it. You
    may have to insert a buffer to prevent this.

    They can lead to an extra amplitude dependant phase shift that appears
    right in the normal amplitude range of the signal.

    Also, they are ugly.
     
  20. Ken Smith

    Ken Smith Guest

    See other post plus:

    Consider this model of what is going on:

    6Vp-p 500 ! \
    Signal ----/\/\/----+---+---!Ideal >--- Squarewave out
    ! ! ! /
    V ---
    --- ^
    ! !
    GND GND


    When the signal swings 3V above ground, the 500 ohm resistor has:

    (3V - 0.7V)/500 = 4.6mA

    flowing in it. If the comparitor is being driven by a normalish op-amp,
    this has used up a good fraction of the drive ability of the op-amp.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-