LDR Based Light Sensor/Detector

Introduction: LDR Based Light Sensor/Detector

About: An electronics hobbyist

Light sensors and detectors are extremely useful for microcontrollers and embedded systems and intensity monitoring is also to be done. One of the simplest and cheapest of such sensors are LDR. LDR or Light Dependent Resistors can be easily used with an opamp as comparator and detection of light can be done.

An LDR is a component that has a (variable) resistance that changes with the light intensity that falls upon it. This allows them to be used in light sensing circuits.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 here). The resistance of an LDR may typically have the following resistances: Daylight = 5000Ω and less

Dark = 20000000Ω

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. It is a hyperbolic curve.

Step 1: Gather the Parts Required

1. Any standard LDR (pic given)

2. Any general purpose opamp (741/358)

3. 100k resistor

4. 10k potentiometer

5. male headers

6. Multimeter and beadboard for testing

7. veroboard, solder kits, wire cutters

Step 2: Construct the Circuit

Gather components and construct the circuit on a breadboard for initial testing and threshold calibration.

Take a multimeter and set it to volts and apply probes at pin 1 (output) of opamp.

Apply light on the LDR (sunlight or torchlight or anything) and observe the output at pin 1.

As light falls on LDR, it's resistance decreases and voltage across it decreases and thus after the set threshold (by pot), the voltage at inverting pin(LDR divider) becomes less than non inverting pin(pot) and output turns high, as shown by multimeter. Similarly as light intensity decreases, it's resistance increases and then the voltage at inverting pin(LDR divider) becomes greater than non inverting pin(pot) and output turns low, as shown by multimeter.

Thus this high or low digital values can be taken by any microcontroller or any logic circuit for further analysis.

Do note that do not use LED at output for output observation because the light of the LED might interfere with the LDR readings. So use a multimeter for this.

Obviously you may take the LDR analog voltage and a rough value for LUX can be measured.

A small example on the corresponding PCB is also given here. Circuit drawn using Fritzing.

Step 3: Make Circuit on a Veroboard/Perfboard

After successful testing, solder them on a small piece of verboard. This type of simple circuit will repair very less current to operate and there is no stringent requirement of power supply. But you may obviously put some power supply decoupling capacitors for better performance. Mount the LDR carefully so that it's exposed surface can get the light to be fallen upon it.Use necessary male headers for power supply and output pins.

For any query comment here or mail me at robosanu1@gmail.com

Be the First to Share


    • Crayons Challenge

      Crayons Challenge
    • Plywood Contest

      Plywood Contest
    • Teach With Tinkercad Contest

      Teach With Tinkercad Contest