IOT based Raspberry Pi Home Security System with Email Alert

In this IoT based Project, we will build a Home Security System using PIR Sensor and PI Camera. This system will detect the presence of Intruder and quickly alert the user by sending him a alert mail. This mail will also contain the Picture of the Intruder, captured by Pi camera. Raspberry Pi is used to control the whole system. This system can be installed at the main door of your home or office and you can monitor it from anywhere in the world using your Email over internet. Security is the most important thing in human life. And people always concern about intruders or thieves when they are away from their home. In the world of Internet of Things (IoT) when we have all the technologies to protect our home, we always want a system which can be controlled and monitored from anywhere.  There are many types of good systems and cameras out there for this purpose but they are much expensive so today we will build a low cost simple Raspberry Pi based Intruder Alert System, which not only alert you through an email but also sends the picture of Intruder when it detects any.

iot based raspberry pi home security system with email alert
IOT based Raspberry Pi Home Security Project with Email Alert

In this IoT based Project, we will build a Home Security System using PIR Sensor and PI Camera. This system will detect the presence of Intruder and quickly alert the user by sending him a alert mail. This mail will also contain the Picture of the Intruder, captured by Pi camera. Raspberry Pi is used to control the whole system. This system can be installed at the main door of your home or office and you can monitor it from anywhere in the world using your Email over internet.

Components Required:

  • Raspberry Pi
  • Pi Camera
  • PIR Sensor
  • LED
  • Bread Board
  • Resistor (1k)
  • Connecting wires
  • Power supply

Working Explanation:

Working of this Project is very simple. A PIR sensor is used to detect the presence of any person and a Pi Camera is used to capture the images when the presence it detected.

Whenever anyone or intruder comes in range of PIR sensor, PIR Sensor triggers the Pi Camera through Raspberry Pi. Raspberry pi sends commands to Pi camera to click the picture and save it. After it, Raspberry Pi creates a mail and sends it to the defined mail address with recently clicked images. The mail contains a message and picture of intruder as attachment. Here we have used the message “Please find the attachment”, you can change it accordingly in the Code given at the end.

Here the pictures are saved in Raspberry Pi with the name which itself contains the time and date of entry. So that we can check the time and date of intruder entry by just looking at the Picture name, check the images below. If you are new with Pi Camera then check our previous tutorial on Visitor Monitoring System with Pi Camera.

You can also adjust the detection range or distance of this system using PIR sensor’s potentiometers. Learn more about PIR sensor here to adjust the range also check PIR sensor based Burglar alarm.

Circuit Description:

In this Intruder Alert System, we only need to connect Pi Camera module and PIR sensor to Raspberry Pi 3. Pi Camera is connected at the camera slot of the Raspberry Pi and PIR is connected to GPIO pin 18.  A LED is also connected to GPIO pin 17 through a 1k resistor.

circuit description iot based raspberry pi home security system with email alert

Scroll to Top