The proposed project is a Raspberry Pi-based intrusion detection system that uses a passive infrared (PIR) sensor to detect motion and a Pi camera to take pictures. The images obtained are stored in Firebase, which is Google’s mobile platform that helps you quickly develop high-quality apps.
Any area (indoors or outdoors) can be put under observation and even a slight movement by any heat-radiating body, such as a human being or an animal like a cat or dog, can be detected. On detection, the sensor triggers the camera to capture an image of the area. This system for intrusion detection can be modified to capture wildlife photos, face recognition, or other such applications.
Without Firebase settings enabled, the captured images are by default saved in Raspberry Pi. Either way, the autogenerated name itself contains the time and date of the movement in the area under observation, thereby giving the added advantage for user verification of the zone of observation (and verification of the same against expected or unexpected trespassing) by checking the folder. The same can be accessed on the Firebase system on your Android/iOS device or via a web app.
|Intrusion Detection System|
|Bill of Material|
|Raspberry Pi 3b+||1||For programming|
|PIR sensor||1||Motion sensor|
|Pi cam||1||5MP Pi camera|
|Jumper wire||3||Female-female jumper|
Python language is used for programming. Before coding, the configuration of Raspbian OS on Raspberry Pi is needed. You need to install the Pi camera library files to run this project on Raspberry Pi.
Fig. 1 shows the author’s prototype when the PIR sensor does not detect any movement.
Fig. 2 shows the prototype when the sensor detects a small hand movement and activates the Pi camera to record the image. The image is captured and stored for reference. The components used in the project are listed in Table 1 for the Bill of Material.
Raspberry Pi – Installation and Setup
To use a Raspberry Pi camera (having a ribbon cable), first, enable the camera interface in the Raspberry Pi config setting. The following code is used for this part: