As a glutton for punishment, I find it is best to keep as many irons in the fire in terms of micro-electronic projects as possible.
My latest fascination is with the bi-directional properties of light emitting diodes. From reading a few dry papers on using LEDs as inputs, I have found there are at least two ways of accomplishing this. First an LED by itself will generate a tiny DC voltage when exposed to a light source of the same or higher frequency of the LED. I think of this as photovoltaic operation. Any high-impedance voltmeter can measure this voltage, and it ranges based on intensity from 0 to 1.5 volts. The other, and perhaps more useful method, is using the LED as a light dependent capacitor. By reverse biasing the LED, a charge is placed on the junction. This charge is then dissipated by the LED’s photovoltaic properties once the reverse bias is removed.
So, using a microcontroller, I have been able to take advantage of this knowledge to create a simple ‘interactive interface’ with a pair of LEDs. The process works like this:
Breadboard setup: 2 LEDs, 2 current limiting resistors in series with the LEDs. LED anodes are connected to bi-directional digital I/O pins on the mcu. LED cathodes are connected to bi-directional digital/analog I/O pins on the mcu.
Step 1> Forward bias the led array (all LEDs lit). This entails setting the anode connected IO lines to output a HIGH logic state (current source) and the cathode connected pins to output a LOW logic state (current sink).
Step 2> Reverse bias the first led in the array. I accomplish this by switching the rolls of the anode and cathode pins. Anode = sink, Cathode = source. This charges the capacitance of the led up to a logic HIGH potential (+5v).
Step 3> Switch the cathode connected pin into a high-z input mode and connect it to the microcontrollers ADC.
Step 4> Perform an analog to digital conversion on the LED, reading the voltage potential stored in the LED. I’ve obtained values around 3.3 volts while the led is “dark” and as low as 0.9 volts while the led is brightly lit by the rest of the array via a mirror. Using a red laser pointer fully discharges the LED resulting in a 0 volt sample.
Step 5> Forward bias the LED again, switching the cathode connected pin back into a digital output of a logic LOW state.
Step 6> Repeat steps 2 through 6 for remaining LEDs in the array
Step 7> Dump ADC results to the serial port for analysis by the host PC.
On paper, this sounds like a lot of work, but thanks to the mighty Microchip PIC microcontroller, it’s really just a series of setting bitwise registers on the PIC and reading the ADC results.
I want to try connecting an op-amp inline with the ADC sampling to try to increase the response time of the led… right now I’m using a 1ms analog sample time, which is causing a slight flicker in my array. If I can halve that it should eliminate any flicker. The problem with a faster sample time is I loose dynamic range or “brightness sensitivity”. I believe this is due to the fact the LED does not discharge fast enough.
A forum member on the linear1 forum recommended I place a resistor across the LED to speed up this discharge. It is certainly worth trying, and simpler than wiring in an op-amp!
Stay tuned…
Popularity: 80% [?]
The diode technically creates a current proportional to the power of the light it is receiving.
Also the “speed” of your circuit is related to the capacitance in the diodes. Smaller diodes have less capacitance that leads to a smaller RC time constant and faster discharges.
Matthew
February 24th, 2006
Sorry for the double post, but I wanted to add the that the ‘change in capacitance’ you are seeing is also from the current being generated by the LEDs. The diode (which contains some capacitance as mentioned before) cannot discharge as quickly with extra current being created.
Matthew
February 24th, 2006
like this is so old. in the matter of technology. I remember that I had a old player, that plays the big round things, vintage. Any way it had same type of control for all of its butons. And the thing is like 25 years old.
kakarot
May 21st, 2006
well sure it’s old … Mimms guy wrote about it in the 70s … although I honestly doubt your record player used the bidirectional nature of LEDs as some sort of button, it’s just not reliable as a mass production real world interface.
justDIY
May 21st, 2006
[...] JustDIY has done some extensive testing and documentation of a phenomenon that is not very well known. LEDs can be used as an input device! This is a collection of the work I’ve done with using the bi-directional properties of LEDs. I have also included links to information I’ve found on the subject and the project by an NYU research that inspired me [...]
Dee’s-Planet! » LED Touch Sensor
June 5th, 2006
[...] JustDIY proves that LEDs can be used for more than lighting, but also as an input device. This is a collection of the work I’ve done with using the bi-directional properties of LEDs. I have also included links to information I’ve found on the subject and the project by an NYU research that inspired me [...]
我不喜欢-Blog » Top 5 Strangest LED Projects
July 17th, 2006