LED as a light detector
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
LED as a light detector
I had remembered hearing about using an ordinary LED as a simple light detector.
I've just got round to trying some simple tests to see if it worked.
Connect an LED across the DCV on a digital multimeter and shine a light on it. (No resistor needed)
I used my halogen desk lamp. (the bulb is 12V and quite bright) and put the led just under the lamp.
I got the following results.
Unbranded rally specials
Red LED =1.3 V
Orange LED = 1.3 V
Yellow LED = 1.5 V
Infrared LED = 0.9V
Good quality high brightness LEDs from Rapid Electronics
Clear Yellow = 1.5 V
Clear Blue = 1.5 V
UV LED = No response in visible or green laser light
But I found the clear ones also responded to being placed next to a 5mW green laser and gave about 1.9 V. The infrared gave about 0.8V under green laser light.
Obviously they will not be able to supply any current but its an interesting idea.
I would expect they will respond best to light of the same wavelength they are designed to emit.
Two LEDs of the same colour connected with a non-transparent tube sush as heat shrink could possibly be used as a makeshift opto-coupler.
Next I will have to see if I can use a microcontroller to detect the output.
I've just got round to trying some simple tests to see if it worked.
Connect an LED across the DCV on a digital multimeter and shine a light on it. (No resistor needed)
I used my halogen desk lamp. (the bulb is 12V and quite bright) and put the led just under the lamp.
I got the following results.
Unbranded rally specials
Red LED =1.3 V
Orange LED = 1.3 V
Yellow LED = 1.5 V
Infrared LED = 0.9V
Good quality high brightness LEDs from Rapid Electronics
Clear Yellow = 1.5 V
Clear Blue = 1.5 V
UV LED = No response in visible or green laser light
But I found the clear ones also responded to being placed next to a 5mW green laser and gave about 1.9 V. The infrared gave about 0.8V under green laser light.
Obviously they will not be able to supply any current but its an interesting idea.
I would expect they will respond best to light of the same wavelength they are designed to emit.
Two LEDs of the same colour connected with a non-transparent tube sush as heat shrink could possibly be used as a makeshift opto-coupler.
Next I will have to see if I can use a microcontroller to detect the output.
1 in 10 people understand binary, the other one doesn't !
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LED as a light detector
Hi John,
This is very interesting information indeed!
I did not know that LEDs react to light in this way.
Thanks for sharing this, I also have a play!
Martin
This is very interesting information indeed!
I did not know that LEDs react to light in this way.
Thanks for sharing this, I also have a play!
Martin
Martin
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: LED as a light detector
I think you only need to reverse the polarity of the LED and you have a light sensor.
Try this : resistor tied to Vcc, kathode tied to the other end and the anode to GND.
Measure the voltage across the LED, shine some light and voilà.
I read about this somewhere a while back.
Nicolas
Try this : resistor tied to Vcc, kathode tied to the other end and the anode to GND.
Measure the voltage across the LED, shine some light and voilà.
I read about this somewhere a while back.
Nicolas
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: LED as a light detector
Hello,
Nice project there John.
I have read about lighting technology that runs LEDs on a fairly low frequency PWM. On the space portion of the PWM cycle the LED is sampled and this allows the ambient light levels to be taken into account. This allows lighting to only come on when it's starting to get dark and switch off if another light source comes into the scene or a big light is switched on etc. Might make a good project simply trying to re-create this automatic circuit for a single LED.
I wonder if you could use a RGB led to collect different ambient colour values and then adjust the LED output accordingly to give colour matched light?
It also means that the conspiracy nuts can still rationally claim that the TV is watching us
Nice project there John.
I have read about lighting technology that runs LEDs on a fairly low frequency PWM. On the space portion of the PWM cycle the LED is sampled and this allows the ambient light levels to be taken into account. This allows lighting to only come on when it's starting to get dark and switch off if another light source comes into the scene or a big light is switched on etc. Might make a good project simply trying to re-create this automatic circuit for a single LED.
I wonder if you could use a RGB led to collect different ambient colour values and then adjust the LED output accordingly to give colour matched light?
It also means that the conspiracy nuts can still rationally claim that the TV is watching us
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: LED as a light detector
Heres a quick fcd i did to use an led as a light sensor, connections are in the comments in the fcd, just a simple way to use an led to switch on another at a preset level (been having a homer simpson moment light on, light off, light on. )
although when i was playing around i did manage to get it to act like a switch (a hillbilly cap switch )
Wil post another fcd if i ever get the second one working
Im working on one that just uses one led and samples during the off periods but im stuck as i need to switch port bit from an output to an input, but i cant get it to work (deleted the fcd for that as i had a hissy fit ) although when i was playing around i did manage to get it to act like a switch (a hillbilly cap switch )
Wil post another fcd if i ever get the second one working
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 1314
- Joined: Sun Jan 15, 2012 3:15 pm
- Has thanked: 474 times
- Been thanked: 458 times
- Contact:
Re: LED as a light detector
Well i finally kinda figured it out with a pic i spent most of today trying to get it to work wit an 18f26k80 but could not get the lcd to work, so swopped it for a P18F27J53 which woked first go, the attached flowchart(im not very good with flowcode ) is not the prettiest solution but it works and needs fine tuning,it's a fun circuit as you use one led with the anode connected to an adc channel and the cathode to a different pin and by repeatedly switching the adc from an input to an output ,with the corresponding action on the other pin, the led switches between a sensor and a light. there is a delay in the chart this needs experimenting with as it allows less flicker depending on the led you use, its almost flicker free if viewed front on but you can see the flicker from the side as its just a test to prove the concept it will flicker when its at the threshold point of switchin on when it gets dark(you choose this point instructions are in the chart), i've added an lcd to show the adc readings so you can choose the point that the led switches on, much smoother transitions could be achieved using pwm output and measuring on the low point but thats beyond my abilities at the moment.
The next thing to work on with this is to get it to talk to another one and send basic data, so feel free to chip in with ideas how i can do this as i aint got a clue
Regards
Dazz
The next thing to work on with this is to get it to talk to another one and send basic data, so feel free to chip in with ideas how i can do this as i aint got a clue
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: LED as a light detector
Thanks Nicolas
I like it
I like it
1 in 10 people understand binary, the other one doesn't !
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: LED as a light detector
(Didn't see this before)
Anyways you'll need to have the LEDs right next to each other to have a good data transfer so it's probably just a fun thing to try but still useless .
Nicolas
You could probably try a software I²C with a clock frequency adapted to the sample rate of the ADC so you could use a pin interrupt based ADC.dazz wrote:The next thing to work on with this is to get it to talk to another one and send basic data, so feel free to chip in with ideas how i can do this as i aint got a clue
Anyways you'll need to have the LEDs right next to each other to have a good data transfer so it's probably just a fun thing to try but still useless .
Nicolas
-
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Contact:
Re: LED as a light detector
Just tried this today with my scope and a bright green LED and I'm getting negative voltage (From 0V to -1V approx).
Kathode to + of probe and anode to - of the probe.
Not sure if you guys had the same thing.
Anyways I don't think I can use neg voltage with the PIC's ADC.
Maybe I'm just doing it wrong ?
EDIT:
Yep, wrong way ... :/
Tried with resistor + LED backwards but that didn't do anything .
Also, my probe doesn't work well anymore, I need a new one.
Kathode to + of probe and anode to - of the probe.
Not sure if you guys had the same thing.
Anyways I don't think I can use neg voltage with the PIC's ADC.
Maybe I'm just doing it wrong ?
EDIT:
Yep, wrong way ... :/
Tried with resistor + LED backwards but that didn't do anything .
Also, my probe doesn't work well anymore, I need a new one.
Re: LED as a light detector
read your light detector idea using led's
my understanding is that voltage is joules of energy per coulomb of charge so if you read a voltage it can only be done by actually drawing electrons across the contacts and hence across that potential difference you read even if it is in picoamps there is a current..so to make a detector simply requires a massive bootstrap amp such as a cmos opamp with a gain of 100,000 or more that can feed its output to an input pin of an mcu
my understanding is that voltage is joules of energy per coulomb of charge so if you read a voltage it can only be done by actually drawing electrons across the contacts and hence across that potential difference you read even if it is in picoamps there is a current..so to make a detector simply requires a massive bootstrap amp such as a cmos opamp with a gain of 100,000 or more that can feed its output to an input pin of an mcu