# LDR breaks over time what to do?

http://cactus.io/hookups/sensors/light/ldr/hookup-arduino-to-ldr-sensor

I have the following circuit which was running for a long time but at one point something broke and it started producing high values such as 4133 or 30412.

I used the recommended 10K pulldown resistor, although some other guides recommend 100k this setup was working for me for a long time.

What I use LDR is an unknown brand, something cheap chinese what you can pickup for arduino kits so I checked a generic data sheet:

Cell resistance
1000 LUX     400 Ω
10 LUX       9 kΩ
Dark           1 MΩ


My measurements show something similar. If I put my finger on the LDR the dark resistance is around 0.3 Mohm and when I point a strong flashlight to the LDR the resistance goes down to about 800 ohm which seems to be normal for me.

While the circuit was working properly it always produced values from 0-1023 and dark usually meant under 200.

What can cause this?

• These values have nothing to do with the LDR. If it was totally shorted or open the min/max values that you can properly "read" with "analogRead" are between 0 and 1023. So my bet is that there is something wrong in your code. (unless these numbers are after some sort of mapping function..) – Wesley Lee May 6 at 7:46
• I don't know what to make of the thing you copied from the datasheet, use the preview to make sure the information is presented as intended. – pipe May 6 at 7:52
• @John: I tidied up your table as best I could. Please check that it now shows what you intended. – Transistor May 6 at 8:02
• My code is as simple as analogRead(A0) and it worked for years so I just don't understand how this broke. The sensor was outdoor so I found some other post that these might break from outdoor use over time but the readings looked fine with a meter so I don't think the LDR is faulty. – user213858 May 6 at 8:13
• "My code is as simple as analogRead(A0) ..." So how are you reading the values of 4133 or 30412? You must have code for that. – Transistor May 6 at 9:21

Please edit your question to include the essential parts of your code to show the configuration, the analog read and how you are displaying the ADC value. (Use the {} code button to format the code properly and use the preview below the editor to make sure it is indented correctly before submitting.)