0% Complete
0/25 Steps

Interfacing LDR with Arduino

What is LDR?

LDR or Light Dependent Resistors are light sensitive devices most often used to indicate the presence or absence of light or to measure the light intensity. An LDR can be applied in light-sensitive detector circuits and light-activated and dark-activated switching circuits.

How does LDR sensor work?

The resistance of a photoresistor decreases with increasing incident light intensity. A photoresistor is made of a high resistance semiconductor. In the dark, a photoresistor can have a resistance as high as several megohms (MΩ), while in the light, a photoresistor can have a resistance as low as a few hundred ohms.

Variation in resistance with changing the light intensity

 

The most common type of LDR has a resistance that falls with an increase in the light intensity falling upon the device (as shown in the image above). You can, therefore, see that there is a large variation between these figures. If you plotted this variation on a graph you would get something similar to that shown by the graph shown above.

Setting up the circuit for LDR sensor

The circuit of the LDR sensor is explained below

  1. One end of LDR is connected through jumper wire(red wire ) to the 5V power supply.

  2. Another end of LDR is soldered with 10K resistor. Through the common junction of LDR and 10K resistor, a jumper wire is taken and hooked into the analog input (here we have used A0 pin).

  3. The free end of the resistor is grounded with the help of jumper wire.

evive LDR Circuit

evive LDR Circuit

LDR Circuit Arduino Uno

LDR Circuit Arduino Uno

Code

The code is exactly the same as the potentiometer code. 

LDR Circuit

Whenever the LDR is covered the LED fades down.

Log in with your credentials

or    

Forgot your details?

Create Account