using a LED as a light sensor

Hey, 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 to
John Larkin
Loading thread data ...

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 to
GregS

I think I can see a way to work this, in a CPLD; will test as time permits.

-jg

Reply to
Jim Granville

Results :

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 to
Jim Granville

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.

Reply to
dungaree

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 ( snipped-for-privacy@misty.com)

Reply to
Don Klipstein

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 to
Grzegorz Mazur

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 to
Paul Keinanen

That's a very ugly methodology, leave it to Larkin to use such a thing.

Reply to
Fred Bloggs

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.

Reply to
jpopelish

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

Reply to
Fred Bloggs

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

Reply to
John Larkin
[...]

ITYM Roy G. Biv. Green is longer than blue.

Regards, -=Dave

--
Change is inevitable, progress is not.
Reply to
Dave Hansen

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

Reply to
John Larkin

hi thats a good thought i havent heared it before

Reply to
kishan.zorro

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)

Reply to
Sjouke Burry

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.

Reply to
dungaree

Invented, I think, by Forrest Mims about 25 years ago, and the subject of a patentability dispute, or something. Google it.

Reply to
mc

Yeah, I did that for a class project some years ago... 1Mbps was fairly easy with pedestrian op-amps doing the heavy lifting, although I had read Phil Hobb's notes on noise in photodetectors to optimize the design somewhat (they helped so much I decided to go out and buy his book). The original goal was to have a full-duplex system via time-division multiplexing, but I ran out of time to do it (initially synchronizing the two ends when they're first turned on takes a bit of effort), so instead I just had a toggle switch that turned everything around.

Getting way off-topic here:

At the time I argued something along the lines of how RS-232 to fiber optic converters are often used for long distance links in harsh environments (e.g., production floors), and how requiring only one fiber rather than two would save costs. I realize these days that, while, sure, it does save costs, in many plants the labor of installing *any* sort of link completely outweighs the costs of the actual fiber, associated hardware, etc.

I do know of a couple of plants where this wouldn't be the case, though -- a sawmill here in Oregon where the owner has literally dozens of little microcontroller-based projects running the place that he designed himself (most are just soldered together on perfboard because they're all one-offs), and a glass factory in Wisconsin where the entire float glass line is overseen by a single PC... running a DOS program designed some time in the late-'80s! (If you asked someone to design such a system for you, these days the response would probably involve multiple PLCs, multiple PCs, etc...)

---Joel Kolstad

Reply to
Joel Kolstad

I didn't know he invented the idea, but I have his book describing the technique. I think he recommended heatshrink tubing to seal them into a unit.

A related idea was used in a microbarometer project in Scientific American's Amateur Scientist column many years back. It used a pair of LEDs to monitor the height of a meniscus of DOT brake fluid in a glass tube for an on/off control loop.

Jon

Reply to
Jonathan Kirwan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.