I would like help with understanding something better, but am not trained in electronics so please bear with me!
I am trying to make a simple circuit to take a {-10V ... +10V} signal from a function generator, and to map it into the range {+1V ... +8V}. The circuit only needs to follow input signals up to a bandwidth of around 20 kHz. The arrangement I have so far is the following:
The scaling and shifting aspect of the circuit works fine, as can be seen in the oscilloscope screenshot below (left). Now, I would like help understanding more the noise in the circuit. In the oscilloscope screenshot below (right), I have applied a much smaller, 2 mVp-p input signal, and observe the noise introduced on the output signal (with both channels on AC coupling). You can see that my circuit has added significant noise onto the input signal:
In the previous images, I was almost at the noise floor limit of what my oscilloscope is able to discern, and so to get a better measure I have also measured the noise by feeding the signals first into the AD8428 instrumentation amplifier, which has gain x2000, via a 260 kHz low pass filter. The noise on the input and output for a 1 V DC input signal are shown below. At the moment, I am not able to provide a frequency spectrum of this noise, so apologies. From these data, I measure the input and output signals to have 53 µVrms and 357 µVrms of noise, respectively:
I have measured both the +12V and -12V power supply rails, and they are both much lower noise than that seen on the output, and so are not responsible for it. All these measurements were done with a "pigtail" ground scope probe, to reduce the effect of any pick-up (indeed, the noise goes away when shorting the + and - of the probe together).
Ideally, I would like the output noise to be limited by the noise on the input signal, and not add so much noise to it. Therefore I would like to understand exactly what is going on here. Specifically, my questions are:
1) Given the parts I have used, how would one go about calculating what the output noise is expected to be? I would like to learn what are the calculations and procedure I could go through in the future, and hopefully to predict the noise value seen on the output, without having to build it and measure it.
I have access to a bunch of specifications in the parts' datasheets, including a voltage noise density of 8 nV/√Hz and current noise density of 0.2 pA/√Hz for the op amp OP1177 (at 1 kHz), and for the LM4040 a value of 180 µVrms from 10 Hz to 10 kHz. I understand the concept of spectral density and how to convert to rms using the desired bandwidth, but I don't understand how I can take these numbers (along with presumably the thermal noise of my resistors), and put them all together to predict the measured value of 357 µVrms. It would be great if someone could walk me through this as an example. It would also be a bonus if someone can illustrate how LTSpice could be used in a case like this to back up any hand calculations.
2) How can I reduce the noise down? Ideally, if I manage to learn more towards answers to the above questions, then I would hope to figure this one out on my own.
--- EDIT --------------------------------------------------------------------
Following suggestions in the comments and answers, I have tried adding two additional capacitors, shown below:
C7 is to limit the bandwidth of the op amp feedback, and therefore hopefully some of the noise. C6 is is an attempt to low pass filter the noise coming from the LM4040 +10V reference, which has the following noise specs from the datasheet:
As pointed out by analogsystemsrf, the LM4040 has quite a lot of noise already. Using the tool https://apps.automeris.io/wpd/ I have extracted the noise spectral density from the picture in the datasheet, and then numerically integrated this spectrum over various bandwidths to get the expected rms noise cumulatively as a function of bandwidth. With a 10 kHz bandwidth, we can expect ~170 µVrms (as stated explicitly in the datasheet), and this increases to 350 µVrms for a 100 kHz bandwidth:
With the addition of the two capacitors, the noise at the output is measured for both a shorted input, and with 1 VDC being sent from the function generator:
When trying different values of C6 (always with the 100 pF feedback cap), the noise changes as follows:
No capacitor: 217 µVrms
1 nF capacitor: 167 µVrms
10 nF capacitor: 123 µVrms
100 nF capacitor: 118 µVrms
1 µF capacitor: 117 µVrms
10 µF capacitor: 116 µVrms
--- 2ND EDIT ----------------------------------------------------------------
As suggested by VoltageSpike, I have also done some tests with R2 disconnected and V_IN grounded, in order to remove the extra complication of noise from the LM4040 reference. The effective schematic is then simply the following:
Then the output noise is measured using the AD8428 instrumentation amplifier, with two different bandwidths - the first is the standard bandwidth of the AD8428 amplifier of 3.5 MHz, and the second is with an additional 260 kHz low pass filter before the AD8428 amplifier. The following table shows the result of changing the value of C7:
Then, after selecting the 56 pF capacitor based on the above data, I have also measured the effect of adding additional filtering capacitors to the power rails of the op amp - specifically, an extra 10 µF and a 100 µF were added to each of the positive and negative rails, changing the noise as follows:
It seems now as if the output noise is coming down to the range of the power supply rails noise. Although, I don't understand why there is so much more noise on the output than the PSU rails when measuring over a 3.5 MHz bandwidth, given the fact that the op amp bandwidth should be limited to tens of kilohertz by the 56 pF capacitor C7.
--- 3RD EDIT ----------------------------------------------------------------
I have managed to get around to taking a noise spectrum of my simplified op amp circuit shown above. There is no C7 capacitor fitted, and the noise was again measured using the AD8428 amplifier (gain x2000, bandwidth 3.5 MHz). Also, to remove the possibility of my power supply rails dominating the op amp output noise, I have been powering the circuit using dual ±9V batteries.
Shown below is the oscilloscope trace, which indicates an RMS output noise of 196 µVrms. I have also then converted the time series data into a voltage spectral density, and the corresponding cumulative RMS noise curve (by integrating the spectral density over the relevant bandwith):
From the data, I am able to read off a voltage noise of ~85 nV/√Hz. Following this TI Application Report, and the book Noise Reduction Techniques in Electronic Systems (Ott, H.), I made an attempt to learn how to arrive at this number. First, I associate noise sources with the various elements - namely, thermal noises of each resistor, and the input voltage noise and input current noise of the OP1177 op amp:
After doing this, I calculate the following noise contributions:
RESISTOR THERMAL NOISE ( using \$\sqrt{4k_BTRB}\$ ):
For R1 - noise = 51 nV/√Hz * 1.35 = 68.9 nV/√Hz
For R2 - noise = 31 nV/√Hz * 1 = 31 nV/√Hz
For R3 - noise = 51 nV/√Hz * 0.35 = 17.9 nV/√Hz
The factors of 1.35 and 0.35 are the gains due to the op amp, depending on whether it is applied in inverting or non-inverting configuration for the various noise sources. So, total resistor thermal noise is found by adding the noise sources by the sum of the squares to be 77 nV/√Hz.
OP AMP INPUT VOLTAGE NOISE:
This is given in the OP1177 datasheet to be 7.9 nV/√Hz (at 1 kHz), and is subject to a gain of x1.35. Therefore its contribution is 10.7 nV/√Hz.
OP AMP INPUT CURRENT NOISE:
From the datasheet, the input current noise is 0.2 pA/√Hz (at 1 kHz). This will develop into a voltage noise across R1, and then due to the gain will contribute of 0.2 pA/√Hz * 160 kΩ * 1.35 = 43.2 nV/√Hz on the output. Similarly, it will also produce a voltage across R2 and contribute an additional 0.2 pA/√Hz * 56 kΩ = 11.2 nV/√Hz. Adding these in quadrature gives 44.6 nV/√Hz coming from the input current noise.
To get the total output voltage noise, we should simply have to add all three noise sources in quadrature, to arrive at:
\$\sqrt{(77\;\;\textrm{nV}/\sqrt{\textrm{Hz}})^2 + (10.7\;\;\textrm{nV}/\sqrt{\textrm{Hz}})^2 + (44.6\;\;\textrm{nV}/\sqrt{\textrm{Hz}})^2}\$ \$\approx 90 \;\;\textrm{nV}/\sqrt{\textrm{Hz}}\$
This seems to agree reasonably well with my measurement above of 85 nV/√Hz, and so these calculations seem to work okay.
However, I then obtained the SPICE model for the OP117 from the Analog Devices website here, and tried to reproduce this in LTSpice. The result is shown below:
It can be seen that LTSpice predicts something like 207 nV/√Hz, which is very different to both the measured value and the value obtained from the simple hand calculations. Can anyone help to shed any light on what might have gone wrong here? Am I misunderstanding how to do the noise calculations, or did I make a mistake in LTSpice?
Note that when configuring the OP1177 as a buffer without resistors, to measure its input voltage noise, LTSpice seems to give the correct value given in the datasheet of 7.9 nV/√Hz:
--- 4th EDIT ----------------------------------------------------------------
It turns out that the SPICE model from the Analog Devices website for the OP1177 was WRONG. Although the input voltage noise was being modelled correctly at 7.9 nV/√Hz (as shown above), the input current noise was wrong in the SPICE model file. Instead of the value given in the datasheet of 0.2 pA/√Hz, the model was incorrectly producing 0.86 pA/√Hz input current noise. When going through the above "hand calculations" using 0.86 pA/√Hz instead, I arrive at the value simulated by LTSpice of 207 nV/√Hz.
I am now happy that the hand calculations, the LTSpice result, and the measured value from lab are all consistent (provided your SPICE model is correct in the first place! Lesson - always compare SPICE model to datasheet values before continuing to model circuits).