You Are Here: Home » AVR ATmega Projects » Sensor - Transducer - Detector Projects » Photocell or LDR

Photocell or LDR




A photocell or photo resistor is a Light Dependent Resistors (LDR). LDR’s are sensors that detect light. They are small, inexpensive, low-power, easy to use and don’t wear out.

Photocell or LDR

Overview

A photocell or photo resistor is a Light Dependent Resistors (LDR). LDR’s are sensors that detect light. They are small, inexpensive, low-power, easy to use and don’t wear out.

An LDR is a resistor that changes its resistive value (in ohms Ω) depending on how much light is shining onto it. They are very low cost, easy to get in many sizes and specifications, but are very innacurate. Each LDR sensor will act a little differently than the other, even if they are from the same batch. The variations can be really large, 50% or higher! For this reason, they shouldn’t be used to try to determine precise light levels. Instead, you can expect to only be able to determine basic light changes. When light falls on the sensor the resistance will drop. When it is dark the resistance can be as much as 10Mohm, when the light increases the resistance can drop to 1Kohm. You can test the photocell with a multimeter. Below you see a graph how the resistance of the LDR changes when the light changes.It is a logaritmic scale.

The photocell is the most sensitive between the green light (400nm) and the red light (700nm). You can test how your photocell works by connecting a multimeter in resistance-measurement mode to the two leads and see how the resistance changes when you shine a light on it and then shading the sensor with your hand. Because the resistance changes a lot, put the meter in auto-ranging mode. Otherwise, just make sure you try different ranges, between 1MΩ and 1KΩ.

 

 

 Circuit example

In this example the sensor is connected to the power (5V) and to a pull down resistor to ground. Then the point between the pulldown resistor and the LDR is connected to the analog input of a microcontroller.

or LDR
The analog voltage reading is used to determine if the LED is on or off. The darker it is, the LED will be on, if it is light the led will be off. The LED has to be connected to a ouput pin, port PB0 of the ATmega328.In the example the ATMega328 board is used. The circuit can be build on a breadboard.

 

For more detail:  Photocell or LDR

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Underlying connection found between diverse materials with extreme magnetoresistance

A new study from the Cava lab has revealed a unifying connection between seemingly unrelated materials that exhibit extreme magnetoresistance,...

Close
Scroll to top