Comparator Connections???

Discussion in 'General Electronics Chat' started by jcbeck84, Dec 16, 2009.

  1. jcbeck84

    Thread Starter Active Member

    Dec 20, 2008
    I have my LM311 comparator connected with the output transitor grounding the base of a PNP transistor to turn on misc things. I use a voltage divider to make a reference halfway between Vcc and ground at IN- and an optocoupler providing a simple Vcc or nothing to IN+. My question is: why when I have my 13V at IN- does the output change just by touching my test probe to IN+?? More importantly how am I supposed to figure how to get it working if I can't even see what the voltages are at the inputs without changing them?
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    Can you post the schematic? It's really very difficult to diagnose problems without one.
  3. jcbeck84

    Thread Starter Active Member

    Dec 20, 2008
    The two resistors are equal so the reference voltage is approx 12.5V. With nothing on IN+ the relay is off. With negative probe at groung and positive on the IN+ pin the relay turns on and I read .8ish volts which is on the same side of 12.5 as nothing. Also when I connect the IN+ pin to ground the relay turns on, which is also on the same side of 12.5volts as nothing. So why isn't the relay on when I don't apply anything?
  4. eblc1388

    AAC Fanatic!

    Nov 28, 2008
    You'll need to use a resistor between LM311 output and PNP base connection to limit the base current. A 2.2K ~ 6.8K resistor is suitable.

    In order to do that, you must also connect a 22K resistor from IN+ to VCC- so that the IN+ pin potential will be pulled down to Vcc- if the optocoupler is NOT providing +Vcc to the pin.

    In this way, you can measure the IN+ pin voltage using a digital meter without triggering the LM311 output.