I'm using an open collector comparator LM339, and I want to isolate V2 from the circuit by a 4N25 optoisolator. I want V(out) to change its state from at least around 1V or less up to 10V. But I get the following result in LTspice IV where Vout swings between 8.5V to 10V:
I cannot change R8, and I want LED to blink for every pulse. I might be using the coupler wrong way. I also noticed R7 also have big effect on the coupler; if I set it to 10k it doesn't work at all.
How can I modify this circuit so that Vout can swing more(from around 1V to 10V) and LED blinks?
Edit:
Suggestion from a comment:
EDIT 2:
Best Answer
As others suggested and you've changed your schematic to get rid of the LED in the output ....here's a simple modification that should provide your required output voltage swing.
Choose an appropriate PNP to sink your required current:
simulate this circuit – Schematic created using CircuitLab
You could also use a FET to achieve the same result.