Comparator question

Discussion in 'The Projects Forum' started by beginner_elec, Jul 28, 2010.

  1. beginner_elec

    Thread Starter New Member

    Jul 28, 2010
    3
    0
    I am currently working on a project where I'm using an op-amp as a comparator (lm747). I set it up as a non-inverting op amp. It's my understanding that when the voltage at the inverting input is more than the non inverting input, the output should be about 0 (I have the minus pin of the op amp tied to ground) and when the voltage is greater at the non inverting input, the output goes high to Vcc.
    I put it all together and for the most part, it works, except that when the voltage is greater at the inverting input, I do not get my output to be 0 or ground, instead, it stays at 2v the whole time. I'm really stumped about this. I even tested the op-amp without any other parts and I still get the 2v at the output when it should be 0.
    Here is the circuit that I am using:
    http://home.cogeco.ca/~rpaisley4/ComparatorCdS.GIF

    except my LED goes to ground instead of Vcc because I want it to come on when the light sensor detects light and off when there is no light present.
    I've switched the op amp chip thinking it might be a bad chip but I get the same result.
    Any advice would be appreciated, thanks!
     
  2. beginner_elec

    Thread Starter New Member

    Jul 28, 2010
    3
    0
  3. Darren Holdstock

    Active Member

    Feb 10, 2009
    262
    11
    Check the LM747 datasheet, you'll see that the output doesn't quite swing all the way to the negative voltage rail. For this device and the load you're using you're doing well to be only 2 V away, it could be up to 5 V.

    Use an op-amp with a rail-rail output, or a proper comparator with an open-collector output.
     
  4. beginner_elec

    Thread Starter New Member

    Jul 28, 2010
    3
    0
    ah ok,
    I actually was wondering about that but it does make sense now why it's doing that.
    thank you very much for your help!
     
Loading...