Design and Implementation of Home Security System Using Piezoelectric Sensor

— A home security system using a piezoelectric sensor is designed to detect intrusion and unauthorized entry into the residential house. A piezoelectric sensor is used because of its capability that can convert mechanical pressure into electrical energy by the deformation of the crystal's structure. The relationship between the mechanical pressure and generated voltage is investigated by conducting an experiment using various pressure conditions and body weight. The relationship between pressure and body weight is directly proportional to the generated voltage. This home security system will control the home appliances based on the information given and send feedback when there is a security breach. The homeowner will receive a notification via a short message service (SMS) from an Arduino board equipped with a Global System for Mobile Communication (GSM) shield.


I. INTRODUCTION
A security system is designed to detect any intrusion or unauthorized entry into the controlled area. The security system for the home can be designed by using different types of sensors such as light, sound, temperature, pressure sensors, and many more [1][2][3]. The term piezoelectric comes from the Greek word, 'piezen' which means press or squeeze. Piezoelectric can be defined as the electric charge that accumulates in certain materials when mechanical pressure is applied to them or vice versa. Man-made piezoelectric material from ceramic which is lead zirconate titanate (PZT) is used because it can provide more voltage than quartz crystal with the same amount of mechanical pressure [4]. Piezoelectric has high sensitivity and can stand a large range of working temperatures which is -40℃ until 80℃. Besides that, it provides easy installation and placement plus having minimum installation damage. This piezoelectric sensor is more advanced compared to others because it is a good rigidity without droop and has high intension without damage. Lastly, it also resists electromagnetic jamming [5]. Based on the previous research by Boyd et al., the intrusion for a smart security system is detected by only one parameter which is pressure [6]. About these problems, a home security system using piezoelectric with low cost is designed and implemented by some advancement in this project. Two parameters will be measured to detect the true intrusion which is pressure and weight. The intrusion only will be detected when both parameters exceed predefined limits or values. This research is aimed to design and implement a home security design using the piezoelectric sensor. Next is to design the Global System for Mobile communications (GSM) based home security system for getting notifications via short message service (SMS). Lastly is to investigate the relationship between the mechanical pressure and voltage generated.

A. Circuit Design Of The System
The circuit of the system consists of three components which are the input, microcontroller, and output. The piezoelectric sensor acted as the input in the system by converting the collected pressure into electrical energy. Next, the microcontroller in the Arduino Mega 2560 functioned as the primary control panel by receiving the signal from the input and sent the command to the LED and light bulb whether to turn on or shut off. Besides, the microcontroller also sent a command to the GSM module to send a message to the mobile phone as the output. The block diagram of the system is shown in Figure 1. Besides, the receiver serial (TX) pin of the GSM SIM900A was connected to the digital pin 11 of the Arduino Mega 2560 while the transmitter serial (RX) pin of the GSM was connected to the digital pin 10 of the Arduino. The VCC pin and GND pin of the GSM was connected to the 5 V and the GND pin of the Arduino. Lastly, all grounds were wired together at a common point [7]. The circuit of the system is shown in Figure 2.

B. Coding of Home Security System
The void setup function needs to be declared to begin the circuit function. It runs every time the circuit is powered with electricity. The variable of the LED, piezoelectric sensor, and relay module was declared in the void loop function. Plus, the 'If' function was used to run the process of the variables. To blink the LED takes only a few lines of code as shown in Figure 3. The variable that holds the number of the pin connected to LED was defined. Then, the 'If' function was used to turn the LED on and off in the void loop. To code the piezoelectric sensor, a variable that holds the number of the pin connected to piezoelectric was defined as shown in Figure 4. The sketch reads the piezo output using the analogRead() command and encoding the voltage range from 0 to 5 volts. The variable of the piezoelectric sensor was declared in the void loop function by using the 'If' function to run the process. The coding of the relay module is shown in Figure 5. In the void loop, the 'If' function was used to run the process. Since GSM module SIM900A used AT command to communicate, AT command was sent from Arduino Mega 2560 to control the module. AT Command in the GSM SIM900A used the Serial port to communicate. As usual, the serial port needs two pins which are a Transmitter (TX) and a Receiver (RX). AT command is a command that begins with "AT".

