# Op-Amp Comparator precision voltage

I need to trigger a speaker if my input voltage is higher than 0.6 V, otherwise the speaker must not be triggered. That's the reason I'm using an AMPOP Comparator:

and, as far as I know, the voltage Vout should be:

$$V_{\text{out}} = \begin{cases} V_{\text{S}+} & \text{if } V_1 > V_2, \\ V_{\text{S}-} & \text{if } V_1 < V_2, \\ 0 & \text{if } V_1 = V_2\end{cases}$$

But when I simulate my circuit, my output voltage is not Vs+ or Vs-. There is a loss in voltage and you can check all voltages on the following image.

V1 = 1 V and V2 = 0.6 V, Vout = 13.011, but Vs+ = 15 V;

V1 = 0.2 V and V2 = 0.6, Vout = 1.9889, but Vs- = 0 V.

I need Vout near 15 V (and 0 V if V1 < V2). It doesn't have to be exactly 15 volts, but near it. Am I doing something wrong? Is there any way to do it without another amplifier after the output? I'm beginner sorry if I misunderstood something.

BTW, if you know an easier way to trigger the speaker, tell me ;)

• Not sure exactly what you mean by "triggering" a speaker, nor why you think a op-amp wired as a comparator will do that. But, the output voltages you see are easily explained by the fact that many op-amps have a compliance voltage in that range... that is, the outputs can not drive the whole supply range... compliance of ~2V is not unusual. Read your datasheet! You don't mention what op-amp you are using. A "rail-to-rail" op amp will drive the output closer to the rail voltages. Even better, use a dedicated comparator IC for this function. – B Pete Nov 26 '12 at 3:55
• @BPete, good enough for an answer, I think. – The Photon Nov 26 '12 at 4:09
• Why you need 15V or a DC signal on a speaker that would imply 2 Amps (but not deliver) in the speaker coil is beyond me. But you can't create a tertiary level output window detector with a simple comparator.. try again? – Tony Stewart Sunnyskyguy EE75 Nov 26 '12 at 4:14
• @Richman: Good points. We could use some detail about what the poster is trying to accomplish. – B Pete Nov 26 '12 at 4:43
• I want an alarm system. If the voltage goes over 0.6 volts, the speaker is activated, otherwise no sound. – Doon Nov 27 '12 at 16:01