# Transimpedance amplifier with diode feedback

Can someone explain the effect of capacitor and diode on the below circuit?

Since when injecting 0.2uA (instead of photodiode)to the opamp with only a resistor(1Mohm gain) feedback I am getting a correct output of -0.21 V, but when I add the diode 1N4148 (with resistor)the output becomes positive +0.21V and when I add the capacitor to resistor and diode the output became -0.15v why this happen.

I know transimpedance opamp use the capacitor to stability but have no clue why the engineer who designed this circuit added a feedback diode. simulate this circuit – Schematic created using CircuitLab

Note: After while I found out that his bom was wrong and he is using a zener diode 1N821A over there, which change the whole story

• Is your photodiode upside down? I'm not intimately familiar with them but I believe they're meant to be operated in reverse bias, no? On that note, C5 seems backwards as well. Apr 4, 2019 at 0:10
• In real circuit there is no photodiode is just a current source like a photodiode which injects current to the negative terminal of opamp. And C5 is the way old engineer designed which I can not determine. Apr 4, 2019 at 0:14
• Are you sure about the polarity of diode and electrolytic capacitor? Apr 4, 2019 at 0:40
• Yes I am sure since I have the schematic and the board in front of me. Apr 4, 2019 at 1:03
• The photodiode as shown would sink current when illuminated, resulting in positive output voltage and reverse-biasing D1. If you're injecting current in to the inverting terminal, you're not testing this circuit in a way that reflects how it will respond to the photodiode. Apr 4, 2019 at 1:18

The purpose of the diode is probably to limit Vout. In this case, Vout cannot go lower than -0.7V approximately...

That would be my guess.

• I agree with this. If for some reason the opamp's output outputs a negative voltage then as soon as that voltage is about -0.7 V the diode D1 will come into forward mode and that will pull the negative input down as well.That will stop at the point where the voltage at the - input is 0 V as the + input is also at 0 V due to the negative feedback loop through the diode. But why would we want this? See my answer. Apr 4, 2019 at 7:40
• It's called a clamping or limiting diode. Apr 4, 2019 at 12:42
• But how will it clamp at -0.7v if we have feedback resistor parallel to it, Apr 4, 2019 at 14:45
• The feedback resistor has a really large value. Its purpose is to really slowly discharge the capacitor.
– Ben
Apr 4, 2019 at 14:59

Indeed as Ben answers, the diode limits the output voltage of the opamp to about -0.7 V. This works through the feedback loop around the opamp, the diode D1 will conduct as soon as the opamp's output has a lower voltage than the opamp's inverting (-) input.

So why is this needed?

Look at the schematic, I see a 10 uF polarized capacitor! unfortunately it is connected the wrong way round, the + pole should be connected to the output of the opamp. We want to avoid getting a too large negative voltage across that capacitor. Polarized capacitors aren't polarized for nothing, they get damaged if you apply a negative voltage for too long.

The diode D1 limits that negative voltage to about -0.7 V (assuming that the + of the capacitor is connected to the opamp's output) which the capacitor can survive.

• Not sure. There will be 0V at the positive side of the capacitor and -0.7V at the negative side of the cap. The voltage difference is 0 - -0.7V = 0.7V, still positive. should not be a problem.
– Ben
Apr 4, 2019 at 12:14
• @Ben You're right! The capacitor is placed the wrong way round in the schematic. Normal operation is: 0 V at - input and a positive voltage at the opamp output. Apr 4, 2019 at 12:18