Home > Projects > Sensor – Transducer – Detector Projects > Burglar Alarm using Arduino and PIR Sensor

Burglar Alarm using Arduino and PIR Sensor

Summary of Burglar Alarm using Arduino and PIR Sensor


This tutorial explains building a simple burglar/intruder alarm using Arduino, a PIR motion sensor, and a buzzer, with a 2N2222 transistor to drive the buzzer and a pushbutton reset (with a debouncing capacitor). It notes possible enhancements like adding a GSM module for SMS alerts and points beginners to related Arduino and PIR tutorials.

Parts used in the Burglar Alarm Project:

  • Arduino board
  • PIR sensor (motion detector)
  • Buzzer
  • 2N2222 transistor
  • 100 ohm resistor (base resistor for transistor)
  • Push button switch (reset)
  • Capacitor (debouncing capacitor for switch)
  • Wires and breadboard or PCB for assembly
  • Power supply for Arduino

In this tutorial, we are building an interesting application using Arduino and PIR Sensor. A Burglar Alarm – is basically an intruder alarm or an anti theft alarm. So this project is all about building an anti theft alarm or an intruder alarm using Arduino and PIR sensor. It is possible to enhance this project with many features like adding a GSM module to send SMS alerts to specified mobile numbers when an intruder is detected (when a motion is detected inside the range of PIR sensor). So lets get to building our burglar alarm project using arduino.

Simple_Burglar_Alarm_Arduino

Lets first build a simple diy burglar alarm using Arduino, PIR sensor and a buzzer only. If you are a beginner, you need to read the following tutorials to build this circuit perfectly.

1.  What is Arduino – read this article if you are very new to Arduino.

2. Blink LED with Arduino – say Hello World!  – Learn how to blink leds using Arduino!

3. Simple LED Projects using Arduino –  Get your hands in it! Do some LED projects using Arduino to get the basics!

4. Interface PIR Sensor to Arduino – Learn about how a PIR sensor works and how it is interfaced to Arduino.

Go through above tutorials before you try building this burglar alarm system using arduino! So lets begin our project.

The circuit diagram to build a simple burglar alarm or an intruder alarm using arduino is given below. You may assemble the circuit as shown in the diagram. Before getting into working of the alarm circuit, I shall brief the components used in this project.

PIR Sensor – is the heart of this simple burglar alarm circuit using arduino. A PIR sensor – is basically a motion sensor or a motion detector which identifies any object that moves inside its range of view. PIR sensor identifies infra red radiations emitted by any object under its radar range.

Buzzer – is used to create a sound alarm when ever a movement is identified inside the range of PIR sensor. A transistor 2N2222 is used to drive the buzzer. The maximum current that can be sourced or sinked from an arduino pin is 20mA (the total current being 200mA from different pins). But the buzzer will need more than just 20mA for its proper functioning. So how to give the necessary current required fir buzzer ? We use switching transistor 2N222 for this purpose. It can act as a switch and at the same time it provides the required current amplification. A 2N2222 transistor with a gain of 100 can give upto 1A current at its output. Another purpose of using a transistor in between arduino pin and buzzer is isolation. A short circuit of the buzzer will destroy only the collector – emitter junction of transistor. Since their is isolation at the base region of transistor (base is connected to arduino), the destruction of collector-emitter junction will not affect base and hence our arduino will be safe from getting burned! The 100 ohms resistor at base is used to limit base current of transistor.

Switch – a push button switch is used to reset the burglar alarm once its activated. The capacitor is used for bypassing bouncing effects of a switch ( debouncing capacitor).

Quick Solutions to Questions related to Burglar Alarm Project:

  • What is the main purpose of this project?
    To build a simple burglar or intruder alarm using Arduino and a PIR sensor that sounds a buzzer when motion is detected.
  • What role does the PIR sensor play?
    The PIR sensor detects motion by sensing infrared radiation from objects moving inside its range and serves as the heart of the alarm.
  • Why is a 2N2222 transistor used with the buzzer?
    The 2N2222 is used as a switching transistor to provide the higher current the buzzer needs and to isolate the Arduino from potential buzzer faults.
  • Why is a 100 ohm resistor placed at the transistor base?
    The 100 ohm resistor limits the base current of the transistor.
  • How is the alarm reset after activation?
    A push button switch is used to reset the burglar alarm once it is activated.
  • Why is a capacitor used with the push button switch?
    The capacitor is used for debouncing to bypass switch bouncing effects.
  • Can this project be enhanced to send alerts via SMS?
    Yes, the tutorial notes it is possible to add a GSM module to send SMS alerts when the PIR detects motion.
  • Do beginners need prior tutorials before building this circuit?
    Yes, beginners are advised to read basic Arduino and PIR interfacing tutorials provided in the article before building the alarm.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top