I have 10 LEDs with different colors: blue, red, green, orange, yellow and each LED has a different Imax: 2mA, 5mA, 10mA, etc... up to 120mA (the last one).
The task is to get them at the same luminosity, by changing the current through the LED. This is the part when the photodiode comes in.
I`ve searched all datasheets of the LEDs and the whole light spectrum is between 420 and 675 nm. This is why i chose this photodiode: BPW21R.
I need a circuit, that uses this photodiode and provides me a maximum of 3v3 output (the analog pins i`m using are 3v3 tollerant), but he whole circuit is powered by 5V.
I will place the photodiode above 1 LED (it doesnt matter which) and i will save the **value** i read on the pin. Then ill move the photodiode above the rest of the LEDs and increase/decrease the current untill i get the same value on the pin (an error of 5-7% is okay).
PS: the LEDs are separated by walls + ceiling, so the light from one LED or the ambiental light won`t affect the measurement on an other LED.
So by applying 3v3 at the VCC of the OpAmp, the maximum output should be arround 3v3.
The only problem is that this photodiode, doesn`t have the same Spectral Sensitivity vs. Wavelength. I need to measure the intensity of the light of different LEDs (red / blue / green / orange).
Unfortunately this is the cheapest photodiode, and the one that has a wide wavelength response... and that`s all i can use, a photodiode + op-amps for gain etc...
I have 10 LEDs of different colors (red / blue / orange / yellow / green). Each LED has a different maximum current (from 5mA up to 120mA). My task is to measure the light intensity of each LED and controll the current so that they all have the same luminosity.
With a high impedance input, like an Arduino A/D pin, you can use a pretty simple circuit for the photodiode. Thus in the circuit illustrated the Arduino A/D would read voltage at the top of the resistor.
While it would be straightforward to adjust the current in your LEDs such that you get equal current response in the photodiode detector, it's not clear that's what you want. That is, the photodiode is less sensitive at the high and low end of the visible spectrum, so the absolute power out of the corresponding LEDs would have to be higher to to get the same response. If you truly want equal power output the sensor would need to be calibrated which is a non-trivial matter.
And how could i calibrate it? By trial and error? And if so, how would i start?
Fortunately, the Arduino is designed to make "learn by doing" easy.
What have you tried and what were the results? If you haven't tried anything, now would be a good time to start.
Keep in mind that the eye is a peak detector, and the analogWrite function is PWM, which controls only the average voltage, NOT the peak voltage and NOT the peak current. You always need current limiting resistors with LEDs.