A Light Dependent Resistor (LDR) or a photo resistor is a passive electronic component, basically a resistor which has a resistance that varies depending of the light intensity

A Light Dependent Resistor (LDR) or a photo resistor is a passive electronic component, basically a resistor which has a resistance that varies depending of the light intensity. A photo-resistor is made of a high resistance semiconductor that absorbs photons and based on the quantity and frequency of the absorbed photons the semiconductor material give bound electrons enough energy to jump into the conduction band. The resulting free electrons conduct electricity resulting in lowering resistance of the photo-resistor. The number of electrons is dependent of the photons frequency.


They are made up of semiconductor materials having high resistance. There are many different symbols used to indicate a LDR, one of the most commonly used symbol is shown in the figure below. The arrow indicates light falling on it.

Photo conductivity is an optical phenomenon in which the materials conductivity is increased. When light is absorbed by the material. When light falls i.e. when the photons fall on the device, the electrons in the valence band of the semiconductor material are excited to the conduction band. These photons in the incident light should have energy greater than the band gap of the semiconductor material to make the electrons jump from the valence band to the conduction band. Hence when light having enough energy strikes on the device, more and more electrons are excited to the conduction band which results in large number of charge carriers. The result of this process is more and more current starts flowing through the device when the circuit is closed and hence it is said that the resistance of the device has been decreased.

LDR’s are light dependent devices whose resistance is decreased when light falls on them and that is increased in the dark. When a light dependent resistor is kept in dark, its resistance is very high. This resistance is called as dark resistance. It can be as high as 1012Ω and if the device is allowed to absorb light its resistance will be decreased drastically. If a constant voltage is applied to it and intensity of light is increased the current starts increasing. Figure below shows resistance vs. illumination curve for a particular LDR.

Photocells or LDR’s are non-linear devices. There sensitivity varies with the wavelength of light incident on them. Some photocells might not at all response to a certain range of wavelengths. Based on the material used different cells have different spectral response curves.

When light is incident on a photocell it usually takes about 8 to 12 ms for the change in resistance to take place, while it takes one or more seconds for the resistance to rise back again to its initial value after removal of light. This phenomenon is called as resistance recovery rate. This property is used in audio compressors. LDR’s are less sensitive than photo diodes and phototransistor. (A photo diode and a photocell (LDR) are not the same, a photo-diode is a pn junction semiconductor device that converts light to electricity, whereas a photocell is a passive device, there is no pn junction in this nor it “converts” light to electricity).

Types of Light Dependent Resistors

1. Intrinsic photo resistors (Un doped semiconductor): 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: These are semiconductor materials doped with impurities which are called as dopants. Theses 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.

The structure of a light dependent resistor consists of a light sensitive material which is deposited on an insulating substrate such as ceramic. The material is deposited in zigzag pattern in order to obtain the desired resistance and power rating. This zigzag area separates the metal deposited areas into two regions. Then the ohmic contacts are made on the either sides of the area.

The resistances of these contacts should be as less as possible to make sure that the resistance mainly changes due to the effect of light only. Materials normally used are cadmium sulphide, cadmium selenide, indium antimonide and cadmium sulphonide. The use of lead and cadmium is avoided as they are harmful to the environment.


• Low cost and simple structure

• Light sensors

• Street lamps

• Alarm clock

• Burglar alarm circuits

• Light intensity meters

Proteus design for LDR interfacing with PIC

Orcad design for LDR interfacing with PIC

LDR interfacing with PIC

/*  Name     : main.c
 *  Purpose  : Source code for LDR Interfacing with PIC18F4550.
 *  Author   : Gemicates
 *  Date     : 2017-07-03
 *  Website  : www.gemicates.org
 *  Revision : None

#define _XTAL_FREQ 12000000                // 12MHZ

#define LDR PORTA

void LDR_Init()
  ADCON0 = 0x41;                           // ADC Module Turned ON and Clock is selected
  ADCON1 = 0xC0;                           // All pins as Analog Input
                                           // With reference voltages VDD and VSS

unsigned int LDR_Read(unsigned char channel)
  if(channel > 7)                          // If Invalid channel selected 
    return 0;                              // Return 0

  ADCON0 &= 0xC5;                          // Clearing the Channel Selection Bits
  ADCON0 |= channel<<3;                    // Setting the required Bits
  __delay_ms(2);                           // Acquisition time to charge hold capacitor
  GO_nDONE = 1;                            // Initializes A/D Conversion
  while(GO_nDONE);                         // Wait for A/D Conversion to complete
  return ((ADRESH<<8)+ADRESL);             // Returns Result

void main()
  unsigned int a;
  TRISC= 0xC0;                             // PORTC as output
  LDR = 0xFF;                              // PORTA as input
  LDR_Init();                              // Initializes LDR Module

    a = LDR_Read(0);                       // Reading Analog Channel 0
    PORTC = a>>8;                          // Higher 2 bits to PORTC
    __delay_ms(60);                        // Delay
  }while(1);                               // Infinite Loop

Error message here!

Show Error message here!

Forgot your password?

Error message here!

Send OTP

Error message here!

Show Error message here!

Lost your password? Please enter your email address. You will receive a password you Need.

Send Error message here!

Back to log-in