Op amp oscillation help - Page 1
Forum section: electronics / projects

author: mayor
author_rank: Regular Contributor
timestamp: August 03, 2021, 12:52:20 pm
content: 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.

author: magic
author_rank: Super Contributor
timestamp: August 03, 2021, 12:58:09 pm
content: 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.

author: mayor
author_rank: Regular Contributor
timestamp: August 03, 2021, 01:08:19 pm
content: Quote from: magic on August 03, 2021, 12:58:09 pmHi!* 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 ata 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.

author: magic
author_rank: Super Contributor
timestamp: August 03, 2021, 01:17:31 pm
content: 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.

author: StillTrying
author_rank: Super Contributor
timestamp: August 03, 2021, 01:45:32 pm
content: 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

author: mayor
author_rank: Regular Contributor
timestamp: August 03, 2021, 03:07:58 pm
content: 1.5nF capacitor in parallel to feedback resistor:I guess switching noise is making it into the measurement. Hmmm.

author: magic
author_rank: Super Contributor
timestamp: August 03, 2021, 08:07:41 pm
content: 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).

author: mayor
author_rank: Regular Contributor
timestamp: August 04, 2021, 09:59:20 am
content: Quote from: magic on August 03, 2021, 08:07:41 pmHi, yes, I think I will add a resistor in v 0.2!

author: StillTrying
author_rank: Super Contributor
timestamp: August 04, 2021, 10:16:39 am
content: 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 RecommendationsFor 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."

author: HB9EVI
author_rank: Frequent Contributor
timestamp: August 04, 2021, 03:12:48 pm
content: we don't know the setup, how the circuit is probed; it could be common mode noise

author: mayor
author_rank: Regular Contributor
timestamp: August 05, 2021, 09:47:42 am
content: 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):

author: 741
author_rank: Frequent Contributor
timestamp: August 05, 2021, 10:26:43 am
content: 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

author: mayor
author_rank: Regular Contributor
timestamp: August 05, 2021, 12:26:16 pm
content: Quote from: 741 on August 05, 2021, 10:26:43 amVery 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.

author: teletypeguy
author_rank: Contributor
timestamp: August 05, 2021, 03:59:00 pm
content: 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).