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."

Photodiode:

"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).

Testing:



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!

Comments

author
T-Urn made it!(author)2010-07-06

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.

author
ahmedabutahoun2003 made it!(author)2015-06-17

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

author
_soapy_ made it!(author)2016-09-20

Hopefully you are still alive.

Everyone else, don't do this!

author
ahmedabutahoun2003 made it!(author)2016-09-25

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

Thanks anyways.

author
ferd_berfal made it!(author)2016-02-05

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).

author
findnemo made it!(author)2015-12-30

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

https://www.instructables.com/community/Led-notification-button-using-USB-car-charger/

author
ReCreate made it!(author)2009-06-13

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

author
Zorink made it!(author)2009-06-13

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

author
AndyCSWu made it!(author)2010-02-06

I connect 30 green LEDs in parallel. They generate 1.3V under a lamp. The current I get is 1.1 uA or 0.0011 mA. But the connection test of my multimeter doesn't beep when I test them.

author
zbot473 made it!(author)2015-08-25

Do the LEDs need some kind of voltage running through them

author
zbot473 made it!(author)2015-08-25

Nice job dude

author
ReCreate made it!(author)2010-02-08

Wow. Some mad efficiency we got here. :P

author
ReCreate made it!(author)2009-06-13

Hmm...That is Unusual.

author
scratchr made it!(author)2010-03-11

leds use silicon, also used in solar cells

author
gomibakou made it!(author)2014-02-20

I've tested some LED i had laying around. I tested with a low-consuption 9W bulb, moving from 10-15cm to almost touching the LED, and tapping it with my hand or something opaque.

Normal Red LED: 40mV-60mV full exposure. Tapped, 6mW or lower. Reacts really slow, similar to LDR

Normal Green LED: 500mV-1200mV full exposure. Tapped, oscillates until 40mV. Reacts fast on changes.

Normal Yellow LED: similar values but slighty lower to green. Equal reaction.

Crystal ultra luminosity Green LED: values similar to normal red LED

The best performance was achieved with the normal green led.

I hope this helps.

author
gomibakou made it!(author)2014-02-20

I forgot i also had some IR LEDs (clear and coloured). In both cases i got the same results: 20mV to 550mV full exposure, response is fast.

Notice that LEDs also detect light around them, so even when you tap them with your hand or similar, they will show high values. That is why even placing the light source far, they still show voltage values around dozen of milivolts instead close to 0 (darkness). Therefore you need to isolate them from indirect light to get accurate measures.

Btw, connect the LED as usual in Diode test mode in multimeter: cathode to GND (black probe) and anode to VCC (red probe).

author
zbot473 made it!(author)2015-08-25

One of the arduino experiments uses this led though hooked up to an NPN transistor

author
erwin.laarhoven.5 made it!(author)2014-11-08

does that make a led tv a camera?

author
zbot473 made it!(author)2015-08-25

No these led just see change in brightness

author
jenengjen made it!(author)2015-03-31

How perceptive erwin, yes, most leds are also a camera... It must have the appropriate chips, of course. Would you like to know more about architecture? http://www.orientaltrading.com/harvest-inspirations-bible-verse-sign-craft-kit-a2-48_6901.fltr

author
nanoBorg88 made it!(author)2015-05-14

Hi, I remember coming across a technique to use leds as sensors and I'm suprised no-one had mentioned it. The way the document had said to do it is to put the led in reverse bias, and count the number of microseconds for it to discharge. In light it will discharge faster than in dark. I am yet to try it but I think it would work more reliably.

author
sekar.v made it!(author)2014-07-13

good to know....thanks

author
sarvesh7 made it!(author)2014-04-27

can anyone pls tell me which one will create highest voltage in sunlight

author
ydanay made it!(author)2014-02-26

I did this as a science project. I got an A+. I knew about it anyway, but I needed this for reference. Thanks!!

author
munymuny200 made it!(author)2011-01-29

r those black leds if so where can i get them

author
micobanff made it!(author)2011-07-17

They are infrared LEDs... they are more commonly clear cases.
Most online LED suppliers will have infrared LEDs, not sure which ones will have coloured casings.

author
ydanay made it!(author)2014-02-08

