Digital readout from photodiode

HI, I have a basic opamp question. I want to read out an IR led on my power meter. I know, that is a recurring topic and I can just look at the other tutorials.

What bugs me is: everybody uses an opamp an as a transimpedance amplifier for that. Before I saw those, I sat down myself and came up with the attached circuit (current source==PD, and I would possibly add a C at the inverting input).
With the given values, it should (and does, in the simulator) switch at 500nA. The threshold can be easily set with the resistor on the non-inverting input.

Why is that apparently not a good way to get a binary signal from a photodiode, as nobody is using that but instead the TIA even for digital sensing.
One argument I see is that it cannot be combined with a Schmitt trigger, but in most projects none is used anyway.
Speedwise, both designs have to deal with the input impedance of the opamp over a fairly large resistor, but I guess that is in the p...nF range ...

What am I missing?

Screenshot_20230131_174246-1

Transimpedance amplifiers are the preferred solution for reasons described in this excellent overview.

1 Like

I get Unauthorized on that link, but is it because the voltage response that I force by driving it through the fixed value resistor is less linear than the current response to the low impedance virtual ground?

The link was to a PDF file (attached). It should answer all your questions, and probably some you did not think about.

photodiodeamplifers.pdf (495.8 KB)

The trick to measure photo current is to short circuit the photo diode.
No voltage across the diode gives a linear photo current.

The photo diode tries to generate a (negative) voltage/current with light.
A transimpedance amplifier fights that with an equal and opposite (positive) voltage/current.
You then can then measure the efford of the opamp.
Leo..

I am so lost with this explanation (but I am not the OP).
"short circuit the photo diode" - with a wire? No voltage! What do you want to measure than?

photo diode "tries to generate a (negative) voltage/current..."?
You are right in terms: a photo diode is used in the "opposite" direction (in current blocking mode). The more photos - the larger the leakage current. But it is not a negative voltage or current, all still the same direction.

And because of fact that we measure the leakage current (which is very tiny) - we need this impedance conversion ("transimpedance", "transducer").

The value you measure is still an analog signal. In order to convert into a digital signal (as 0 or 1) - you need a Comparator: an OpAmp which will "compare" the input voltage with a threshold: with a loopback it jumps to the "saturation state": if above, to full 1, below to 0.

It sounds to me easier to do this:

  • instead of a photo diode - you use a photo resistor
  • this one sits in a voltage divider
  • and you use an analog ADC input to measure the voltage
  • the SW decides which value means 0 or 1

A photo diode needs for sure an OpAmp, which can act also directly as a Comparator (not just as an analog impedance transformation with still analog out).
A photo diode cannot be directly used on an MCU pin - but a photo resistor could.

Haha, no.
Maybe the wrong words.
The fact that the opamp in a transconductance amplifier tries to eliminate voltage buildup across the diode with an equal and opposite current seems as if the diode is shorted by the opamp.
There is a constant zero volt across the diode, independent of illumination.

No, in this case in current generating mode. A photo diode is just a mini solar cell.

I suppose you understand you can safely short out a large 12volt solar panel with a DMM set to 10Amp current measurement.
Leo..

Try anode to analogue pin and cathode to ground.
The MCU will return an analogue value corresponding to about 0.75volt.
Leo..

I strongly recommend reading the very clear exposition of photodiode properties and intricacies of TIA design, attached to post #4.

1 Like

Thank you (I think I understand what was written there and what I have posted, provided ...).
I STRONGLY recommend to behave kindly (and polite, not using harsh words against anybody else you have never met)

Thank you for your "nice" response (I tried to help with "my" understanding/knowledge, if you think you are "only the king" - keep going. Good bye).

Each has its own strengths and weaknesses;

Photoresistors are less sensitive to light, and (as manufactured) less well characterised. The Adafruit documentation emphasizes that each photocell will perform differently due to manufacturing and other variations and reaffirms that photocells should not be used to precisely measure light levels (and each photocell requires individual calibration).

By contrast the responsivity of a photodiode can be very precisely characterised.

The photoresistivity of any photoresistor will also vary widely depending on ambient temperature.

Photoresistors also exhibit a certain degree of lag between exposure to light and the subsequent decrease in resistance, usually around 10 milliseconds. The lag time when going from lit to dark environments is even greater, often as long as one second.

They do have advantages - mainly that their spectral response is in the middle of the human sensitivity.

Thanks, also for the lengthy discussion, as I missed post #4 before. :slight_smile: I think I got it.

And useless vis-a-vis exposure to IR.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.