9
\$\begingroup\$

I'm trying to use a photodiode to measure light levels via an ADC on an ATMega168. I've got the microcontroller code working properly (measuring values on a pin and reporting it as an led brightness) but I'm having trouble getting the photodiode to report a voltage dependent on light levels.

I see that I could accomplish this with an op amp (here) but I'd like to be able to do this without an op amp if possible. I have a 5 volt source and I'd like to make the photodiode spit out values between 0 and 5 volts. Is there a crafty circuit I could use for this purpose that doesn't require an amplifier? I'm asking this question because I'd like to know how to use a photodiode for this purpose (I don't want to use an LDR). Thanks!

edit

Oh yeah, here is the datasheet for the photodiode I am using.

\$\endgroup\$
14
\$\begingroup\$

Important notice This is an IR diode: Daylight blocking filter matched with 870 nm to 950 nm emitters. IR photodiodes usually have an opaque black package, while visible light photodiodes are in clear packages. You could look for a photodiode (a phototransistor is even more sensitive) with an eye sensitivity curve. I remember having used the SFH3410 from Osram here.

Then the good news: a photodiode or phototransistor acts as a current source, so a series resistor is sufficient to convert the current to a voltage. In your datasheet the graph of figure 3 is the one you need. The reverse current varies between 1uA and 100\$\mu\$A. A series resistor of 10k converts this to 10mV - 1V. You could increase this to get a higher voltage, you'll have to experiment with light levels and resistor value to achieve a full range of 5V. Also keep in mind that the input impedance of the ADC is parallel to the measurement resistor, reducing sensitivity.

The graphs below are from the SFH3410's datasheet. If you keep in mind that you need a \$V_{CE}\$ of at least 0.5V (right graph), you'll be limited to 4.5V output from a 5V power supply.

alt text


Further reading:
SFH3410 application note

\$\endgroup\$
  • 1
    \$\begingroup\$ This is photoconductive mode. Can also use photovoltaic, basically open-circuit, which is what the OP's link describes. Photoconductive is faster as the relatively large forward bias 'sweeps' the injected carriers away, but also noisier. \$\endgroup\$ – tyblu Dec 10 '10 at 20:42
  • \$\begingroup\$ I am not so sure this would work.. These photodiodes are very sensitive however if you have 100uA, you have lots of light. How about nA range, than it would be difficult to measure anything. \$\endgroup\$ – Frank Aug 13 '11 at 10:27
  • \$\begingroup\$ @Frank - I used the SFH3410 for indoor light measurement. 10 lux is already a very dim room, 1000 lux a very brightly lit room. (Moonlight: 1 lux; direct sunshine on a bright summer's day: 100 000 lux.) For nA range you wouldn't only measure little, but also see very little :-) \$\endgroup\$ – stevenvh Aug 13 '11 at 10:59
  • \$\begingroup\$ @Frank - BTW, I used the sensor for a constant light PID control system, which happened to work perfectly over the 5 to 1000 lux range required by product management. \$\endgroup\$ – stevenvh Aug 13 '11 at 11:39

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.