Interfacing PIR Motion Sensor with Raspberrypi

Posted on Updated on

1

THINGS USED IN THIS PROJECT

Hardware components:
Raspberry Pi 2
× 1
PIR Motion Sensor
× 1
Buzzer (optional)
× 1
Breadboard
× 1
Jumper Wires
× 1

How it Works

PIR (passive infrared) motion sensor detects any movement of objects, human or animals. Mostly they are used in automatically activated lighting and burglar alarm systems.

Every object with temperature above absolute zero emits heat in the form of infrared radiation. PIR motion sensor detects change in the infrared radiation impinging on it. When any object or human passes in the front of the PIR sensor, the temperature in sensor’s field of view will rise from ambient temperature to object temperature and then back again to ambient temperature. PIR sensor converts this temperature change into the change in output voltage and that change in voltage is considered as motion detected.

2

PIR Sensor

3

1 / 2 • PIR Sensor

4

PIR Sensor

Sensor

Sensor has three pins. Power ( VCC ), Ground (GND) and output (OUT) pin which gives logic high if motion is detected. It has two potentiometers. One for sensitivity adjustment and second for adjusting the time the output signal stays high when motion is detected.

5

CODE

PIR. PY Python

Create new python file PIR. py and enter the following code.
To run the code, open the terminal and go to the directory where your PIR.py is located. Then enter the command ” sudo python PIR.py ” and hit enter

6

7

8

VCC, OUT and GND pins

9

Potentiometers to adjust Sensitivity and Output Time

Posted By-:  Vissicomp Technology Pvt. Ltd.

Website -: http://www.vissicomp.com

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s