{"product_id":"ldr-light-dependent-resistor-20mm","title":"LDR – Light Dependent Resistor 20mm","description":"\u003cp\u003e\u003cspan\u003eExtra large photosensor for detecting the presence and relative strength of light.\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2\u003eDescription\u003c\/h2\u003e\n\u003cp\u003eThis extra large 20mm (3\/4″)  LDR (Light Dependent Resistor) is also called a photoresistor.  An LDR is a resistor whose resistance changes with the amount of light striking it.\u003c\/p\u003e\n\u003ch2\u003ePACKAGE INCLUDES:\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e20mm LDR (Light Dependent Resistor)\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003e\u003cstrong\u003eKEY FEATURES OF LIGHT DEPENDENT RESISTORS:\u003c\/strong\u003e\u003c\/h2\u003e\n\u003cp\u003eAs the strength of the light falling on the LDR increases, the resistance of the LDR gets lower.\u003c\/p\u003e\n\u003cp\u003eIt is typical to put the LDR in series with a resistor to create a voltage divider and feed that output to an analog input on an MCU.  The output will be a lower voltage when no light is striking the sensor and the voltage will increase as the light intensity increases.\u003c\/p\u003e\n\u003cp\u003eThese can be used in a variety of applications such as monitoring a pilot light, night light control, auto chicken coup door opener or anywhere that you want to detect a basic threshold of light and take some action.\u003c\/p\u003e\n\u003ch2\u003e\u003cstrong\u003eOur Evaluation Results:\u003c\/strong\u003e\u003c\/h2\u003e\n\u003cdiv id=\"attachment_4823\" class=\"wp-caption alignright\"\u003e\n\u003ca href=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic.jpg\"\u003e\u003cimg decoding=\"async\" aria-describedby=\"caption-attachment-4823\" class=\"wp-image-4823 size-medium entered lazyloaded\" src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-300x225.jpg\" alt=\"LDR Photoresistor Schematic\" width=\"300\" height=\"225\" data-lazy-srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-300x225.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-400x300.jpg 400w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic.jpg 800w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-768x576.jpg 768w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-249x187.jpg 249w\" data-lazy-sizes=\"(max-width: 300px) 100vw, 300px\" data-lazy-src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-300x225.jpg\" data-ll-status=\"loaded\" sizes=\"(max-width: 300px) 100vw, 300px\" srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-300x225.jpg 300w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-400x300.jpg 400w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic.jpg 800w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-768x576.jpg 768w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Photoresistor-Schematic-249x187.jpg 249w\"\u003e\u003c\/a\u003e\n\u003cp id=\"caption-attachment-4823\" class=\"wp-caption-text\"\u003eLDR Test Setup\u003c\/p\u003e\n\u003c\/div\u003e\n\u003cp\u003eThis is a basic light sensing component that can be used to experiment with a number of different types of applications which uses the presence or absence of light to take an action.  They are robust devices that work well in final applications as well.\u003c\/p\u003e\n\u003cp\u003eThe leads on this device are very beefy and can be bent to support the sensor at any angle.\u003c\/p\u003e\n\u003cp\u003eThe output of the sensor is fairly linear, but the accuracy is not sufficient to measure the absolute strength of light.  These are best used to detect the presence or absence of light or to a get rough idea of how much light is striking the sensor.\u003c\/p\u003e\n\u003cp\u003eHere are some measured resistance values from a sample that we tested compared to LUX falling on the sensor\u003c\/p\u003e\n\u003ctable class=\"table table-striped\" width=\"662\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd width=\"213\"\u003e\u003cstrong\u003eLUX\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"213\"\u003e\u003cstrong\u003eLDR Resistance Value\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"213\"\u003e\u003cstrong\u003eLight Intensity\u003c\/strong\u003e\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"213\"\u003e0\u003c\/td\u003e\n\u003ctd width=\"213\"\u003e\u0026gt; 2M\u003c\/td\u003e\n\u003ctd width=\"213\"\u003eDark room\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"213\"\u003e10\u003c\/td\u003e\n\u003ctd width=\"213\"\u003e12K\u003c\/td\u003e\n\u003ctd width=\"213\"\u003eVery dim room\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"213\"\u003e300\u003c\/td\u003e\n\u003ctd width=\"213\"\u003e2K\u003c\/td\u003e\n\u003ctd width=\"213\"\u003eModerate room light\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"213\"\u003e1000\u003c\/td\u003e\n\u003ctd width=\"213\"\u003e900\u003c\/td\u003e\n\u003ctd width=\"213\"\u003eOvercast daylight\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"213\"\u003e20,000\u003c\/td\u003e\n\u003ctd width=\"213\"\u003e100\u003c\/td\u003e\n\u003ctd width=\"213\"\u003eNext to fluorescent bulb\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003cdiv id=\"attachment_4824\" class=\"wp-caption alignright\"\u003e\n\u003ca href=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Serial-Plot.jpg\"\u003e\u003cimg decoding=\"async\" aria-describedby=\"caption-attachment-4824\" class=\"wp-image-4824 size-thumbnail entered lazyloaded\" src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Serial-Plot-150x150.jpg\" alt=\"LDR Serial Plot\" width=\"150\" height=\"150\" data-lazy-srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Serial-Plot-150x150.jpg 150w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Serial-Plot-100x100.jpg 100w\" data-lazy-sizes=\"(max-width: 150px) 100vw, 150px\" data-lazy-src=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Serial-Plot-150x150.jpg\" data-ll-status=\"loaded\" sizes=\"(max-width: 150px) 100vw, 150px\" srcset=\"https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Serial-Plot-150x150.jpg 150w, https:\/\/protosupplies.com\/wp-content\/uploads\/2018\/04\/LDR-Serial-Plot-100x100.jpg 100w\"\u003e\u003c\/a\u003e\n\u003cp id=\"caption-attachment-4824\" class=\"wp-caption-text\"\u003eSerial Plotter Output\u003c\/p\u003e\n\u003c\/div\u003e\n\u003cp\u003eThe simple program below reads the output of the sensor using an analog port and outputs the raw data to the Serial Monitor window.  Circuit hook-up is per the schematic shown above. Change lighting on the sensor to see the effect.\u003c\/p\u003e\n\u003cp\u003eChanging the 10K resistor to a different value can be used to change the range of the analog output if desired.  That may be useful when working with very bright or very dim light levels.\u003c\/p\u003e\n\u003cp\u003eFor fun, try changing the delay(1000) to something shorter such as delay(100) and use the Serial Plotter window to view the output while putting different light on the sensor.  The plot shown to the right is an example output.\u003c\/p\u003e\n\u003ch3\u003eLDR Example Program\u003c\/h3\u003e\n\u003cpre class=\"copy-the-code-target\"\u003e\u003cspan\u003e\/*\u003c\/span\u003e\n\u003cspan\u003ePhotoresistor Light Sensor Module Test\u003c\/span\u003e\n\n\u003cspan\u003eBasic code for reading the analog output of the light sensor module\u003c\/span\u003e\n\u003cspan\u003e*\/\u003c\/span\u003e\n\u003cspan\u003econst\u003c\/span\u003e \u003cspan\u003eint\u003c\/span\u003e \u003cspan\u003eANALOGPIN\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003eA0\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e  \u003cspan\u003e\/\/ Set to any analog input pin\u003c\/span\u003e\n\u003cspan\u003eint\u003c\/span\u003e \u003cspan\u003erawValue\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003e0\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e          \u003cspan\u003e\/\/ Returned ADC reading from sensor\u003c\/span\u003e\n\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003e\/\/  Initialization\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003evoid\u003c\/span\u003e \u003cspan\u003esetup\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e \n\u003cspan\u003e{\u003c\/span\u003e \n  \u003cspan\u003epinMode\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003eANALOGPIN\u003c\/span\u003e\u003cspan\u003e,\u003c\/span\u003e \u003cspan\u003eINPUT\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003ebegin\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e9600\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e         \u003cspan\u003e\/\/ Set comm speed for debug window messages\u003c\/span\u003e\n\u003cspan\u003e}\u003c\/span\u003e\n\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003e\/\/  Main\u003c\/span\u003e\n\u003cspan\u003e\/\/===============================================================================\u003c\/span\u003e\n\u003cspan\u003evoid\u003c\/span\u003e \u003cspan\u003eloop\u003c\/span\u003e\u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e \n\u003cspan\u003e{\u003c\/span\u003e\n  \u003cspan\u003erawValue\u003c\/span\u003e \u003cspan\u003e=\u003c\/span\u003e \u003cspan\u003eanalogRead\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003eANALOGPIN\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e  \u003cspan\u003e\/\/ Read sensor input\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eprint\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e\"Reading Raw: \"\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cb\u003e\u003cspan\u003eSerial\u003c\/span\u003e\u003c\/b\u003e\u003cspan\u003e.\u003c\/span\u003e\u003cspan\u003eprintln\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003erawValue\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n  \u003cspan\u003edelay\u003c\/span\u003e \u003cspan\u003e(\u003c\/span\u003e\u003cspan\u003e1000\u003c\/span\u003e\u003cspan\u003e)\u003c\/span\u003e\u003cspan\u003e;\u003c\/span\u003e\n\u003cspan\u003e}\u003c\/span\u003e\n\u003cbutton class=\"copy-the-code-button\" data-style=\"svg-icon\" title=\"Copy\"\u003e\u003csvg aria-hidden=\"true\" role=\"img\" class=\"copy-icon\" viewbox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"currentColor\" focusable=\"false\"\u003e\u003cpath d=\"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z\"\u003e\u003c\/path\u003e\u003cpath d=\"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z\"\u003e\u003c\/path\u003e\u003c\/svg\u003e\u003c\/button\u003e\u003c\/pre\u003e\n\u003cp\u003e\u003cem\u003eNotes: \u003c\/em\u003e\u003c\/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003cem\u003eNone\u003c\/em\u003e\u003c\/li\u003e\n\u003c\/ol\u003e\n\u003chr\u003e\n\u003ch2\u003eTechnical Specifications\u003c\/h2\u003e\n\u003ctable class=\"table table-hover\" width=\"840\"\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003cstrong\u003eOperating Ratings\u003c\/strong\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eMax Voltage\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e250V\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eMax Power Dissipation\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e200mW\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eDark Resistance\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e\u0026gt; 1M Ohms\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003ePeak Detection Wavelength\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e540nm (similar to human eye)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e \u003cstrong\u003eDimensions\u003c\/strong\u003e\n\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eSensor Diameter\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e20mm\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eLead Diameter\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e0.9mm (0.36″)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd width=\"145\"\u003e\u003c\/td\u003e\n\u003ctd width=\"264\"\u003eLead Length\u003c\/td\u003e\n\u003ctd width=\"229\"\u003e26mm (1″)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\n\u003c!----\u003e","brand":"Keszoox","offers":[{"title":"Default Title","offer_id":45683479052523,"sku":"","price":3.72,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0677\/1005\/8731\/files\/LDR-Light-Sensitive-Resistor-20mm.jpg?v=1723005210","url":"https:\/\/keszooxstore.com\/products\/ldr-light-dependent-resistor-20mm","provider":"Keszoox","version":"1.0","type":"link"}