Security & Saftey

PIR Sensor based Security Alarm System

I’ll teach you how to build and install a PIR Sensor-based Security Alarm System in this easy DIY project. This circuit was created with Arduino as the main controller and, of course, the PIR Sensor. In addition, I used the UM3561 IC, a Siren Generator IC, to generate the required Alarm sound using a Speaker.

PIR Sensor based Security Alarm

Outline

  • Introduction
  • PIR Sensor based Security Alarm Circuit Principle
  • PIR Sensor based Security Alarm Circuit Diagram
  • Circuit Components
  • PIR Sensor based Security Alarm Circuit Design
  • Code
  • Working of PIR Sensor based Security Alarm System
  • PIR Sensor Based Security Alarm System Applications
  • Limitations of this Circuit

Introduction

In general, infrared or laser transmitters and receivers are utilised in security systems used in homes, stores, workplaces, and other locations for precision and reliability. However, these solutions necessitate a significant financial investment as well as infrastructure support.

This project implements a simple, cost-effective solution for security systems, in which I will describe a PIR-based Security Alarm System, in which a PIR sensor is utilised instead of a transmitter or receiver. This reduces power consumption while also being a low-cost solution. The acronym PIR stands for Passive Infrared Sensor.

PIR Sensor based Security Alarm Circuit Principle

The circuit’s principal goal is to provide security. This is based on a PIR sensor with a siren-producing IC. The PIR sensor detects IR radiation emitted by people and generates a digital output. The Arduino UNO receives this digital output.

The Arduino UNO then triggers the UM 3561 siren IC based on the data signal from the PIR Sensor. When a human is detected, the sound is produced.

The UM3561 is a ROM integrated circuit. It produces a variety of siren sounds, including ambulance, fire engine, police, and machine gun sirens.

PIR Sensor based Security Alarm Circuit Diagram

Circuit Components

  • PIR sensor
  • Arduino UNO
  • UM3561 Siren IC
  • NPN Transistor – 2N2222
  • Resistors 10KΩ and 220KΩ
  • Speaker 8Ω
  • Breadboard
  • Connecting Wires

PIR Sensor based Security Alarm Circuit Design

The Arduino UNO, PIR sensor, UM3561 IC, Speaker, transistor, and a few resistors make up the designed system. A Siren generator IC is the UM3516. It has a total of eight pins. Sound effect selection pins are located on the first and sixth pins. You can choose from four different types of noises depending on how they’re connected.

To make a Police Siren, I left both Pin 1 and Pin 6 open in my project. An NPN Transistor (which is operated by Arduino UNO’s Pin 4) connects Pin 5 to +5V.

One end of the 220K resistor is linked to the UM 3561 IC’s seventh pin, while the other end is attached to the IC’s eighth pin. The third pin of the IC is used as the output, which is connected to a speaker through a resistor and transistor.

Through a 10K resistor, the transistor’s base is connected to the IC’s output. The emitter pin is linked to ground, with one end of the speaker connected to the collector and the other end to +5V.

The output of the PIR Sensor is linked to Pin 3 of the Arduino.

Code

int pir = 3;
int siren =4;
void setup()
{
pinMode(pir,INPUT);
pinMode(siren,OUTPUT);
digitalWrite(siren,LOW);
delay(8000);
}
void loop()
{
if(digitalRead(pir))
{
digitalWrite(siren,HIGH);
delay(10000);
digitalWrite(siren,LOW);
while(digitalRead(pir));
}
}

Working of PIR Sensor based Security Alarm System

  1. Connect the wires as shown in the circuit diagram and turn the power on.
  2. The PIR sensor is turned on and detects infrared rays emitted by humans.
  3. The range of this PIR sensor is 5 metres. This distance can be varied by adjusting the pot provided for the sensor.
  4. When a human is identified, the PIR sensor outputs a logic HIGH value to ARduino UNO’s Pin 3, i.e. a voltage of 3.5V to 5V.
  5. When the Arduino detects logic HIGH on Pin 3, it sets Pin 4 to HIGH for ten seconds. During this moment, the Siren IC UM3561 is turned on by providing +5V to Pin 5.
  6. Internally, the siren generator has an oscillator that produces the sound.
  7. A 220K resistor is used externally to adjust the oscillator circuit to a specific frequency.
  8. After that, it’s sent to the control circuit, which is controlled by tone selection pins.
  9. These tone selection pins select one tone from the IC’s several tones.
  10. As a result, oscillations and a chosen tone are communicated to the address counter. The data is subsequently sent to the ROM by the address counter.
  11. The tone is then sent to the output pin 3 via the ROM.
  12. The output of the NPN transistor is used to magnify the siren.
  13. The transistor’s base receives voltage from the siren generator’s output pin.
  14. When the transistor receives the cutoff voltage at the base, it begins to conduct, and the speaker is linked to the ground through the negative pin.
  15. When a human is recognised, the sound emitted by the speaker can be heard.
  16. It makes a Police Siren sound in the current circuit.

PIR Sensor Based Security Alarm System Applications

  • This can be used to secure important items in museums.
  • This can also be utilised as a doorbell circuit that automatically sounds the bell when a human is identified.
  • This could be utilised in defence applications to detect humans in the field of battle.
  • This can be utilised in sound-producing toy applications.

Limitations of this Circuit

  • PIR sensor pot should be adjusted in such a way to detect the humans only.
  • This can detect the human only within its range of 5 meters.
Tags

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button
Close
Close