Interfacing A Pir Sensor With Firebird V Robot: E-Yantra Team

Download as pdf or txt
Download as pdf or txt
You are on page 1of 42

Introduction

Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Interfacing a PIR Sensor with FireBird V Robot

e-Yantra Team

Embedded Real-Time Systems Lab


Indian Institute of Technology-Bombay

IIT Bombay
December 23, 2015

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 1/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Agenda for Discussion


1 Introduction
Specifications
2 Working Principle
Principle
Illustration of Working Principle
3 Connection Details
Connections of a PIR Sensor
Pin Connections between PIR Sensor and FireBird V Robot
Jumper Settings
4 C Code
5 Output displayed on LCD & LED Bargraph
6 Applications using PIR Sensor

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 2/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Introduction

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 3/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Introduction

Passive Infrared Sensor measures In-


frared light coming from objects in its
field of view

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 3/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Introduction

Passive Infrared Sensor measures In-


frared light coming from objects in its
field of view
Everything emits some low level radia-
tion and hotter something is, the more
radiation is emitted.

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 3/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Introduction

Passive Infrared Sensor measures In-


frared light coming from objects in its
field of view
Everything emits some low level radia-
tion and hotter something is, the more
radiation is emitted.
The pyroelectric sensor in the PIR is
split into two slots. When a body moves
in its field of view, one slot experiences
more IR than the other, and a differen-
tial voltage is created, which indicates
the motion of a human.

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 3/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Specifications

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 4/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Specifications

Single bit output

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 4/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Specifications

Single bit output


Small size makes it easy to conceal

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 4/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Specifications

Single bit output


Small size makes it easy to conceal
Sensitivity: Pre-settable

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 4/13


Introduction
Working Principle
Connection Details
Specifications
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Specifications

Single bit output


Small size makes it easy to conceal
Sensitivity: Pre-settable
Size: Length 32mm, Width 24mm, Thickness 26mm

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 4/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Working Principle

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 5/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Working Principle

PIR Sensor has two slots in it

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 5/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Working Principle

PIR Sensor has two slots in it


When idle, both slots detect the same amount of IR

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 5/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Working Principle

PIR Sensor has two slots in it


When idle, both slots detect the same amount of IR
When a warm body like a human or animal passes by, it first intercepts
one half of the PIR sensor, which causes a positive differential change
between the two halves of the PIR Sensor.

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 5/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Working Principle

PIR Sensor has two slots in it


When idle, both slots detect the same amount of IR
When a warm body like a human or animal passes by, it first intercepts
one half of the PIR sensor, which causes a positive differential change
between the two halves of the PIR Sensor.
When the warm body leaves the sensing area, the reverse happens,
whereby the sensor generates a negative differential change.

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 5/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Working Principle

PIR Sensor has two slots in it


When idle, both slots detect the same amount of IR
When a warm body like a human or animal passes by, it first intercepts
one half of the PIR sensor, which causes a positive differential change
between the two halves of the PIR Sensor.
When the warm body leaves the sensing area, the reverse happens,
whereby the sensor generates a negative differential change.
These change pulses are what is detected

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 5/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Illustration of Working Principle

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 6/13


Introduction
Working Principle
Connection Details Principle
C Code Illustration of Working Principle
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Illustration of Working Principle

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 6/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Connections of a PIR Sensor

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 7/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Connections of a PIR Sensor

+V : This pin of the PIR sensor


should be connected to an exter-
nal 5V supply.

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 7/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Connections of a PIR Sensor

+V : This pin of the PIR sensor


should be connected to an exter-
nal 5V supply.
GND : This pin of the PIR sensor
should be connected to Ground.

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 7/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Connections of a PIR Sensor

+V : This pin of the PIR sensor


should be connected to an exter-
nal 5V supply.
GND : This pin of the PIR sensor
should be connected to Ground.
OUT : This pin of the PIR sensor
is the digital output. This pin is to
be read by the microcontroller to
detect the movement and decide
the appropriate action that should
be taken

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 7/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Pin Connections between PIR Sensor and FireBird V Robot

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 8/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Pin Connections between PIR Sensor and FireBird V Robot

Pins of PIR Sensor PinsofATmega2560Microcontroller


BoardExpansionSocket
GND Pin 23/24 (or any Ground pin)
+V Pin 21/22 (or any 5 Volts pin)
Digital Output Any GPIO Port Pin

Table: Pin Connections between PIR Sensor and FireBird V Robot

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 8/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Jumper Settings

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 9/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Jumper Settings

There are two triggering modes available


in the PIR Sensor. These modes can be
changed according to the jumper positions.

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 9/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Jumper Settings

There are two triggering modes available


in the PIR Sensor. These modes can be
changed according to the jumper positions.
H Retrigger Mode: Output remains
HIGH when sensor is retriggered repeat-
edly. Output is LOW when idle ie not
triggered

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 9/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Jumper Settings

There are two triggering modes available


in the PIR Sensor. These modes can be
changed according to the jumper positions.
H Retrigger Mode: Output remains
HIGH when sensor is retriggered repeat-
edly. Output is LOW when idle ie not
triggered
Normal Mode: Output goes HIGH
then LOW when triggered. Continuous
motion results in repeated HIGH/ LOW
pulses. Output is LOW when idle

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 9/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Jumper Settings

There are two triggering modes available


in the PIR Sensor. These modes can be
changed according to the jumper positions.
H Retrigger Mode: Output remains
HIGH when sensor is retriggered repeat-
edly. Output is LOW when idle ie not
triggered
Normal Mode: Output goes HIGH
then LOW when triggered. Continuous
motion results in repeated HIGH/ LOW
pulses. Output is LOW when idle

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 9/13


Introduction
Working Principle
Connections of a PIR Sensor
Connection Details
Pin Connections between PIR Sensor and FireBird V Robot
C Code
Jumper Settings
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Jumper Settings

There are two triggering modes available


in the PIR Sensor. These modes can be
changed according to the jumper positions.
H Retrigger Mode: Output remains
HIGH when sensor is retriggered repeat-
edly. Output is LOW when idle ie not
triggered
Normal Mode: Output goes HIGH
then LOW when triggered. Continuous
motion results in repeated HIGH/ LOW
pulses. Output is LOW when idle

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 9/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

C Code

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 10/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Output displayed on LCD & LED Bargraph

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 11/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Output displayed on LCD & LED Bargraph

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 11/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Applications using PIR Sensor

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 12/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Applications using PIR Sensor

Human Detection
Applications

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 12/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Applications using PIR Sensor

Human Detection
Applications
Thermal Imaging

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 12/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Applications using PIR Sensor

Human Detection
Applications
Thermal Imaging
Infrared Homing

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 12/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Applications using PIR Sensor

Human Detection
Applications
Thermal Imaging
Infrared Homing

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 12/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Applications using PIR Sensor

Human Detection
Applications
Thermal Imaging
Infrared Homing

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 12/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Thank You!!

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 13/13


Introduction
Working Principle
Connection Details
C Code
Output displayed on LCD & LED Bargraph
Applications using PIR Sensor

Thank You!!

Thank You!!

www.e-yantra.org Firebird ATmega2560 Robotics Research Platform 13/13

You might also like