LED Senses and Displays Ambient Light Intensity

Dec 4
08:32

2008

Steven ZHAO

Steven ZHAO

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

After enjoying record sales in Q4 07, due to energy saving trends, LED production equipment manufacturer now sees a "digestion phase" during which the semiconductor market will absorb the production capacity built up over the past quarters.

mediaimage
LEDs are commonly used for displaying information. Although not used frequently,modern LEDs can also work as photo-voltaic detectors. An LED under reverse bias condition can be modeled as a light dependent current source in parallel with a capacitor. More the incident light,LED Senses and Displays Ambient Light Intensity Articles larger is the current source value and that discharges the equivalent capacitor faster. Figure 1 illustrates the use of LED as a sensor. The LED such as Led display,Led manufacturer,Electronic signs is reverse biased, using two pins (pin1 and pin2 in the _gure) of a microcontroller,which charges the equivalent capacitor. Subsequently, the cathode of the LED is connected an input pin (pin 3) of the Microcontroller. The capacitor which was charged to Vcc, will now discharge through the current source and when the voltage on the capacitor falls below the lower logic threshold, Pin3 of the microcontroller will sense the logic as '0'. If the incident light intensity is more, the capacitor discharges faster and if the ambient light is less, it takes longer for the capacitor to discharge. Thus by measuring the time it takes for the voltage on pin 3 to reach logic '0', the microcontroller can estimate the intensity of the ambient light incident on the LED.
It shows the circuit schematic of an AVR ATTiny15 based circuit that uses a 3-mm, red LED in a clear packaging, to sense the ambient light as well as to indicate the incident light intensity by ashing the same LED at a proportional frequency.The circuit is very simple and just uses 4 components. The power supply to the circuit can be any voltage between 3 to 5.5V DC.
The LED is connected to port pins PB0 and PB1 of the AVR Microcontroller. Another port pin PB3 is used to output a square wave, with a frequency proportional to the incident light intensity.
The circuit operates by _rst forward biasing the LED for a _xed period. It then reverse biases the LED, by changing the bit sequences applied to PB0 and PB1. In the next step, PB0 is then recon_gured as an input pin. An internal timing loop is used to measure the time it takes for the LED to change the logic voltage applied to PB0 from logic '1' to logic '0'. This time T, is inversely proportional to the ambient light incident on the LED. The LED is then ashed at a frequency inversely proportional to the time T. Thus for lower light levels, the LED ashes at a lower frequency. As the incident light intensity increases, the LED ashing frequency increases. This
provides a visual indication about the incident light intensity. 3 Testing The circuit was tested by applying known light intensity through a test LED. For low values of LED forward current, the light output intensity is fairly linear. The light output of the test LED was coupled to the sensor LED (D1 in _gure 2) of the circuit. It was ensured that no other 2 external light was incident on the sensor LED, by enclosing the test LED and the sensor LED in a sealed tube, covered with black tape. The test LED current was varied between 0.33 mA to 2.8 mA. Corresponding output of the sensor LED ashing frequency was recorded and is shown as a plot in _gure 3. As can be seen from this _gure, the circuit provides a fairly linear output.
The ATTiny15 AVR Microcontroller is an 8-pin device. The circuit presented here uses only 3 out of the 6 I/O pins. The rest of the pins can be used to control external devices or for communication with other devices. Control program for the microcontroller was written in AVR assembly language and is enclosed.