Basic ElectronicsElectronics

LDR Light Dependent Resistor, Photoresistor LDR Working, LDR based Projects

LDR Light Dependent Resistor

LDR Light dependent resistor is a Photoresistor whose resistance increases or decreases with the intensity of light. Photoresistor is the combination of two words photon which means light particles and resistor. LDR can sense the light intensity, due to this property it is mostly used in light sensing circuits.  It is also called a photoconductor. A Light Dependent Resistor (LDR) is also called a cadmium sulfide (CdS) cell or a Photoresistor. It is basically a photocell that works on the principle of photoconductivity. This LDR is mostly used in light varying sensor circuit, and light and dark activated switching circuits. LDRs are also used in Solar trackers, Laser security systems, etc.

In this article, I will try to cover the maximum things including its working principle and how an LDR can be used in different types of circuits and projects.

LDR Light dependent resistor

In general, a photo resistor works like this:

    • In bright light, its resistance is relatively low (usually less than 10 kΩ).
  • In darkness, its resistance is relatively high (usually more than 1 MΩ).

Symbol of LDR

The symbol of LDR is:

LDR Light dependent resistor

Working principle of a Photoresistor:

In order to understand the working principle of a Photoresistor. We will first discuss the atom structure as we know that the outermost shell of an atom contains valance electrons which are loosely bonded so small amount of energy will require to make these electron free from valance shell.  Those electrons which are not attached with nucleus are known as free electrons. These electrons are free to move when an external energy like an electric field is applied. Thus when some energy makes the valence electron pull out from the outer orbit, it acts as a free electron; ready to move whenever an electric field is applied.  Photoresistors work on the principle of photoconductivity.

Photoconductivity is  electrical and optical process in which electromagnetic radiation absorption such as ultraviolet light, infrared light,  visible light or gamma radiation  make material electrically conductive.

The number of free electrons and holes are increase when the material absorbs light and raises its electrical conductivity. When the light incident on the semiconductor it will raise the electron to band gap.

The change in the electrical conductivity of the Light dependent resistor can be measured by connecting bias voltage and a resistor in series. When the light will incident on the LDR its resistance will be changing due to which current flow in the circuit will also change.

When light falls on Photoresistor the light contains photons which fall on the device, which will make the electrons in the valence band to jump to the conduction band because the electrons are excited by the photon which has greater energy than band gap of semiconductor.  Hence when light having enough energy photons strikes on the device, the electrons from the valance band will start moving from valance band to the conduction band which results in a large number of charge carriers free electrons and holes. The result of this process is that the resistance will be decrease more and more current starts flowing through the device.

Types of Photoresistor

It is of two types either intrinsic or extrinsic Light dependent resistor.

  1. Intrinsic Photoresistor

This category of LDR is composed of undoped semiconductor material i.e. these type of Photoresistor are made from pure semiconductor material either silicon or germanium. In intrinsic Photoresistor the electrons are tightly bonded to the nucleus. There are less free electron. Sufficient amount of light energy is required to excite the electron from the valence band to conduction band. Small amount if charge carriers are release in this type of photoresistors they are not used in most application and are only useable within narrow wavelength ranges.

  1. Extrinsic photoresistor

This type of LDR is made up of doped semiconductor material. In doping we add element which has high valance electrons such as phosphorous. The doping constitutes a new energy level above the valence band. Thereby reducing the light energy required to excite the electron.



Construction of an LDR

The construction of an LDR includes a light-sensitive material such as semiconductor that is placed on an insulating substrate like as ceramic. Light dependent resistor is made up of cadmium Sulphide semiconductor having negligible free electrons in the absence of any incident radiation. When there is no light striking on LDR in its resistance is usually in mega ohms while when light is striking its resistance is in few hundred ohms. The required resistance and power is obtained by giving LDR a zigzag shape. The area of zigzag separates the metal placed areas into two regions. The whole structure is placed in a plastic case so as to have direct exposure to the incident radiation. The resistance of the photo resistor is to be kept minimum as possible to make sure that the resistance increase or decrease due to the light effect only. The use of cadmium and lead materials is avoided as they are injurious to the environment.

