Photoresistor VT90N2 LDR

Post date: May 08, 2015 2:59:23 AM

P

There is a somewhat rough formula that relates the resistance of an LDR to the light in Lux. That is:

Rldr=500/Lux, or

Lux=500/Rldr (in kOhm)

as Rldr is related to the voltage measured over it, reading the Voltage over it, can be used to calculate the Rldr and thus the Lux level

If the LDR is the lower part of a 5 Volt Voltage divider and a 10kOhm resistor the upper part, the Voltage will be:

Vout=(5/(10+Rldr))*Rldr

Vout=5*Rldr/(10+Rldr) (remember: multiplication before division)

as we do not measure a voltage, but a value between 0 and 1024, every step can be defined by 5/1024=0.0048828125.

=> Vout=Analogreading*0.0048828125

as Rldr=(10Vout)/(5-Vout) (remember Rldr is expressed in kOhm)

=> Lux=(500*(5-Vout))/(10*Vout)

=> Lux=(2500-500*Vout)/(10*Vout)

=> Lux=(2500/Vout-500)/10

=> Lux=(2500/((AnalogRead*0.0048828125)-500))/10

info from following article:https://arduinodiy.wordpress.com/2013/11/03/measuring-light-with-an-arduino/