Docsity

IOT Practical 2 write-up TE AIDS SPPU 2024 Pattern, Study Guides, Projects, Research of Internet and Information Access

Toggle sidebar
bg1
PRACTICAL EXPERIMENT NO. 2
Title: Detection of obstacles using connectivity of Raspberry-Pi / Arduino with IR sensor & notifying using
LEDs.
Problem Statement: Implement an application to detect obstacles and notify users using LEDs to
understand the connectivity of Raspberry-Pi / Arduino with IR sensor.
Aim: Write a program(application) to detect obstacles and notify users using LEDs to show the connectivity
of Raspberry-Pi / Arduino with IR sensor.
Objectives:
• To study and understand IR Sensors.
• To understand the connectivity of Raspberry-Pi / Arduino with IR sensor.
• To understand the detection of obstacles and notifying users using LEDs.
Prerequisites:
• Knowledge of C, C++, Java and Python Programming.
• Knowledge of Arduino IDE/Raspbian, LEDs, Sensors.
Outcome: An application(program) which detect obstacles and notifies users using LEDs showing the
connectivity of Raspberry-Pi / Arduino with IR sensor.
Software requirements: 64-bit Open Source Operating System (Windows/Ubuntu), ardOS/Arduino IDE,
Raspbian OS
Hardware requirements: Arduino Uno/Raspberry Pi Board and Sensors.
Theory:
IR Sensor
An IR sensor is a device that detects IR radiation falling on it. Proximity sensors (used in touchscreen
phones and edge avoiding robots), contrast sensors (used in line following robots) and obstruction
counters/sensors (used for counting goods and in burglar alarms) are some applications involving IR
sensors. IR sensors (Infrared sensor) are modules which detect the presence of objects before them. If the
object is present it give 3.3V as output and if it is not present it gives 0 volt. This is made possible by using a
pair of IR pair (transmitter and receiver), the transmitter (IR LED) will emit an IR ray which will get
reflected if there is a object present before it. This IR ray will be received back by the receiver (Photodiode)
and the output will be made high after amplified using an op-amp link LM358.
• An infrared sensor is an electronic instrument which is used to sense certain characteristics of its
surroundings by either emitting and/or detecting infrared radiation.
• Infrared sensors are also capable of measuring the heat being emitted by an object and detecting motion.
• Infrared waves are not visible to the human eye. In the electromagnetic spectrum, infrared radiation can be
found between the visible and microwave regions.
• The infrared waves typically have wavelengths between 0.75 and 1000µm.
pf3
pf4
pf5

Partial preview of the text

Download IOT Practical 2 write-up TE AIDS SPPU 2024 Pattern and more Study Guides, Projects, Research Internet and Information Access in PDF only on Docsity!

PRACTICAL EXPERIMENT NO. 2

Title : Detection of obstacles using connectivity of Raspberry-Pi / Arduino with IR sensor & notifying using LEDs. Problem Statement: Implement an application to detect obstacles and notify users using LEDs to understand the connectivity of Raspberry-Pi / Arduino with IR sensor. Aim: Write a program(application) to detect obstacles and notify users using LEDs to show the connectivity of Raspberry-Pi / Arduino with IR sensor. Objectives:

  • To study and understand IR Sensors.
  • To understand the connectivity of Raspberry-Pi / Arduino with IR sensor.
  • To understand the detection of obstacles and notifying users using LEDs. Prerequisites:
  • Knowledge of C, C++, Java and Python Programming.
  • Knowledge of Arduino IDE/Raspbian, LEDs, Sensors. Outcome: An application(program) which detect obstacles and notifies users using LEDs showing the connectivity of Raspberry-Pi / Arduino with IR sensor. Software requirements: 64 - bit Open Source Operating System (Windows/Ubuntu), ardOS/Arduino IDE, Raspbian OS Hardware requirements: Arduino Uno/Raspberry Pi Board and Sensors. Theory: IR Sensor An IR sensor is a device that detects IR radiation falling on it. Proximity sensors (used in touchscreen phones and edge avoiding robots), contrast sensors (used in line following robots) and obstruction counters/sensors (used for counting goods and in burglar alarms) are some applications involving IR sensors. IR sensors (Infrared sensor) are modules which detect the presence of objects before them. If the object is present it give 3.3V as output and if it is not present it gives 0 volt. This is made possible by using a pair of IR pair (transmitter and receiver), the transmitter (IR LED) will emit an IR ray which will get reflected if there is a object present before it. This IR ray will be received back by the receiver (Photodiode) and the output will be made high after amplified using an op-amp link LM358.
  • An infrared sensor is an electronic instrument which is used to sense certain characteristics of its surroundings by either emitting and/or detecting infrared radiation.
  • Infrared sensors are also capable of measuring the heat being emitted by an object and detecting motion.
  • Infrared waves are not visible to the human eye. In the electromagnetic spectrum, infrared radiation can be found between the visible and microwave regions.
  • The infrared waves typically have wavelengths between 0.75 and 1000μm.