Testing LDR with a Multimeter:

The LDR testing is simple like resistor. To test LDR set the Multimeter on ohm and connect the probes of the Multimeter with the LDR. When the LDR will expose to light its resistance will decrease and when in darkness its resistance will increase.

Characteristics of  LDR:

Max power dissipation

This is the maximum power the device is able to dissipate within a given temperature range usually it is 25C for photo resistor. This rating may be applicable above a certain temperature.

Maximum operating voltage

Particularly as the device is semiconductor based, the maximum operating voltage must be observed in darkness that may be applied to the device continuously. This is typically specified at 0 lux, i.e. darkness.

Wavelength:

The sensitivity of a photo resistor depends upon the light wavelength when the wavelengths of the light changing sensitivity of the photoresistor will also changing. They are sensitive to light having wavelengths between 4000°A (blue light) and 10000°A(infrared). If the wavelength is outside a given range then there is no noticeable effect.

The photo resistor specification details the wavelength of maximum sensitivity. The wave length is the distance between two crust or trough in a wave. Curves may be provided for the overall response in some instances. The wavelength is specified in nm.

Different materials have different unique spectral response curves of wavelength versus sensitivity like ultraviolet light, visible light have different wavelength. Extrinsic light dependent resistors which are doped semiconductor in which impurities are added for conduction are generally designed for longer wavelengths of light, with a tendency towards the infrared (IR). Mostly photo resistors are made up of extrinsic semiconductor when working in the IR range must check that heat not build up because thermal energy can affect the measurement of resistance.

Resistance when illuminated

The resistance under illumination is a key specification is a key parameter for any Photoresistor. Often a minimum and maximum resistance is given under certain light conditions, often 10 lux. The resistance of Photoresistor is maximum in dark in mega ohms and minimum in light a few hundred ohms.

Sensitivity

Light dependent resistors have a lower sensitivity refers to the relative change in the resistance value when the Photoresistor is not illuminated by light and the resistance value when illuminated by light as compare to photo transistors and photo diodes.

Photoresistors are not true semiconductor they are passive component because they lack PN-junction due to which its resistance will be changing however we keep the light intensity constant. Photo resistor also changes it resistance with temperature. Photo resistor should not be used where précis light intensity measurement is required because its resistance is not stable it is changing.

Temperature coefficient:

The photoelectric effect of the Photoresistor in which electrons are ejected from valence band to conduction band is greatly affected by temperature. Some Photoresistors have higher photoelectric sensitivity at low temperatures, but lower sensitivity at high temperatures.

Dark resistance:

Dark resistance values will be given for the photo resistor when there is no illuminated on the photo resistor. Dark resistance is the ratio of the applied voltage to the dark current and it is usually expressed as “0LX”  .These may be specified after a given time because it takes a while for the resistance to fall as the charge carrier recombines photo resistors are noted for their slow response times.


Latency:

Photo resistor possesses time latency in changes in resistance and illumination. Latency is the time taken by the component to respond to any change. This phenomenon is called the resistance recovery rate. It takes noticeable time in light level usually about 10 ms for the resistance to drop completely when light is applied after total darkness,  when the light is completely remove resistance rise back in 1 second to the starting value.  Due to this reason LDR should not be used where light is constantly changing. Light dependent resistor is used in audio compressors to smooth the response.

Spectral response:

The spectral response is also called spectral sensitivity, which refers to the sensitivity of the photo resistor under the irradiation of monochromatic light with different wavelengths. If you plot the sensitivity at different wavelengths, you can get a curve of the spectral response.

Frequency characteristics

When the photoresistor is irradiated with pulsed light, the photocurrent takes a period of time to reach a stable value. After the light is stopped, the photocurrent is not immediately zero, which is the time delay characteristic of the photoresistor.

The frequency characteristics of the materials are different depending upon on their resistance delay characteristics and photosensitivity.

The use frequency of lead sulfide is much higher than that of cadmium sulfide, but the delay of most photoresistors is relatively large, so it cannot be used in applications that require fast response.

