I tested it in a completely dark room and the resistance keeps increasing after 1 mega ohm. Right now it has reached 5 megaohm. Why is that so?
1 Answer
The datasheet says that it is MINIMUM 1.0 Mohm after 15 seconds after removing the test light.
The test procedure isn't laid out explicitly, but it seems that they exposed the unit to a light of a specific intensity (1 foot candela) for 16 hours and then measured the resistance for light. They then shut off the light and measured again after 15 seconds. In those conditions you are guaranteed 1 Mohm. That doesn't mean that the dark resistance can't be higher, just that it won't be lower.
Additional tips from Spehro Pefhany's comment: You can limit the maximum dark resistance by putting a resistor in parallel to the LDR.
If you want it to top out at 1 Mohm, put a 1 Mohm resistor in parallel to the LDR. The parallel combination then has a combined resistance of just under 1 Mohm in complete darkness, and (assuming the 12 kohm max light resistance from the datasheet) a light resistance of 11.85 kohm.
-
\$\begingroup\$ Now it is almost 20 megaohm. \$\endgroup\$ Commented May 13, 2016 at 12:53
-
4\$\begingroup\$ If you want it to be lower, put a resistor in parallel. As JRE says the part is meeting (exceeding) the guaranteed minimum performance. \$\endgroup\$ Commented May 13, 2016 at 13:15
-
\$\begingroup\$ I actually want LDR to change linearly as possible with LED light in it up to 1M ohm \$\endgroup\$ Commented May 13, 2016 at 13:31
-
4\$\begingroup\$ @user16307 Then you bought the wrong LDR. Yours is specifically designed to work like the human eye, which is not linear at all. \$\endgroup\$ Commented May 13, 2016 at 14:27
-