Voltage comparator always on

comparatortransistorsvoltage

I'm using a LM339 voltage comparator by supplying it 5V, with a reference voltage of 1V. I have a 3K pull up resistor on the output to 5V. For some reason, the output voltage is always 2V. It doesn't change at all when my input signal rises above the 1V reference voltage. Any thoughts would be much appreciated 🙂

LM339

Edit: I wasn't clear in the diagram, but the bottom phototransistor is actually attached to a voltage regulator. Also, I tried removing the top photodiode and now the output is always 5V. I think it's like this because I have to pull it high to Vcc so I'm not sure how to make this work.

Best Answer

You need to connect photodiode o/p to I/V converter and then assign it to non-inv pin of comparator. Measure i/v converter output and accordingly verify LM339 o/p is changing or not.