Applications of LDRs

  1. When the LDR is used with relay it forms a photo switch. When the light will incident on the ldr it will make the relay open or close therefore it work like a photo switch.
  2. Used as part of a SCADA system to perform functions such as counting the number of packages on a moving conveyor belt
  • The most obvious application for an LDR is to automatically turn on a light at a certain light level.
  1. LDRs can be used to control the shutter speed on a camera.
  2. These are used as light sensors.
  3. These are used to measure the intensity of light.
  4. Their latency property is used in audio compressors and outside sensing.
  5. Infrared astronomy and Infrared Spectroscopy also use photo resistors for measuring mid-infrared spectral region.
  6. Photo resistors are available in Small  size
  7. It is easy to carry from one place to another place.
  8. Low cost
  9. Used in street lighting design
  10. Alarm clocks
  11. Burglar alarm circuits
  12. Light intensity meters

Classification

Photo resistors are divided into three types according to characteristics:

  1. Ultraviolet Photoresistors:

  Ultraviolet photo resistors are more sensitive to ultraviolet light, including photoresistors, cadmium sulfide, cadmium selenide etc.

  1. Infrared Photoresistors:

Mainly lead selenide, lead sulfide, lead telluride. Photosensitive resistors such as indium antimonide are widely used in missile guidance, non-contact measurement, astronomical detection, infrared spectroscopy, human lesion detection, infrared communications and other defense, scientific research, and industrial and agricultural production.

  1. Visible light Photoresistor:

Including cadmium selenide, selenium, cadmium sulfide, cadmium telluride, gallium arsenide, silicon, germanium, and zinc sulfide photoresistors. It is mainly used in various photoelectric control systems, such as photoelectric automatic opening and closing of portals, automatic turning on and off of navigation lights, street lights and other lighting systems, automatic water supply and automatic water stopping devices, mechanical automatic protection devices and “position detectors”, camera automatic exposure device, photoelectric counter, smoke alarm, photoelectric tracking system, etc.


LDR based Projects:

 Dark Activated LED light with Photoresistor LDR:

LDR Light dependent resistor

Components required:

  • 2N3904 Transistor
  • Light dependent resistor
  • 2KΩ Resistor
  • 1KΩ Resistor
  • LED
  • Battery

In this project the transistor works as a switch. When the current flow in the base of transistor it act like a switch and a large amount of current flow from collector to emitter and led will turn on. When there is no current at the base the transistor will off and led will turn off. We will connect the collector transistor with 5V. Connect 2KΩ resistor with the base of transistor. Now connect the LDR at the base of transistor. Then connect the led at the emitter with 1KΩ Resistor.

When the LDR will be exposing to light it resistance will decrease and the current will flow through transistor and the LED will turn on. When the LDR is expose to dark its resistance will increase and no current will flow through transistor and the LED will be turn off.

Automatic ON/OFF Street light using LDR:

LDR Light dependent resistor

Components Required:

  • BT134 power transistor
  • LDR
  • 220KΩ Resistor
  • AC Bulb

In this project we are using BT134 power transistor the pin configuration of this transistor from left to right:

  1. Main terminal 1
  2. Main terminal 2
  3. Gate

LDR is connected to main terminal 1 and gate. 220KΩ Resistor is connected with main terminal 2 and gate. The bulb is connected with main terminal 2 and main terminal 1. Now give supply to the bulb when the LDR will expose to light the bulb will not turn on and when the LDR will expose to dark the bulb will turn on.

I also have a very detailed tutorial on how to make an automatic street light control system using LDR and 555 Timer IC.


Activate buzzer and LED using LDR and Arduino:

LDR Light dependent resistor

In this project we will activate buzzer and led through LDR. This project will work on the intensity of light when the LDR is not exposed to light the resistance of the LDR will be maximum led and buzzer will be turn on. When LDR is exposed to light the resistance will be decrease and the LED and buzzer will off. The speaker and led negative terminal will connect with the ground. The speaker other will connect with digital pin 11 and connect led with the digital pin 11. Connect the LDR with analogue  pin A0 and other pin with the 5V.

Arduino LDR Programming:

