This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LM311 Comparator Oscillations

Other Parts Discussed in Thread: LM311, LM311-N

I've been evaluating the LM311 Comparator for 1mV to 10mV input signal changes and have been attempting Figure 40 in the Data Sheet. I've been following the Application Hints - but I expect maybe not as well as some need to be done.

I am getting oscillation as the output ATTEMPTS to change state. I say ATTEMPT as I can hold it right at the point where it goes into oscillation, without the hysteresis pulling it through.

I've read the application notes and have now tried three prototypes.

In the book, Trouble Shooting Analogue Circuits, Bob Pease mentioned LM311 troubles (in the chapter described below).

Obviously many engineers have experienced trouble here before.

The chapter text suggests that Bob Pease had solved the problem and possibly documented a solution. I can't find this on the web. Possibly it is help within National Semiconductors archives.

Does anybody know if anything exists? It may even be within one of his many paper-pad hand-drawing style articles.

Straight searches find heaps of LM311 hits, but nothing on Bob Pease's solution.

-----------------------------------------------

Chapter 9. Quashing Spurious Oscillations

Page: 113     1st new paragraph.

Just the Right Touch

For faster comparators, such as the LM311, everything gets even touchier, and the layout is more critical.

Yet, when several people accused the LM311 of being inherently oscillatory, I showed them that with a good layout, the LM311 is capable of amplifying any small signal, including its own input noise, without oscillating and without any requirement for positive feedback.

-----------------------

  • Peter,

    I also could not locate the application note. However the LM311-N data sheet has some text describing the issue.

    Have you consider amplifying the signal then using a comparator? This will allow a greater hysteresis and make layout less important.

  • Hi Peter,

    Hmmm... I do not recall any specific articles or notes from Bob on the LM311 oscillations. Most likely this was from correspondence with various customers over the years prior to writing the Troubleshooting book (I drew most of the non-paper-pad schematics for that book).

    If Bob was able to eliminate oscillations in his characteristic rats-nest construction style, you should be able to, too..:^)

    Supply bypassing can be CRITICAL for comparators. You do not think of them as high-speed devices, but they are. Output transition rise/fall times can be in the 10-100's of nanoseconds - and moving at high voltages (high dV/dt) - even if your input signal is only a few Hz. You should have bypassing that is effective up into the 100's of MHz and solid grounds. That means some small capacitors (~1000pF) right across the supply pins.

    If you are building the circuit on a solderless proto-board, then all bets are off unless you solder the bypass cap directly to the device pins. Grounds and supply buses on these boards tend to be very noisy and the capacitive coupling between pins is high. Dead-bug or Belly-flop style on a copper plane would be better.

    I would add more bypassing to the supplies and also make sure the V- and GND pin are tied tightly together and to ground, and the the ground path from the GND pin to the load is not shared with any signal grounds.

    For Figure 40, bypassing will be very critical as you are dealing with the balance pins - which are a direct link into the input stage. Balance pins are always sensitive nodes and an ingress point for noise. For figure 40, they are using the offset adjust pins to shift the offset to create hysteresis. While a clever way to add hysteresis, it is risky if the output goes linear as now there is a direct small-signal path back into the input.

    A comparators output can go into a class-A like linear mode when very near the transition point. This is where you will see the sine-like oscillations. Hysteresis does not help this because the oscillation is usually a small percentage of the full output transition.

    My guess is his advice would be:

    1. Heavily bypass all supply lines, three caps: 1000pF, 0.1uF and 10uF.

    2. Solid ground pin connection to ground point that includes the ground ends of the bypass capacitors.

    3. Keep output line away from inputs and balance pins.

    4. Don't share power ground path with input signals. The basic "star" ground stuff...

    Regards,

    Paul Grohe

  • Hi Ron,

    Thanks for your searching.

    My original application had both comparator inputs varying between +/- 10-volts (Auto-zero voltage versus Integrator output voltage), unlike a zero crossing detector with one side grounded.

    However, I'd be interested in seeing a good application note on "amplifying before the comparator", as I feel I have a need for that too - in a zero crossing situation. Limiting the front-end amplifier to prevent saturation would be required I expect.

    I was drawn to the LM311 primarily by its +/-15 volt input range. I now can't find exactly where there was mention of a really low hysteresis voltage. But figure-40 was what I was attempting.

    I had done a few "low-cost" prototypes to see what is possible - all with that oscillation. I've now done a new one with separate supplies for the output section to see whether there is any interaction. Also I now have  low-impedance opamp outputs directly driving the comparator inputs.

    I've moved this comparator issue out of the critical design path and am treating it as a low priority experimental task. Its an interesting challenge!

    Cheers,

    Peter

  • Peter,

    With a small <10mV input signal that I assumed was ground based, a standard inverting or non inverting amp amp circuit could be used to increase the level of the input. This amplifier would need a very low VIO to prevent DC error. If the <10mV signal is a differential input, then an instrumentation amplifier would be needed to increase the signal at much added cost. 

  • Hi Paul and Ronald,

    Thanks for your comments.

    Since I posted the original question, I have received, assembled and tested a revised PCB. These have all been double-sided PCBs with a "strip" of ground plane on the top layer, joining the positive side bypass caps to the negative side bypass caps (GND pins). On the bottom layer of the PCB is a larger ground plane. Plenty of vias are along that strip too.

    That sandwich ground plane is reasonably localised - due to creating ISLANDS out of the different sections (Input, Output, Offset network) in order to STAR them at the power connector.

    On this version, I used a separate regulator to power the output pull-up resistor. That was to isolate it from the "Oscillating" comparators positive supply. I had another regulator powering the pull-up resistor going to the OFFSET trimpot network for the same reason. On the front-end, to reduce the input driving impedance, I drove the comparator's POS and NEG input pins - directly from a opamp output pins (no series resistance). All sections had STAR power and ground connections back to the power connector. All very isolated.

    I found that oscillation commence when the comparators differential input voltage (pin 2 and pin 3) was about +5mV and ceased once it had gone through to -15mV. 

    I removed the Open Collector 33k Feedback resistor to see how it would perform. No difference. Also the OFFSET Network Trimpot and Capacitor were removed - again no impact.

    I am using +/-5-volt supplies. Currently GND (pin-1) goes directly to the output connector's GND pin, then back to the STAR GND at the power connector.

    You mention tying the GND (pin-1) to the NEG supply (pin-4). I am willing to do this for the sake of this exercise (its become an interesting side task to resolve). I'm curious what your reasoning behind that comment is.

    Overall, I think that you are implying that Figure 40, "While a clever way to add hysteresis", is probably unlikely to work (for me anyway). Too clever for its own good. I accept that.

    I'll do one more PCB revision, as I have seen a few things that are worth refining. One thing is to add more POS and NEG power plane, so I get a far greater low-impedance "plane" capacitance to ground - as well as my tantalum's, 100n and 1n0 capacitors. I've taken onboard your high-speed design comments.

    Do you think Bob Pease solved this with a DIP-8 package - rather than a SO-8?

    Regards,

    Peter