Lets mess around with LEDs (as photo sensors) - Page 1
Forum section: electronics / projects

author: kakureru
author_rank: Contributor
timestamp: May 09, 2015, 09:28:41 pm
content: I like to re purpose things and rather than buying specialized (insert preferred device here.) I would prefer to use LEDs.This started out as an interest in measuring the different settings on some camera strobes.What I found out instead if the wide responsiveness of LEDs vs different light sources.What I am wondering is if there is any ones(s) who has a range of leds with similar voltage current specs in different colorswho can reproduce this test to see what colors respond the best in what situations.White has the most response to the strobe at around30v3v but Im sure that is because of the phosphors used to make it whiteand the dump of UV light from the strobe which could be reflective by the UV led's response which may be lower than it shoulddue to its physical difference. (phew)no, I don't know these LED's specific details off hand aside general color and forward voltage of around 3.3v.It would be neat to make something to measure light wavelengths on the ultra cheap. (if such a thing does not already exist that is not just a prism)Specific strobe is sunpak 355AF on canon t3itriggered on 11 is Red2 is white3 is UV4 is blue

author: Richard Crowley
author_rank: Super Contributor
timestamp: May 09, 2015, 09:42:46 pm
content: I have been interested in the method of using a single ordinary LED as both an indicator and as a sensor. For example on a user-interface control panel where the LED would be used to sense whether a finger had "pushed" a virtual button or not. Whether it is sensing the ambient light and then senses a shadow from the finger, or whether it is alternately pulsing a low-level light, and then detecting whether anything is being reflected back, etc. I have a printer with a flat plastic panel and some illuminated "icons" that indicate various modes, etc, but the illuminated icons are actually "buttons" and sense when you touch them.

author: PeterFW
author_rank: Frequent Contributor
timestamp: May 09, 2015, 10:00:03 pm
content: Quote from: Richard Crowley on May 09, 2015, 09:42:46 pmThere are a few projects out there that use a LED either as a light sensor, bi directional communication, or touch interface.I made a small light sensor using a attiny with a led, the LED will behave as a tiny photo sensitive capacitor when reverse charged, you only have to measure how long the discharge time is to get a value that is proportional to the light intensity.If i remember correclty, dit that some time ago...If you put two leds near each other on the front panel, you could use them as buttons in theory.Switch on LED1, measure discharge from LED2, switch on LED2, measure dischrage from LED1.If a finger is present on one the light reflected is brighter -> button press.Here is the LED touchscreen:

author: kakureru
author_rank: Contributor
timestamp: May 09, 2015, 11:09:39 pm
content: the use as touch sensitivity is what initially introduced me to things like this way back when.But this time im more interested in using LEDs for sensing their specific (or range of) wavelengths

author: eneuro
author_rank: Super Contributor
timestamp: May 10, 2015, 12:00:42 pm
content: Quote from: kakureru on May 09, 2015, 11:09:39 pmAnyway did you checked in those experiments influence of light angle relative to front of the led?I have no idea if it affects its wavelength sensitivity somehow, but it changed output voltage readings for sure at the same lighting conditions in a way I do not expectedLED (3mm THT yello) absorbing sun light at cloudy day pointed directly to te sun covered by clouds gave me ~3 (three) times lower voltage ~100mV in comparision to its maximum ~300mV which I had when it was turned 90 degrees perpendicular to expected sun rays in a way as if sun was on the top on linked imageCheapy multimeter used probably has ~1M, so this is load resistance, I guess.Didn't check SMD 1206 green LED yet, but it will be interesting to see If this angle also affects those LEDs output voltageLooking on yor osciloscope photos you have those diodes put into scope inputs in a way it detects flashes in a way we expect to get highest readings (front of the led), but my experiment showed it might we wrong assumptionIf you could rectreate different conditions and show us results at different angles it could be interesting if you have also higher response at suggested perpendicular led axis position vs light source rays.

author: kakureru
author_rank: Contributor
timestamp: May 10, 2015, 04:39:26 pm
content: Since i Know I have at least 4 of each kind of led, Ill do an experiment with then at different angles relative to flash butso far when one was drooping during photo session (then corrected for above image), only intensity (peak voltage) was affected not the relative drop off slope.Then perhaps check response each led has to its own kind verses other kinds. (like does red have an effect with an IR or even blue)(before next experiment, I am imagining that the different wavelengths drop off as the strobe powers down)

author: calexanian
author_rank: Super Contributor
timestamp: May 10, 2015, 05:23:51 pm
content: Listen to the Forest Mimms episode of the Amp Hour. He discusses that at length.

author: kakureru
author_rank: Contributor
timestamp: May 10, 2015, 06:58:09 pm
content: ... So with that, with that LEDs I have the best one for my needs is red. (since I am mainly interested in visible light for my needs.)when my other leds come in, I want to see how responsive green and yellow are.