A. The Working Principle of Piezoelectric Sensor
The circuit of the system which consists of piezoelectric and Arduino Mega 2560 sensor as the sensing and decisionmaking devices was successfully designed and implemented into the home prototype. The completed system of the home security system was tested by different conditions of pressure exerted on the piezoelectric sensor and the output was recorded in Table 1. When there is no pressure exerted on the piezoelectric sensor, there was no output observed on the LED and the light bulb [8]. Meanwhile, when there is pressure exerted on the piezoelectric sensor, the LED and the light bulb was switched on because of the electric charge produced by the voltage generated from the piezoelectric sensor. Ceramic material type of piezoelectric sensor can detect mechanical pressure applied to it and produced electrical charge from voltage generated. The electrical charge was transferred into the circuit of the system. The amount of mechanical pressure detected by the piezoelectric sensor depending on the connection of the piezoelectric sensors either in series or parallel as shown in Figure 7.  Figure 6. Hence, the functionality of the project was tested. The result of voltage generated from piezoelectric sensors for a different number of piezoelectric sensors and types of connection is shown in Table 2. The amount of voltage generated increases when the number of the piezoelectric sensor was added. For instance, the voltage generated for series and parallel connections increased from 1.32×10 -3 V to 3.50×10 -3 V and 1.10×10 -3 V to 2.10×10 -3 V when the number of single piezoelectric sensors became two. The amount of the voltage generated in parallel (4.90×10 -3 V) connection is less than in series (9.60×10 -3 V) connection for five pieces of piezoelectric discs. The rate of voltage changes is much higher for series connection when piezoelectric discs are added compared to parallel connections. The piezoelectric stack is assembled in series and parallel to use as an energy harvester [9]. The graph of voltageregulated against the number of the piezoelectric sensor is plotted as shown in Figure 8. The voltage generated from the piezoelectric sensor is directly proportional to the number of the piezoelectric sensor. The voltage generated in the series connection of the piezoelectric sensor also showed a steeper line graph compared to the parallel connections. From Ohm's Law equation, voltage is directly proportional to the electric current. Since the voltage generated was increased when the number of piezoelectric sensors increased, thus the electric charge was also increased. The generated voltage from the piezoelectric sensor was measured by varying the human body weight and the types of activities for 30 seconds for each activity. The results for the reading of generated voltage are shown in Table 3. For standing activity, the voltage generated from the piezoelectric sensor for 45 kg human body weight is 17.60×10 -3 V compared to 65 kg human body weight which is 22.90×10 -3 V. Moreover, jumping activity has a higher voltage generated which is 22.30×10 -3 V compared to the standing 20.60×10 -3 V activity for the 55 kg weight of the human body. Table 3 The voltage generated for different human body weight and types of activities  Figure 9 shows the graph of voltage generated against human body weight for two different activities which are standing and jumping. For both activities, the piezoelectric sensor was generated more voltage when the weight of the human body was increased [10]. The voltage generated when jumping activity was much greater than standstill by the same person for 30 seconds. This is because the pressure exerted on the piezoelectric sensor when jumping was greater than standing. Hence, the correlation between the pressure and the voltage generated is directly proportional.

B. The Application of GSM
GSM can be used to send and receive a message in a critical area. For sending a message, the person must have a mobile number in the code and SIM card inside the GSM modem for receiving the message. The GSM was used to send notifications via SMS to the mobile phone when the pressure was exerted on the piezoelectric sensor. The GSM was also coded and connected through high power supplied to send SMS to the mobile phone through Arduino Mega 2560. Figure 10 shows the SMS written 'Intrusion detected!' was send from GSM to the mobile phone when the piezoelectric sensor was given pressure. Hence, the GSM system was successful in sending a message when there is an intrusion occurred.

Human body weight
Average voltage (mV) The home security system is commonly used in residential areas to reduce crime cases such as burglary and kidnapping. When the piezoelectric sensor was applied pressure, the outputs which are LED and light bulb were switched on. The notification via SMS was also sent to the mobile phone when there is an intrusion that occurred in the house. Based on the experiment for the human body weight parameter, the amount of voltage generated for 45 kg, 50 kg, 55 kg, 60 kg and 65 kg were very small which is the reading of the voltmeter was only read in mV. About this result, the piezoelectric sensor will not detect intrusion if the pets such as dogs or cats, and the children are giving pressure to the piezoelectric sensor because they are very light compared to an adult. The voltage generated is directly proportional to the mechanical pressure such as the weight of the human body and the stress applied to the piezoelectric sensor.
For recommendations, the lack of awareness by getting only SMS during a security breach is one of the limitations. In the future, rather than getting SMS when there is an intrusion, the system can be improved by getting phone calls during burglary using coding. Thus, society will be more alert and take immediate precautions to ensure the safety of family members and home appliances.