Hi guys, I am relatively new. I am trying to use a photodiode ( 2 pins) to read a voltage depending on the amount of light hitting the photosensitive surface. I have tried to use various examples on the internet.
The photodiode I am using is the OSD15-E. Its nothing crazy and im using it because it has a peak sensitivity in the visible range which is what i want. Both legs are the same length, but i think i know which the cathode/anode.
What ive tried so far is connecting anode to ground, 5V to the cathode and a resistor which connects to the 5v and the cathode. I then have a wire connecting the cathode (which has 5v and resistor to it) to the analog pin 1. Its essentially this.
Essentially what i get it one constant value on my serial monitor. The value depends on the resistor i use and ohms law.
I measure the voltage drop across the resistor and whatever is left shows up on my monitor. i.e. if its 4.3 V over the resistor. Ill have 0.7 continuously coming up on my screen.
Maybe it's not the part number you think it is: perhaps it's not working in the visible spectrum as you thought. Try it with a tv remote or some other IR emitter.
The photodiode works totally fine by itself. If i take out the photodiode and have it independent from everything else, i can put a meter across the legs and obtain a voltage of about 0.3V. THis makes sense as it in ambient light.. I then shine a high intensity light at the photodiode and it goes up to about 0.6 V. Clearly it is working as a photodiode, but not while its in my small circuit.
also if i cover the sensor the voltage just drops out to zero as expected
I think the problem is that the arduino analog input is just not sensitive enough to detect the difference on your photodiode. The input impedence expected for the ADC would usually be measured in Ks, not Megs. I think you're going to need an opamp.
The photodiode works totally fine by itself. If i take out the photodiode and have it independent from everything else, i can put a meter across the legs and obtain a voltage of about 0.3V. THis makes sense as it in ambient light.. I then shine a high intensity light at the photodiode and it goes up to about 0.6 V.
OK, the photodiode is working in photovoltaic mode -- in that case the end connected to the negative probe of the multimeter is the banded end of the diode (the cathode). The photoinduced current flows in the opposite direction of the diode symbol.
Why not just use the photodiode in that mode, with a 1.1V reference? Connect the banded end to ground and the other end to the Arduino input. I suggest to add a 100 nF capacitor in parallel to the photodiode to lower the output impedance for the ADC. You should try a ~ 10 megohm resistor across the diode, depending on the lighting conditions.