0% found this document useful (0 votes)
60 views3 pages

The Use of Light Sensor

In this lab exercise, an ambient light sensor is used to determine if it is morning or evening. The light sensor detects light levels and controls a light bulb and buzzer accordingly. When the sensor detects low light, representing evening, the light bulb turns on and the buzzer plays one tone. When high light is detected, representing morning, the light bulb turns off and the buzzer plays a different tone. The serial monitor also prints "EVENING" or "MORNING" based on the light levels. The objectives are to learn how to use an ambient light sensor and understand its applications.

Uploaded by

Ralf Llena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views3 pages

The Use of Light Sensor

In this lab exercise, an ambient light sensor is used to determine if it is morning or evening. The light sensor detects light levels and controls a light bulb and buzzer accordingly. When the sensor detects low light, representing evening, the light bulb turns on and the buzzer plays one tone. When high light is detected, representing morning, the light bulb turns off and the buzzer plays a different tone. The serial monitor also prints "EVENING" or "MORNING" based on the light levels. The objectives are to learn how to use an ambient light sensor and understand its applications.

Uploaded by

Ralf Llena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

THE USE OF LIGHT SENSOR

MY OWN LAB EXCERCISE

OBJECTIVES:
 To be familiar on how to use the light sensor
 To know the different uses of ambient light sensor and where it can be used
EQUIPMENT AND MATERIALS:

QUANTITY COMPONENT
1 Ambient Light Sensor
1 Light bulb
1 Arduino Uno R3
1 Piezo
1 1kΩ Resistor
1 500 Ω Resistor
1 10kΩ Resistor
DISCUSSION:
AMBIENT LIGHT SENSOR- TEMT6000 ambient light sensor is just another analog sensor. It is compatible
with micro-controllers which supports analog data input. If the light is very low then the SIG will be also
very low as light increases the SIG will also goes high.

In this lab exercise, the ambient light sensor is used to determine if it is morning or evening and also the serial
monitor will display if it is evening or morning. The light bulb will turn on when it detects low light and turn off
when it detects a high value of light. The buzzer also has a specific tone to know if it is morning or evening.
PROCEDURE:
AMBIENT LIGHT SENSOR WITH LIGHT BULB AND PIEZO BUZZER
1.) Connect the circuits for the three components.

For the ambient light sensor, connect collector to the 5V, the emitter connects to the GND with a 10kΩ
Resistor, and connect the A0 pin between the emitter and resistor.

For the light bulb, terminator 1 connects to the GND and terminator 2 connects to the 13 pin with a 500 Ω
Resistor
For the piezo buzzer, connect the positive to the pin number 4 with a 1kΩ Resistor and the negative connects
to the ground.
2.) Type the sketch
For the void set up

int temt6000Pin = A0;


float light;
int light_value;
void setup()
{
Serial.begin(112500);
pinMode(temt6000Pin, INPUT);
pinMode(13, OUTPUT);
pinMode(4, OUTPUT);
}
For the Void loop
void loop() tone(4,523,100); tone(4, 2217, 500);
{ delay(100); delay(700);

int light_value = analogRead(temt6000Pin); tone(4,659,100); tone(4, 3322, 500);

light = light_value * 0.0976; delay(300);


delay(700);

delay(100); tone(4, 3322, 500);


tone(4,784,100);
if (light_value > 1002) delay(700);
delay(550);
{ tone(4, 3729, 500);
tone(4,352,100);
delay(700);
digitalWrite(13, LOW); delay(2000);
tone(4, 3729, 500);
Serial.println("MORNING"); noTone(4);
delay(700);
delay(100); delay(4200);
tone(4, 3322, 500);
tone(4,659,100); }
delay(700);
delay(150); else
noTone(4);
tone(4,659,100); {
delay(4200);
delay(300); digitalWrite(13,HIGH);
}
tone(4,659,100); Serial.println("EVENING");
}
delay(300); delay(100);

tone(4, 2217, 500);

delay(700);
3.) The outcome

The outcome of this circuit is when the light sensor cannot detect light or less light the light bulb will turn
on and the buzzer will make a specific tone/sound and in contrast when the light sensor detect a high
brightness or light the light bulb will turn off and the buzzer will make an another tone/sound.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy