LM319 Comparator Issues

Discussion in 'General Electronics Chat' started by masteropie, Aug 21, 2008.

  1. masteropie

    Thread Starter Member

    May 17, 2008
    26
    0
    I am trying to test these comparators. I have 12 volts threw a 1k resistor connected to v+. v- and gnd to negative. If i connect my multimeter between the output and negative the comparator won't operate, it won't go to +12. However if it connect my multimeter between the output and positive the comparator will pull the output down.

    I don't understand this. How do i hook up a LM319 to get +12 on the output?
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    Take a look at the manufacturer's datasheet. It has some good examples of circuits.

    hgmjr
     
  3. masteropie

    Thread Starter Member

    May 17, 2008
    26
    0
    Ok, so it works fine. The output is only meant to go negative.
     
  4. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    A digital voltmeter has an input resistor of 10M so it does not affect the circuit that has a 1k ohms pullup resistor.

    Maybe the input of your voltmeter is shorted or you have it set to measure current instead of voltage.

    The output should go near 0V with one type of input then the 1k resistor should pullup the output with the other kind of input.

    Maybe you have a load on the output. Please attach a schematic.
     
  5. masteropie

    Thread Starter Member

    May 17, 2008
    26
    0
    Meter is 1M input. Set to voltage range.

    Set up like in this diagram the meter will not move off zero no matter what the inputs are.
     
  6. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    You don't have a resistor on the output of the comparator.
    The 1 K you have drawn is on the wrong position.
    See attachtment.
    (look out the pin numbers in the drawing are for the metal can housing).

    Greetings,
    Bertus
     
  7. masteropie

    Thread Starter Member

    May 17, 2008
    26
    0
    I had the 1k on the v+ to prevent accidental damage from a short circuit while experimenting. So i need a 1k resistor from the 12v supply to the output?

    This comparator will be driving a 2N7000 mosfet, if the current has to flow threw a 1k resistor that is going to result in a slow rise time on the gate. In spice the comparators output was able to go positive, it worked very nice.
     
  8. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hallo,

    If you want to protect the comparator you can put a resistor of about 100 Ohms in the +12 Volts.
    The voltage may drop to low with a 1 k in the powerline.
    The output is open collector, thats why you don't see a voltage arise on the output if you do not connect a resistor to the powersupply on it.

    Greetings,
    Bertus
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The output is capable of sinking up to 25mA. So, to maximize the current source/sink capability for the charging/discharging of your 2N7000 MOSFET gate, divide the maximum sink current by two, and select a resistor that will allow that much current to pass when placed across Vcc and ground.
    25mA/2=12.5mA
    R=E/I; so Rpullup = 12v/12.5mA = 960 Ohms. 1k is the closest standard value.
    12v/1k Ohms = 12mA.
    You'll also need to know the power consumed in the resistor.
    P=EI, or Power in Watts = Voltage x Current, so P = 12v x .012 = 144mW
    Double that for reliability's sake: 144mW x 2 = .288mW
    While you could "squeak by" with a 1/4W resistor, reliability and stability would be better with a 1/2W resistor.
     
  10. hallovipin

    Member

    Mar 17, 2009
    14
    0
    what if we a have a pullup resister of 4 k instead of 1 K
     
  11. Darren Holdstock

    Active Member

    Feb 10, 2009
    262
    11
    I've tried some signal integrity experiments by varying the value of the pullup resistor on a comparator, and the best value (in terms of pulse shape) was always 1k. I guess that's the reason why the datasheet apps circuits invariably use 1k pullups, but the datasheets themselves give no hint of impaired transient response if the magic value is strayed from. Most open-collector comparators seem to be optimised for 1k, but I have no idea if this conforms to some standard, is an industry agreement, or a convenient tradition.

    Hallovipin - a 4k pullup shouldn't cause problems if you can tolerate a little bit of ringing and slower edges. Try it and see.
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You really should start your own thread if your question is in any way different from the original poster's question; otherwise it is known as "topic hijacking" and is considered bad form; as it leads to confusion.

    If you are using an LM319, with a 4k pullup resistor to +12v on the output, the pullup resistor will be able to source 3mA maximum, and the output of the LM319 will have around 22mA current sink capability remaining before the output saturation voltage becomes excessive, leading to overheating.
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    A 1k pullup no matter the Vcc? That doesn't make sense.

    80 Ohms per volt makes sense for an LM319, giving around 12.5mV source/sink.

    For an LM339, around 280 Ohms per volt works, giving about 3.5mV source/sink.
     
  14. Darren Holdstock

    Active Member

    Feb 10, 2009
    262
    11
    Sarge, it's a case of matching the characteristic impedance of the comparator output to the pullup resistor. Mostly it doesn't matter too much. Again, try it and see, you just need a comparator and a pot. You'll need a scope fast enough to catch the ringing on a high-speed comparator or you won't see it. Alternatively, very high speed comparators have push-pull outputs.
     
  15. hallovipin

    Member

    Mar 17, 2009
    14
    0
    But I am in trouble using LM319. I am using a 4k pulup resistor. Problem is that my comparator is not giving output for a differential voltage less than 500mv. other thing is that there are ringings on some instant. I am fed up with as nothing is mentioned in the datasheet.
    What do u think ? whether above mentioned problems are caused by high value of pull up resistor? If I decrease it down to 1K, will it solve the problem?
    If not what may be the problem?
     
  16. hallovipin

    Member

    Mar 17, 2009
    14
    0
    I am using +8V and 0 V as +ve and -ve supply voltages. Output at some instences is looking like an anlog signal???
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Hallovipin,
    While your question is indeed related to the topic, it is best to start a new topic to avoid confusion.

    Your post will likely be moved to it's own topic by a Moderator, with a link back to this thread.

    Please post a schematic of your circuit in it's current configuration.

    Try Darren's suggestion of using a 'scope and a potentiometer. I suggest using a 470 Ohm to 1k fixed resistor in series with a 5k pot to avoid accidentally shorting the output to Vcc.

    Ringing on your output may be due to long trace/wire runs, etc. If possible, try to locate your pull-up resistor at the far end of the signal run from the comparator output.
     
    Last edited: Oct 8, 2009
  18. hallovipin

    Member

    Mar 17, 2009
    14
    0
    I am not using any series resistors with two input pins. Does it matter.

    Ringing due to long wires can not be an issues as I am working on a fabricated PCB.
    What about the problem of not working of the comparator less that a differentilal voltage of 0.5V.
    Can u throw some light on it.
     
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Post an image of your schematic, preferably in .PNG format.
    Use the "Go Advanced" button, and attach the image. Image size should be less than 100kbytes.

    Not necessarily true. Post an image of the PCB, indicating the trace where it connects to the output of the comparator, and where the pull-up resistor is.

    Post your schematic.
     
Loading...