How do I detect light with an LED?
Electronic – Detecting light with an LED
detectionledlight
Related Solutions
There are not good answers to these questions because LEDs are intended for emitting light, and as such the parameters you need to answer your questions are not specified.
A LED reverse biased as a light sensor is a current source proportional to the light level. Being a current source, it have very high impedance (a perfect current source has infinite impedance). The response time is proportional to the resistance of the node times the capacitance. Since the capacitance is parasitic, it is hard to guess and will depend a lot on the particular LED and on layout. The resistance is the deliberate resistance R1 in parallel with any leakage resistance and the resistance of the LED being a imperfect current source. Other then R1, these are again hard to guess. 20 MΩ is so high that leakage can be a important factor. Even dirt on the board and ambient humidity matters at that impedance.
As for how to determine the voltage, that again must be done experimentally. Unless you have a unusual LED that is intended also for reverse operation, you're not going to get a spec. Test a few and leave lots of room for device variation.
I would use a considerably lower resistance with some amplification. The lower resistance will decrease the response time and make things more predictable by making the leakage resistance small enough in comparison to not matter. You are currently getting ouputs from 150 mV to 5 V with 20 MΩ. With 2 MΩ instead, those voltages will be 15 mV to 500 mV, which is still big enough for plenty of opamps to amplify reliably and should be low enough to make leakage ignorable. It may still be too slow, in which case you can use lower resistance still with better amplification.
Another point is that if your supply is large enough to get 5V on R1, then you may be applying too much reverse voltage to the LED in low light conditions. Check the LED datasheet (this usually is specified) and make sure you're not exceeding the reverse voltage limit. A lower resistance will let you use lower reverse bias voltage.
If you choose synchronous detection, then you can simplify solution. Then you may want to choose LEDs as narrow angled as you can withing any part of visible spectrum.
Synchronous detection is the way to detect a signal which may be lower than background noise. Imagine taking shot with camera before LEDs are up. Then turn LEDs on and take another picture with exactly same conditions. Subtract arrays of pixel values of 2 frames from each other and look at the remainder. It will contain perfect difference of what was lit by LEDs. In your setup the DIFF picture will contain exactly retroreflectors (cataphote) only. Because the rest of the scenery got no significant increase in brightness.
While you debug the solution it will be obvious that power of LEDs can be reduced to some very low level, but only experiments will tell. I estimate that you will not need any super-powerful diodes. Some ordinary white LEDs with very acurate lens will do.
Best Answer
It is possible to use a led as a light sensor as well as a light emitter. Essentially a reverse biased led will act as a capacititor, if it is then disconnected the charge will drain at a rate roughly proportional to the light hitting it.
We can use this with a microcontroller - utilising the multi state ability of the ports.
The resistor should be about 100 ohms, I have only used this with red leds - it may work with others.
Use the following sequence:
The length of time will be dependant on the amount of light hitting the led.
There are several examples of this on the web - I will list them here as I find them again:
LED senses and displays ambient-light intensity
Red LEDs function as light sensors
Multi-Touch Sensing through LED Matrix Displays - very cool video
LEDs As Sensors
Very Low-Cost Sensing and Communication Using Bidirectional LEDs