Op amp as comparator

Discussion in 'General Electronics Chat' started by nickyoko21, Mar 16, 2010.

  1. nickyoko21

    Thread Starter New Member

    Mar 16, 2010
    op amp is used as comparator. 5V is connected to VCC, 0V to GND.
    If V+ is 1V and there is NO connection to V-, what will be the output?
    Will it be '5V'?
  2. hgmjr


    Jan 28, 2005
    This is not a practical circuit connection so I would say the output is indeterminate since there are a number of variables that could cause the answer to go either way.

  3. Wendy


    Mar 24, 2008
    Nope, which is why most folks don't use op amps as comparators. The parts have a superficial resemblance, and you can get by with it sometimes, but most op amps only get within a couple of volts of the power supply.

    The specific part number matters a lot. Care to post a hypothetical schematic with the op amp in question?

    Some good part numbers for comparator chips are LM339 (quad) or a LM393 (dual). Both require pull up resistors.
  4. Envergure


    Jan 14, 2010
    Leaving a pin "floating" is generally a bad idea. All kinds of things could induce a voltage on the floating pin and change the output of the op-amp. The circuit will behave unpredictably. This is bad circuit-design practice.

    The output of an op-amp will never be exactly the same as VCC, it can't go that high. Op-amps always have a "margin," and the output can't get within the margin voltage of either power pin.

    Op-amps are analog devices; comparators are digital devices. In a logic circuit, you can't get away with using an op-amp as a comparator, but if you're just converting some waveform to a pulse wave for noisemaking purposes, it'll work just fine.

    - Chris
  5. Ghar

    Active Member

    Mar 8, 2010
    Don't BJT op amps also require a DC connection at each input for the transistor bias currents?
    Without those connections you can have weird things happen.
  6. kdillinger

    Active Member

    Jul 26, 2009
    It does not matter what the input stage is. Op-amps require a DC return path. This is also why you should never AC couple an input without a DC return path.