# How do I connect a photodiode?

I'm trying to design a circuit to measure the ambient visible light (380nm to 750nm). Accuracy isn't too important.

I've been looking at photodiodes, but I'm not sure how to connect them up.

I need the following requirements from my circuit:

• low power
• low accuracy
• low cost photodiode (e.g. this on digikey)
• AD convert signal for uC

I was thinking of some sort of voltage divider with a photodiode in the circuit? Then connecting this to an op amp, before going to the AD pin of a uC.

• Keep in mind that the SFH3410 has been discontinued since March 2005. May be hard to get. Digikey doesn't list a price either. You can probably only buy the whole stock. Jun 11, 2012 at 14:26
• @stevenvh the replacement is simply a RoHS-compliant equivalent of the same item. Same code but with "-Z" appended. Feb 16, 2013 at 4:35

Photodiodes are easy. You connect them reversed to the +5V (cathode!) and the anode to a resistor to ground.

If light falls on the diode it will cause a current through the resistor, which will cause a voltage across it. So you can choose the sensitivity by choosing a value for the resistor. You'll have to make sure that there remains enough voltage drop across the photodiode.

Note that the SFH3410 is a phototransistor, you use them in the same way, collector to +5V, emitter to resistor. They have a much larger current, in fact they contain a photodiode, whose current is amplified by a transistor. (Nice product, that SFH3410. I've also used it.)

This is the most important graph from the datasheet. It shows current as function of luminosity. Note that both scales are exponential. 10 lux is twilight, 1000 lux is a brightly lit desktop for precision work. Direct sunlight can reach 100 000 lux. So if you want to measure inside lighting you could use a 12k$\Omega$ resistor, which will give you 3.6V at 1000 lux. The SFH3410 will work well up to 4.5V output at a 5V power supply.

• Since accuracy is not needed, trans-conductance amplifiers are not needed, right? Jun 11, 2012 at 9:46
• @abdullah - with opamp? You'll typically connect the photodiode to V-, and I don't know if he has that. Jun 11, 2012 at 9:47
• Yes, I've meant op-amps, and trans-impedance :) I shouldn't talk about subjects that I even don't even know their name. Jun 11, 2012 at 9:55
• @abdullah - you got the "trans" right! ;-) The name comes from the transfer function, output/input. That's a voltage output divided by a current input. So V/I = impedance. I/V (like in MOSFETs) would be transconductance. Jun 11, 2012 at 10:06
• Hey, many thanks for your very useful reply. I would like to use an op-amp if possible? Jun 11, 2012 at 11:09