0
\$\begingroup\$

Why am I not getting the expected gain out of my op-amp?

I m using a 16-pin TI OPA4322SAIPW op-amp with a Advanced Photonix 019-141-411-R photodiode and this circuit:

enter image description here where Rin is 1.8 kΩ and Rf is 27 kΩ. My Vin measured across the photodiode is ~0.14 V in ambient lighting conditions. I have also connected my op-amp to 3.3 V from a Pi Pico and to ground. I would expect to get Vout = -(27/1.8)·0.14 V = -2.1 V. However, when I read the output using a Raspberry Pi Pico ADC pin, I get 0.34 V. Is there something off with my op-amp here? I also replaced the op-amp with a fresh one and got the same behavior.

My goal is to get around 3.3 V out, but no matter what I do, I can't seem to get above 1 V out of my op-amp. Am I missing something?

Update: I've got everything working now, The issue was that my photodiode was a reverse bias diode. I got it working using the circuit from this answer although Spehros answer to this would have worked for any forward bias diode.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ Please show all connections and pin numbers. \$\endgroup\$
    – Mattman944
    Aug 3 at 1:23
  • \$\begingroup\$ I would first realize that a photodiode is best thought of as a light dependent current source, not a voltage source. I would look at transimpedance amplifier design to start. \$\endgroup\$
    – Luke Gary
    Aug 3 at 1:23
  • \$\begingroup\$ Are you sure the polarity of the photodiode is correct? Voltage to correct pins of op-amp? Is the inhibit pin connected properly? Is the input of the Raspberry Pi loading down the signal? \$\endgroup\$
    – PStechPaul
    Aug 3 at 1:28
  • \$\begingroup\$ @PStechPaul Ive tested my PiPico ADC input by feeding 3.3v directly from a power supply, and it reads out 3.3v correctly so I dont think its loading down the signal, Ive tried the polarity of the photodiode both ways to make sure ive got the anode and cathode correct \$\endgroup\$ Aug 3 at 1:48
  • 1
    \$\begingroup\$ Show us your actual circuit, including the photodiode & power supply, not the standard example opamp configurations. \$\endgroup\$
    – brhans
    Aug 3 at 2:08

2 Answers 2

4
\$\begingroup\$

You need enough power supply voltage to accommodate your input and output voltages. You have not specified what you are using, but if you are using a single supply such as 3.3V/ground you can only get positive voltages output. The open-circuit voltage you measured probably has a short circuit current in the 0.1-1uA range under normal ambient lighting. You can get a rough measure of it with a multimeter.

If you use a transimpedance amplifier configuration you'd want to do something like this (plus a bypass capacitor on the power):

schematic

simulate this circuit – Schematic created using CircuitLab

Try something in the M\$\Omega\$ for Rf.

Here D1's negative current in photovoltaic mode works into a virtual ground with the current supplied via Rf. C1 helps with stability. The output is 1V/uA of PD current with a 1M\$\Omega\$ resistor and proportionally more for higher values of Rf.

\$\endgroup\$
10
  • \$\begingroup\$ Thank you for posting this! I got the best response so far, but there is still something wrong. I used a 1Mohm resistor and 220pf capacitor, and got 0.3 v output in the dark and 0v when I turn a light on. Would it be helpful if I posted a picture of my circuit? Im 99% sure Im using the right pins on the op amp but you never know \$\endgroup\$ Aug 3 at 1:42
  • 1
    \$\begingroup\$ Try flipping the PD. \$\endgroup\$ Aug 3 at 2:01
  • \$\begingroup\$ Flipping the pd (cathode to ground, anode to -input/resistor/capacitor) gives me the original values I had, 0.1v in the dark and .34v with a flashlight on it. arg! \$\endgroup\$ Aug 3 at 2:13
  • \$\begingroup\$ Maybe let's see the circuit. You could also try 10M. \$\endgroup\$ Aug 3 at 2:18
  • 1
    \$\begingroup\$ Try replacing the PD with a 1.5V battery in series with a resistor the same value as Rf (eg. 1M). You should get 1.5V in one direction and 0V in the other. \$\endgroup\$ Aug 3 at 3:19
0
\$\begingroup\$

It looks like a photodiode needs to be reverse biased with about 1-5 VDC for it to operate, and then it will produce up tp 400 uA when exposed to light. Here is an article that explains a bit:

https://www.gadgetronicx.com/working-photodiode-applications/

Photodiode

This is the circuit they recommend:

Photodiode circuit

So, based on that, try again, and you should have success.

[edit]Your photodiode has output of 0.04 to 0.14 A/W, where W is the detected optical power. I would expect W to be around 1 mW so that would correspond to 40-140 uA. Through the 100k resistor this would be 4-14 volts. If the circuit is too sensitive, try maybe 20k.

\$\endgroup\$
2
  • \$\begingroup\$ Ive tried many variations of resistors for this circuit, and got no responsiveness to light. I got a consistent output of ~.5v regardless of resistor changes on R1 and R3, which is the same value I get if I take the diode out completely. When I flip the diode I get consistent ~1.4v (no light responsiveness either) so I think the diode is working b/c I see such a big change when I flip the anode /cathode, but am not sure why none of these variations in resistors are making a difference \$\endgroup\$ Aug 3 at 15:10
  • \$\begingroup\$ I just figured it out, My photodiode was a reverse bias diode, and I needed a totally different circuit for that. Thank you for your help!! \$\endgroup\$ Aug 3 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.