Author Topic: Op amp oscillation help  (Read 1486 times)

0 Members and 1 Guest are viewing this topic.

Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Op amp oscillation help
« on: August 03, 2021, 12:52:20 pm »
Hi,

I have the following circuit:



I realize the input and feedback resistors probably need to be larger, more similar values. I also realize I should have left a footprint for a feedback capacitor (I'll stack a cap on top of the resistor) if needed. The source is a pH or ORP probe, that has very high impedance.

The output goes into a 100 ohm/22nF rc filter, then to an ADC.

The issue is some oscillation:



I am not entirely sure what the best approach is to correct it in hardware. What value resistors, feedback capacitor, etc. Or if oversampling at the ADC would be enough. This is for home use, so not critical at all.

 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6779
  • Country: pl
Re: Op amp oscillation help
« Reply #1 on: August 03, 2021, 12:58:09 pm »
The schematic seems to be incorrect.

Pins 2,7 are guard drivers IIRC so you are not supposed to connect them to any input, I hope it's a mistake.
It seems to be unity gain, is it how it's supposed to be? :-//
The input signal supposedly goes below ground. The input of the opamp may or may not work (see specs), but the output certainly won't go below the negative supply. Bias currents will likely increase at -400mV due to ESD protection (see the datasheet again).

You don't need to match resistances seen by the inputs; bias current is too low to matter with such low values of resistance.
« Last Edit: August 03, 2021, 01:02:13 pm by magic »
 

Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Re: Op amp oscillation help
« Reply #2 on: August 03, 2021, 01:08:19 pm »
The schematic seems to be incorrect.

Pins 2,7 are guard drivers IIRC so you are not supposed to connect them to any input, I hope it's a mistake.
It seems to be unity gain, is it how it's supposed to be? :-//
The input supposedly goes below ground. The input of the opamp may or may not work (see specs), but the output certainly won't go below the negative supply.

You don't need to match resistances seen by the inputs; bias current is too low to matter with such low values of resistance.

Hi!

* pin 2,7 are guards, and are driven on purpose (per spec: A "Guard" is a driven trace or shield that physically surrounds the input trace and feedback circuitry that is held at
a potential equal to the average input signal potential)

* Yes, I configured it as unity gain. I suppose ONE of the probes could have been configured otherwise, but the ORP probe will swing from just above ground to ~4V.

* The input is always above ground, as the reference for the probes makes it so (for PH probe, it +0.5V, for ORP, + 2.048).

I hope this additional info clarifies things a little.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6779
  • Country: pl
Re: Op amp oscillation help
« Reply #3 on: August 03, 2021, 01:17:31 pm »
You are right. I somehow believed that this IC drives the guard pins internally.

Adding a feedback capacitor at unity gain doesn't change anything, unless problems are due to parasitic capacitance at IN-. Now that I think about it, perhaps they are if those guard traces are large enough. But you might as well replace the feedback resistor with 0Ω in such case.

The output filter is an RC lowpass I suppose, so you could try without the R to see if it makes any difference.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp oscillation help
« Reply #4 on: August 03, 2021, 01:45:32 pm »
I would think it could be oscillating because of the amount of capacitance stuck on its inverting input. Changing the 10k feedback resistor down to 1k to 0 might be an easy fix.

https://www.ti.com/lit/ds/symlink/lmp7721.pdf
.  That took much longer than I thought it would.
 

Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Re: Op amp oscillation help
« Reply #5 on: August 03, 2021, 03:07:58 pm »
1.5nF capacitor in parallel to feedback resistor:



I guess switching noise is making it into the measurement. Hmmm.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 6779
  • Country: pl
Re: Op amp oscillation help
« Reply #6 on: August 03, 2021, 08:07:41 pm »
The whole idea seems unfortunate because the guard picks up noise and injects it into IN- while being isolated from the output by a resistor. It should be quite the other way around.

Since it's unity gain, I think you could route a short trace from OUT to IN- and separately drive the guard from OUT, perhaps with some series resistance if capacitive loading or short circuits are a concern (like if the guard extends to long external cables or whatnot).
 

Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Re: Op amp oscillation help
« Reply #7 on: August 04, 2021, 09:59:20 am »
The whole idea seems unfortunate because the guard picks up noise and injects it into IN- while being isolated from the output by a resistor. It should be quite the other way around.

Since it's unity gain, I think you could route a short trace from OUT to IN- and separately drive the guard from OUT, perhaps with some series resistance if capacitive loading or short circuits are a concern (like if the guard extends to long external cables or whatnot).

Hi, yes, I think I will add a resistor in v 0.2!
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Op amp oscillation help
« Reply #8 on: August 04, 2021, 10:16:39 am »
Even if you ignore the spikes there seems to be a lot of 40mV p-p MHz noise. The data sheet says have good V+ supplies.

Page 25.
"9 Power Supply Recommendations
For high-sensitivity applications, the power supply rails should be as clean as possible.
Noise on the power supply lines can modulate the tiny capacitance (about 0.5 pF) of the ESD structure on each input. While this is not a major concern for most applications, charge-sensitive or high-gain, high-impedance applications can be affected. Common results are power line "hum" or high-frequency switcher "hash" imposed on the signal.
TI recommends using a very low noise linear regulator and add a dedicated filter network to the LMP7721 power supply pins consisting of a series resistor of about 100 Ω, and a bypass capacitor of 100 uF or larger. Series inductors or ferrite beads may be required if high frequency switcher noise is present."
.  That took much longer than I thought it would.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Op amp oscillation help
« Reply #9 on: August 04, 2021, 03:12:48 pm »
we don't know the setup, how the circuit is probed; it could be common mode noise
 

Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Re: Op amp oscillation help
« Reply #10 on: August 05, 2021, 09:47:42 am »
I tried probing with the probe spring, but ended up using the clip. I _think_ I saw a similar result. I'll try some more measurements.

The power supply is currently a 12 V wall wart (for tests, I am not using the AC-DC converter shown here) then a LP38798 LDO, which is very low noise. I have laid it out as carefully as possible, and note that the footprint above the resistor divider is unpopulated (and not shown in the schematic):




This then goes through an ADM3260 for data and power isolation. There is filtering for the op amp (100R + 220uF):





 


Offline mayorTopic starter

  • Regular Contributor
  • *
  • Posts: 234
  • Country: ca
Re: Op amp oscillation help
« Reply #12 on: August 05, 2021, 12:26:16 pm »
The TI extract mentions ferrite beads. There is a nice piece by Jim Williams on this topic, an101f - Minimizing Switcher Noise.

https://www.google.co.uk/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjgp5e_1ZnyAhWRQUEAHZOIAzkQFnoECAUQAw&url=http%3A%2F%2Fwww.analog.com%2Fmedia%2Fen%2Ftechnical-documentation%2Fapplication-notes%2Fan101f.pdf&usg=AOvVaw06_Kj_YYddJCKASCHMng1X

Very helpful, thank you. I will keep for reference.

However, it looks like I was picking up noise from poor measurement technique. I managed to find a ground point near enough the output of the op amp and measured power rails and output. They are as clean as I think I can make them. It appears the only change needed for future revisions is adding capacitor footprint to avoid oscillation.

Power:



Output:



Thank you all.
 

Offline teletypeguy

  • Contributor
  • Posts: 13
  • Country: us
Re: Op amp oscillation help
« Reply #13 on: August 05, 2021, 03:59:00 pm »
When you have an opamp with a feedback resistor (output to neg) ALWAYS put a cap across it to roll it of at the high end.  100pF, 10pF, or even a few pF from your fingers touching it can tame an oscillating amp.  The pole is at 1/(2*pi*R*C). 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf