It's a comparator, not an op-amp. The question does not arise with op-amps because they generally do not have open drain outputs.
The answer is maybe. You will have to read the datasheet for the particular comparator (assuming it has open drain/open collector output).
In the case of the LM339 the maximum output voltage is 36V regardless of Vcc.
Some comparators may have protection diodes on the output, so the datasheet would likely state a maximum such as Vcc+0.3V.
Is this comparator IC somehow different than op-amp comparators?
They are similar in some ways. Comparators usually have the following advantages:
- They should have low input offsets so you get precise switching.
- Many work down the the negative rail on the inputs.
- They don't latch up. Op-amps can take some time to come out of saturation so this introduces a time delay.
- Many comparators have open-collector outputs so you can parallel them. This is useful in window-comparator applications.
This means that when the inverting terminal voltage is greater, the load connected to output can be powered on.
If V- > V+ then the output pulls low. A load connected between VCC and the output will turn on.
When the noninverting terminal voltage is greater, the load connected to output will be powered off.
For an open-collector comparator the output transistor will be turn off allowing the output to be pulled high.
So if an LED is connected to output, it will turn on when the inverting voltage is greater and turn off when the noninverting voltage falls below the inverting voltage.
No circuit schematic so we can't comment.
I think I am confused about the pull-up part in LM393. In my design, I want to feed 2 leds in parallel from the output of the comparator, so I guess I will need 20 + 20 = 40 mA in total from this output.
Why not put them in series and halve the current?
Does LM393 give the opportunity to have this much current flow?
Check the datasheet.
If so, where the reference voltage (which I want to compare with a signal and when signal is above that reference voltage the load gets current) be connected?
Use the inverting input for your reference. Usually a pair of resistors configured as a voltage divider will give you the reference voltage required.
- Use a comparitor for comparison.
- Use an op-amp for amplification. (But don't use a 741.)
Comments on schematic:
If you think I can use an op-amp comparator (left circuit), then I noticed that with GND connected to -Vcc terminal of this op-amp, the current flows through LEDs even the signal is lower than Vref.
I would expect the output to be 0 V and so no current flows through the LEDs. However this is not the case. You can also to explain this to me.
If you read the Output Voltage Swing parameters on the 741 datasheet you will see that it may be as low as ±12 V on a ±15 V supply. That means it can only get to about 3 V from negative supply and that's when it has a decent ±15 V supply. You're running it at 9 V so it may be worse.
Hopefully you're beginning to understand why an op-amp is not the right choice for a comparator and that the 741 is a not a good choice for an op-amp.
Best Answer
Yes, you can add hysteresis using positive feedback from the comparator output.
simulate this circuit – Schematic created using CircuitLab
Of course, the amount of hysteresis you add depends on how noisy you expect your signals to be.