Can you recommend a comparator?

Discussion in 'General Electronics Chat' started by jcarver1112, Jul 15, 2015.

  1. jcarver1112

    Thread Starter New Member

    Jul 11, 2015
    8
    0
    .
     
    Last edited: Jul 16, 2015
  2. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    That one looks like it will do what you want.

    You should learn about parametric search engines. The first thing I want to do with your question is go:
    www.mouser.com
    semiconductors
    amplifier IC's
    analog comparators
    differential
    1 channel
    open collector
    search
    sort by price
    LM311 still exists for about 91 cents, but you can get a quad LM339 for half that price.

    Then the search engine starts falling apart. Half the chips don't show output current. Half of the rest are labeled wrong or entered wrong. Now you have to start reading datasheets to get the down-low.

    http://www.mouser.com/
    http://www.mouser.com/Search/Refine.aspx?N=21009524
     
    Last edited: Jul 15, 2015
  3. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    Driving a relay isn't a hugely demanding task, you don't need a particularly fast comparator for example.

    Most comparators have an open collector output, and in any case you'll have to provide back emf protection when driving the inductance of a relay.

    If you need more output current - the open collector output lends itself well to adding an external PNP to make it a Sziklai pair.
     
  4. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    The first number is a quality indicator. 1 is military, 2 is industrial, and 3 is commercial and it's mostly about temperature range. In the National Semiconductor numbering system, any LM3xx will have a LM1xx that is better in specifications and temperature rating. The suffixes are about packaging. From memory, CN means plastic dual inline pins, NOPB means no lead.

    Supply current is what the chip uses for itself. Output current is what the chip delivers.
    Supply voltage range means you can use any voltage in that range, as long as the inputs do not exceed your power supply voltage...and then there are exceptions. Nobody intentionally designs a power supply voltage to wander all over the place. Usually, it's just making sure a battery doesn't go flat while the inputs are too high.
     
  5. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    Ian is going into design specs. I'm still on selection specs.

    A back EMF protector is a diode you place on a relay coil so the inductor doesn't kick the transistors out of the chip.
     
  6. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    When you switch off the current through the relay, the magnetic field around the coil collapses and induces a large voltage spike.

    Most people put a diode across the coil terminals oriented so its not conducting when you energise the coil - Tyco relays published a fairly comprehensive appnote on it, last time I saw a copy was on the Element 14 website.
     
  7. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    At school I was taught rote - no one ever bothered to explain why any of that stuff was interesting.
     
  8. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    The 211 will be "better" in some aspect. It might only be the survivable temperature range. This is when you REALLY examine the datasheets. You might spend 10% to 30% of the entire design time reading specs. I find I have to keep going back and reading one thing or another if I'm doing a design to maximize something like total power use because I'm pushing every spec to its limit.
     
  9. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    Maybe I'd have been better at maths if any of the teachers had the faintest idea what it was any use for.

    It was hard work and I wanted to know what it was for - they hadn't a clue!
     
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    How fast is the signal your are demodulating with the comparator, and how fast a comparator response do you need? If the answers are "not bery fast", consider the quad LM339 or dual LM393, two of the largest-selling IC's in the world. They will operate up to 36 V, are available in 1xx and 2xx rugged versions, and are just about indestructible. They don't have offset trims or the other goodies on newer parts, but they are an excellent starting point for a "newbie". Another option, again if you don't need great speed) is using an opamp with a wide input common mode range to act as a comparator. The advantage is that an opamp has a totem pole output - it can source the relay driver base current without the pull up resistor that an open collector comparator output requires. Also, the device isn't sinking the base current to ground when keeping the relay drive transistor turned off, a bit of power savings in battery applications.

    ak
     
  11. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    Likely because the 4 channel device outsells the single channel device by a wide margin.
    The more devices a manufacturer sells, the cheaper he can make it, and there's likely little difference in the chip area (and thus cost to process a wafer) between the single-channel and 4-channel comparators.
     
  12. ian field

    Distinguished Member

    Oct 27, 2012
    4,413
    782
    Some of the older parts may also be out of production.

    AFAIK: Semiconductors are traded just like shares, scarcity pushes the price up.

    A few years ago I was getting a few PICs, the prices for parts like the 16F628 etc were quite reasonable, but I decided to get a couple of the old 16F84 because I still see the occasional project that uses them - I was shocked that they cost more than 2x the price of a 628.
     
  13. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,516
    1,246
    The LM339 common mode input range includes the chip's negative supply rail, but not the positive one. Add a 2-10K-resistor divider from V1 to GND, connect the - input to the center to create a trip point of 4.5V, and scale R3 and R2 to get the delay you want. R3 and R2 can be 10x larger without affecting performance, allowing a smaller C1.

    ak
     
  14. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    If you post your LTspice (.asc) file (click Upload a File at the bottom), we can likely help you with the simulation.
     
  15. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    Maybe because you're trying to get the base of the input transistor to a higher voltage than its collector.
     
  16. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    Here's an idea: Quit guessing and read the datasheet.
     
  17. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,773
    1,103
    If you need a LM339 spice model it's freely available (along with many other third party models) from the Yahoo LTspice User Group.
     
  18. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    I regret answering the question about a schematic that listed the OP27 as the part you were using when you were not using that part. Looking at the datasheet which shows that you were pretending to pull the base of a transistor higher than its collector supply, when you aren't even using that chip, surely allowed me to look like an ass.
     
Loading...