Light/Dark Detector Using an Op-amp


Introduction: Light/Dark Detector Using an Op-amp

About: Most of my instructables will be tutorials for Atmel microcontrollers, Arduino, or Raspberrypi. I try to show concepts that you can use in your own programs by creating simple programs and circuits to illus...

This is a simple demonstration showing how to use an op-amp and a photocell to sense light or darkness.

You will need:

* In the picture the Arduino is only being used as a power source.

Step 1: Build the Circuit

Build the circuit according to the diagram.

The red dot on the chip indicates pin one.

The resistor in series with the LED is not critical. It can be anywhere between 330 to 560 Ohms. I recommended a 470 Ohm because most resistor kits contain it. I substituted a 560 Ohm because I have lots of them.

There are many different op-amp chips available, and just about any of them will work. I chose the LM741 because it is what I have on hand. If you use a different chip be sure to check the pinouts. I have seen op-amps with four different pinouts. For instance Adafruit and SparkFun sell dual op-amp, eight pin chips that have different pinouts.

Step 2: Testing

The trim pot adjusts the sensitivity.

The way the circuit is wired it is a light detector. In a reasonably dark room the LED will be off. Shining a light on the photocell will cause the LED to light.

If you reverse the wires to pins two and three it will be a darkness detector. In darkness the LED will be on, and shining a light on it will cause the LED to turn off.



    • Casting Contest

      Casting Contest
    • Oil Contest

      Oil Contest
    • Make it Move Contest

      Make it Move Contest

    We have a be nice policy.
    Please be positive and constructive.




    Y did u use the opAmp(i know what is opamp, but i can't get the reason y did u use it here)

    4 replies

    THis would normally be done with a microcontroller, I just used an op-as an experiment. The advantages are an op-amp is cheaper, the parts count is the same and no programming is necessary.

    Thanks, but i guess u didnt get my qn ,
    "U are using the opamp as an ADC, To get a High output for the reference voltage i.e convert the LDR's Analog signal to digital and light the led ",correct?


    Did it just for fun.

    Y did u use the opAmp(i know what is opamp, but i can't get the reason y did u use it here)