Ldr monitoring system

Hello sir i have a doubt regarding connections of ldr circuit
Is it that one lead of ldr should be in A0 pin and other in 3v3
And one leg of 10k resistor in gnd and other leg in A0 pin


Yes, you are right. This way the resistor and the LDR get connected in series. The reading is measured on A0 pin which in turn is the voltage across the LDR converted to bytes internally.

i did the same connection to the bolt module and i got the readings as in the image.when i hide the LDR with my finger then it is showing less value, its fine. but when i put my setup in the sunlight, under torch of my iPhone it is showing 1.02 thousand value constantly even i change the lighting conditions.

It is probably because ldr is an analog sensor of 10 bit value in which the data can fall between 0-1023. The ldr provided might be having a maximum set to 1.02 thousand. Therefore, light falling on the ldr beyond a certain limit is read 1.02 thousand only.

sir please use 330ohm resistor instead of 10k ohm and check the valves.I used 330 ohm and i got valves with in the range.

@Nikhil The range of the LDR sensor with which it can measure the intensity of the light is limited. It will not be able to tell the difference between bright sunlight and low sunlight as sunlight is a powerful source of light.

Therefore, please conduct the experiment indoors under normal lighting conditions and remember to use 330 Ohm resistor.

But Sir, even I faced the same problem as @Nikhil faced.But then I even tried the method you said…i.e) I used 330 ohm resistor,but still I get the same 1.02 thousand values,and if I close the LDR sensor with my finger,the value is changing else it remains constant.

@dhivyaassn It seems that you are giving too intense a light to the LDR.
Try doing the experiment in a dimly lit room.

Thank you for your suggestions:) @shoeb.ahmed

1 Like

Sir I got trouble in rebuilding that product. Two days before I build the product it was working properly and was providing me the output, Today it is not working. What to do ?

Yes,you are right that is how you do it.

@deepankarrai99 What error are you facing? Please elaborate and provide any screenshots if required.

Yes you are right
you should also try using 330 ohms resister
it gives some better results