Pages: [1]   Go Down
Author Topic: Light Dependent Resistor sensitivity  (Read 2944 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Many thanks in advance!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

California
Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
42 The answer to life, the universe, & Everything
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you connecting it?

for the potentiometer you should have
pin 1 to 5v
pin 2 to analog in
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
Logged

42 is the answer, but what is the question?

http://www.nerdtests.com/ft_nq.php
[img]"http://www.nerdtests.co

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: July 18, 2008, 05:01:42 am by MikMo » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 207
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
« Last Edit: July 18, 2008, 11:15:19 am by BigMike » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 631
Posts: 34504
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any smoothing will introduce latency, it's a matter of balance. You can smooth with software http://www.arduino.cc/playground/Main/Smooth or with hardware by putting a capacitor between ground and the analogue input.
Logged

Pages: [1]   Go Up
Jump to: