A step by step tutorial to make your own PIR person detector.
Components Required:
- Raspberry Pi 3 B+
- SD Card
- Micro USB Cable with Adapter
- Monitor with HDMI cable
- Mouse and Keyboard
- Breadboard
- 6 Jumpers
- PIR Sensor
Step 1: Connect PIR Sensor with Raspberry Pi
PIR sensor has 3 labelled pins, Vcc, Gnd and Signal
Connect VCC to 5V
Gnd to Gnd
And, Signal to GPIO4 (pin 7)
Step 2: Adjust Sensor Sensitivity
The PIR sensor has 2 potentiometers:
In the image above, the right potentiometer controls sensitivity and the left potentiometer controls the timeout.
Here, we set both the sensitivity and timeout at their lowest values (anti-clockwise). It is advised to keep the timeout as low as possible and just change the sensitivity depending on the range required.
Step 3: Power up Raspberry Pi and program on python
The code for this project can be found here.
You can bring your hand in front of sensor to detect motion. And adjust the sensitivity potentiometer according to the application environment.
Author: Nakul Garg