Ive got it connected to my arduino with a 39K resistor (LDR from 5v to PinA1 and 39K from GND to PinA1).
The 39K gives the best light range, giving analog readings of around 12 in a dark room with only the TV on and gives around 970 when i shine a very bright light source directly into the LDR. Now i want to display the LUX instead of analog values. Any help?
int InteriorLDR = 1;
int InteriorLDRreading;
void setup () {
Serial.begin(9600);
}
void loop() {
InteriorLDRreading = analogRead(InteriorLDR);
Serial.print("Interior - Analog - ");
Serial.print(InteriorLDRreading);
Serial.println("");
delay(2000);
}
If you know the actual technology used in the LDR you might be able to research an equation to relate light to resistance - this will involve several assumptions but might give good enough results. If I remember rightly the common CdS LDRs work by the light generating electron-hole pairs in the CdS (which is a semiconductor) which make it more conductive.
You might be able to calibrate the sensor using a PWM controlled LED light source (I think LDRs have a slow response and will see an PWM LED as effectively a continuous source). If not calibrate you should be able to check the validity of any equation you find.
Looking at the test conditions, 2 hours illumination at 400 - 600 LUX and then testing at 100 and 10 it doesn't sound the most accurate of sensors.
I am not sure you can do anything useful without calibration. Can you get hold of a photographic exposure meter these were sometimes calibrated in LUX.