The circuit is supposed to measure supply voltage and only output HIGH when Vs>10.22V, but it's output is HIGH regardless of input voltage. When Vs=9V I measure the inverting input to be 0.22V and the non-inverting input to be 0V so I don't understand how my NE5532 can output HIGH is such a scenario. I tried replacing the NE5532 with a LT1490 which made the circuit function as intended, but I would like to know what's going on The reason for using these op-amps instead of dedicated comparators is because I intend to use this configuration in a circuit with a supply voltage of 40V.
A few possible reasons (I am not completely familiar with the 5532 spec's) are :
1) The 9v is not sufficient for proper workig of the opamp.
2) the inputs voltage levels are too close to the 0v/ GND level for meaningful operation
3) the opamp is blown
The input bias current for NE5532 is ~800nA whereas this is 0.1nA for LT1490 when Vs=0. This may be causing some trouble in proper functioning of the NE5532. Also it may be better that if dual supply is used, given that the inv terminal is being set close to 0V. So this may help NE5532 work normally.
You are exceeding the common-mode range. From the datasheet, the inputs must be 2 to 3 volts HIGHER than ground (pin 4).
Additionally the total supply voltage from pin 8 to pin 4 must be at least 10 volts.
Why do you want to use an opamp which is intended for audio or other linear purposes as a comparator?
You are exceeding the common-mode range. From the datasheet, the inputs must be 2 to 3 volts HIGHER than ground (pin 4).
Additionally the total supply voltage from pin 8 to pin 4 must be at least 10 volts.
Why do you want to use an opamp which is intended for audio or other linear purposes as a comparator?
I see, "common mode input voltage range" is not a parameter I've paid much attention to, it explains it though Is this a common thing for op-amps though? Needing a couple of volts above GND to work? What exactly happens when the input voltage is outside the common mode range?
I can't find a comparator that can handle a supply voltage of 44V like the NE5532 and LT1490 can.
NE5532 has a pair of parallel 'head to toe' diodes across it's inputs, if you exceed about 0.6 differential voltage across them the diodes will conduct and seriously screw up the output and input voltages!
44V maximum supply, rail-to-rail capability, 0-44V input voltage range, what else would I be looking for when using a chip like this as a comparator? I don't care about slew-rate or CMRR, this isn't a high precision circuit.
NE5532 has a pair of parallel 'head to toe' diodes across it's inputs, if you exceed about 0.6 differential voltage across them the diodes will conduct and seriously screw up the output and input voltages!
The diodes are there to protect the input. Close to 40 years ago, when the NE5532 was designed, the opamp's input structure was far more primitive, and excessive differential voltage would either damage the input or cause a phase reversal.
Look at semiconductor manufacturers, they usually have interactive selction guides.
Important parameters: supply voltage, rail to rail input voltage range, push pull output.