# Measuring UV light with an photodiode - Is my component selection correct?

I have the following circuit to measure the UV A power with an OpAMP, a photodiode and an ADC:

I have simulated the circuit in CircuitLab and it looks okay, but I want to hear some additional feedback about the component selection to be sure that the circuit will work as expected. The circuit should output ~+150 mV when the max UV A power of 6 mW is measured by the photodiode and ~1.65 V when no light is available. The whole circuit is powered by a single 3.3 V supply.

Does this circuit fit into my requirements or does it contain an error?

• I'm guessing that CircuitLab either doesn't take diode capacitance into account, it doesn't take op-amp bandwidth into account, or both. I expect that in real life it'll oscillate because of the diode capacitance handing off of the op-amp's inverting input. If so, you'll need some capacitance in parallel with R6 to stabilize it -- and that will slow down your circuit. Aug 27, 2022 at 14:53
• Can you show your design equations, so someone checking doesn't have to look up all the relevant numbers? Aug 27, 2022 at 15:01
• it depends on your specs for tolerance errors from 3.3V and R values. You can eliminate IC6B by inverting the diode with a single supply as it maintains 0V across it with a positive output at 3V/6mW/cm^2 Aug 27, 2022 at 15:01
• The 1st error is lack of design specs for sensitivity, and range tolerances. Do you really want 0 at Vdd/2? Do you know std. R Values are 2.70 and 2.74? Do you have any other requirements for noise? rail-to rail? . Also it is power density in mW/cm^2 Other than the inverted diode voltage, and C ratio gain effects, the component choice of the diode is correct. Aug 27, 2022 at 15:36
• Thanks for your comments. I have updated my question Aug 27, 2022 at 16:18

That means the op-amps are also powered by the same voltages; 3.3 volts and 0 volts.

does it contain an error?

It won't work because the photocurrent of the photodiode will try and raise the virtual ground of the first (left hand) op-amp and, the output of the op-amp would have to produce a negative voltage (lower than 0 volts) to keep the virtual ground at 0 volts. This can't happen without the op-amp having a negative power rail: -

But, you could turn the photodiode round and that stands a chance of working. And, you probably don't need the 2nd stage op-amp either.

Does this circuit fit into my requirements

Well, your requirements are somewhat defined by what the simulation tells you is produced and, given that this looks unlikely to be correct, I don't think your requirements are very well defined.

And, as Tim Wescott points out in a comment, you will probably need a few pF across your feedback resistor to cut-down on noise and instability.

• Thanks. I have updated my question. Aug 27, 2022 at 16:18
• @Kampi once an answer is produced, you cannot just incorporate the good information it gives you and reformat your question. I'm going to roll-back your question to where it originally stood. I also suggest that if you are recognizing the info in my answer as useful, you upvote it. Aug 27, 2022 at 16:22
• If you are going to do anything to your question you need to do it carefully so it doesn't make my answer look wrong. If you have a new train of thought given what I have said in my answer then please mention it in a comment and I'll find a way of revamping your question with this new information whilst keeping the original question still current and therefore, my answer still current. Aug 27, 2022 at 16:26
• Thanks. I rotate the diode to remove the negative current and remove the second OpAmp. Aug 27, 2022 at 16:29
• That's a good start and, I seem to remember that your modified question mentioned +/- 2.048 volts but, without a negative and positive power rail, this can't be done. Aug 27, 2022 at 16:32