P416 was a great metal can housed Ge transistor :) had them as toys at age of 1.5 years (in 1967) and later on used them with removed hats as light sensor as well. even better use can find old ceramic packaged DRAMs som guy had them connected to LPT port and used as image sensor some while ago those schematics and software used to be online. oh well today real image sensor are cheaper than ceramic packaged memories Antti
using a LED as a light sensor
Started by ●May 6, 2006
Reply by ●May 8, 20062006-05-08
Reply by ●May 8, 20062006-05-08
On Sun, 07 May 2006 09:36:02 -0700, Jim Thompson <To-Email-Use-The-Envelope-Icon@My-Web-Site.com> wrote:>On Sun, 07 May 2006 09:19:49 -0700, John Larkin ><jjlarkin@highNOTlandTHIStechnologyPART.com> wrote: > >>On Sun, 7 May 2006 01:30:42 +0200, "BrunoG" >><please_reply_in_the_forums@www.micro-examples.com> wrote: >> >>>Hi, >>> >>>Here is an idea about using a LED as a light sensor, to dim a 7-segments LED >>>display : >>> >>>http://www.micro-examples.com/public/microex-navig/doc/096-led-light-sensor.html >>> >>>Questions & comments are welcome ! >>> >>>Thanks, >>> >>>Bruno >>> >> >>Too many excmamation points! >> >>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. >> >>John >> >> > >Are LED's more efficient as light sensors than so called photo diodes? > > ...Jim ThompsonHey, the sun came out! Weird. Random yellow T-1 LED, -9 volt bias, full sunlight, 2 uA. As a pv, it makes 1.5 volts into a 10 meg fluke, pointed at the sun, but only about 7 mv in office/room light. John
Reply by ●May 8, 20062006-05-08
In article <HNK7g.84056$dW3.15371@newssvr21.news.prodigy.com>, DecaturTxCowboy <forgetit@bummer.com> wrote:>BrunoG wrote: >> Hi, >> >> Here is an idea about using a LED as a light sensor, to dim a 7-segments LED >> display : > >Reminds me when I needed a light sensor on the spur of the moment. I >took a pair of dykes and peeled off the metal can of a transistor and >used that.I got out the old LED tray a couple of months ago and was basically testing LED's and photodiodes for light sensitivity. The photodiodes were easily recognizable compared to LED's and some LED's have very little light sensitivity, but I still need to finish that batch. I built a probe for my portable oscilloscope so I can measure light noise from overhead lighting. greg
Reply by ●May 8, 20062006-05-08
Antti wrote:> well I was able to make a iopad oscillator that had frequency change > 10% based on light intensity, and even that was possible bad solution, > eg the change could be even larger. > > but getting stable absolute reading is probably more difficult or > impossible due to temperature, effects, etcI think I can see a way to work this, in a CPLD; will test as time permits. -jg
Reply by ●May 8, 20062006-05-08
Jim Granville wrote:> Antti wrote: > >> well I was able to make a iopad oscillator that had frequency change >> 10% based on light intensity, and even that was possible bad solution, >> eg the change could be even larger. >> >> but getting stable absolute reading is probably more difficult or >> impossible due to temperature, effects, etc > > > I think I can see a way to work this, in a CPLD; will test as time > permits. > -jgResults : Circuit 1: Connect LED as photo-Diode, into a CPLD, wired as Open Collector Schmitt Single Pin oscillator : LED + 1 CPLD pin. No Caps, No resistors ! Freqency is ~ 7-9KHz with incandescent bulb close (Freq variation due to 100Hz light modulation) Freq drops to below 200Hz, as light level reduces. Circuit 2: Drive LED, with simple waveform 25% ON (L), then 25% OFF(H), then TriState the LED pin. The Photo current will drive the LED pin down, and that time does vary with light level. So yes, you can use the same LED to sense ambient light. The practical problem, is the conflicting nature of the drive and bias. The LED Diode starts to clamp the photo current, giving something in region of ~1150mV of available swing, and that has to cross the voltage threshold in order to be timed. Expected wide LOG range of Sense current is observed. Best results with Digital levels, seem to be from a Non Red LED (Amber, or Green), and usable LED Light output comes from Vcc >= 2.5V. With this, see appx 300mV of Sense-Overdrive margin. If more margin is required, options are to raise the LED voltage during sense, or lower the threshold point. -jg
Reply by ●May 9, 20062006-05-09
"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. > > PeterOut 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.
Reply by ●May 9, 20062006-05-09
In art. <UIU7g.67822$_S7.34546@newssvr14.news.prodigy.com>, dungaree wrote:> >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.I just stuck a Radio Shack 276-086A red LED onto a digital voltmeter. This is a 10 mm narrowbeam one with a beam only a few degrees wide, but I expect other GaAlAsP red LEDs to perform similarly when directionality is not an issue. I did not try this tonight with other LEDs out of belief that I knew a winner to pick. 1 meter feet from a kitchen light fixture having a single 13 watt spiral compact fluorescent lamp and a mildly diffusing cover: 1.25 volts. I expect 5 mm narrowbeam GaAlAsP red LEDs to do the same at half this distance. Point-blank-range at surface of compact fluorescent lamp tubing: 1.4 volts. Obviously, for getting waveforms of light intensity, the LED (or photodiode) needs a resistor to load down the voltage to much less than its open circuit voltage, or better still reverse-bias it. Point blank range on my Dell 17 inch CRT monitor: .27 volt. - Don Klipstein (don@misty.com)
Reply by ●May 9, 20062006-05-09
Don Klipstein wrote:> I just stuck a Radio Shack 276-086A red LED onto a digital voltmeter. > This is a 10 mm narrowbeam one with a beam only a few degrees wide, but I > expect other GaAlAsP red LEDs to perform similarly when directionality is > not an issue. > > I did not try this tonight with other LEDs out of belief that I knew a > winner to pick. > > 1 meter feet from a kitchen light fixture having a single 13 watt spiral > compact fluorescent lamp and a mildly diffusing cover: 1.25 volts. > I expect 5 mm narrowbeam GaAlAsP red LEDs to do the same at half this > distance. >A few years ago I made a small toy: AT89C2051 + LED. The LED turns on in the dark and goes off when there is external light. The LED was used as both light source and light sensor in photovoltaic mode - no need to reverse direction and only one uC pin was used. I used comparator input of 2051 as LED input-output. 100 kOhm pot was connected to the other input. The device worked very well, bu the LED selection was critical. Only some red and some orange LEDs were good as light sensors - all green and blue ones didn't work at all. The "good" leds can be easily recognized by connectin them to the digital voltmeter as voltage source. If the voltage produced is > 1V, the LED is "good" as a sensor. Whwn the LED was on, the uC was used to generate PWM output with inactive period of a few msec - during that time the LED was turned off and photovoltaic voltage was measured. Gregory
Reply by ●May 9, 20062006-05-09
On Sun, 07 May 2006 13:33:17 -0400, John Popelish <jpopelish@rica.net> wrote:>Keep in mind that an LED is good at converting to DC, only a range of >wavelengths that are shorter than the emitted wavelength. A red LED >does not respond much to red light, but produces a fair signals when >exposed to green and blue light, etc. Blue LEDs make pretty nice UV >detectors that ignore visible light..This would suggest that only LEDs in a non-colored case would be usable for photovoltaic applications ? A red LED in a red case would receive only very little green or blue light and thus produce very little current. Paul
Reply by ●May 9, 20062006-05-09
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 PefhanyThat's a very ugly methodology, leave it to Larkin to use such a thing.