0% found this document useful (0 votes)
68 views1 page

ICT Quiz 3

1. The document describes how to interface an IR sensor module with an Arduino board. The IR sensor module detects motion using an infrared LED transmitter and photodiode receiver. 2. The Arduino code initializes the IR sensor pin as an input and LED pin as an output. It then enters a loop to read the sensor pin value and turn on an LED if motion is detected. 3. If the sensor output is high, no motion is detected and the LED is turned off. If the output is low, motion is detected and the LED is turned on. The status is also printed to the serial monitor.

Uploaded by

Ingrid Gomez
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)
68 views1 page

ICT Quiz 3

1. The document describes how to interface an IR sensor module with an Arduino board. The IR sensor module detects motion using an infrared LED transmitter and photodiode receiver. 2. The Arduino code initializes the IR sensor pin as an input and LED pin as an output. It then enters a loop to read the sensor pin value and turn on an LED if motion is detected. 3. If the sensor output is high, no motion is detected and the LED is turned off. If the output is low, motion is detected and the LED is turned on. The status is also printed to the serial monitor.

Uploaded by

Ingrid Gomez
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/ 1

ICT Q3: INTERFACING IR SENSOR MODULE electricity; (p-n junction operate in 2.

junction operate in 2.) setup serial with 115200 baud rate, print
WITH ARDUINO reverse bias direction) statement to check if serial monitor
IR Sensor (Infrared Proximity Sensor) – emits no light  infinite resistance, open switch window is working, initialize IRSensor
infrared lights to sense some aspect of with light  low resistance, closed switch pin as input and LED pin as output
the surroundings and can be Op-Amp (LM358) – voltage comparator;
employed to detect motion of an compare threshold voltage (pin2) to
object photodiode’s series resistor voltage
can only measure infrared radiation (pin3)
IR Sensor Pinout if pin3 drop > pin2, Opamp output = HIGH and 3.) [loop] read sensor pin with digitalRead()
1 – red – vcc (3.3v/5v operation voltage) LED is on (indicating detection of an object) and store value to sensorStatus variable
2 – black - gnd IR Motion Sensor Module – Parts
3 – blue green/green – digital output If output high = no motion detected, LED is
LOW  no motion detected LOW, and print status in serial monitor
HIGH  motion is detected window
1. Apply voltage to IR LED If output low = motion detected, LED is HIGH,
2. emits infrared light and print status in serial monitor window
3. light propagates through air and
hits an object
4. light gets reflected in photodiode
sensor
If object is close, reflected light is stronger
Power LED – on when power is applied to
If object is far away, reflected light is weaker
board
TWO MAIN COMPONENTS:
Signal LED – on when circuit is triggered
IR Transmitter Section – IR led is used
Arduino Code
IR Receiver Section – photodiode is used to
1.) declare (int) two global variables (1 – holds
receive ir signal before getting output
pin value where ir sensor is
IR LED (Transmitter) – emits light in IR
connected, 2 – holds value where LED
frequency range (approx.. 20-60
is connected)
degree of light-emitting angle, cm-ft
range); converts electricity into light
Photodiode (Receiver) – converts light to

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