LM311 LM211
6MOTOROLA ANALOG IC DEVICE DATA
TECHNIQUES FOR AVOIDING OSCILLATIONS IN COMPARATOR APPLICATIONS
When a high speed comparator such as the LM21 1 is used
with high speed input signals and low source impedances,
the output response will normally be fast and stable,
providing the power supplies have been bypassed (with 0.1 µF
disc capacitors), and that the output signal is routed well
away from the inputs (Pins 2 and 3) and also away from Pins
5 and 6.
However , when the input signal is a voltage ramp or a slow
sine wave, or if the signal source impedance is high (1.0 kΩ
to 100 kΩ), the comparator may burst into oscillation near the
crossing–point. This is due to the high gain and wide
bandwidth of comparators like the LM211 series. To avoid
oscillation or instability in such a usage, several precautions
are recommended, as shown in Figure 15.
The trim pins (Pins 5 and 6) act as unwanted auxiliary
inputs. If these pins are not connected to a trim–pot, they
should be shorted together. If they are connected to a
trim–pot, a 0.01 µF capacitor (C1) between Pins 5 and 6 will
minimize the susceptibility to AC coupling. A smaller
capacitor is used if Pin 5 is used for positive feedback as in
Figure 15. For the fastest response time, tie both balance
pins to VCC.
Certain sources will produce a cleaner comparator output
waveform if a 100 pF to 1000 pF capacitor (C2) is connected
directly across the input pins. When the signal source is
applied through a resistive network, R1, it is usually
advantageous to choose R2 of the same value, both for DC
and for dynamic (AC) considerations. Carbon, tin–oxide, and
metal–film resistors have all been used with good results in
comparator input circuitry, but inductive wirewound resistors
should be avoided.
When comparator circuits use input resistors (e.g.,
summing resistors), their value and placement are
particularly important. In all cases the body of the resistor
should be close to the device or socket. In other words, there
should be a very short lead length or printed–circuit foil run
between comparator and resistor to radiate or pick up
signals. The same applies to capacitors, pots, etc. For
example, if R1 = 10 kΩ, as little as 5 inches of lead between
the resistors and the input pins can result in oscillations that
are very hard to dampen. Twisting these input leads tightly is
the best alternative to placing resistors close to the
comparator.
Since feedback to almost any pin of a comparator can
result in oscillation, the printed–circuit layout should be
engineered thoughtfully. Preferably there should be a
groundplane under the LM211 circuitry (e.g., one side of a
double layer printed circuit board). Ground, positive supply or
negative supply foil should extend between the output and
the inputs to act as a guard. The foil connections for the
inputs should be as small and compact as possible, and
should be essentially surrounded by ground foil on all sides to
guard against capacitive coupling from any fast high–level
signals (such as the output). If Pins 5 and 6 are not used, they
should be shorted together. If they are connected to a
trim–pot, the trim–pot should be located no more than a few
inches away from the LM211, and a 0.01 µF capacitor should
be installed across Pins 5 and 6. If this capacitor cannot be
used, a shielding printed–circuit foil may be advisable
between Pins 6 and 7. The power supply bypass capacitors
should be located within a couple inches of the LM211.
A standard procedure is to add hysteresis to a comparator
to prevent oscillation, and to avoid excessive noise on the
output. In the circuit of Figure 16, the feedback resistor of
510 kΩ from the output to the positive input will cause about
3.0 mV of hysteresis. However, if R2 is larger than 100 Ω,
such as 50 kΩ, it would not be practical to simply increase the
value of the positive feedback resistor proportionally above
510 kΩ to maintain the same amount of hysteresis.
When both inputs of the LM211 are connected to active
signals, or if a high–impedance signal is driving the positive
input of the LM211 so that positive feedback would be
disruptive, the circuit of Figure 15 is ideal. The positive
feedback is applied to Pin 5 (one of the offset adjustment
pins). This will be sufficient to cause 1.0 mV to 2.0 mV
hysteresis and sharp transitions with input triangle waves
from a few Hz to hundreds of kHz. The positive–feedback
signal across the 82 Ω resistor swings 240 mV below the
positive supply. This signal is centered around the nominal
voltage at Pin 5, so this feedback does not add to the offset
voltage of the comparator. As much as 8.0 mV of offset
voltage can be trimmed out, using the 5.0 kΩ pot and 3.0 kΩ
resistor as shown.
Figure 17. Zero–Crossing Detector
Driving CMOS Logic Figure 18. Relay Driver with Strobe Capability
VCC = +15 V
3.0 k
10 k
VCC
5.0 k
LM311
Inputs
VEE
VEE = –15 V
Output
to CMOS Logic
Balance
Adjust
Balance
Input
Gnd
*D1
VCC2
VCC1
VEE
VEE VCC
Output
Inputs LM311
Gnd
1.0 k
Q1
Balance/Strobe
2N2222
or Equiv *Zener Diode D1
protects the comparator
from inductive kickback
and voltage transients
on the VCC2 supply line.
TTL
Strobe
+
+