Skip to content

O-imperador/raspberry-pi3-pir-security-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi PIR Security System

A simple IoT-based security system using a Raspberry Pi 3 Model B, a PIR motion sensor, an alarm (LED), and an IP camera.
When motion is detected, the system activates the alarm and attempts to capture an image from the provided camera URL.


📸 Features

  • Detects motion using a PIR sensor
  • Triggers an alarm signal on motion detection
  • Fetches a snapshot from an IP camera
  • Saves the captured image locally
  • Clean GPIO shutdown on exit

🛠️ Hardware Requirements

  • Raspberry Pi 3 Model B
  • PIR Motion Sensor (connected to BCM pin 4)
  • Alarm/Buzzer (connected to BCM pin 5)
  • Wi-Fi or Ethernet connection
  • IP Camera (supports snapshot URL, e.g. via Android IP Webcam app)

🔌 Wiring

Component Raspberry Pi Pin
PIR Sensor OUT GPIO 4 (BCM)
Alarm/Buzzer GPIO 5 (BCM)
PIR VCC 5V
PIR GND GND
Buzzer VCC GPIO 5
Buzzer GND GND

🧪 Software Requirements

  • Proteus (this project was created using Proteus 8 Professional)
    • When simulating the PIR sensor in Proteus, make sure to load the provided HEX file into the PIR module so the sensor behaves correctly during simulation.
  • IP Camera App (optional):
    • If you want to use an IP camera like I did, install IP Webcam from the Android Play Store.
    • You can also modify the script to use your laptop’s webcam instead.
  • Python Packages (for Raspberry Pi):
sudo apt update
sudo apt install python3-pip
pip3 install RPi.GPIO requests

🧑‍💻 Usage

Update the IP camera URL in the script if needed:

IP_CAMERA_URL = "http://<your-ip-camera-ip>/shot.jpg"

About

A simple IoT security system built using Raspberry Pi 3 Model B, a PIR motion sensor, a buzzer/alarm, and an IP camera. When motion is detected, the alarm activates and the Raspberry Pi captures an image from the IP camera and stores it locally.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages