Pages: [1]   Go Down
Author Topic: LDR and his scope  (Read 791 times)
0 Members and 1 Guest are viewing this topic.
Deventer
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I am new to the Arduino and the sensors and all stuff. But had some stuff at scool years (YEARS) ago... hehe

I want to make a beamerlight sensor. To test the opacity of the beamerlight. If the light is to low, the light has to be changed.
I made this with my Arduino starters kit. I used the LDR and the analog input and using Processing on the PC to read out the analogread value of the sensor. So this is between 0-1023. My problem is that the value is between 20 and 100 of the sensor. This is very small comparing to the 0-1023 he can read. So i want to boost up or wathever to finetune the LDR to get between the 0-1023 when i sence the beamerlight. I know i can use a opamp...... but how?
Can anybody help me?
Would be nice......

Marcel
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8477
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can reduce the reference voltage, see analogReference(), select an external reference and apply a much smaller voltage to the AREF pin.

You can also select the internal 1v1 reference which may be closer to your needs.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Or you can change your sensor to a photo-diode or photo-transistor (I'm not sure about the difference!). It would hook up slightly differently, but not much. Plenty of help out there on the web.

Why change? Better response, wider "swing" of readings for same light level difference.
Logged

Deventer
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reactions.....
I think i have to use an OPAMP to finetune the voltage on the inputpin.

Can somebody help me with that?

Marcel
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

analoguereference would be an order of magnitude easier and cheaper.

Code:
analogReference(INTERNAL);

in setup if you have a Uno/Duemilanove

Or adjust the voltage divider circuit with the LDR in.  You certainly don't need an opamp.
« Last Edit: May 01, 2011, 11:05:17 am by pluggy » Logged


Milan, Italy
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

use the function map() in addition to analogReference
Logged

Deventer
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

thanks....

The map function is not what i want. It maps only values, but don;t spread the it. The sensor doesn't get more sensitive in the area I want.

I gonna try the analogref functions, thanks for that!

But.....
i did some research on the web today and know now that a ldr is not the best device(sensor) to do this job. Temperature does react on the value.....
So this is a better option: tsl230r (IC wich read the light and send a frequency value to the arduino).

Hope that works better....


Marcel

Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
IC wich read the light and send a frequency value to the arduino

Sparkfun.com has one...

http://www.sparkfun.com/products/8940

$6
Logged

Pages: [1]   Go Up
Jump to: