Connect with us

op-amp as a comparator

Discussion in 'Electronic Design' started by Jimbo, Jun 2, 2006.

Scroll to continue with content
  1. Jimbo

    Jimbo Guest

    Hello,

    I'm using an UA741CD Texas Instruments with an SOIC-8 packaging as a
    comparator. The output going directly into a PIC509 input pin with the
    pull-up features disabled. The plus input terminal of the op-amp is
    set at 2.5 volts by a voltage divider and the negative input terminal
    varies. The two offset nulls are grounded on the op-amp. for some
    reason when the comparator should go to 0 (or ground) it only goes to
    1.9 volts instead and makes my pic thinkit's a positive value rather
    than a negative. Any ideas? Also, what are the two offset nulls for?
    thanks!

    Jimbo
     
  2. Luhan

    Luhan Guest

    I think that 741 does not go to the negative supply on the output. You
    want something like an LM358.

    Luhan
     
  3. Genome

    Genome Guest

    No you are not.....

    You were sitting at home having not figured out how to download porn from
    the interwank and then you got seriously frustrated and thought you'd sign
    up to Google and try and have a wank over some sort of disgusting.....

    Let's start from the beginning....

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <!-- Created on 29-May-2006 12:04:11 -->

    <html>
    <head>
    <title>
    sc
    </title>
    <meta name="GENERATOR" content="NumbNutz 8.6">
    <meta name="FORMATTER" content="NumbNutz 8.6">
    </head>

    <body bgcolor="#00ccff" text="#000000" link="#0000ff" vlink="#800080"
    alink="#ff0000">

    <a href="http://www.southern-charms.com/carol/ca80x001.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x001.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x002.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x002.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x003.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x003.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x004.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x004.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x005.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x005.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x006.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x006.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x007.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x007.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x008.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x008.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x009.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x009.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x010.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x010.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x011.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x011.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x012.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x012.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x013.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x013.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x014.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x014.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x015.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x015.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x016.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x016.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x017.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x017.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x018.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x018.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x019.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x019.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x020.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x020.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x021.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x021.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x022.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x022.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x023.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x023.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x024.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x024.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x025.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x025.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x026.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x026.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x027.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x027.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x028.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x028.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x029.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x029.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x030.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x030.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x031.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x031.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x032.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x032.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x033.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x033.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x034.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x034.jpg" width="200"
    height=150" alt=""></a>
    <a href="http://www.southern-charms.com/carol/ca80x035.jpg"><img
    src="http://www.southern-charms.com/carol/ca80x035.jpg" width="200"
    height=150" alt=""></a>

    </body>
    </html>
     
  4. mc

    mc Guest

    The 741 only swings to within about 2 volts of V+ and about 2 volts of V-.
    Are you using it on a single 5-volt supply? It's not supposed to work at
    all with so little voltage.

    You want a low-voltage rail-to-rail op-amp.
     
  5. Fred Bloggs

    Fred Bloggs Guest

    The 741 is not suited for this job. The old time opamps were designed to
    run off of bipolar supplies so most of the input and output range was
    centered about the mean of the supply voltages, which is 0V in the case
    of +/-Vsupply. When you go single supply on one of these, those ranges
    are now centered about Vsupply/2 or 2.5V in your case. Allow
    approximately 1.5V clearance headroom from the supply rails for proper
    operation and you're left with really no more than about 1.5V to 3.5V
    operating range. This will not work very well for logic circuits.
     
  6. Tim Wescott

    Tim Wescott Guest

    How about an LM339. Just about as old as the 741, it'll work on 5V, and
    it's actually made to be a comparator.

    --

    Tim Wescott
    Wescott Design Services
    http://www.wescottdesign.com

    Posting from Google? See http://cfaj.freeshell.org/google/

    "Applied Control Theory for Embedded Systems" came out in April.
    See details at http://www.wescottdesign.com/actfes/actfes.html
     
  7. Brian

    Brian Guest

    No, depending upon the level of input and such, an op amp may make a crappy
    comparator. He wants a 5v rail to rail comparator.
     
  8. Pooh Bear

    Pooh Bear Guest

    But why ?

    Graham
     
  9. Hi,
    use a lm311 instead. I'm sure you will like it.

    Marte
     
  10. Or just use a PIC with an internal comparator (eg. 12F629). An LM339
    has better specs though.


    Best regards,
    Spehro Pefhany
     
  11. Jamie

    Jamie Guest

    yes, i like the LM311 also, it has enough drive
    output to operate an average PCB relay with
    plutty of gain.
    lowers the parts count greatly.
     
  12. Jimbo

    Jimbo Guest

    Yep, I'm using a +5 volts single supply and a ground.

    Thanks!
     
  13. Jimbo

    Jimbo Guest

    Why what? Why am I using a comparator? Google it. It's compares two
    voltages.
     
  14. Pooh Bear

    Pooh Bear Guest

    I know that of course.

    Why a 741 ? Hardly a great choice.

    Graham
     
  15. ehsjr

    ehsjr Guest

    With 5 volt supply, an LM324 will give you about 0 to 3.5 -
    is that good enough?
    Ed
     
  16. Jamie wrote...
    One of Robert Widlar's fine designs. Rather expensive
    when it first came out, but now pretty cheap. NSC has
    a 1970 appnote he wrote on the part, AN-41.

    One caution, although it can run on 5V, and has PNP input
    transistors, like the LM339, LM2901, LM3302, LM393, LM2903,
    etc., it can't work all the way down to zero volts. But,
    unlike those parts, it can deal with a +/-5 to 15V split
    supply with a grounded output load switch. It can also
    do high-side load switching. Pretty impressive for 1969.
     
  17. Ken Smith

    Ken Smith Guest

    They are a bit slower when the output section's emitter is used to drive
    the load.
     
  18. Jimbo

    Jimbo Guest

    I was looking at these things and have noticed a "strobe" and a
    "balance" pin. What in the world do these two pins do?
    Jimmy
     
  19. RHRRC

    RHRRC Guest

    Others may have suggested similar but why make life so difficult
    anyway?
    The pic10F's have a comparator ad fixed Vref on board to do what you
    want for cheaper than just the 509. The 629 & 675 do lots more
    (variable referencing etc) cheaper than a 509 with a 741.
     
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

-