LDR showing constant value

@rajputsafal27

Are you using the 10k ohm resistor in the above circuit?

No i am using 330ohm resistor which came with the bolt IOT kit.

Hello!

I think the resistor that was used in this case was the one with brown black orange color code as mentioned in the hardware connections part in the course. I too had the same problem having a constant value of 1.02 at every single refresh but when I went for the one other resistor, the Orange orange brown one (also provided in the kit) just to explore its effects on the circuit, I was successfully able to witness some noticable changes(values shown were in between 800-900) in the values on refreshing the table.

Hope this was helpful :slight_smile:

1 Like

I too have used that one included in the kit orange orange brown code resistor.

I think your graph is a straight line because you did not vary the intensity of light in your room, try putting different lighting in front of your sensor and I hope it will give some variations in your graph.

Well this is very obvious I tried varying the intensity with Mobile flash and even in sunlight

@rajputsafal27

Can you use the 10k ohm resistor as the as per the instructions?

image

I’ll get back to you on this by tomorrow EOD if the issue still persists. We might have to get on a screen sharing session.

Did you try replacing the ends of the “Resistor”
For example A_B is the terminal currently, try doing B_A

Hope this helps :slight_smile:

I have used the 10K ohm resistor and made the connection to breadboard this time the value changed from 5 to 6 but then again it droped to 5.
Refer the graph below

Please make sure all connections are taken good, and if you don’t mind you can make connections again and deploy your configuration. Please don’t put it in one place…Change them according to the light variation places

This might me happening because you are not exposing the LDR to different light intensity and are keeping it in same light intensity throughout. Try changing the angle of LDR to light source and you will observe different values.

HOLD THE LDR ABOVE LIKE SHOWN IN THE IMAGE BELOW AND NOW CLICK ON THE BUTTON PUSH DATA TO CLOUD

The connections should be like this :point_down:
3.3v - LDR - a0 Pin - 330 - gnd.

  • If u are getting the constant value you better place your finger on LDR sensor and collect the data and remove your finger and do this for some time u can see the changes in the graph.
  • or LDR must be focused to a bright light for his case u can turn on your flash on your moblie phone for better experience you can switch off lights in your room and focus the flash on LDR. hope u can definetly find the solution for u problem.

thank you

Don’t know if this is the cause of LDR failure, but your circuit may have a basic flaw: Too much current can flow.
You may have to make the circuit again and rewrite the code, also because with a lower supply, your circuit will be less sensitive.

The problem may be with your lighting conditions. Try reading values in a completely dark room and see what happens. This may give you an idea whether the reading of the LDR sensor is changing or not. Maybe the lighting conditions in the environment where you are testing the module provides a light stimulus to the sensor which is giving you a corresponding value in the graph.
Try going for dark environment instead.

@rajputsafal27 Hi please check the connections carefully LDR one leg to 3.3v and another leg at analog pin A0

Also it is 10k OHM not 330k OHM where one leg to GND and other pin to A0

Input device A0 is correct

https://trainings.boltiot.com/courses/429176/lectures/6647171 check this link for any doubts.

Do reply when problem gets solved.

hello you need to make few changes to get desired output
1)use 10k Ohm instead of 330 Ohm we most probably use high resistance resistors for voltage dividing circuit so change it
2)then check most probably it works if not then use 3v3 pin instead of 5v that would be most probably better

i hope your Query will be get solved by this
have a great day!!

try 3v3 pin may be that could solve.

Use breadboard for connections. Try switching btween the resistors. And also try placing your finger near or above the LDR can see a small change. But have to wait aleast 5 min to results show Up.
Hope it Helps!!

try mobile flash and cross check once