Home Projects Security and other sensors and detectors Led Sensor



Led Sensor



From the beginning, Leds are used in many applications for signalization purposes. For what else can be Led used except for signalization or lighting? You can use it in another way, and some times that may be very useful. Usual Leds can be used as ambient light sensors, where Led can be used for signalization or as ambient light sensors. The idea is very simple, just look at schematic.



As we see, Led is connected between two pins of microcontroller, GP0 and GP1 (it can be any pins). If GP0 = 1, and GP1 = 0 then Led is ON (that is a normal situation). If we change state so that GP0 = 0, and GP1 = 1, then Led has inverse voltage and it is OFF (that is also normal). But if we put GP1 after this state to high-z state and measure the time until GP1 came to zero state, we will take different result for different level of ambient light. Short falling time = more ambient light.


I think that you may not use Led in some special device for measuring ambient light, but it is interesting to use that Led-sensor in some simple and not commercial application.

Here is a sample code - Led Senzor.bas. When you turn on this device, Led is off (it must be daylight), but when you make a shadow around Led, it will begin to shine!

I think that I changed your thinking about Led, as we gave a new way of use.

Hex code download - Led Senzor.hex


Download full article in .doc

For any question please feel free to mail me.




Search Site | Support us | Advertising | Profile | Books | Gadgets | Add your link here | Contact Us

IQ Technologies @ copy right 2008

Powered by Wild Host   Site Design By : FRIEND