I know that as the intensity of light increases the resistance in LDR decreases and thus the voltage decreases but then why the value that is shown on cloud is showing the opposite. What is the value that is taken as input at the A0 pin?
Hello! The Voltage is being measured across the High Value resistor that you have attached there. That’s why when the Intensity is increasing the voltage across LDR is decreasing whereas the voltage across the Resistor is increasing. And that Voltage is being given to the A0 pin which is being converted and shown in your result. Hope it helps!
Thanks this helped
Hi harshitmittal1999, as you know the resistance of the LDR is inversely proportional to the light falling on the device ,thus when the light falls the current flows between the pins reducing the potential difference between them . Example : at the beginning the one pin is 3.3v and analog pin is 0v ,after light falls on the LDR the A0 pin gets some voltage thus the net potential difference decreases ,this is the reason why you find this anomaly . Hope this helped
The entire system works on voltage division rule. The high resistance which is attached with the LDR acts as a voltage measurer. As the light intensity decreases the resistance of LDR increases , consequently the voltage across it also increases as a result of which the voltage across resistor decreases. The resistor is connected to the A0 pin which gives a measure of the low voltage or in other words the low intensity. In easier terms the intensity of light is directly proportional to the voltage across the high resistance which is measured through A0 pin.