PIR infrared sensor module is based on infrared technology, automatic control products. High sensitivity, high reliability, low power consumption, low voltage operation mode. Widely used in various auto-sensing electrical equipment, especially for battery-powered automatic control products.

Using PIR we can identify the motion and this sensor will transmit a signal for 3 sec so we need to do a program and detect the motion and as per your requirement you can activate or deactivate any functions like switching on camera when motion is detected.

I am going to use Raspberry Pi 2 For this small Project . In this Project i am designing and program to detect a motion and on basis of that alarm will be played for 1 minute.

Requirement :

1.Raspberry Pi

2.Pyroelectric Infrared Pir Motion Sensor Detector Module

3.Computer With Putty Installed

 

Step 1.

Install any raspberry based Operating system with GPIO Package installed and as well as Python Installed. I am using OSMC.

Step 2.

Connect the PIR VCC,OUT,GND to Raspberry pi 5v,GPIO4,GND

pir_wiring

VCC – > 5v
GND -> GND
OUT -> GPIO4 (Pin 7)

 

Step 3

Connect to raspberry pi using SSH (Putty For Windows)

Step4

Create a python program and copy bellow code .And after saving run the script with sudo permission