# Problem with using comparator to amplify signal

I want to use LM293(comparator) to amplify signal. The input signal from 0 to 2.5V, and make the output signal double(from 0 to 5V).

Then I use the LM293, and I do the simulation first, it works fine. But when I test the circuit in reality, it doesn't works, which means when the input is 0 or something below about 1.6V, the output is always about 3.2V. When the input signal > 1.6V, the Vout= 2*Vin, which is I want.

Here is my circuit below, if you have any suggestion, please let me know. Thanks! I have draw the signal almost as I get. (I am sorry that C1 is connected between output of Lm293 and Gnd, I will update this Asap)

• Can you explain what function C1 has? Apr 23, 2015 at 13:01
• In order to filter the signal, I also have done test without C1. This seems no bad effect. Apr 23, 2015 at 13:03
• You are aware that C1 is shorted out in your schematic? Apr 23, 2015 at 13:08
• I am sorry, the short line should be deleted. Apr 23, 2015 at 13:12
• Why use a comparator as an amplifier? Any old op-amp would work better as a, well, amplifier. Apr 23, 2015 at 13:46

The LM293 is only guaranteed to be able to sink 6mA. You have a 100 ohm pull-up resistor and with 6mA flowing into the chip's output, the output voltage will be limited to not going below 4.4 volts. Using a typical output current sink value of 16mA, your output might be able to pull down to about 3.4 volts and you may get a shade or two lower.

If you made the pull-up resistor more like 1kohm you'd be a bit better off but, then you are going to have problems reaching the 5V rail. Either compromise your requirements, use a higher supply voltage or consider using a rail-to-rail output device.

However, even with a rail-to-rail device, the output will clip at about 4.9 volts and 0.1 volts from a single 5 volt rail.

• Thanks for your suggestion. You help me figure out the problem and let me do the test later. Maybe I can change the 5V to 6V and Update the value of resistors. I have check the sink current of Lm293 from datasheet, which I miss before. Apr 23, 2015 at 13:28

If you must use an LM293 type comparator as a crappy low-frequency op-amp, you need to add a "BFC" (big fat capacitor) between the output and ground. Something like 10uF is probably appropriate, and I would suggest increasing that 100 ohm output resistor to a few hundred ohms at least. This adds a dominant pole to stabilize the amplifier.

This is only possible because of the simple internal structure of the LM293, and is not generally applicable to comparators (they will oscillate internally).

I also don't think you'll get very satisfactory results with a 10kHz input as you show above, but I've not done the maths.