Display Lux with LDR

The LDR im using is a MLG4458 with the following specs:

Light Resistance @ 10 Lux(Kohm) = 100-200
Light Resistance @ 100 Lux(Kohm) = 20-35
Dark Resistance @ (Mohm) = 20

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);
}

Not easy because of two things:-

  1. the large range given for each light level suggests you will need to calibrate individual sensors.
  2. the resistance to light reading is not linear, so you need to build up a look up table to convert it

Without more data or a calibrated light source or a calibrated light meter I don't think you can do it.

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.

The LDR im using is a MLG4458

Have you got a link to the data sheet, I can't find one.

Grumpy_Mike:

The LDR im using is a MLG4458

Have you got a link to the data sheet, I can't find one.

It has specs for alot of different LDR's in there

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.