They are also commonly seen in purple cases, but I doubt this will be helpful 2-3 years after the fact. :)

author
Poorna+Prasad made it!(author)2013-04-18

Whats the name of the arduino used here? I mean the Model?
Someone pls help !

author
ydanay made it!(author)2014-01-30

Duemilanove. But I believe that you can with any other Arduino Board, or any other board for that matter, not just Arduino.

author
lekirst made it!(author)2013-11-05

is there a way to alter the code so the output led is the same as the sensor led?
I tried this (http://playground.arduino.cc/Learning/LEDSensor) code, but doesn't seem to be very stable.

author
bdjumakov made it!(author)2013-08-09

How do you connect the leds for sensing? (for example GND ----|>|---DPin2 or DPin3 ----|>|---DPin2)
Thanks

author
FtForger made it!(author)2012-09-17

Are you positive you were getting over 1 volt? Are you sure your meter wasn't on a different scale? I spent several hours tested about 25 (mix of red and white) LEDs. I was getting about 15 millivolts out of most of them, with a few as high as 25-28 millivolts, but none anywhere near a volt.

author
Zorink made it!(author)2011-11-27

I have not been able to light up another LED, but I'm sure you could if you string enough together. The voltage is great for an analog input pin on an IC, but the current isn't enough to drive an LED.

I am unfamiliar with the band, I'll have to look them up!

author
wild_blaze made it!(author)2011-06-17

btw i got 0.33 volts from a green LED........

author
wild_blaze made it!(author)2011-06-17

just watchd d video......i think...u really don't need an arduino...or any microcontroller for that........btw nice concept............

author
lukeD made it!(author)2011-05-29

I've got a question:
can I use a normal LED to make a security system?

my plan was to make it in my room. a laser light pointing at the LED and if the laser beam is interrupted (if the door is open, or if somebody walks by) that I can see that somebody was in my room.
would this whole plan be possible with a normal LED?

author
Zorink made it!(author)2011-05-29

It would work okay, but I'd use a component that is actually made to be a photo-detector. I've seen it done with IR or lasers depending on the distance you need. For just a door an IR LED with an IR detector would work as long as there are no other large sources of IR near it (certain lights, the sun, etc shining on the sensor).

Here is one I found with a bit of google
http://hackaday.com/2011/04/19/laser-trip-wire-the-bare-essentials/

author
lukeD made it!(author)2011-05-30

can you find a IR detector in household stuff?

author
Zorink made it!(author)2011-05-30

They are pretty cheap. I think Radio Shack has them for a few bucks.

author
lukeD made it!(author)2011-05-29

rated *5

author
kcd12321 made it!(author)2011-05-06

Really interesting and cool. The straw had a great effect.

author
beehard44 made it!(author)2011-02-24

i was wondering if i can make an earpiece out of this (passive receiver) but i doubt if the LEDs can supply enough power. i'll try it tho

author
Electronics+Blurred made it!(author)2010-09-23

Because , like diodes ,
diodes were able to be turned into electricity generating stuff .
Now , if you are worried about it not producing enough voltage , use a op-amp , this site , is so freaking clever .
http://www.wikihow.com/Make-a-Motion-Detector
i didn't say it's the best , there might be more ,

author
Zorink made it!(author)2010-09-23

opamps are magic

author
Chowmix12 made it!(author)2010-06-02

LED solar panel FTW!!

author
strmrnnr made it!(author)2010-03-22

I may have to play with this idea some day. The current may show up if a load is introduced.

I wonder how many LEDs it would take collecting light to power 1 LED emitting light at full power.

author
Ender2007 made it!(author)2010-03-22

Very nice!
Thanks.

author
billbillt made it!(author)2010-01-16

This is great! Could you maybe provide a simple hook up diagram or schematic?
                                   Thanks!

author
scratchr made it!(author)2010-03-11

This only uses 2 leds, 2 transistors, and a 9v.

untitled_1.png
author
billbillt made it!(author)2010-03-16

Thanks for this!

About This Instructable

156,434views

136favorites

License:

More by Zorink:LEDs as light sensorsLarge Jacob's LadderRapidprototyped Weighted <DEL>Companion</DEL> Storage Cube
Add instructable to: