LED as light emitter and light detector
virtuPIC
Posts: 193
Well, the idea is not that new. You can find it on many pages related to other controllers. However, I've not found an implementation on the prop so far.
LED means Light Emitting Diode. And if you give a reverse voltage to a semiconductor diode it has a certain capacitance. Even better: The leakage current of such a diode in blocking mode depends on the light falling in. That's why switching diodes are packed into black plastic.
If you give a blocking voltage to an LED you will charge this capacitance. Now disconnect the charger and measure the time the lonely LED needs to discharge to a threshold. You get a value dependent on the light.
You can still operate the LED for light emission when you don't use it as a sensor. If you have two devices you only need two LEDs and two resistors for wireless half duplex transmission! The bad news is that this simple circuitry is rather slow in discharging the LED. I am still thinking how to accelerate it. Resistor in parallel? Lower charge voltage?
If you want to experiment you'll find a small test / demo program attached. Plug an LED and a resistor to your prop demo board, load the program and get an LED adapting its brightness to ambient illumination. It works by charging, discharging, and flashing the LED. If it gets dark the discharge time will be long enough that the LED will flicker or even blink.
It's fun to watch and enlightening!
P.S.: You could connect an LED matrix display and use it as a touch pad. Even multi-touch. But only for your private use since there is already a patent on this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
LED means Light Emitting Diode. And if you give a reverse voltage to a semiconductor diode it has a certain capacitance. Even better: The leakage current of such a diode in blocking mode depends on the light falling in. That's why switching diodes are packed into black plastic.
If you give a blocking voltage to an LED you will charge this capacitance. Now disconnect the charger and measure the time the lonely LED needs to discharge to a threshold. You get a value dependent on the light.
You can still operate the LED for light emission when you don't use it as a sensor. If you have two devices you only need two LEDs and two resistors for wireless half duplex transmission! The bad news is that this simple circuitry is rather slow in discharging the LED. I am still thinking how to accelerate it. Resistor in parallel? Lower charge voltage?
If you want to experiment you'll find a small test / demo program attached. Plug an LED and a resistor to your prop demo board, load the program and get an LED adapting its brightness to ambient illumination. It works by charging, discharging, and flashing the LED. If it gets dark the discharge time will be long enough that the LED will flicker or even blink.
It's fun to watch and enlightening!
P.S.: You could connect an LED matrix display and use it as a touch pad. Even multi-touch. But only for your private use since there is already a patent on this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
Comments
I just though, well, a LED produces voltage when exposed to light. I can measure it with my DVM. So why not use the Prop as ADC just to measure that voltage.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I just plugged a resistor of 1 MOhn to 10 MOhm in parallel to the LED and got lower resolution but higher sample rate.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Here is one such thread but I think it's older: http://forums.parallax.com/showthread.php?p=589699
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Ned
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"They may have computers, and other weapons of mass destruction." - Janet Reno
If you go back, even further, Tracy Allen was doing this during the very first seminar that the Propeller was introduced to the public.
http://forums.parallax.com/showthread.php?p=574644
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
It is stil only virtuPIC that have PASM code to that
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
We used to do that conversion at school.
You can still buy OC71 herestore.triodestore.com/mullardoc71.html
I had a devil of a job calibrating some radar equipment once, until I discovered that one of the diodes in the circuit was light sensitive. Get everything set up nicely, then close the lid, wtf it's all wrong again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I remember White/blue/red spot devices
Oh yes. They came with my Philips Electronic Engineer kit. But that also had LDRs for light detection.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
2005: Multi-touch sensing light emitting diode display and method for using the same
This patent is not on the sensor itself but on how to combine many sensors to form a sensor matrix to locate a finger, stick, or whatever touching its surface. I consider this circuit almost trivial. The LED-sensor idea has been published years before. A Mitsubishi paper dates 2003. And yes, bipolar junctions are known to be slight sensors already for decades.
You can use an LED as light sensor without any legal problem. But if you build a matrix of them you should do it different from the patent mentioned above.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
That was a good experimentation kit!! The lad was able to hack into the Air Traffic Control system!!
And there was me, happy to get a cystal set going
Tried building a crystal set again last year, could not get it to work. Eventually came to the conclusion that there is not much around here to receive on a.m. any more.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
Patenting PWM on LED to dim them I think is pushing it a little far though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
This started me thinking patents have always been very "odd".
Of course a lot hinges on ones interpretation of "obvious".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
· Search the Propeller forums (via Google)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Got zapt by 347V at work once. That hurts a lot.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My new unsecure propmod both 1x1 and full size arriving soon.
cs.nyu.edu/~jhan/ledtouch/index.html
Back up to the ~jhan directory to see other interesting interactive displays. The patent application is good reading.
I was intrigued by the lead up in a BASIC Stamp thread[noparse][[/noparse] that came up just before the Propeller beta seminar, and that is why I was fooling around with the LED there.
For use in half duplex communication channel I think there is no getting around the fact that the photo ("leakage") current is very small, and it becomes vanishingly small as the light intensity decreases with distance. No room for stray light! Stray capacitance of breadboards etc. should be reduced to a minumum, so that it is only the LED reverse diode capacitance that has to be charged. On the other hand, extra capacitance is needed when using the LED to measure bright sources like the sun.
In the limit of photo current there is the temperature dependent "dark" or "saturation" current. Green gallium nitride LEDs are quite good as photo detectors in that limit, due to their high band gap voltage, higher than silicon or even gallium arsenide.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I like the basic idea: Use an LED as a sensor, as a detector. Measuring the leakage is easy: Capacitor and resistor of the needed ADC are already integrated in the LED. You need no other hardware! If you use a phototransistor you need at least a capacitor. Okay, we could try to use the BE-capacitance... However, as I said before, this sensor is rather slow. If you use the photovoltaic effect of the LED you are much faster: www.edn.com/article/CA150821.htm claims up to 250 kpbs for half duplex transmission. But the respective circuit uses two op-amps, several passive elements and a transistor for transmission.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
The EDN article uses an IR led, driven at about 35 mA. Some IR leds can be driven to large pulse powers, for example, I am working with one now, an Osram SFH4550, that can be pulsed up to a good fraction of an 1 amp and over 1000 mW per steridian in a 3 degree beam. Schemes like IrDA use short pulses for transmission, shorter than the normal bit duration. The reason is so that the flashes can be brighter for more distance, without compromising battery life.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Well, yes: The SD integrator is a similar idea like mine to use voltage only a little over threshold to charge. Both ideas are rather demanding. Do we know the exact threshold voltage? We are dealing with a capacitance smaller than 50 pF, currents of at most a few nA, resistances of hundreds of MOhm.
The question is the purpose of such a device. If you want to use it for data transmission you won't get it real fast. I estimate at most the magnitude of analog phone modems. In this case I would try the photoelectric generator of the EDN article. (Also with visible light LED.) Touch sensors don't need to be that fast. However, when I unplugged the LED I got a reliable capacitive touch sensor. But I want to build a illumination-controlled automatic door with photoelectric sensor for control and security with as few hardware as possible. Looks perfect for this purpose!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
outa := ((|< >| ratio -1) << 16) | (ledmask & outa) ' transfer log ratio to demo leds
The ratio was in relation to an initial or calibration light level, so that the display could show 4 doublings above and below the initial value.
As an aside, another use for green GaN leds is as feedback for logarithmic or log ratio amplifiers. (Shielded from light, of course!) Conformity to the log curve depends on current being much greater than the saturation (dark) current, and with its ~3 volt bandgap voltage, GaN can have a theoretical saturation current down in the femto-Ampere range.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
But, I don't think an RGB LED in clear plastic would give much contrast between the colors.· But, I could imagine maybe a little contrast due to the different bandgaps of the semiconductors involved...
On second thought, I think the different bandgaps should let you tell something about the color of light involved.· But, the red LED would be sensitive to red, green, and blue light, green to just green and blue, and blue to just blue...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Post Edited (Rayman) : 5/13/2009 2:17:32 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Oh, you don't find the code attached to this message. I finally did it. I started my propeller microcontroller blog where I will publish my ideas. This is the first one.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys