You are on page 1of 7

5/16/2017 Interface PIR Sensor to Arduino - Motion Sensor/Detector

About Privacy Policy Search Search

Write For Us|Earn Money

Home Buy Project Kits Store Advertise With Us Write For Us

Ads by Google Types of Sensors PIR Sensor Circuit Diagram

Home / Arduino / Interfacing PIR Sensor to Arduino Connect Motion


Sensor/Detector to Arduino

Interfacing PIR Sensor to


Arduino Connect Motion
Sensor/Detector to Arduino
Last Updated on February 24, 2016 by jojo in Arduino with 2
Comments

Ad closed by
Ad closed by
Stop seeing this ad Why this ad? Stop seeing this ad

In this article, we are going to learn how to interface/connect PIR Why this ad?
Sensor or Passive Infrared Sensor to Arduino. We have written a
tutorial on how to interface PIR sensor to 8051 previously in
CircuitsToday! So a PIR sensor which is also known as Pyroelectric
sensor or Passive Infrared Sensor is basically an electronic sensor
employed in motion detecting applications. A PIR sensor detects or
measures IR (Infra Red) radiations emitted by any object inside its
eld of view.

Get Daily
Updates via
Email

http://www.circuitstoday.com/interface-pir-sensor-to-arduino 1/7
5/16/2017 Interface PIR Sensor to Arduino - Motion Sensor/Detector

Enter your email

Subscribe

Categories
101-Announcements (26)
A PIR sensor is generally known to the world as motion sensor or 555 Timer IC (14)
motion detector. We can actually build motion sensors or motion
8051 (24)
sensing lights we get on market with the help of Arduino and PIR
sensors. So this tutorial is also a beginning guide to build motion 8051 projects (20)
sensor or a motion detector based on arduino. Lets learn how to Ampli er Circuits (39)
interface a motion sensor/detector to arduino!
Arduino (44)

Lets brief how a PIR sensor operates! ARM (3)

Audio Circuits (104)


In a practical aspect, all objects emit heat energy in the form of
Automotive Circuits (28)
radiation. The theory behind this concept is that all objects with a
temperature above absolute zero ( absolute zero is -273.15 degree AVR (18)

celsius or zero kelvin) emit heat energy in the form of radiation at Basic Electricity (1)
infra red wavelengths (invisible to human eyes). These emitted infra
Basic Electronics (6)
red radiations can be detected with the help of electronics and this
Battery Circuits (23)
principle is employed in the design of a PIR sensor. A PIR sensor do
not emit any kind of radiation for detection purposes but they just C plus plus (7)
measure the infra red radiation emitted by other objects inside its
C Programming (14)
eld or range of measurement.
Cable TV Circuits (1)

I hope you have got an idea behind the operating principle of PIR Camera Technology (5)
Sensor! Lets get to our job of interfacing PIR sensor to Arduino! Clipping and Clamping Circuits (7)

Clocking & Timer Circuits (2)


Assemble the circuit as shown in diagram given below. A PIR sensor
module has only 3 pins one is Vcc which is a +5 volts input, a Conversion Circuits (10)
ground pin and nally the digital output pin. Connect +5V from Counter Circuits (2)
Arduino to Vcc of PIR sensor module, connect a GND from Arduino to
Counters (2)
ground of PIR sensor and nally connect the output pin (marked as
http://www.circuitstoday.com/interface-pir-sensor-to-arduino 2/7
5/16/2017 Interface PIR Sensor to Arduino - Motion Sensor/Detector

out) to any digital pin of arduino. In our circuit diagram, we have Digital Electronics (11)
connected it to pin 7 of arduino.
Drones (1)

Education & Training (6)


Possible outputs from PIR sensor module
Electronic Components (31)
The PIR sensor module has got only one digital output mode. So it
Electronic Keys & Locks (3)
has only 2 possible output values either a HIGH or a LOW. By
Electronics Books (10)
default standards, when there is no object inside the range of PIR
sensor it outputs a LOW value or 0V at output. When an object is Electronics Jobs (4)
identi ed inside the range of PIR sensor it immediately outputs a Embedded Systems (7)
HIGH value or +5V at output.
Equipment Reviews (1)

Interfacing PIR Sensor to Arduino Circuit Diagram Events (3)

Fan Circuits (1)

Filter Circuits (16)


The program and code to interface PIR sensor and arduino is as
given below! If you nd any di culty in grasping the code, try Fire Alarm (3)

reading our other interfacing articles to gain more insights! Fun & Game Circuits (14)

Gadget Reviews (6)


The Program
Guides (1)

Ham Radio Circuits (2)


int sensor=7; //The output of PIR sensor connected to
pin 7 High Voltage Circuits (1)
int sensor_value; //variable to hold read sensor value (26)
History
void setup()
Home Circuits (35)
{
pinMode(sensor,INPUT); // configuring pin 7 as Input Industrial Circuits (15)
Serial.begin(9600); // To show output value of sensor Infographics (1)
in serial monitor
Instruments (13)
}
Integrated Circuits (20)

void loop() Inverters (5)


{
Lab Manuals (20)
sensor_value=digitalRead(sensor); // Reading sensor va
lue from pin 7 LED related (3)

Serial.println(sensor_value); // Printing output to se Light Related (14)


rial monitor
Lighting Circuits (44)
}
MATLAB (3)

Microcontrollers (7)

The program is self explanatory through comments! If you have any Mobile Phone Related (1)

doubts regarding, this please ask in comments section. The output Motor Related (14)
screenshots are added below!
Nanotechnology (14)

Oscillators (25)
Output of PIR Sensor in Arduino Serial Monitor when there is no
motion inside range PCB (1)

http://www.circuitstoday.com/interface-pir-sensor-to-arduino 3/7
5/16/2017 Interface PIR Sensor to Arduino - Motion Sensor/Detector

Output of PIR Sensor in Arduino Serial Monitor when there is Peripheral Interface Controller (29) (PIC)
motion detected in range
Power Controller Circuits (8)

Power Electronics (3)

If you would like to learn more about Arduino and interfacing other Power Supplies (72)
interesting devices like RFID module, GSM Module, Gas sensor and
Product Reviews (5)
many other sensors read the following tutorials!
Project Ideas (1)

1. Interfacing GSM Module to Arduino tutorial on how to connect Projects (7)


GSM module to Arduino and hence send and receive sms! Proteus (8)

Proximity Detectors (3)


2. Interfacing RFID Reader to Arduino tutorial on how to connect
RFID reader to Arduino and read RFID cards serially using arduino. Radio Circuits (30)

Radio Transmitters (19)


3. Interfacing Gas Sensor MQ2 to Arduino and LPG sensor MQ5 to
Raspberry Pi (1)
Arduino tutorials on interfacing di erent gas sensors to Arduino!
Relays (3)

Remote Circuits (12)

Reviews (5)

Robotics (6)

RTOS (2)

Security & Saftey (17)


You may also like:
Sensor Circuits (16)
Robot using Arduino and Bluetooth Module (Obstacle Avoidance Robot)
Signal Conditioners (11)
Arduino Irrigation and Plant Watering using Soil Moisture Sensor
Signal Generators (13)
Home Automation using Arduino and GSM Module
Speed Controller Circuits (1)
Interfacing Accelerometer to Arduino
State space analysis (2)
Pulse Sensor and Arduino Interfacing
Switching Circuits (6)

Tech News (87)

Telephone Related (9)


We recommend:
Television Related (4)
What is Real Time Operating System (RTOS)- How it works?
Temperature Related (3)
Worlds Smallest Magnetic Data Storage
Test & Measurement Circuits (38)
Digital to Analog Converters (D/A)
Testing Components (9)
RedTacton Technology
Three phase circuits (1)
Monolithic/Hybrid Digital to Analog Converters
Timer Circuits (3)

Tone generator circuits (20)


Ads by Google PIR Alarm Gas Sensor Circuit Design
Tools and Softwares (6)

Transmitters (7)
2 thoughts on Interfacing PIR Sensor to Arduino
Tutorials (159)
Connect Motion Sensor/Detector to Arduino
http://www.circuitstoday.com/interface-pir-sensor-to-arduino 4/7
5/16/2017 Interface PIR Sensor to Arduino - Motion Sensor/Detector

UPS (2)
vaneza October 6, 2016 at 12:41 am
USB Circuits (3)
What exactly the model of this PIR SENSOR sir
Videos (5)
Reply
VLSI (36)

Voltage Regulators (15)


mathew dony April 6, 2016 at 8:37 am
My PIR Sensor is always showing 0 in serial monitor. I tested the sensor
giving an LED as the output and the LED blinks everytime the PIR Sensor Latest Articles
detects something.Please help.
How a Thermostat Works
Reply
Tutorial

10 Things to Consider While


Leave a Reply choosing a PCB Prototype Service

Your email address will not be published. Required elds are DIY SwitchBoard for Home
marked * Automation

Robot using Arduino and


Comment
Bluetooth Module (Obstacle
Avoidance Robot)

Transistor Circuits in Proteus

Arduino Irrigation and Plant


Watering using Soil Moisture
Sensor

Home Automation using Arduino


and GSM Module

Interface 7 Segment Display to


Name *
AVR Atmega32 using CD4511B

Interfacing Accelerometer to
Arduino
Email *
DC Motor Speed Control using
PWM in AVR Atmega32

Website
Like Us on Facebook

Post Comment

http://www.circuitstoday.com/interface-pir-sensor-to-arduino 5/7
5/16/2017 Interface PIR Sensor to Arduino - Motion Sensor/Detector

Page not
found
The webpage might be temporarily down or it
may have moved permanently to a new web
address.

Recent Comments

Narasimha Rao on Proteus PCB


Design and Simulation Software
Introduction

Miftatnn on Proteus PCB Design


and Simulation Software
Introduction

rmak on Understanding the PN


Junction

jojo on Home Automation using


Arduino and GSM Module

mai on Home Automation using


Arduino and GSM Module

mai on Home Automation using


Arduino and GSM Module

ramesh on Robot using Arduino


and Bluetooth Module (Obstacle
Avoidance Robot)

ni y on Understanding the PN
Junction

Nishant on Touch switch using


CD4011.

rinshad on Automatic Head


Lights Turn O Circuit

jojo on LM35 and Arduino


Temperature Measurement and
Display on LCD

http://www.circuitstoday.com/interface-pir-sensor-to-arduino 6/7
5/16/2017 Interface PIR Sensor to Arduino - Motion Sensor/Detector

Aimen on LM35 and Arduino


Temperature Measurement and
Display on LCD

bagher on Draw Your Circuits


and Simulate them Online for
Free using EasyEDA

jojo on Gas Leakage Detector


using Arduino and GSM Module
with SMS Alert and Sound Alarm

Shibabrata Mukherjee on Gas


Leakage Detector using Arduino
and GSM Module with SMS Alert
and Sound Alarm

Pages

About

Advertise With Us

Authors

Buy Project Kits

CT Home

Datasheets

Disclaimer

Electronic Circuit Symbols

Lab Manuals

- Electronic Circuits Lab

- Microcontroller lab

- Microprocessor Lab

Privacy Policy

http://www.circuitstoday.com/interface-pir-sensor-to-arduino 7/7

You might also like