 Kurdistan Journal of Applied Research (KJAR) Print-ISSN: 2411-7684 | Electronic-ISSN: 2411-7706 Volume 3 | Issue 1 | June 2018 | DOI: 10.24017/science.2018.1.4 Received: March 10, 2018 | Accepted: April 22, 2018 Smart Home System Based on GSM Network Halgurd Nawzad Awl Bakhtiar Ali Karim Communications Engineering Communications Engineering Technical college of Engineering Technical college of Engineering Sulaimani Polytechnic University Sulaimani Polytechnic University Sulaimani, Iraq Sulaimani, Iraq Halgurd.Awl@spu.edu.iq Bakhtiar.ali@spu.edu.iq 17 Abstract - Due to increasing robbery and intrusion, establishing home-security system has become a correlated part of the modern houses, buildings, and offices. As the family members are not at home all the time, the traditional home security system, which makes alarm sound only, may not be efficient enough. Alternatively, Global System for Mobile communications (GSM) based security system can provide higher level of security and convenience compared to the traditionally used systems. The main objective of the current paper is to design and implement cost-efficient and reliable security, safety and home automation system for protection and occupants’ convenience. If any undesired events, such as intrusion, gas leakage and fire occurs in the house, our system warns the homeowner in real-time using Short Message Service (SMS). With the proposed system home appliances can also be controlled in three ways, namely sending SMS from the authorized numbers to the system through GSM network, smartphone app using Bluetooth module and infrared (IR) control using IR module. Keywords: Security, GSM, Arduino, Sensor, safety SMS. 1. INTRODUCTION Nowadays, security is one of the crucial issues in the world. Home security system has altered significantly over the last decade and it is expected that the change will be continuing in the coming years. Burglary and other household thefts have been increasing noticeably. Besides, safety from gas leakage, fire and controlling appliances remotely have become the essential requirements for the modern homes, offices and buildings. Therefore, currently used security systems, which mainly rely on video monitoring, need to be enhanced to meet the acceptable level of security [1]. To solve the above-mentioned limitations, a smart home system has been proposed. The proposed system allows the user to obtain both security and safety. In security section, unauthorized person is detected using Passive Infrared (PIR) sensor and Arduino Uno. Then, the property owner will be informed by short message service (SMS) through global system for mobile communication (GSM) networks. This system aims to prevent accessing unapproved people to the property while the landlord is not at home. In the safety section, gas and smoke sensors are used to ensure the property is safe enough. If any of the above- mentioned sensors is activated, the landowner is notified directly with the help of GSM module by sending SMS to the authorized party. Additionally, the home appliances can be switched on and off remotely through the system in three ways, namely sending SMS from the registered number to the system, using smartphone app, and infrared (IR) remote control. Different types of home security systems have been studied in literature. The study conducted in [2] used Zigbee based wireless sensor networks (WSNs) to control smart appliances. The final goal was to produce industrial and home automation system. The proposed system in [3] utilized embedded micro-web server. Interment protocol (IP) connectivity and android based app were the main parameters to control and access the smart devices remotely. Such system integrates temperature sensing, power plugging, and light switching functionalities. Web camera based security system is presented in [1]. Whenever the camera detects a motion, two functions are performed namely, a sound alarm is triggered and a mail is delivered to the landowner. The system is based on Atmega644p microcontroller which receives the signals from the sensors and makes decision accordingly. The authors in [4] integrated home automation system based on Zigbee with Wi-Fi networks using traditional home gateway. The system can be accessed remotely through the gateway which allows network interoperability. To show the reliability of the system four difference devices namely, safety sensor, Zigbee remote control, radiator valve, and light switch have been tested. Bluetooth based home automation system is presented in [5]. The network architecture of the system consists of a main controller and some Bluetooth sub-controllers. There is a wired communication between each home appliance and sub- controllers. After receiving information from the home devices, the sub-controllers send data to the primary controller wirelessly. Due to expense of Bluetooth technology and to limit the required physical wiring, one Bluetooth module is assigned for several appliances. However, long access delay could be the main drawbacks of this architecture which may have negative impact on the system performance. Our system is different from the previously designed ones in terms of functionalities since it has ability to 18 carry out all security, safety, and home automation tasks. In addition, cost-effective materials are used in the experiment, therefore, the system cost is comparatively low. This paper is composed of five parts and organized as follows: Section two will explain main method and materials used in the experiment. In section three, the proposed system will be explained in detail. In section four, the obtained results will be presented and comprehensively discussed. The final section will conclude the main points of the paper and make suggestion for the future works. 2. METHODS AND MATERIALS The proposed system in this paper is generally divided into two parts. The first part concerns with security and safety in which the system works as a transmitter. In the second part, the system can perform home automation functionalities and works as a receiver. Then, both parts are integrated to create a reliable smart-home system which has security, safety and home automation functionalities. The primary components used in the system are explained below. 2.1 Arduino Uno Arduino is an open-source platform which can be programed with personal computer (PC) to control different types of electronic devices such as sensors, lights, loudspeakers, motors [6]. The Arduino board used in the system is shown in figure 1. Figure 1: Arduino Uno Board 2.2 PIR sensor PIR sensor is an electronic device that is used to detect an object’s motion. This came for the fact that energy is emitted from all objects, which have temperature higher than absolute zero, in the form of radiation. PIR sensor is basically designed to detect such radiation. The object’s motion is captured by this sensor when the distance between them is equal or less than 6 meters. The setup time of this sensor is between 10-60 second [7]. Figure 2: PIR sensor [7] 2.3 GSM Module (SIM900A) SIM900A is the dual band GSM/ General Packet Radio Service (GPRS) system and its operation frequencies are 850 MHz, 900MHz, 1800 MHz, and 1900 MHz. The connection between this module and PC or microcontroller is made with the help of RS232 and serial cable. Internet access, voice call, and SMS are the functions performed by this module [8]. Figure 3 shows the GSM module used in our system. Figure 3: GSM Module 2.4 Relay Relay is an electronically operated switch which is used to open and close another switch which has ability to carry lager amount of current [9]. In this paper we use relay, shown in figure 4, when we want to control high power appliances, such as TV and air condition via low-power Arduino output signal. The relays are connected to the Arduino output pins while the home applicants are connected to the output of the relays. Figure 4: Relay 2.5 Bluetooth Module Bluetooth module is a Bluetooth serial port protocol (SPP) module which has 3Mbps data rate and operates on 2.4GHz. This module is designed to provide short range serial communications; therefore, it can be easily used to interface with Arduino [10]. We use this module when we want to control electrical devices through smartphone app. Figure 5: Bluetooth module 19 2.6 Remote control We use the remote control shown in figure below to turn the home appliances on and off with the help of IR receiver. Figure 6: IR remote control 2.7 Infrared (IR) receiver This piece of hardware is used to receive signal from the remote control and transfers the received signal into an understandable form by the Arduino. The Arduino then performs a specific task based on the received data from the IR receiver. Figure 7: IR receiver It is worth mentioning that the sensors, Bluetooth module, and IR module are connected to the input pins of the Arduino since they take signals from outside into Arduino. While the relays, buzzers and laser are connected to its output pins since these components are derived by the signals coming out from the Arduino. 3. PROPOSED SYSTEM The architecture of the proposed system is shown in figure 8. As can be seen that the core part of the system is an Arduino board which receives the signals from all the sensors connected to its inputs then sends the instructions to the GSM module and turns on the lasers and the buzzer. When the system works as home automation system, the GSM module tells the Arduino what to do based on the content of the received SMS from the registered number. In our system the home appliances can be controlled not only through GSM network, but also mobile App and remote control. The electrical devices connected to the relays can be turned on and off in either way. Figure 8: System block diagram The working principle of the proposed system is illustrated in the following flow chart. Figure 9: Flow chart representation of the system Before implementing the system, we use a special program to draw the schematic diagram that shows how the elements are connected. Figure 10: Schematic diagram of the system Then, the schematic diagram shown above has been transferred to a prototype of the proposed system as can be seen in figure 11. Figure 11: System implementation 4. RESULTS AND DISCUSSION The implemented system shown in figure 11, has been tested thoroughly and the obtained results have been presented and discussed in the following steps: As we 20 mentioned above, the system works in two main modes namely, transmitting mode and receiving mode. 4.1 Transmitting mode Three types of sensors are used in this mode these are PIR sensor, gas sensor and smoke sensor. To make the system more realistic, two lasers and one piezo buzzer have been used in the system. In the first step we have tested the PIR sensor as shown in figure 12. When an object’s motion has fallen into the working range of the sensor, the sensor has been activated and has sent a signal to the Arduino. Then the Arduino has sent relevant instruction to the GMS module, which has an active SIM card in it, to inform the authorized party by sending SMS to the registered number. Meanwhile, the two lasers have been flashed and the piezo buzzer has turned on. Figure 12: Receiving SMS from the system when PIR sensor is activated. Figure 13: Receiving SMS from the system when smoke sensor is activated. Similarly, the two other sensors, gas sensor and smoke sensor, have been tested by methane gas and smoke respectively. Consequently, the lasers and the buzzer have turned on and the mobile phone has received the notification messages at each case as shown in the following figures. Figure 14: Receiving SMS from the system when gas sensor is activated. For further confirmation the three sensors have been tested together and the obtained results are depicted in figure 15. Figure 15: Receiving SMS from the system when all sensors are activated. The figure above is a complete result of the transmitting mode of the system when all the sensors (i.e. motion, gas, and smoke) have been activated. In such case the Arduino receives the signal from the all sensors. After manipulating the received signals, it sends instruction to the GSM module to notify the homeowner about each case. As a result, the mobile phone has received a message that shows all the sensors have been activated instantaneously. 4.2 Receiving mode In this mode two relays play an essential role. These relays are used to switch on and off the home appliances through the low-power Arduino output. In terms of distance, this mode is categorized as local and global remote control. In the former case, infrared and Bluetooth communication links are used to control the home appliances via IR remote control and smartphone app respectively. Based on our program, the IR remote control works as follows: Number1 pressed: Relay1 On Number2 pressed: Relay1 Off Number3 pressed: Relay2 On Number4 pressed: Relay2 Off When the control button is pressed, it sends the related signal to the IR receiver which is linked to the Arduino. 21 After receiving the signal, Arduino sends out instruction to the electrical device through selected relay. Finally, the electrical devices will be turned on or off depending on the pressed number on the IR remote control. For controlling the electrical devices through Bluetooth, a smartphone is connected to the system and a special app so-called Bluetooth electronic is used as shown in figure below. Figure 16: Bluetooth electronic app for switching electrical devices The buttons shown on the front page of the app (i.e. buttons inside the blue rectangle) are used to turn the relays on or off just like we have done with IR remote control. The button label (i.e. whether it is number1 or number2 etc. compared to the remote control) starts from left to right. For example, if we want to turn on the appliance connected to relay1 via this app, we need to press the first button on the left (this button is just like pressing number1 on the remote control). After pressing the button of the app (i.e. Bluetooth electronic app), the smartphone sends a signal to the Bluetooth module connected to the Arduino. When Arduino received the signal from Bluetooth module, it turns on or off the device (via relay) based on the pressed button on the app. In the latter case (i.e. global remote control), the SMS is sent from the mobile phone to the system through GSM network and the system response (whether turns the electrical devices on or off) is based on the message content. The message should have the following structure: 𝑎𝑥𝑏𝑥 When 𝑎 represents relay1 and 𝑏 represents relay2. The value of 𝑥 decides whether switch on or off the appliance connected to that relay (i.e. 𝑥=0 and 𝑥=1 mean turn off and turn on the electrical device respectively). To test this approach, we have sent a message contained 𝑎1𝑏1 to the system. Consequently, the devices connected to those relays have been turned on. Similarly, when we have sent 𝑎0𝑏0, the devices connected to those relays have been turned off. One of the important aspects of our system is that there is a good correlation between all the ways of controlling appliances in the receiving mode. That is, when a home appliance turned on, for example, by smartphone app, it can be turned off by GSM message or IR remote control and vice versa. 5. CONCLUSION In this paper a cost-efficient security, safety, and home automation system have been proposed, designed and implemented. The proposed system allows property security/protection by using PIR sensor, Arduino and GMS module. The system also provides remotely controlling electrical devices at home through text messaging, smartphone app, and IR control. Therefore, the system meets comparatively higher level of user satisfactions since they can protect their homes and control their electrical devices regardless where they are. The most important aspect of our system is that it informs the property owner about any events, such as intrusion, fire or gas leakage, in real time which is not the case for the traditionally used video-streaming based system. The current system can be further improved by adding IP camera to it. In that case if any unauthorized movement or gas leakage or fire is detected, the system will capture the event(s) then sends the picture to the authorized parties through a predefined way such as email. REFERENCE [1] J. Bangali and A. Shaligram, “Design and Implementation of Security Systems for Smart Home based on GSM technology”, International Journal of Smart Home, Vol. (7), pp. 201-208, 2013. [2] M. Nikose, P. Mishra, and A. Agrawal, “A Review On Industrial Automation By Zigbee Based Wireless Remote Controller”, International journal of scientific & technology research, Vol.(3), pp. 213-215, 2014. [3] R. Piyare, “Internet of Things: Ubiquitous Home Control and Monitoring System using Android based Smart Phone”, International Journal of Internet of Things, Vol. (2), pp. 5-11, 2013. [4] K. Gill, S. Yang, F. Yao, and X. Lu, “A ZigBee-Based Home Automation System”, IEEE Transactions on Consumer Electronics, Vol. (55), pp. 422-430. 2009. [5] N. Sriskanthan, F. Tan, and A. Karande, “Bluetooth based home automation system”, Microprocessors and Microsystems, Vol. (26), pp. 281-289, 2002. [6] “Arduino tutorials point”, tutorialspoint.com, 2016, [online]. Available at: https://www.tutorialspoint.com/arduino/arduino_tutorial. [Accessed: March. 31, 2018]. [7] A. N Vaghela, B. D Gajjar, and S. J Patel, “Automatic Switch using PIR Sensor”, International Journal of Engineering Development and Research, Vol. (5), pp. 696-698, 2017. [8] Campus Component, “ GSM Interfacing Board”, campuscomponent.com, 2011. [Online]. Available at:file:///C:/Users/bakhtiar/Downloads/GSMModule.pdf. [Accessed: March. 31, 2018]. [9] D. Anusha, PM.Sarma, and M.N. SandhyaRani, “Appliance Remote Control Using Arduino”, International Journal of Latest Trends in Engineering and Technology (IJLTET), Vol. (2), pp. 35-41, 2013. [10] ITead Studio, “Bluetooth to serial port module”, /iteadstudio.com, June. 18, 2010. [Online]. Available:http://www.electronicaestudio.com/docs/istd016A.pdf. [Accessed: Feb. 24, 2018]. https://www.tutorialspoint.com/arduino/arduino_tutorial