hi everyone,
is it possible to use comparetor op amps like lm311 or lm339 as crud audio amps?
Maybe. Probably not. Why would you want to? Single op-amps are available in SOT-23-5.
Tim
You could build a class-D amp using a comparator.
Maybe a comparator works as a linear amplifier, but it won't be good.
An opamp has a frequency compensation capacitor inside so that it doesn't oscillate when negative feedback is used.
A comparator oscillates when negative feedback is used.
The output of an opamp goes to any level within its linear range.
The output od a comparator goes digitally only high and low with linear nothing in between.
The output of an opamp goes to any level within its linear range.
The output od a comparator goes digitally only high and low with linear nothing in between.
In theory, but all practical comparators have a finite gain (200k for a LM339, that is similar to an opamp). So adding a feedback will force them into linear operation (unless the comparator has an internal hysteresis).
It has been years since I used a LM339 in an audio application, but I don't recall it being bad at all.
The problem is the gain and output stage are wide open, so the gain extends to much higher frequencies, where the phase shift wraps around. So you can hardly apply any feedback without it oscillating.
I think the usual approach is to shunt the output into submission with a Big Fuckin' Cap, but this doesn't address the fundamental problem, which is that the circuit itself is unstable and prone to oscillation. Indeed, this tends to result in low level oscillation (~mV), as its screams are muffled into the large capacitor, but not silenced.
You also don't have a driving output, only open collector. So you're limited to class A resistor loaded output.
Used in a proper PWM circuit, it's not bad, but now you're intentionally harnessing its screams, which means the possibility of high efficiency (adding a suitable output stage), and the requirement for heavy filtering.
Tim
Yes, it can be done. There are some examples of this on the datasheet. The VCO schematic on the LM339 uses a comparator as an op-amp integrator: see top left of the schematic.
The LM311 will probably be better with the output connected as an emitter follower but there are no examples on the datasheet.
Yup, LM339 is perfectly fine as an opamp - as mentioned stability can be an issue, but it's not too bad if you can slow it down a bit with a cap. Various revisions of the datasheet have even suggested this use, though recent versions seem to have been scrubbed of this. I've used it before for a very specific application - I needed an open collector opamp, which would be connected in "wired OR" with multiple others, with only one active at a time.
Keep in mind this is because LM339 is inordinately slow for a comparator. You may have worse luck with faster specimens like LM311.
I have even seen application notes showing DTL gates used as linear amplifiers (with appropriate biasing and feedback, of course.)
The original question was "is it possible to use comparetor op amps like lm311 or lm339 as
crud audio amps?"
Was that a Freudian slip?