Well, I'm working on a project, an arduino powered night light..Just for my first try with arduino.
I've seen lots of tutorials using the LDR..But I've found them connecting a pin to 5V..But i'm using a 9V power source..So will i connect that pin to 9V or to 5V and please, i wanna know why.
Also, I've found some people using 10 Kohm resistor and others using 22 Kohm resistor..So which one is better to use?
Here is the LDR that i will use.. http://ram-e-shop.com/oscmax/catalog/product_info.php?products_id=1185
The LDR would be connected to a series resistor. The junction of the LDR and the resistor goes to an analog input.
+5---- LDR------resistor-----GND
|
|______analog input
The dark resistance can be measured with a DVM with no light falling on the LDR.
The light resistance is the measured value of the LDR with light on it.
The value of the resistor depends on the values read from the LDR mentioned above.