I have a very good op amp (AD8551) that I use to dynamically amplify a very small signal (2x, 10x, 100x, 1000x gain).
The problem is that there is a noticeable noise level at 100x and 1000x gain, and it has a weird constant shape.
If I power the circuit with a poorly stabilized power supply and connect the input of the amplifier at GND, I get a large noise level at 1000x as seen in the picture bellow.
If I power the circuit with a better stabilized power supply, the noise is still present at 1000x with the same waveform, but lower amplitude. And no matter what power supply I use the weirdly shaped noise doesn't disappear.
Since my AD8551 has a PSSR of 130 dB, I thought that TL431 used for biasing the input may be at fault. So I left the poorly stabilized power supply for the op amp and used the better one for the TL431, but the output is the same. Stabilizing the voltage on the resistor in the cathode of TL431, doesn't change anything.
The image below is an output sampled by a microcontroller with it's internal ADC. As you can see at 1000x the output swings almost full range. The reason 100x is missing in this test is because I replaced the 1MΩ R21 with a 100KΩ resistor and 1KΩ R66 with a 100Ω one, resulting in 1.1X, 2X 10X and 1000X amplification.
I did this because I was fearing that the feedback resistor R21 might be too big to bias the op amp negative input, even though AD8551's input bias current is rated max 2nA. The change did slightly diminish the amplitude of the noise.
Does the Vcc have to be dead quiet even though the op amp's PSRR is 130 dB? Is it the input bias causing this problems?
I can't figure it out, especially since I don't have access to an oscilloscope. All I have are the readings from the microcontroller saved on a SD card.
Looks like mains hum. (I'm assuming the annotations on the graph show you are changing the input gain during acquisition, so that the sinewave is not continuous).
Now we don't know:
For example if you are sampling at 50Hz in a 50Hz mains country, and seeing a frequency less than 0.5Hz, chances are that you are aliasing mains hum down to the observed frequency.
And given the high input impedance opamp inputs, they look like a target for electrostatic coupling, rather than magnetic.
Now, on which input?
If you remove the sensor and short the input to ground, does the noise disappear? Then the sensor connection must be more carefully screened. Or you need a buffer amp at the sensor to reduce the sensor's output impedance.
If the noise remains: reduce R21 to 100k and R66 to 100 ohms. Did that attenuate the noise tenfold? If so, it is the negative input that's picking up. More likely both inputs are picking up noise, since they are both fairly high impedance points.
You can reduce electrostatic pickup by screening : experimentally, surround the amp with tinfoil (and ground the tinfoil to the amp's ground)