LEDs As Light Sensors





Introduction: LEDs As Light Sensors

LEDs are great for making light, but they can sense light too!

I recently stumbled upon this site which mentions, "In 1977, Forrest M. Mims reminds us in one of his "Engineer's Notebooks" that LEDs can also be used as photodiodes... " The page features a LED matrix being used as a multi-touch input but offers very little information. I still have no idea how to make his project, but I did learn how to use LEDs as light sensors.

This instructable goes over my experimenting with different kinds of LEDs as light sensors and making a dark activated night light using LEDs as sensors.

Step 1: What You Will Need

  • random assortment of LEDs
  • current limiting resistors for LEDs
  • multimeter
  • breadboard
  • bright flashlight
  • microcontroller (I used Arduino)

Step 2: How Does It Work?

According to Wikipedia:

LED as light sensor:

"A LED is simply a diode that has been doped specifically for efficient light emission and has been packaged in a transparent case. Therefore, if inserted into a circuit in the same way as a photodiode, which is essentially the same thing, the LED will perform the same function."


"A photodiode is a type of photodetector capable of converting light into either current or voltage, depending upon the mode of operation."

Step 3: Sensing

All you have to do is hook up the multimeter to read the voltage coming off the LED, that's it! Try pointing the LED at different light sources and see how the reading changes.

Step 4: Experimenting With Different LEDs

The wikipedia article also states, "As a photodiode, it is sensitive to wavelengths equal to or shorter than the predominant wavelength it emits. For example, a green LED will be sensitive to blue light and to some green light, but not to yellow or red light"

Get a few different color LEDs and see how the color affects the voltage output.

My Results:
(see second image)
The voltage readings for ambient light were consistent with the wavelength property explained above. IR had the highest voltage and blue had the lowest.
The max reading I get seemed to do more with the type of LED rather than the color. The red, yellow, and green ultra bright LEDs put out the most voltage.
Dark was .001 or 0 for all of them.

As for current, my multimeter read .000 amps. I'm sure it puts out some, but nothing I can measure. If someone has some equipment that can get a reading I'd be interested to know what it is.

Step 5: Add Some Programming

Now that we have some nifty LED sensors (aka - normal LEDs) it's time to make them do something. I make a quick Arduino sketch that turns on an LED when it gets dark. The code is very straightforward; when the voltage from the sensing LED goes below a set level the Arduino knows it is dark and turns on an LED. I used the red super brights for the sensors because they had the best range (IR was too sensitive).


Straw diffuser on the blue leds for a dark detecting night light:

Note: This program is just a simple example I thought of and made in a few minutes. This is by no means the only thing you can do with this concept. The meat of this instructable is in the experimenting.

Now that you know how to use LEDs as light sensors go and make something awesome!



    • Epilog Challenge 9

      Epilog Challenge 9
    • Paper Contest 2018

      Paper Contest 2018
    • Science of Cooking

      Science of Cooking

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




    Nice experiment! I came across this about 20 years ago - my then Boss pointed me at it as a sensor for a low level light meter - there wasn't enough output :-( Don't think I've never seen it used in a product. Out of the companys collection of LEDs I remember the high bright red LEDs ( clear case ) worked best. It also got a mention in the April copy of Elektor Mag this year I believe - there was a follow up letter asking if it was an "April Fool". There was no consensus as to which type of LED gave the best output. I've just tried it with a Hyper brite red LED in a water clear case - its about a year old, and I'm sorry I can't tell the Manu or Model. I stuck it under a halogen desk lamp, 20 Watt, not diffused, about 1 foot / 300mm above. Got about 600mV or about 0.7uA peak on a cheap DVM. Readings dithered a bit. Not sure why - may have been poor contact with crock clips etc.

    Are you asking about dc power for the Arduino ?

    Wondering about my photo-transistor, its a very old clear device, and when I shade it parameters change drastically, becomes two back to back diodes if I remember correctly. Is it using the photo diode led sensor principle or is it using some other light sensing principle. Hard for you to know without having it in your possession, but I don't think I'd let it out of my possession. Its very old.

    Hmm, can I connect a 9v battery holder to the power plug or it will cause a problem?

    Hopefully you are still alive.

    Everyone else, don't do this!

    So, that's a no, eh? Well. I didn't try it yet. So i'm alive :D

    Thanks anyways.

    You can measure the current generated with the digital volt meter even if you get "0.000" when the meter is set to current mode. You just need to know what the input impedance of the meter is in voltage measuring mode. (You can use a second meter to measure the input resistance (impedance) of the first, or you can find the value in the meter's manual.) Digital meter are often either 1 or 10 Megaohms input impedance. Using Ohm's law you have Current=Voltage/Resistance. A 10 megaohm meter that reads 0.01 volts means the LED is generating 0.01Volt/10^7 Ohms = 10^-9 amps (1 nanoamp). The power generated (or consumed) in a DC circuit is just voltage times current so the LED is generating about 10^-9 Amps * 0.01 Volts = 10^-11 Watts (10 picowatts).

    I am wondering if this will work as part of what I am aiming for.


    How much Current do the LED's output under light?

    My multimeter read .000, so not a lot. I knew I forgot something, thanks. I'll put in step 4.