Iot - Infrared Sensor
Iot - Infrared Sensor
Date: / /2023
Infrared Sensor is used to detect proximity or to build obstacle avoidance robots. This sensor has three
pins two of which are power pins leveled VCC and GND and the other one is the sense/data pin which
is shown in the diagram below. It has an onboard power LED and a signal LED. The power LED
turns on when power is applied to the board the signal LED turns on when the circuit is triggered.
This board also has a comparator Op-amp that is responsible for converting the incoming analog
signal from the
photodiode to a digital signal. It also has a sensitivity adjustment potentiometer; with that, one can
adjust the sensitivity of the device. Last and finally, the photodiode and the IR emitting LED pair
which all together make the total IR Proximity Sensor Module.
Connection Diagram:
Procedure:
Step 1. Power the infrared sensor with 5V or 3.3V on Arduino board and connect ground (IR sensor
to the ground of (Arduino board).
Step 2. Connect the output of the infrared sensor to a digital pin D9 of the Arduino board.
Step 3. Power the Arduino board via computer USB connection.
Step 4. Verify the code, and remove the errors if any.
Step 5. After successful compilation of the code, upload the code.
Step 6. Put some obstacle in front of the infrared sensor.
Step 7. Observe the output in the serial monitor.
Code:
void setup()
void loop()
{
}
else
{
Conclusion:
In this practical working of IR sensor and interfacing of it with Arduino Uno was studied
successfully.