ARDUINO Microcontroller Based Building Security System

This work aims to protect homes against danger, damage, and any criminal activity using Passive Infrared (PIR) and LASER sensors . Depending on cutting beam that emitted from the laser source or from PIR, there are three cases to warn; the first case (without GSM (Global System Mobile)) to issue a warning aerobically by sound. The second case (with GSM modem and Arduino), will be sent a warning SMS (Short Message Service) directly to the user through GSM Networks. In addition, final case with GSM and Arduino, gives the order to the phone (Nokia 6500) snapped a picture and is sent to the user depending on GSM networking MMS (Multimedia Message Service). The LASER sensor is used to detect any move depending on cutting beam. The PIR is used to detect a human body. In addition, the devise cannot work until activated by the user through the password (to activate protection device) as well as confidential in the same way it is closed. This system is built with open source hardware (Arduino uno 328). Beside to software has been the use of Micro C language in programming microcontroller (Arduino uno 328) addition to Proteus program to simulate the work of Ardino.


Introduction
Today there is need to security factors almost in all the life system like in home, companies etc. The main reason for providing security for our buildings (home, office, church, school, etc.) because the crime is rising widely and People are using guard dogs and security men are both good for some time, but is expensive and is possible to easily fooled. Beside as well the main reason, There are many reasons for needing security in our life. The first reason is to give safety for human whether they are inside (voice alarm) or outside the building (send SMS and MMS). The second reason is allow giving knowledge on people whom visit building (snapping a picture). In this work, aims to design security system safe and easily operated, with low cost and efficiency. We have a prototype of this system, which is composed of two sensors-LASER sensor, PIR sensor, relay, a microcontroller unit-Arduino Uno board and a GSM module. The description of work can be classified into three parts: 1. Building security system alert the person by alarm. 2. Building GSM security system alert person by send SMS. 3. Building GSM security system alert person by send MMS.
Previously some system provides security manually which can easily break by thieves. So, here Password is mainly used for authentication.
Building security is applied in order to provide safety and better security, there are many previously published researches in this filed, as follows: In 2013 Sayemul and Saiduzzaman proposes to build a microcontroller on an automated system that can provide powerful protection against any hacker breakage or against physical intrusion and send a warning to the law enforcement group a signal immediately. The system consists of a microcontroller concomitant with a passive infrared radiation sensor, a shock sensor and a keyboard with a display panel [1]. In 2014 Budijono et al. proposed to collects all information from 2 PIR sensors used to detect obstacle, processing the data and transmits SMS to equivalent GSM mobile phone number by utilizing a GSM modem also Serial Camera for taking image, SD Card module for keeping this image [2]. Sushma et al. in 2015 proposes to used Arduino based surveillance enhancements the capability of detecting stealing through vibration and PIR sensors and Password pedant. Arduino microcontroller is connected to a USB and diverts analog to digital signal, it initiates to take the picture and stores the pictures in the cloud server to save effect of the person involved in the theft. pictures are transmits to the android users as a trigger alert to deal with intruders [3]. In 2016, Choudhary et al. present an innovative low cost design and implementation of automated control based on weather conditions, appliance control, and, home security together with the design of android application to enable the smart phone to send commands and receive alerts through the server based system. The system is processed via Arduino microcontroller [4].

General Description of Equipment
The equipment that used in this work are:

I. ARDUINO
It's open basis physical computing stage established on an easy microcontroller board involve of a microcontroller ATmega328 and developing ambience for writing software of the Council. Arduino can be utilized to improve communicating objects, with input from a collection of switches or sensors and control a variety of keys, lights and other physical outputs. Arduino microcontroller can be performed lonely, or they can connect with software running on your computer (for example, Flash, processing, Proteus and Max MSP) [1,2]. Arduino Uno is a microcontroller board based on the Atmel ATmega328 microcontroller. "Uno" means one in Italian and the Council Uno is the latest in a series of USB (Universal Serial Bus). The Arduino Uno board has a 16 MHz ceramic resonator, connected USB, power socket, at the head of ICSP, reset button, 6 analog inputs and 14 digital input/output pins (of which 6 can be used as PWM) outputs. Panel has 32 KB of flash memory, which uses 0.5 KB of boot loaders 0.2 KB of SRAM, 1 Kbytes of EEPROM and 16 MHz clock speed. Arduino Uno board is shown in Figure 1 [3,5].

II. Passive Infrared (PIR) Sensor
PIR sensor is an electronic device that depends in its work on sensing infrared (IR) light radiating from objects (human, animals or anything) in its range of view and used in the building of PIRbased on motion detectors. Has been a clear movement to discover when it is the source of infrared radiation with one-degree heat, like a human, throws ahead of the source of X-infrared with another temperature, like a wall. This means that the sensor does not detect heat from the faces of passers-by in front of him, but this object interrupt normal field sensor that determines the state. Any object, even exactly the same degree as the one heat surrounding objects cause rapid intervention to activate the police if he was moving in a range of sensors. All objects above absolute zero emits energy in the form of radiation. Mainly, IR radiation is not visible to the human eye but electronic devices can detect this radiation [6].

III. LASER Detector
Overview of Components Used in the circuit of LASER Detector:

A. Light Dependent Resistor
The Light Dependent Resistor (LDR) is a sensor, which has a resistance reduced when the light hits it. This type of sensor is typically utilized in light sensor circuits in severe areas. Made of LDR of the semiconductor light-sensitive materials, to isolate the base. Cadmium sulfide, lead sulfide, germanium, silicon and gallium arsenide semiconductors are the most employed for this system [7].
B. 741 Operational Amplifier 741operational amplifier module work in this circuit as comparator, as shown in Figure 2, It's function based on a comparison between the varying input voltages at pin 2 with the reference voltage at pin 3 and give the output to pin 6. If the reference voltage at pin 3 is less than the input voltage at pin 2, after that the output is negative at pin 6 and If the varying input voltage is lower than the reference, then the output is positive [8].

C. Relay
Relay is an electromagnetic device, which consists of a solenoid, moving communications (switch) and the restoration of the spring and consumes a relatively large amount of power. It is used for isolating control and remote control. Thus, it is possible for the interface IC to control the relay comfortably. To enable this, the driver circuitry, which will act as a buffer circuit, is that the integration between them. A driver circuit senses the presence of the level of "high" in the input and pays relay effort from another source. Thus, the relay is used to switch the power supply to the devices [7]. Relay module; is an electrically operated switch, it is used to allow the opening and closing the circuit depending on the voltage or/and current to ensure the safety device in the event that the voltage or current is greater than the ability of Arduino to handle and thus the fundamental function protect each part of the circuit separately.

D. GSM Modem
GSM modem in this system is a mobile phone (Nokia 1100 or Nokia 6500) that is connected with arduino through an relay module to control it .In the second part (Building GSM security system alert the person by send SMS) when any sensor activated the microcontroller control the relay module to open saved massage and send it to an user phone number that is chosen before as shown in Figure 3. In the third part (Building GSM security system alert the person by send MMS) we used an mobile phone with camera and has Ability to send MMS (Multimedia Message Service), and in the same way when any sensor activated the microcontroller control the relay module to take picture and send it to a user phone number as shown in Figure 4.

E. LCD Display
LCD (Liquid Crystal Display) screen is an electronic display module and obtain a large domain of applications. These modules are pre seven segments and other multi segment reasons being: LCDs are inexpensive; simply programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on [9]. LCD display is utilized to show instructions and indications to the user. It is two line 16 Character Display driven by the ATmega328 micro controller [1]. Figure 5 shows a 16x2 LCD panel.

F. Mobile Phone
In this work, using two types of mobile phone. The first type is Nokia 1100 to send SMS as shown in Figure 6 and Nokia 6500 to send MMS as show in Figure 7.  (Figure 2 and Figure 3). Password Authentication: To get more Security, password utilized as a authorizing tool. This system saves password of authenticating users for the aim of authentication. System utilizing password validation supports tolerable security to the users as it represents as a secret of authorizing users. For Authorized User: If the user is authorized and the password is validated successfully by the sensor, the Arduino will start the servo to rotate and unlocks the door.

Experimental Results and Discussions (for Unauthorized User)
The owner switches the device on before he left your building. If the thief who tries to enter the door is found as unauthorized and if the validation fails, Depending on cutting beam that emitted from the laser source or from PIR, there are three cases to warn; I. Security Alarm System (without GSM) It Shows line alarm. It provides higher alarm sound. This system (alarm system) just rings an alarm for the part of security such as in case of fire. This system consists of sensor, transmitter, receiver and speaker. When sensor, activated the transmitter will send signal to receiver to turn speaker on as shown in Figure 6. Figure 7 shows the flowchart of this case II. Security Alarm System (with GSM). It is consist of LASER sensor (which set in the main home door) or PIR sensor (which set inside the home), arduino microcontroller, relay module and GSM modem. When sensor activated the microcontroller control the relay module to send SMS as shown in Figure 8 and Figure 9 or to take picture and send it in MMS to a user phone number as shown in Figure 10. In this case the user can do what is necessary such as call police and he can use the picture as evidence against the thief. Figure  11 shows the flowchart of this case Proteus is used as a software for microprocessor simulation. An electrical simulation was created including all the required connections and voltages for the micro-controller model to operate on the simulation (as the micro controller real model used in this work). The simulation by proteus is shown in Figure 12.

Conclusion
The used wireless security with password authentication and two sensors which provide high layer security system, Reliable and Durable, Low power consumption, only 2.4mWatts, No need to keep eye on surveillance continuously, Alert sound can call law enforcement team if necessary, Battery operated, can be backed up & also mains operated, Highly sensitive LASER sensor for any cutting from burglars or any moving body, each PIR sensors can cover 10-45 meters and More PIRs can be connected parallel for larger space, Also Can be used in any building like Home Security System, in Museum or Bank . And final Low cost operating system using Arduino module [AT-mega328] in Micro C programming language ( Figure 13 shows the part of programming) and Overall cost effective and parts are easily available on the market.