Introduction: LED As Light Sensor !!!

Picture of LED As Light Sensor !!!

Hello friends in this instructable I am going to share how I found out that LEDs can sense Light. I know it sounds strange but it actually is true. I came to know about it as I was experimenting with arduino and sensors. I knew that IR leds can be used to sense IR light when used in reverse biased. So I tried using a normal LED to measure light and it worked !

I know it is not as sensitive as the LDRs and Photodiodes but still it is fun to try it out and we get to learn something which is never bad...

I have also made a light sensitive switch using this LED as sensor.



Step 1: Gathering Components.

Picture of Gathering Components.

I have provided the links of required products, cheap price and good sellers, you can also find products on ebay but I don't trust it much.

1. Arduino . ( UNO in my case, you can use any one you have)


2. Breadboard.

3. Wires.

4.LEDs. (any LEDs work. we need 2 . one for sensor , other as indicator.)

5. 100 ohm resistor.

Thats all we need.

Step 2: Making Connections.

Picture of  Making Connections.

* First place the LED (Sensor) in the breadboard.

Note:- LED works different in Forward and Reverse bias. In Forward biased mode ie. Anode to pin A0 and Cathode to GND. the LED gives High values in Light and Low values in Dark. and vice versa in Reverse bias.

* Once the LED is placed in breadboard, Connect its one pin to A0 (analog pin) of Arduino. and connect its other pin to GND pin of Arduino.

* Now place another LED on breadboard and connect a 100 ohm resistor to its Anode. Connect a wire from the resistor to pin 13 on Arduino (digital pin). Connect the Cathode of LED to GND of Arduino.

(The sensor LED seems black but I have just wrapped black tape around it)
When all the connections are done , next step is to upload the code.

Step 3: Writing and Uploading Code.

Picture of  Writing and Uploading Code.

For uploading code in Arduino we need an IDE , Arduino has its own free IDE you can visit Arduino.cc to download it.

Once You have set up the arduino IDE you can start writing code. refer the code given below to make the Arduino sensor :

I have uploaded two codes one for sensing the Light , second to make a light dependent switch using the LED as sensor. In the second code you will find a conditional statement " if( value > 100)" here the value 100 is set because my led works on that value, I have noticed different LEDs have different sensitivity levels so before making the switch circuit you will have to note the values of the LED in light and in dark. You can see the results in Serial Monitor. Refer the picture above to start serial monitor .

First open the first code and upload the code to arduino , now open Serial monitor and note the values in dark and value after light is applied. these values can be used to trigger the switch .

eg: If in dark the value is 100-150 and in light it is 50-100. then the LED on pin 13 can be turned on by editing the if statement as "if(value > 100 ) { digitalWrite(led,HIGH);}". now the LED will turn on when in Dark and if the greater than ">" is replaced with less than "<" then the LED will turn on in light.

Comments

WashiulA (author)2017-06-08

Hey dude, The Black one you used is a IR Recvr I thinks.....

No I am sure (90%)

You should change the title a little bit ;) bcz IR Recvr is not a LED :)

BTW, Nice Project :)

WolfxPac (author)WashiulA2017-06-09

you seem new in electronics, if you doubt it you can try it yourself before commenting

WashiulA (author)2017-06-08

Now 100%, U are using a IR Recv

About This Instructable

4,010views

48favorites

License:

Bio: I'm a guy who loves to play with technology ..... Visit https://www.facebook.com/harsh.dethe.7 to know more about me.
More by WolfxPac:HOW TO GET UNLIMITED STORAGE ON GOOGLE PHOTOS.Get EIS (Electronic Image Stabilization) on Any Android Smartphone.  IR REMOTE DECODER USING ARDUINO.
Add instructable to: