PIR Sensor Based Security Alarm System

Previously I have built some security alert systems using different methods. Now I will gonna design and implement a PIR Sensor Based Security Alarm System using Arduino. I have designed this circuit using Arduino as the central microcontroller and of course the PIR sensor itself. For generating a police siren effect, I have used a UM3561 IC, which is a siren generator IC, to produce the alarm sound through a buzzer.

Generally, security systems that are specially used in houses, shops, and offices, are basically infrared or laser systems for accuracy and reliability. But these methods require a lot of monetary investment and infrastructure support.

A simple cost-effective solution for a security alarm system is implemented in this small project where I will elaborate on a PIR based security alarm system. This method requires minimal power consumption as well as a low-cost implementation.

Must Read Infrared Sensor Based Intruder Alarm System

Principle Behind PIR Sensor Based Security Alarm System

The main principle of the circuit is to turn the alarm on and provide security. This is based on a PIR sensor with an IC that produces different siren alarms. PIR sensor stands for Passive Infrared Sensor. The PIR sensor detects the infrared radiations emitted from the human body and produces a digital output through its digital output pin. This digital output is sent to the Arduino for the next process.

Based on the digital signal from the PIR sensor, Arduino then triggers the UM3561 IC through the 2N2222 NPN transistor. Thus it produces the sound when any human is detected.

The UM3561 is a ROM IC. It generates multi-siren tones like an ambulance siren, fire engine siren, police siren and machine gun sound.

Project

PIR Sensor Based Security Alarm System

Circuit Diagram

PIR Sensor Based Security Alarm System Circuit Diagram

Components Required

  • Arduino Nano
  • PIR Motion Sensor
  • UM3561 Multi-Siren IC
  • 2N2222 NPN Transistor (x2)
  • Resistors (10KΩ & 220KΩ)
  • 8Ω Speaker
  • Breadboard
  • Connecting Wires

Circuit Connection of PIR Sensor Based Security Alarm System

The designed circuit consists of Arduino, PIR sensor, UM3561 tone generator IC, buzzer, transistor and a couple of resistors. The UM3516 IC is a tone generator IC. It has 8 pins. Pin 1 and pin 6 are the sound effect selection pins. Based on how they are connected, you can choose between 4 different types of sounds.

For our purpose, I opened both pin 1 and pin 6 to generate a police siren effect. Pin 5 is connected to +5V through a 2N2222 NPN transistor which is also activated by Arduino digital pin 4.

One end of the 220KΩ resistor is connected to the 7th pin of the UM3561 IC and the other end is connected to the 8th pin of the IC. Output is taken from the 3rd pin of the IC and it is connected to a buzzer through a resistor and a transistor.

The base of the transistor is connected to the output of the IC through a 10KΩ resistor. The emitter pin is connected to the ground while the negative end of the buzzer is connected to the collector, while the positive end is connected to the +5V.

Coming to the PIR Sensor, its output is connected to pin 3 of the Arduino.

PCB Design

After designing the schematic diagram of the PIR sensor-based security alarm system, I realised that the assembled components and wiring are too clumsy and unprofessional. In fact, the wiring also has a chance of loose connection. To give it a clean and professional look I decided to build its PCB prototype using EasyEDA software as it is so simple to use. Now come to the main part, where we need to order our PCB prototype. I always prefer PCBWay for their quality assurance, fastest delivery and also for 24/7 customer support.

Gerber file for PIR Sensor Based Security Alarm System Gerber.

PIR Sensor Based Security Alarm System 2D View
2D View
PIR Sensor Based Security Alarm System 3D View
3D View

Why I Choose PCBWay as My First Preference?

I’ve done several runs with PCBWay and am happy with the results, it’s good quality. The etching, solder mask, and hole sizes are all done well and that is what matters to me. It takes a few hours for a design to get approved and then a couple of days to finish and ship.

With more than a decade in the field of PCB prototypes and fabrication, PCBWay has proved its assurance from time to time. They always look at the needs of the customer from different regions in terms of quality, on-time delivery, cost-effectiveness and any other demanding requests. PCBWay is a place that brings manufacturers and customers together. As one of the largest and most experienced PCB manufacturers in China, PCBWay is proud to be the best business partner in any aspect of PCB needs.

Check it out for a High-Quality PCB solder mask. There are some pictures below of the new colours of solder musks.

Working Principle of PIR Sensor Based Security Alarm System

The PIR sensor is powered and it detects the IR rays emitted from the human body. This PIR sensor has a maximum range of around 5 meters. You can adjust the potentiometer provided for the sensor to vary your desired distance. When any human is detected, the PIR sensor outputs a logic HIGH-level value i.e., a voltage of 3.5V to 5V to Arduino digital pin 3.

As soon as the Arduino detects logic HIGH on pin 3, it makes pin 4 HIGH for a duration of 10 seconds. During this time, the IC UM3561 is activated as its pin 5 is provided with +5V. The tone generator has an inbuilt oscillator to produce sound. The oscillator circuit is tuned to a certain frequency and also uses a 220KΩ resistor externally.

Then it is passed to the control circuit, which depends on the tone selection pins. These tone selection pins decide one tone from different tones produced by the IC. Thus oscillations along with selected tones are sent to the address counter.

The address counter then sends the data to the ROM. ROM then sends the tone on the output pin 3. The output is given to the NPN transistor to amplify the siren.

The base of the transistor gets voltage from the output pin of the siren generator. The transistor starts conducting when it gets the cut-off voltage at the base and the buzzer is a negative pin and is connected to the ground.

Thus the system produces the sound that can be heard from the buzzer when a human is detected. In the present circuit, we set this IC for a police siren sound.

Applications of PIR Sensor Based Security Alarm System

  • In museums, we can use this system to protect valuable things.
  • It can also be used as an automatic doorbell system which will activate when a human is detected.
  • This can be used in toy applications that produce sound.

Limitations of PIR Sensor Based Security Alarm System

  • PIR sensor pot should be adjusted in such a way as to detect humans only.
  • This system can detect humans only within a range of 5 meters.

Arduino Code

1 thought on “PIR Sensor Based Security Alarm System”

Leave a Comment