Introduction: LED AS a LIGHT SENSOR

Picture of LED AS a LIGHT SENSOR

LED = Light Emitting Diode
Which is intentionally made to emit the light and it uses semiconductor material.
It has been observe that this normal led is not only emitting the light of particular wavelength but the most amazing fact found that the same LED is converting light energy into electrical signal
so this can be used as a light sensor.

IF YOU WILL MEASURE VOLTAGE OF LED IN LIGHT AND IN ABSENCE OF LIGHT YOU WILL GET FAR DIFFERENCE BUT IT IS DIRECTLY PROPORTIONAL TO LIGHT INTENSITY.


YOU CAN USE SERIES AND PARALLEL COMBINATION OF LED TO MAKE A CELL (A LIGHT CELL)

Step 1: LED AS a LIGHT DETECTOR? YES

Picture of LED AS a LIGHT DETECTOR? YES

You can use any led

By this sensor we can get the direction of light, and its cheaper and easily available.. I used ARDUINO UNO hardware to simplify circuits by micro controller then analog circuit using transistor as a comparator.

1-ARDUINO BOARD ANY VERSION
2-USB CABLE
3- LED 2 PIECE
4-COMPUTER WITH ARDUINO SOFTWERE


In this circuit we connect,

1st LED: to a analog pin 1 of Arduino and ground- anode is to Arduino pin 0 and cathod is connected to ground

2nd LED: is connected to Digital pin 12 or 13 of Arduino and ground- anode to digital pin 12/13 and cathod to ground you can use series resistor for digital pin 12 or 13

Step 2: HERE WE GO

int sensorLEDPin = 0 ; // LED as sensor +VE connected to analog pin 0 -VE connected to ground of arduino

int auxopPin = 12; // I have used additional external led for demostration as on board pin13 led cant be seen to ALL

int LEDPin = 13 ; // LED connected to digital pin 13

int LEDval = 0 ; //Variable to store the the LED sensor value

int light = 220; //SETS the intensity of light different led have different sensetive

//auxpin is auxilary pin

// you can use serial moniter and check your led value and choose threshold value
// if in light if it stays at 220 then you can use value for threshold around 200 or 210

// if light falls below this then your circuit led will glow

void setup()

{

pinMode(13,OUTPUT);

pinMode(12,OUTPUT);

Serial.begin(9600);

}

void loop()
{

LEDval = analogRead(sensorLEDPin);

Serial.println(LEDval);

delay(1000);

if (LEDval >= light)

{ // check if light

digitalWrite(LEDPin, LOW); // if light is there outside, turn off led

digitalWrite(auxopPin, LOW);

}

else

{

digitalWrite(LEDPin, HIGH); // if dark, turn on led

digitalWrite(auxopPin, HIGH);

}

}

Step 3: Some Other Sensor As a Reverse Application

like led as a light sensor
speaker as a microphone

diode as a temperature sensor

piezo disc as a touch or pressure sensor

motor as a generator

you can like my Facebook page and get updates like this project.
https://www.facebook.com/SparkingElectronics
from here you can download e-books for free
you can see amazing video too ..


Thank you

Step 4:

Comments

sghosh21 (author)2015-01-11

i even tried it out with a voltage divider, amplifying the voltage a bit........but it doesn't work most of the times...........

TAPAN MOJIDRA (author)sghosh212015-10-14

just open serial monitor and see what readings are displayed ?

sghosh21 (author)2015-01-11

dude i dont why ..............but its not working

TAPAN MOJIDRA (author)sghosh212015-01-16

JUST OPEN THE SERIAL MONITOR. AND SEE WHAT VALUE YOU RECEIVED?
AND JUST CHOOSE THE THRESHOLD VALUE JUST FEW OF TENS LESS THAN YOU RECEIVED THE VALUE FROM SERIAL MONITOR AND SEE WHAT HAPPENS.

sghosh21 (author)TAPAN MOJIDRA2015-02-20

okay i will surely try it out

TAPAN MOJIDRA (author)sghosh212015-04-20

Have you tried? it e
works for me...

TAPAN MOJIDRA (author)sghosh212015-02-19

which input pin are you usi g? use analog input pin A0.

About This Instructable

4,858views

43favorites

More by TAPAN MOJIDRA:ARDUINO 4*4 OR 4*3 KEYPAD :- Convert key pressed into intiger value 24*10 LED MATRIX PERFECTLY RUNNINGARDUINO AS A 8051 PROGRAMMER - CHEAPEST PROGRAMMER IN THE WORLD
Add instructable to: