window comparator

Discussion in 'The Projects Forum' started by chuackl, Sep 30, 2013.

  1. chuackl

    Thread Starter New Member

    Sep 26, 2013
    Most of the window comparator i saw in google image, the output of 2 opamp is connected together. since there is no feedback loop on the opamp, the vo=AVd. the opamp are operate at open loop gain. Both of the opamp will give output of vo=vs when Vin in the range of Vlow<Vin<Vhigh.
    However, when Vin doesn't meet any two of the requirement, either 1 opamp will have output value of Vs and 0. For such construction, isn't it short circuit the opamp output and thus causing overheating, damaging the opamap?
  2. paulktreg

    Distinguished Member

    Jun 2, 2008
    The outputs of the IC, the LM339 for example, are open collector transistors so they don't output a voltage as such. When a pull up resistor is connected from the output of the op-amp to the positive rail the output is high if this transistor isn't conducting and low when it's switched on. Hope that makes sense?
    chuackl likes this.
  3. #12


    Nov 30, 2010
    You have already seen that a window comparator is a kind of "and" gate. Chips that are called comparators have open collector outputs. This can also be done with op-amps by using diodes or resistors on the outputs so they can't short each other.
  4. chuackl

    Thread Starter New Member

    Sep 26, 2013
    i been confused a normal opamp and a comparator. I can perform the same function as well using normal opamp but need more components and will be more costly, so a comparator like lm339 will be better. Thank for all the information.
  5. crutschow


    Mar 14, 2008
    Yes, to use an op amp in a window comparator circuit will likely require the addition of diodes on the outputs to prevent the two outputs fighting as you noted.
  6. WBahn


    Mar 31, 2012
    Note that, on paper to first order, a comparator and an opamp look pretty much alike (ignoring that fact that most comparators are open-collector, but that isn't required).

    But they are optimized for different purposes. An opamp is optimized for operation in the linear region while a comparator is optimized to get out of the linear region as quickly and cleanly as possible. To get the desired performance in the mode it is meant to be used, the performance in the other mode is significantly impaired. Hence, while using an opamp as a comparator or a comparator as an opamp is certainly doable, it is generally not a good idea.