Electronic – Not accurate readings when connecting OpAmp AD822 to ADC MCP3008

adcoperational-amplifierphotodiode

for my project, I am using a photodiode, that I connected to the AD822 OpAmp. This OpAmp should then be connected to the MCP3008 ADC. I am reading the data from the MCP3008 with a RaspberryPi. I am however getting weird readings from the ADC. I guess that this is because there is some sort of fluctuations in the voltage coming out of the OpAmp. Below there is a diagram of my wiring as it currently is (I am using the negative side of the 9V battery as ground):

Wiring of the OpAmp to ADC

I use single supply voltage for the OpAmp, as I do not have the possibility of dual supply.

If I try to measure the Voltage across the 10kOhm resistor with an multimeter, I get a value of 0V. However, according to my ADC the Voltage input Voltage fluctuates between 0 and 1.7V.

Now, if I disconnect the ADC and remove the 10µF capacitor and connect the 10kOhm resistor directly to ground, I get readings with my multimeter of 0.04V with ambient light and about 05.V if I put my flashlight over the Photodiode. So it seems to be working like that

Am I wiring something wrong? Are my capacitors or resistors wrong / at the wrong place?

Here are the datasheets:
Datasheet Op Amp; Datasheet ADC

Thank you in advance!

EDIT after jusaca response:

enter image description here

EDIT with Solution:

Jusaca, thank you for the decoupling advice and the relation between Rf and Cf.

I have worked on it more and finally realised what the last error was:
I had to connect the negative side of the 9V battery to the ground of the MCP3008 and to the ground of the RaspberryPi. So connecting the entire "ground" side (the bottom line in my diagram) to both the negative side of the battery and the ground of the RaspberryPi and both grounds of the MCP3008! 🙂

Best Answer

The voltage over the 10k will always be practically 0V, because no current is flowing in the ADC input. You have to measure the voltage over the capacitor (meaning from ADC input to ground) to see the same voltage the ADC is seeing.

The fluctuations you see in the ADC signal indicate that the OpAmp is not in stable operating conditions. As Andy mentions in the comment: You need to decouple the supply voltage with something like 100nF between V+ and V- as close as possible to the supply pins of the OpAmp. This gives a low impedance path for the supply current.


Another common cause of instability with transimpedance amplifiers is a lagging phase due to the capcaitance of the photodiode. If the phase lag approaches 180° the negative feedback becomes positiv feedback and the amplifier may start oscillating.
To compensate for that a feedback capacitance \$C_f\$ is placed in parallel to \$R_f\$. In your case that is the 1300pF. How did you get that value? You need to know the capacitance of the diode as well as the GBW of the OpAmp to calculate a matching \$C_f\$. You can read the details in this TI paper Compensate Transimpedance Amplifiers Intuitively, but the short form is:

\$ C_f = \frac{1}{4 \cdot \pi \cdot R_f \cdot GBW}[1 + \sqrt{1+8 \cdot \pi \cdot R_f \cdot C_D \cdot GBW}] \$

So if your feedback capacitance varys to much from the ideal value that might be the cause of the instabilities you see.

Related Topic