Even without any connection, I get the values around 250-300. adding LDR to the pin, doesnt change any values. However, when I try to gnd the analog pin or, when i try to connect it to Vin, I get the values 0 and 1023 respectively. Cld someone please suggest.
Thankyou.
1 end of the ldr is connected to the A0, and the other end to the ground. Both with and without this ldr connection, the analog pin reads the value of 250-350
I will try to connect the 10k resistor from the same pin to gnd. Could you please let me know y is that needed?
It is needed to convert the change in resistance of the sensor into a change in voltage that can be measured.
The analogue input can only measure voltages not resistances.
Because the input is floating and picking up interference that is giving you a value, it is how electronics works and applies to digital inputs as well.
Grumpy_Mike:
It is needed to convert the change in resistance of the sensor into a change in voltage that can be measured.
The analogue input can only measure voltages not resistances.
Hi,
Sorry for the late reply. I was doing some research on it, and I just understood the concept of a pull up, pull down resistor. So basically my setup should be like a pull up resistor, having the LDR as a switch. one end of the LDR and the Resistor should be connected to the analog Pin. Is this rite?
I have 6 ldrs which works with 6 pull up resistors. Is it ok, if I give the the same supply to all these 6 (Analog pins will be different though).. This will work!!
(I know this will work.. Not ready to spoil my board!! Just double chking)