Goeduhub:- AI, ML, HADOOP, Python and IOT Training provider.
Register for Free Certified Workshop on AI & Machine Learning :: 26-01-2020 || Career options for aspiring CS/IT, ECE, EE or EIC or EEE Engineers
0 like 0 dislike
8 views

1 Answer

0 like 0 dislike
by (6.7k points)
selected by
 
Best answer

Working of Infrared (IR) Sensor

Interface Infrared (IR) Sensor often used as Obstacle Detecting Sensors or Proximity Sensors. An IR Sensor Module basically consists of three parts: an IR Transmitter, an IR Detector and a control circuit.

Usually, an IR LED is used as an IR Transmitter and a Photo Diode or a Photo Transistor (less often) is used as an IR Detector. The control circuit consists of a Comparator IC with necessary components.IR Sensor in IoT with Raspberry-PI training in Jaipur

Infrared (IR) Sensor Specification:

  • 5VDC Operating voltage
  • I/O pins are 5V and 3.3V compliant
  • ange: Up to 20cm
  • Adjustable Sensing range
  • Built-in Ambient Light Sensor
  • 20mA supply current
  • Mounting hole

Components of IR Sensor

  • Emitter: This component continuously emits the infrared signal
  • Receiver: It waits for the signal which is bounced back by obstacle
  • Indicator: On board LED to signal if obstacle is deducted by the sensor
  • Output: Could be used as Input for further processing of the signal
  • Ground: Ground/Negative point of the circuit
  • Voltage: Input voltage point of the circuit

 Infrared (IR) Sensor Pinout:

Pin Name

Description

VCC

Power Supply Input

GND

Power Supply Ground

OUT

Active High Output

 Connection: IR sensor to Raspberry-PI

IR Sensor connection with Raspberry-PI

  1.      Connect Vcc Pin of IR sensor to 5v Pin of Raspberry-pi (We are Using PIN 2)
  2.    Connect Ground Pin of IR sensor to Ground Pin of RASPBERRY-PI (We are Using PIN 6)
  3.     Connect Out PIN of IR sensor to GPIO PIN of Raspberry-PI (We are Using PIN 40) 

Python Program:


import RPi.GPIO as GPIO

import time

GPIO.setmode(GPIO.BOARD)

GPIO.setwarnings(False)

GPIO.setup(40,GPIO.IN)

while(1):

        state=GPIO.input(40)

        if state==False:

                time.sleep(1)

        else:

                print("Object Detected")

                time.sleep(1)

|| New Year Discount on summer training-2020 ||

20% OFF | on all summer training courses

|| Offer valid till 31-JAN-2020 (Extended Date) ||

Courses & Fee

  1. Augmented Reality & Virtual Reality - INR 15000/-
  2. AI, ML & Deep Learning - INR 12000/-
  3. Robotic Process Automation (RPA) - INR 12000/-
  4. Big Data HADOOP - INR 12,000/-
  5. Internet of Things (IoT) - INR 10,000/-
  6. Web development using python (Django) - INR 8000/-
  7. Industrial Automation (PLC-SCADA) - INR 8000/- 

Limited time offer !! Hurry up!!

[[ CALL - 07976731765 ]]

Register for Training

 Go to your Branch CSE or IT | ECE | EE, EIC or EEEMECE
 Know About Popular Colleges/Universities  List of IITsList of NITs | RTU-KOTA | Manipal University-Jaipur | JECRC University | Amity University Jaipur | BIT Mesra-Jaipur | MODY UNIVERSITY | LNMIIT-Jaipur | JK Lakshmipat | Banasthali Vidyapith | POORNIMA University
 Exams:   List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
Placements:  List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Online Free Training:  Artificial Intelligence(AI) & Machine Learning | Python Programming | Internet of Things-IoT | OpenCV (Open Source Computer Vision Library) | LINUX | Big Data : Hadoop | 
 Goeduhub
About Us | Contact Us   Social::   |  | 
...