PIR Sensor based Security Alarm

PIR Sensor based Security Alarm Circuit Principle

The main idea of the circuit is to provide security. This is based on PIR sensor with an IC that produces siren. The PIR sensor detects the IR radiations emitted from the humans and it produces a digital output. This digital output is applied to the Arduino UNO.
Based on the digital signal from the PIR Sensor, Arduino UNO then triggers the UM 3561 siren IC. Thus it produces the sound when any human is detected.
The UM3561 is a ROM IC. It generates multi siren tones like ambulance siren, fire engine siren, police siren, machine gun sound.

PIR Sensor based Security Alarm Circuit Diagram




NOTE: The circuit diagram shows the Oscillator Resistor (between Pin 7 and 8 of UM 3561) as 220Ω but it is 220KΩ.

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 designed system consists of Arduino UNO, PIR sensor, UM3561 IC, Speaker, transistor and a couple of resistors. The UM3516 IC is a Siren generator IC. It has 8 pins. First and sixth pins are the Sound effect selection Pins. Based on how they are connected, you can choose between 4 different types of sounds.
In this project, I have left open both the Pin 1 and Pin 6 to produce a Police Siren. Pin 5 is connected to +5V through an NPN Transistor (which is activated by Arduino UNO’s Pin 4).
One end of the 220KΩ resistor is connected to the seventh pin of the UM 3561 IC and the other end is connected to the eighth pin of the IC. Output is taken from the third pin of the IC and it is connected to a speaker through a resistor and transistor.
The base of the transistor is connected to the output of the IC through a resistor of 10KΩ. Emitter pin is connected to the ground while one end of the speaker is connected to the collector, while the other end is connected to +5V.
Coming to the PIR Sensor, its output is connected to Pin 3 of 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));
}
}