Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Use the relay coil to substitute for one of the pull-up resistors in your circuit.
C) The output of the comparator is not enough to drive either the relay nor the LED.Better, since you have to add a transistor to drive the relay anyway, use the input signal source to drive the added transistor and relay seperately from the rest of the circuit.
With the existing circuit as drawn with the LEDs back to back so to speak the Vsat out of the comparator can never exceed the breakdown voltage of either LED, one of the two is always reversed biased so if the breakdown voltage of the LED is 5 Volts that is as good as it gets. The max current sink on a comparator like the LM393 is about 16 mA. Given a choice I would use the output of one comparator to drive a LED and the other to drive a transistor like a 2N2222 to drive the relay with a LED across it. This does away with the back to back LED configuration.
Ron
I already went down all those paths. Sorry.
That was the first thing I thought of and is cover in both design issues. A) LED (20mA) can't pass the relay current (77mA) and B) the relay turn on voltage plus the LED voltage is greater than the supply voltage, so neither will turn on.
C) The output of the comparator is not enough to drive either the relay nor the LED.
People talk about the TYPICAL current from the comparator as being 16mA. But really they should consider that its MINIMUM current is only 6mA which is not enough to drive anything except the low base current of a transistor.
The maximum saturation voltage loss is 1.5V when its current is only 6mA.
On one project I used an LM393 comparator in a wireless microphone base station to drive a tiny low power relay (6mA) that turned on a spotlight.
It's a bi-color LED (2 pin-2 LED), so that would not be an option.