IR Sensor Working Principle of Working An IR sensor consists of two parts, the emitter circuit and the receiver circuit. This is collectively known as a photo-coupler or an optocoupler. The emitter is an IR LED and the detector is an IR photodiode. The IR photodiode is sensitive to the IR light emitted by an IR LED. The photo-diode’s resistance and output voltage change in proportion to the IR light received. This is the underlying working principle of the IR sensor. The type of incidence can be direct incidence or indirect incidence. In direct incidence, the IR LED is placed in front of a photodiode with no obstacle in between. In indirect incidence, both the diodes are placed side by side with an opaque object in front of the sensor. The light from the IR LED hits the opaque surface and reflects back to the photodiode.

A breadboard can be divided into two segments, which are called the bus strip and the terminal strip. The bus strip consists of two long lines of spring clips running across the board, these lines can be used to provide supply voltage (VCC) and ground (GND) to the circuit. Typically, the supply voltage line is marked in red and the ground line is marked in blue (or black on some boards). All spring clips along each line are internally connected, making both supply voltage and ground signals conveniently accessible from any part of the breadboard. VCC is the supply voltage that the microcontroller system uses. GND - All electrical current in a system needs to flow back to ground. In a typical microcontroller project, all components flow back to Ground, which is why this is usually referred to as “common ground.” At GND, this is usually a 0-V reading. The terminal strip is the main area that can be used to populate the various circuit components. It is usually separated into two sides by a notch that runs along the middle of the board. Each side has many lines that are made up of five internally connected spring clip holes. The five spring clips on each line of the terminal strip are connected internally, allowing for component connections. Implementation Apparatus: Arduino Uno board, IR Sensor, USB Cable, Breadboard, 1 x 220 Ω Resistor, 1 x LED, 2 Male to Male Jumper Wires, 3 Male to Female Jumper Wires. Interface/Connections: (^) Peripheral Arduino Pin Breadboard Pin LED Cathode (-ve) GND Negative 24(Bus Strip) LED Anode (+ve) D13 C24(Terminal Strip) IR VCC 5V - IR GND GND - IR OUT D2 - Resistor One End - E Resistor Other End D13 C

Procedure: Step 1: Connect the Arduino board to CPU using the FRC cable provided with the board. Step 2: Connect the Power supply adaptor and power on the circuit. Step 3: Open Arduino IDE and create a new sketch (program) using the connections.

Step 4: In the Arduino IDE go to tools →Port and select the appropriate COM port.

Step 5: In the Arduino IDE click on the upload button to compile and download the code into the Arduino UNO. When successfully downloaded, the code will start running.

Step 6: Open the serial monitor from Tools→ Serial Monitor. Set the baud rate to 9600.

Step 7: Put an obstacle (paper, finger) between the IR Sensor and observe LED. Observations: When an obstacle is put in front of the IR module, the LED of pin 13 on the Arduino board will turn ON. Observation Table: Conclusion: An application was developed for detecting obstacles and notify users using LEDs showing connectivity of Raspberry-Pi / Arduino with IR sensor successfully. Viva Questions:

  1. What is an IR Sensor?
  2. What are the components & pins of IR Sensor?
  3. Explain working of IR Sensor.
  4. What is a Breadboard?
  5. Explain composition of Breadboard.
  6. Explain digitalRead(). Obstacle Distance (in cm) LED State 92 OFF 7 ON 210 OFF 30 ON