Comparators....gack!

Jan 03, 2006 8 Replies

Ok, so I set up an LM311 (or LM393, or 339) to compare two slow-moving voltages with reasonable output impedances (under 20kohms), and have a 4.7k from +12V for output load. (Supply is +12V, -6V.) With one voltage adjusted near the other, I get a full amplitude oscillation on the order of roughly 1-4MHz (depending on some stuff).



NFB doesn't kill it. Capacitor from output to -in doesn't kill it. Tying spare pins doesn't do anything. Capacitors to ground, on the input, don't even do a damned thing!



Um...help?



Tim


-- Deep Fryer: a very philosophical monk. Website:

formatting link


Comparators simply are not compensated for negative feedback, or for no feedback. When you ever so slowly sweep the inputs through the linear range the thing _will_ oscillate like crazy.

Adding the suggested positive feedback will create a bit of hysteresis, which will tend to make it latch into the state that it's in. Consequently, when your input goes by that critical point and the comparator starts to move the critical point will move, too, in such a way to slam the thing hard against the stops (which is what you wanted).

Tim Wescott Wescott Design Services http://www.wescottdesign.com

The effect you are aiming for is to have the threshold for a positive going transition a few millivolts more positive than the threshold for a negative-going transition.

The exact number of millivolts depends on the amount of noise you've got on your signal - something like five times the rms noise is the sort of level for which you can produce a nice theoretical justification. Mostly the amount of the hysterisis is actually fixed by maximum resistance value that you can buy in the size of resistor that you are fitting to your board.

The application note part of a comparator data sheet usually give example circuits, sometimes with a discussion of what is going on - the Linear Techology data sheet for the LT1016 is particularly good.

Bill Sloman, Nijmegen

Try positive feedback.

Well, I'm trying to compare an error signal to a reference signal, I'd rather not have it plug around the equilibrium, makes for a mess...

I substituted a 741 and it worked beautifully. Now because I need two such error amps (feedback signal being the greatest of errors signals via diodes to the control node), I've switched to a 358, which now *doesn't* work right! Argh!

Tim

-- Deep Fryer: a very philosophical monk. Website:

formatting link

Try capacitors across the opamp inputs: +IN>----+---|+\\ [C] | > -IN>----+---|-/

Hm... might be worth a shot.

Switched to an LM833 (I've got a bunch of desolder pulls from a car amp ;), with some finagling I've got the circuit working perfectly. :) I think I'll draw the present circuit, maybe even take some pictures and write/upload part, erm, 7 or 8, whichever it is...

Tim

-- Deep Fryer: a very philosophical monk. Website:

formatting link

Anything over 100 ohms for a source impedance is considered high with the LM311, there is too much gain and potential for capacitive coupling developing sufficient feedback voltage to use this part haphazardly. You might download the datasheet and read the application hints section.

formatting link
.

Op amps are not good comparators - when the input stage is driven into saturation, you can get lots of base charge accumulating in one or more of the transistors in the amplification path, and it can take a while - I've seen 500usec claimed - to get rid of that base charge when the input stage finally comes out of saturation, which can make for a very long propagation delay.

You might like to think about capacitatively coupled hysterisis - the time constant of the RC network has to be matched to the expected slew rate on your error signal - the slower the error signal slews through the critical region the longer the time constant that you need.

Putting a 10pF capacitor in series with a 10M positve feedback resistor gives you 100usec, which is often enough. After six or so time constants the threshold is back to the DC value, if your reference is actually an iinvariant voltage.

Bill Sloman, Nijmegen (but in Melbourne, Australia at the moment)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required