In the project Light Intensity Monitoring can I make the hardware connections as follows

- Place 10k ohm resistor in A0 and 3v3 pins.
- Place LDR in A0 and GND.

As the circuit shown in training module had the connections as above.

I have tried this but if I connect it this way, the output I’m getting is around 1000 for all intensities of light. But if I make the connections as the way mentioned in the course, I get the correct output. Can someone explain the reason for this?

Yes bro Definitely. Let me tell you about circuit, if we connect LDR in A0 and 3v3 there will be a voltage drop across LDR according to its resistance and it is connected to A0 which convert analog signal to digital we ll get correct output, Here note that resistance does play role for the case if, suppose that there is too much light then resistance of LDR will be very low so external resistance plays role to balance circuit. Current comes from A0 and goes to GND through this resistance always.

Now come to the scenario which you are talking about if we connect resistor in between 3v3 pin and A0, then there will be a constant voltage drop so A0 will always show a constant data no matter how much light is there or how much dark is there.

If you didn’t understand then make figure of this circuit on paper by your own then you will understand very clearly.

Thank You.

When I was doing this project, even I had the same doubt as you and I tried connecting resistor in A0 and 3v3 pins, LDR in A0 and GND pins. Even I got the output around 1000 for all intensities of light. After seeing these results, following is the conclusion that I came to.

Since the resistor and LDR are in series, changing their order does not change the voltage drop across them. The reading of light intensity depends on voltage at A0 pin. **Higher this voltage, higher the light intensity**. The device can measure a maximum of 1000 Lux of light intensity.

I used a 300 ohm resistor. I googled the internal resistance of a typical LDR and I found that it was in the range 500 ohm at bright conditions to 2000 ohm at dark conditions. Lets assume that this is the range for our LDR also.

Lets say that for circuit connection as given in training module, the output reaches 1000 Lux when resistance of LDR is 500 ohm at bright conditions.

**At bright conditions**: Total resistance = 300 + 500 = 800 ohm. Voltage = 3.3V. By ohm’s law current = V/R = 0.004125 A.

For circuit connection in training module: Voltage drop across LDR = 500 * 0.004125 = 2.0625V

So voltage at A0 = 3.3 - 2.0625 =1.2375. Therefore for voltages at A0 above 1.2375, the output

is 1000 Lux.

For your circuit connection: Voltage at A0 is now 2.0625 which is greater than 1.2375. So the

ouptut is 1000 Lux.

**At dark conditions**: Resistance of LDR is now 2000 ohm(according to our assumption). Current = V/R = 3.3/2300 = 0.00143 A

For circuit connection in training module: Voltage drop across LDR = 2000 * 0.00143 =

2.86V. So voltage at A0 = 3.3 - 2.86 =0.44V. Since 0.44 is lesser than 1.2375, output is less

than 1000 Lux.

For your circuit connection: Voltage at A0 is now 2.86 V which still is greater than 1.2375. So

the output is still 1000 Lux.

So we can conclude that the output for your connection should be 1000 Lux for all light intensities.

Pardon me for the long answer but this should make things very clear.

Thank you