int buzzer=12;
int led=11;
int ldr=A0;
int ldrread;
void setup(){
Serial.begin(9600);
pinMode(led,OUTPUT);
pinMode(buzzer,OUTPUT);
pinMode(ldr,INPUT);

}
void loop(){
ldrread=analogRead(ldr);
if (ldrread >= 400) {
    tone(buzzer, 100);
    digitalWrite(led, HIGH);
    delay(100);
  noTone(buzzer);
  digitalWrite(led, LOW);
  delay(100); 
 Serial.println("----------- ALARM ACTIVATED -----------"); 
  }
  else {

    noTone(buzzer);
   
 digitalWrite(led, LOW);
 
 Serial.println("ALARM DEACTIVATED");
 }
}

Adjustable LDR LED controller using LM741 IC:

LDR Light dependent resistor

In this project we will control the led through the operational amplifier LM-741. We can adjust the resistance through potentiometer.

Components Required:

  • Potentiometer
  • LM -741
  • Resistor 10k
  • Led
  • Battery

Connection:

  1. Connect the 10K resistor with LM-741 pin 3 and 4.
  2. Connect the potentiometer with Lm-741 pin 2.
  3. Connect the LDR with potentiometer one terminal while connect the other terminal of LDR with 10K resistor
  4. Connect the other terminal of 10K resistor with at pin 3 of LM-741 .
  5. Connect led at pin 6 of the LM-741.
  6. Now connect battery positive terminal with pin 7 of LM-741 and 10k resistor.
  7. Connect the negative terminal of the battery with 10k resistor and potentiometer.



LDR based Day and Night Detection using LM741:

LDR Light dependent resistor

As explained in very detail, LM741 is basically an Operational Amplifier but it can also be used as the Voltage comparator. If you study in detail about the amplifiers you will come to know that any Operational Amplifier can be used as the voltage comparator, but it is not necessary that any comparator can be used as the Operational Amplifier.

In the above circuit the LM741 Operational Amplifier is used as the voltage comparator. The LDR “Light Dependent Resistor” is connected in series with a 10 kilo Ohm resistor. The LDR and 10k resistor makes a voltage divider circuit. As the amount of light falling on the LDR changes so the resistance changes due to which we get variable voltage. The resistance of the LDR changes with the amount of light falling on the LDR. As you can a wire from the middle of the LDR and 10k resistor is connected with the Inverting input pin of the LM741 Op Amp IC.

The voltage which is fed to the Inverting input of the LM741 IC is compared with the voltage which is coming from the R3 which is a 100K variable resistor. This variable resistor is used to set the reference voltage on the Non-inverting input of the LM741 Op Amp IC. Two 470 Ohm resistors are connected in series with the 100k variable resistor, which protects the circuit from the short circuit.

Let’s say you rotate the knob of the variable resistor and the resistance get’s two low and as a result the 12v get’s short with the GND. In a situation like this it will damage the circuit. To protect the circuit from such situation the two resistors which are connected in series will provide resistance, so the voltage line will never short with the GND.

We have to voltages to compare let’s say

V1 = Reference voltage which is coming from the Variable resistor.

V2 = the voltage coming from the LDR.

V1 and V2 will be compared using the LM741. The output of the LM741 will be High if

V1 > V2 and the output will be low if V1 < V2.

The V2 varies as the amount of light varies so when there is light it will have one state and when there is no light then it will have another state. Which makes this best for the day and night detection. As day and night are completely opposite so we will be having two output states High or Low.

When V1 > V2 the output get High, and at the output we get voltage which is approximately equal to the input supply voltage which in our case is 12 volts. The output voltage of the LM741 IC is not exactly 12 volts it can be around 10 to 11 volts. So when the output is high we get around 12 volts.

At this point we are able to differentiate between the day and night and accordingly we get 0 volts and 11 volts approximately. Now the next step is to use this output voltage to control a Relay which can be used to control a light Bulb. But if you look at the datasheet you will find that the output current of the LM741 IC is 25milliamps which is not enough to turn on a 12v relay. The relay I have used in this circuit needs around 32milliamps. So it means we will need some kind of driver to control the relay.