author: daqq
author_rank: Super Contributor
timestamp: May 10, 2015, 07:41:04 pm
content: Neet experiment! Note that the LEDs have quite different spatial characteristics - it would be interesting on how they react to different positions of the photo.QuoteThey did something like this:www.merl.com/papers/docs/tr2003-35.pdf

author: kakureru
author_rank: Contributor
timestamp: May 10, 2015, 08:15:07 pm
content: From what I surmise, An led's wavelength detection is directly relative to its normal light output.That info about Forest Mims helped allot.but alas, I am still going to try it with the red leds and the blue. (due to lens shape and relative differences in color)This will involve putting the same led in all the channels and pointing them in different directions.

author: Kleinstein
author_rank: Super Contributor
timestamp: May 10, 2015, 08:42:54 pm
content: The scope shows times 10 probe. So the actual voltage is more like 0.3 volts. The is no resonable way a LED should provide more than there normal voltage.The curve for the red LED looks strange - there seems to be some kind of saturation at the relatively low voltage.

author: kakureru
author_rank: Contributor
timestamp: May 10, 2015, 09:21:16 pm
content: oops, you are rightnever the less, data is still interesting.

author: kakureru
author_rank: Contributor
timestamp: May 10, 2015, 09:36:48 pm
content: Here is a new capture with correct probe settings. (in addition to leds being pointed into strobe better.)~thanks for the catch

author: kakureru
author_rank: Contributor
timestamp: May 10, 2015, 09:41:12 pm
content: and equally interesting, here are the rises..

author: kakureru
author_rank: Contributor
timestamp: May 10, 2015, 11:40:13 pm
content: And finally, Here is the red at different angles. I could do slight angles but this time around, Im only interested in if the leds respondthe same in general. So a slight off angle would only effects the amplitude and not the wavelength response a little less than shown.Im sure other colors would show similar characteristics.1 - Pointed out properly2 - 90 degree side (flat side of metal)3 - Back side of led (with likely reflection from scope casing)4 - 90 degree side (edge of metal)**yes i forgot to set the multiplier again but for this experiment, it really don't matter.

author: eneuro
author_rank: Super Contributor
timestamp: May 10, 2015, 11:55:31 pm
content: Quote from: daqq on May 10, 2015, 07:41:04 pmThanks for this link with detailed description how reverse biased LED with two I/O pins and resistor without need to use ADC to sense light is designedHowever, it look like there is very smal cut off frequency at which bits can be send via such bidirectional LEDs channelQuoteJust wonder if switching MPU pin between I/O mode to ADC mode with classic LED ON sourcing limited current by resistor coudn't be fasterAt cloudy day I had ~100mV at 1M multimeter load which is ~20 LSB on MPU 5Vcc, with ADC clock set to 250kHz and ~13 clock cycles per ADC reading we get close to 20kHz LED voltage sensing-I mean we switch off LED to ground, then start ADC and in ~50us we have another ADC reading, switch back to I/O mode and ready to PWM LED and make ADC reading after switching offOf course we have limited number of ADCs on MPU and I/O method with reversed LED is quite tricky nit, but still wonder how to increase bitrate using LED communication and if using ADC could allow lets say 10kbps between two leds?It is small offtop, but still messing with LEDsI found quite cheap NPN phototransistors, but it is interesting to push LED to the limits and try send data between two of them at highest speeds possible using eg. crappy 3mm yellow LED I've shown above

author: SeanB
author_rank: Super Contributor
timestamp: May 11, 2015, 07:30:45 pm
content: Using it as a voltage source ( needs a lot of light to bias it) you can get a data rate that will probably pass 9600BAUD data reasonably reliably. You will use 2 5mm hyperbright red or blue LED units coupled to each other directly ( black heatshrink to get the ambient light down) and driving the transmit at 10mA will give you a voltage output that is easy to read with a simple comparator and some low reference voltage. Red led will give about 1V into a high impedance ( around 10k) and blue will do around 2V, so you can use a simple comparator and say a forward biased diode as reference with the output going into your microcontroller.

author: eneuro
author_rank: Super Contributor
timestamp: May 11, 2015, 09:32:33 pm
content: Quote from: SeanB on May 11, 2015, 07:30:45 pmThanks for some hints, however probably it could be difficult to make such good light coupling, while I do not like to connect those two diodes in a way to create something like optocoupler physically linked together.I have another requirement in another project where I'd like send data from blinking LCD screen (~1inch2 area) and when tried this yellow 3mm diode, nope on white screen area very small voltage ~1mV, so probably messing with LEDs in this case will not workI expected much better response fromiiyamaLCD monitor at normal brightness, while I do not want press customers to change his screen settings to receive data from my web page to reprogram their devices, so probably NPN phototransistors will do th ejob much better than LEDs.Additionaly, rather this small green LCD in SMD 1206 package is in my interest in a few projects.It quite nice glows even at very small current when trying check its polarity with crappy multimeter in diode resistance mode, but need to solder it first to prototype PCB to test how it responds to different light sources