fbpx

Interface Ldr Sensor With Arduino Uno

A Light Dependent Resistor (LDR) or a photo resistor is a non linear device whose resistivity is a function of the incident electromagnetic radiation.

  • A light dependent resistor works on the principle of photo conductivity.
  • Photo conductivity is an optical phenomenon in which the materials conductivity (Hence resistivity) reduces when light is absorbed by the material.
  • When light falls the resistance of the device has decreased.
  • When a light dependent resistor is kept in dark, its resistance is very high. This resistance is called as dark resistance.
  • It has high as 1012 ohm when LDR kept in dark.
  • When light is incident on a photocell it usually takes about 8 to 12ms for the change in resistance to take place.
  • While it takes seconds for the resistance to rise back again to its initial value after removal of light.

Application

  • Weather Monitoring System.
  • Manufacturing Industry.

Hardware Required

  • LDR.
  • Arduino.

Circuit

Code

 int ldr=A0;
 int limit=200;
 void setup()
 {
 Serial.begin(9600);
 }
 void loop()
 {
 int val=analogRead(ldr);
 Serial.print(val);
 if(val>limit)
 {
 Serial.print("Light  Detected");
 }
 else
 {
 Serial.print(" No Light");
 }
 } 

Leave a Reply

Your email address will not be published. Required fields are marked *