We can use a transistor with the LM741 IC. As you can see in the circuit diagram I have used 2n2222 NPN transistor. Now if you look at the datasheet of the 2n2222 NPN transistor you will find the 2n2222 base voltage should not exceed 6 volts. If you apply voltage greater than 6 volts it will damage the 2n2222 NPN transistor.

As we know the output voltage of the LM741 IC is around 12 volts when in ON state so if this voltage is directly connected with the base of the 2n2222 npn transistor it will completely damage the transistor. Now to solve this problem we will need to use a voltage divider to reduce the voltage. so that’s the reason I used 10k and 1k resistors in series. This the base voltage never exceeds 6 volts. Now we can turn ON and Turn OFF the 2n2222 NPN transistor without any problem. The transistor will be used to control the 12v relay. This relay is of the type SPDT “Single Pole Double Throw”.

This relay can be used to control any type of bulb, AC or DC. You can also connect a buzzer instead using a bulb. Now it entirely depends on you for what purpose you are going to use this Circuit.


LDR Proteus Simulation:

In the following simulation you can see the ON and OFF state of the Relay.

Night Time:

LDR Light dependent resistor

Day Time:

LDR Light dependent resistor

Download LDR Proteus Simulation: 

Following is the PCB design of the day and night detection circuit designed in CadSoft Eagle 9.1.0 version.

LDR Light dependent resistor

Download PCB:

LDR Light dependent resistor

I made one prototype model at home, did all the soldering and it worked perfectly.

LDR based Solar Tracking System:

LDR Light dependent resistor

The circuit which I discussed above can also be used in the Solar Tracker system. For the Sun tracking we need two LDRs, I am talking about the one dimensional solar tracking system. Download the Arduino and LDR based Solar Tracker programming.

LDR Light dependent resistor

As you can see the same circuits are used in the Solar Tracking system.

The same circuit can also be used in a laser security system. You only need to point the laser on the LDR, set the reference voltage and now if anybody cross the laser the buzzer will turn ON or you can signal a microcontroller. This circuit has so many uses. Think about the other uses and let me know in a comment.


LDR based Laser Security System using Arduino and GSM Module:

LDR and GSM module with Arduino, Circuit Diagram:

LDR Light dependent resistor

TXD of the GSM sim900A Module is connected with pin number 7 of the Arduino, the RXD pin of the GSM sim900A module is connected with pin number 8 of Arduino and GND is connected with the Arduino’s ground. a power supply is connected with sim900A ideal voltage is 4.7v to 5v as already explained.

An LDR Light Dependent Resistor is connected in series with a 10k resistor which makes a voltage divider circuit. As you know an LDR Light Dependent Resistor is basically a variable resistor, whose resistance changes with the amount of light falling on the LDR. So a change in resistance will result in a change in the voltage. This change in voltage can be monitored using the analog pin A1 of the Arduino.

Laser Security System using GSM and LDR, Arduino Programming:

#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8); // gsm module connected here
String textForSMS;
int data = 0; 

int sensor = A1; 

void setup() {


  randomSeed(analogRead(0));
  Serial.begin(9600);
      SIM900.begin(9600); // original 19200. while enter 9600 for sim900A
 Serial.println(" logging time completed!");
pinMode(sensor, INPUT); 

  delay(5000); // wait for 5 seconds

  
}

void loop() {

data = analogRead(sensor); 
Serial.println(data); 
  
     if ( data < 400) // 
  {
       textForSMS =  "\nIntruder detected";  
  sendSMS(textForSMS);
  Serial.println(textForSMS);
  Serial.println("message sent."); 
delay(5000);
  }
}


void sendSMS(String message)
{
  SIM900.print("AT+CMGF=1\r");                   
  delay(1000);
 SIM900.println("AT + CMGS = \"+923339218213\"");  // recipient's mobile number, in international format
 
  delay(1000);
  SIM900.println(message);                         // message to send
  delay(1000);
  SIM900.println((char)26);                        // End AT command with a ^Z, ASCII code 26
  delay(1000); 
  SIM900.println();
  delay(100);                                     // give module time to send SMS
 // SIM900power();                                   // turn off module
}

Related Project:

LDR and Arduino based Solar Tracking System

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

One Comment

Leave a Reply

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

Back to top button