Connect with us

Comparator Substitution

Discussion in 'Electronic Basics' started by Ron M., Sep 19, 2007.

Scroll to continue with content
  1. Ron M.

    Ron M. Guest

    I have been told that if you leave feedback off of a op amp that it
    will act similar to a comparator. Is this actually true?? THANKS.
     
  2. Chris

    Chris Guest

    Pretty much, yes. But there are the details, of course.

    First off, most comparators like the LM339 have open collector-type
    outputs, so they require a pullup resistor at the output. Op amps
    dont. In fact, some op amps like the LM324 require a *pulldown*
    resistor in order for the output to reach the full range.

    Second, since a comparator's output voltage will be Vcc (the pullup,
    remember) when high and about 0.1V to 0.4V when low (a saturated
    output transistor), the output can be read by all modern logic
    families. The typical op amp output has an analog amplifier output
    that will typically only go within a volt or two of the power supply
    rail. So an op amp being used as a comparator with a 5V supply might
    have a low output of 1.2V or so, and a high output of 3.5V or so.
    With a pulldown, the LM324 can go almost down to 0V, but still has the
    high end limitation. Maybe not so good.

    Also, since most op amps have internal frequency compensation built
    in, their slew rate (changing states from a logic "0" to a logic "1")
    will be really slow in comparison with a comparator.

    Many times, an op amp can be used in place of a comparator where
    switching speed and stringent logic level outputs are not required.
    In fact, an op amp can have some advantages. It is much less likely
    to break into oscillations when the voltage levels of the two inputs
    are very close to each other. Also, if you only need one comparator
    and have one or two spare op amps on a quad package like an LM324,
    it's very tempting to try.

    The best thing to do is look at a couple of data sheets, and see some
    of the differences in specs, Ron.

    http://www3.national.com/ds.cgi/LM/LM124.pdf
    http://www.national.com/ds.cgi/LM/LM139.pdf

    Good luck
    Chris
     
  3. Jamie

    Jamie Guest

    Basically, yes.
     
  4. Ron M.

    Ron M. Guest

    EXCELLENT POST!! Just the information that I needed. Luckily the
    application that I have in mind is not frequency sensitive. THANKS
    MUCH.
     
  5. Traver

    Traver Guest

    One more thing to remember is that not all op amps are meant to be
    saturated (railed high or low). Some of them will allow only one amp
    in a multi package to be saturated. Just look at the data sheet and
    the ones that can't remain in saturation will usually tell you.
    Unfortunately the ones that are able to be used as comparators don't
    explicitly tell you. Also, there are many op amp outputs that go to
    ground as well as the VCC rail.
     
  6. Ron M.

    Ron M. Guest

    I'm using a 324. Just downloaded the datasheet and will check it out.
    Next time I won't wait until the very last minute to design and build
    and will actually get a real LM339 to use. It was stupid to wait so
    long prior to doing the project.THANKS.
     
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

-