Pins explanation - first iot project

In the first iot project that is light intensity monitoring system …LDR is placed between A0 and 3V3 pins and resistance is placed between A0 and ground . can some one explain why the componets must be placed in those pins and what is its purpose

thanks in advance

1 Like

As LDR is a light dependent resistor it will check the brightness of the light based on the brightness internal resistance will be changed as voltage changes.
The circuit is connected in series so LDR should be in series connection with the resistor 1 so it is placed between A0(to give the voltage based on brightness of light collected by LDR) and 3V3.
To make series connection Resistor is placed between A0 and ground.

thank you for your response .
can u please elaborate more on 3v3 pin and when there is already an internal resistance in LDR why do we require an additional resistor
thanks in advance

3v3 pin is a pin which supplies a potential of 3.3V. Now that if we connect a LDR directly between the A0 pin and 3.3V pin(which seems to be ur query since ur question was about the other resistor there), the potential difference across the LDR will always remain the same (3.3V). Now if we use another resistor, this potential gets divided and by determining this potential difference, we can determine the light intensity level.

1 Like

thank you …but .when potential gets divided how can we determine the light intensity ?

The resistance of the LDR varies with respect to the light intensity falling on it. So as resistance varies the potential across the LDR also varies(Voltage Divider) and this change in potential is directly proportional to the light intensity and this is being captured by the A0 pin.