# Light Dependent Resistor sensitivity

Hi everyone.
I've received my Arduino this morning and I'm already having some amazing results. I'm a sound artist and my electronics knowledge is next to none, however I'm surprised how easy it is to implement some very powerful interactivity features into my work! Top stuff!

Anyway, I have a question...

I'm experimenting with a Light Dependent Resistor I bought from Maplin:
http://www.maplin.co.uk/module.aspx?ModuleNo=35963&doy=17m7

Spec:
Min. resistance @ 10lux: 9k[ch937]
Max. resistance @ 10lux: 22k[ch937]
Typ. resistance @ 100lux: 7k[ch937]
Dark resistance after 1 sec.: 0.05M[ch937]
Dark resistance after 5 sec.: 0.15M[ch937]

It works, however the readings I'm getting in Pure Data (using Pduino) are of incredibly low values! Something like 0.001-0.020 when lit with flashlight from about 1-0.5 cm distance. I bump it up digitally (multiply by 1000) to get higher numbers, but then I'm getting horrible step increments. Is there a way to increase sensitivity of this component? Or is this a software configuration issue?
I'm using a 1k resistor in the chain. Could this be an issue?
Did I get a wrong type of LDR?

I'm eager to learn.

By the way, I used a potentiometer as well and there the problem is that as I rotate it, it remains at 0 and I only get values to change at the last couple of degrees. So it quickly changes from 0 to 0.956 or something. Hmm...

How are you connecting it?

for the potentiometer you should have
pin 1 to 5v
pin 3 to gnd

for the light sensitive resistor you need to put it in a voltage divider
(thanks doctronics!)
http://www.doctronics.co.uk/images/vdiv4.gif

while the resistor is in the light your reading will go up
and when its in the dark go down

the 9v just put in 5v slot and 0v to ground

Just do NOT apply 9V as in the drawing above this could be bad for your analog pin.

Apply 5V from Arduino and Ground from Arduino.

Just do NOT apply 9V as in the drawing above this could be bad for your analog pin.

Apply 5V from Arduino and Ground from Arduino.

MikMo, I think it will be ok as long as the LDR is ok (ie not short-circuit).

The minimum resistances of the LDR are about equal to Rbottom, so Vout wiil be about half of 9V - easily handled by the Arduino.

However, as you say connecting to the Arduino supply will work, but only give half scale.

Regards,

Mike

Thanks guys!

I think I've solved the mystery. It wasn't a component-related issue, I had it all connected the way you suggested. So I've decided to give SimpleMessageSystem a go instead of Pduino, just to see if it makes a difference...
Now I'm getting correct values! Both the LDR and the potentiometer now transmit values within a full range of 0-1024! 10-bit! Excellent stuff!
The only thing I'm not very happy with is latency (I guess that's due to value sampling rate or something) - if I twist the knob rather quickly, values jump in huge steps. Like 0-100-300-600-1000-1024 (6 steps). Is there a way to smooth value changes? I've implemented a workaround within Pure Data, but it's not very responsive (values change smoothly, but with a noticeable delay, so not ideal for real-time audio applications). Anyway, I guess I shouldn't be complaining. It's only set me back £20 to build this interface. I can certainly live with that...

Thanks for your help! Very much appreciated!

Any smoothing will introduce latency, it's a matter of balance. You can smooth with software Arduino Playground - Smooth or with hardware by putting a capacitor between ground and the analogue input.