Monday 22 January 2018

LDR (Light Dependent Resistor) – How to Use it?

Light Dependent Resistor

Introduction:

LDR known as Light Dependent Resistor or Photoresistor, it is a passive electronic component, it is basically a resistor whose  resistance is dependent on light falling on it. It is made up of high resistance semiconductor, whenever kept in dark the resistance will increase and reach upto several mega ohms and when kept in light resistance is few kilo ohms. Photocells or LDR’s are non linear devices. Their sensitivity varies with the wavelength of light incident on them.
Based on the materials used LDRs are of two types:
  1. Intrinsic photo resistors: These are made of pure semiconductor materials such as silicon or germanium. Electrons get excited from valance band to conduction band when photons of enough energy fall on it and number charge carriers is increased.
  2. Extrinsic photo resistors: In this kind of photo resistors the semiconductor is doped with other impurities called as dopants. These dopants create new energy bands above the valence band which are filled with electrons. Hence this reduces the band gap and less energy is required in exciting them. Extrinsic photo resistors are generally used for long wavelengths.

Usage:

LDR’s are cost effective and are very easy to implement device. They are most commonly used as light sensors. The places where absence and presence of light needs to be detected LDR’s are of great use. They are also seen to be used in burglar alarms, light intensity meters, street light etc.

Application:

Project for Reference:

Code:
int ldrpin = A0;
int buzzpin = 13;
void setup ()
{
  Serial.begin(9600);
  pinMode (ldrpin, INPUT);
  pinMode (buzzpin, OUTPUT);
  buzz(200);
  delay(2000);
}
void loop ()
{
  int ldrval = analogRead(ldrpin);
  Serial.println(ldrval);
  if (ldrval <= 900)
  {
    buzz(500);
  }
}
void buzz(unsigned char time)
{

  digitalWrite(buzzpin, 170);
  delay (time);
  digitalWrite(buzzpin, 0);
  delay (time);
}

No comments:

Post a Comment

SMART BLIND STICK The smart blind stick is the project made to help the blind people who is suffering when walking.It just uses to de...