New York, NY IMG HI 58° LO 56° Home About Contact
IMG-LOGO
Home Engineering Mechanics Strength of Materials To detect the light intensity using Arduino UNO
Strength of Materials Lab Experiments

To detect the light intensity using Arduino UNO



Aim

To detect the light intensity using Arduino UNO.

Tools and Components required:

  1. Arduino UNO board
  2. LED’s
  3. LDR Sensor (Photo Resistor)
  4. Connecting Wires
  5. Arduino Software.
  6. Resistors
  7. Bread Board

Theory

Photo resistor allows interacting with the external environment, through intensity of light. It is based on light resistance that senses the light and will allow the microcontroller in the arduino to react and change the intensity of LED diode. The photo resistor creates a different resistance based on the intensity or the light. Changing the resistance through intensity changes the voltage too. The microcontroller reads different values and will light up the Led with more or less intensity. A low resistance value will occur when the sensor is well lighted and a high resistance value will occur when it is in darkness.

arduino

Circuit

circuit

Program:

int ldr=A0;//Set A0(Analog Input) for LDR.

int value=0;

void setup() {

Serial.begin(9600);

pinMode(13,Output);

}

void loop() {

value=analogRead(ldr);

Serial.println(value);

if(value<300)

{

digitalWrite(13,High);

}

else

{

digitalWrite(13,Low);

}

}

Result:The light intensity is measured successfully with Photo resistor and Arduino UNO.









Subscribe

Get all latest content delivered to your email a few times a month.