EmbeddedRelated.com
Forums

using a LED as a light sensor

Started by BrunoG May 6, 2006
Paul Keinanen wrote:

> A red LED in a red case would receive only very little green or blue > light and thus produce very little current.
I agree, completely. I think this is the reason you see so many reports of poor performance of LEDs as light sensors. It is also a possible reason that blue LEDs are so variable, type to type. Some of the epoxy cases may be more transparent to UV than others, but this difference is not evident to the eye.

jpopelish@rica.net wrote:
> Paul Keinanen wrote: > > >>A red LED in a red case would receive only very little green or blue >>light and thus produce very little current. > > > I agree, completely. I think this is the reason you see so many > reports of poor performance of LEDs as light sensors. It is also a > possible reason that blue LEDs are so variable, type to type. Some of > the epoxy cases may be more transparent to UV than others, but this > difference is not evident to the eye. >
The operative mnemonic is Roy B. Giv in so far as the wavelength hierarchy of efficient light power to current conversion. Any LED emitter will efficiently convert wavelengths to its left in the sequence, red-orange-yellow- etc...
On Tue, 09 May 2006 12:17:22 GMT, Fred Bloggs <nospam@nospam.com>
wrote:

> > >Spehro Pefhany wrote: >> On Sun, 07 May 2006 21:07:08 GMT, the renowned Fred Bloggs >> <nospam@nospam.com> wrote: >> >> >>> >>>Spehro Pefhany wrote: >>> >>>>On Sun, 07 May 2006 17:04:11 GMT, the renowned Fred Bloggs >>>><nospam@nospam.com> wrote: >>>> >>>> >>>> >>>>>John Larkin wrote: >>>>> >>>>> >>>>> >>>>>>For a more serious challenge, use the live 7-seg display itself as the >>>>>>ambient light sensor. No ADC allowed. For advanced credit, no extra >>>>>>parts allowed at all, just firmware. >>>>>> >>>>> >>>>>Is that for continuous adjustment or just Lo/Hi operation thresholding? >>>> >>>> >>>>Either way is possible. Perhaps not repeatable or reliable. >>>> >>>> >>>>Best regards, >>>>Spehro Pefhany >>> >>>Well I'm not getting how this is done without extra circuits and just >>>firmware, where "extra circuits" is anything other than a LED driver, or >>>IOW only circuits that are strictly output and no inputs. I can see how >>>you could reverse the voltage across the whole array by opening or >>>driving the common and then detecting reverse current, but no detection >>>ckts are allowed. >> >> >> Preset the output to a known level (eg. Vss or Vdd), switch the output >> drive to an input and measure the time for the input, diode and stray >> capacitance to charge with the photodiode current from the initial >> level to the input threshold. >> >> >> Best regards, >> Spehro Pefhany > >That's a very ugly methodology, leave it to Larkin to use such a thing.
I'll use anything that's reliable and profitable. And if it's clever and fun, even better. The 7-seg as its own light sensor falls into the clever category, but it may not be reliable, since we'd have no good control over the photosensitivity of the displays on a production basis. A proper photodiode, connected directly to a uC port pin and doing the tristate pump/discharge thing, would be perfectly good in a lot of applications, providing "analog" light measurement ability. It was an idea to play with. I know you don't approve of ideas, or of playing. John
On Tue, 09 May 2006 12:52:39 GMT in comp.arch.embedded, Fred Bloggs
<nospam@nospam.com> wrote:

[...]
> >The operative mnemonic is Roy B. Giv in so far as the wavelength
ITYM Roy G. Biv. Green is longer than blue. Regards, -=Dave -- Change is inevitable, progress is not.
On Tue, 09 May 2006 04:16:52 GMT, "dungaree" <matilda@downunder.biz>
wrote:

> >"Peter Dickerson" <first{dot}surname@tesco.net> wrote in message >news:gzF7g.2141$pj4.78@newsfe1-win.ntli.net... >> "Spehro Pefhany" <speffSNIP@interlogDOTyou.knowwhat> wrote in message >> news:619u52tt1vjveq72agp691mm9d86ustcak@4ax.com... >>> On 7 May 2006 23:37:15 -0700, the renowned "Antti" >>> <Antti.Lukats@xilant.com> wrote: >>> >>> >hum.. >>> > >>> >I am doing exactly this with an FPGA >>> >but I only see about 0.2% timing difference between dark and light >>> > >>> >with some other methods the difference is about 10% >>> >Antti >>> >>> Maybe there's an internal pull-up or pull-down you need to turn off. >> >> I'm a bit surprised that LED's are sensitive enough to use a simple input >> port discharge approach. Microcontroller ports typically spec input >> leakage >> in th 1 uA to 10 uA range without pullups. OK, that's over the temperature >> range. But we are not trying to make a temperature sensor but a light >> sensor. 1 uA of photocurrent is a lot of current - about 5 x the >> saturation >> level of the systems I use with 5x5 mm photodiodes. so, yes, I would >> surprised if the timing change from dark to light was very great - and >> swamped by the change with temperature. >> >> Peter > >Out of curiosity I just stuck a red LED on a volt meter to see the voltage >swing. >In bright room light, the LED generated about 20millivolts max. That level >is in the noise floor of most microcontrollers. > >
Connected to a port pin, it would be more reasonable to use it in reversed-biased photodiode mode, where volts of swing are easily available. John
hi
thats a  good thought i havent heared it before

dungaree wrote:
> "Peter Dickerson" <first{dot}surname@tesco.net> wrote in message > news:gzF7g.2141$pj4.78@newsfe1-win.ntli.net... > >>"Spehro Pefhany" <speffSNIP@interlogDOTyou.knowwhat> wrote in message >>news:619u52tt1vjveq72agp691mm9d86ustcak@4ax.com... >> >>>On 7 May 2006 23:37:15 -0700, the renowned "Antti" >>><Antti.Lukats@xilant.com> wrote: >>> >>> >>>>hum.. >>>> >>>>I am doing exactly this with an FPGA >>>>but I only see about 0.2% timing difference between dark and light >>>> >>>>with some other methods the difference is about 10% >>>>Antti >>> >>>Maybe there's an internal pull-up or pull-down you need to turn off. >> >>I'm a bit surprised that LED's are sensitive enough to use a simple input >>port discharge approach. Microcontroller ports typically spec input >>leakage >>in th 1 uA to 10 uA range without pullups. OK, that's over the temperature >>range. But we are not trying to make a temperature sensor but a light >>sensor. 1 uA of photocurrent is a lot of current - about 5 x the >>saturation >>level of the systems I use with 5x5 mm photodiodes. so, yes, I would >>surprised if the timing change from dark to light was very great - and >>swamped by the change with temperature. >> >>Peter > > > Out of curiosity I just stuck a red LED on a volt meter to see the voltage > swing. > In bright room light, the LED generated about 20millivolts max. That level > is in the noise floor of most microcontrollers. > > >
Same curiosity:very clear uncolored led:150 millivolts in 6 oclock pm daylight. ( a pity leds do not show any type mark , could have been a IR led)
kishan.zorro@gmail.com wrote:
> > thats a good thought i havent heared it before
What's a good thought? Include context. See below. -- "I'm a war president. I make decisions here in the Oval Office in foreign policy matters with war on my mind." - GWB 2004-2-8 "If I knew then what I know today, I would still have invaded Iraq. It was the right decision" - G.W. Bush, 2004-08-02 "This notion that the United States is getting ready to attack Iran is simply ridiculous. And having said that, all options are on the table." - George W. Bush, Brussels, 2005-02-22
Seems one could take advantage of  opto ability of LEDS
as a bi-directional optical data coupler.

Point the LEDs at one another. Digital data should easily
be transferred half-duplex in both directions.

Cool.



"dungaree" <matilda@downunder.biz> wrote in message 
news:iHc8g.75088$H71.14012@newssvr13.news.prodigy.com...
> Seems one could take advantage of opto ability of LEDS > as a bi-directional optical data coupler. > > Point the LEDs at one another. Digital data should easily > be transferred half-duplex in both directions. > > Cool.
Invented, I think, by Forrest Mims about 25 years ago, and the subject of a patentability dispute, or something. Google it.