I made this circuit but no matter what the input Voltage is, the output stays high and the led lights. Is it because of the offset voltage ? And where to connect the offset nulls to make the output zero? It did not work when I connected the to ground
closed as unclear what you're asking by Bimpelrekkie, laptop2d, Edgar Brown, Dwayne Reid, Bort Feb 25 at 13:50
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
An ideal opamp-based comparator multiplies its input difference (Vdiff = Vi-pos – Vi-neg) by its open-loop gain (Ao).
But there's always a non-zero offset voltage (Vos) which should be added to Vdiff. So the actual comparison equation turns into Vout = Ao (Vdiff + Vos). This equation tels us that;
If Vdiff +Vos if greater than zero then Vout will hit the positive supply rail.
Likewise, if Vdiff +Vos is lesser than or equal to zero then Vout will hit the negative supply rail.
Thus, even if Vdiff is zero then the output will hit either negative or positive rail depending on the sign of Vos.
As for your question, since the output hits to the positive supply rail when Vi-neg = 6 VDC regardless the value of Vi-pos, the source of the problem shouldn't be the offset voltage.
You may try adding a potentiometer to zeroe the Vos like following anyway: