GSM Based Home Automation, Safety and Security System Using Android Mobile Phone

DOI : 10.17577/IJERTV4IS050648

Download Full-Text PDF Cite this Publication

Text Only Version

GSM Based Home Automation, Safety and Security System Using Android Mobile Phone

Akanksha Singh (Student)

Arijit Pal (Student)

Bijay Rai (Assistant Professor)

Department Of Electrical & Electronics

Department Of Electrical & Electronics

Department Of Electrical & Electronics

Sikkim Manipal Institute Of Technology,

Sikkim Manipal Institute Of Technology,

Sikkim Manipal Institute Of Technology,

Majitar Rangpo, Sikkim, India

Majitar Rangpo, Sikkim, India

Majitar Rangpo, Sikkim, India

Abstract In this paper, we will deliberate how to control home appliances, safety and security system using GSM technology by using android application through android mobile phone. We will also show that we can control the appliances even in the absence of an android phone by sending a normal SMS. The advantage of using GSM technology is that we can control the home appliances from remote places anywhere in the world. This system allows the owner to control the appliances and to receive a feedback status of the home appliances by sending instructions in form of SMS as well as through an android application. For the home security system we are using an anti- theft reporting system which will report the owner by ringing an alarm and by sending an SMS. Also for the safety system in case of fire or gas leakage it will report the owner by sending a SMS and also by ringing an alarm. Thus by using GSM technology, it provides the wireless access to the devices to be controlled.

Index Terms Microcontroller, GSM modem, sensors, appliance control, android app.

  1. INTRODUCTION

    The wireless communication is increasing day by day. This has motivated us to use mobile phones to remotely control household appliances and to receive a feedback SMS about the security and safety of the house. In this paper we describe a remote appliance control system which can control different household appliances by sending a SMS from a mobile phone and monitor the safety and security of the house just by a SMS. This controller is extremely handy at places where we have to control the ON and OFF switching of the devices as no wired connection is required between the switch and the home appliances as it can be controlled from any place in this world. The microcontroller would then control the home appliances based on the information given to it and send a feedback during a security breach and it also send a feedback during gas leakage or if a fire takes place. The proposed solution is easy to use, simple, secure, and robust and can also be controlled through android mobile phones through and android application. In this paper we describe a simple remote home appliance control, security and safety system using GSM SMS (Short Messaging Service). A remote household appliance control has been described in [1]-[4] using internet.

    A Bluetooth based home automation control is described in [5]. In [6] a GSM based system for home automation is described which uses voice commands for control. In [7], Voice command for home automation has been described. In this paper we describe a simple remote home appliance control using GSM SMS (Short Messaging Service).

  2. SYSTEM DESCRIPTION

    The system has two parts, namely; hardware and software. The hardware architecture consists of a stand-alone embedded system that is based on 8-bit microcontroller (ATMega2560), a GSM handset with GSM Modem (SIM900), relay module, sensors (MQ2, MQ7 and ultrasonic sensors). The software part consists of programming in arduino and an android based application run on android phone. The GSM modem provides the communication media between the home owner and the system by means of SMS. The SMS consists of commands to be executed. The format of the message is predefined. The SMS message is sent to the GSM modem via the GSM public networks as a text message with a definite predefined format. Once the GSM modem receives the message, the commands sent will be extracted and executed by the microcontroller. The system will interpret the commands and turn the appliances ON/OFF accordingly via the switching module. For the home security and safety system, in case of security breach, fire and gas leakage microcontroller will ring the alarm and send a feedback message through the GSM modem to the GSM handset. The detailed description about the hardware and software is as follows:-

    1. HARDWARE USED

      The following hardware is used in the project which is explained as follows:-

      1. GSM Mobile Handset

        Cellular phone containing SIM (Subscribers Identifying Module) card has a specific number through which communication takes place. The mode of communication is wireless and mechanism works on the GSM (Global System for Mobile communication) technology. Here, the user transmits instructions to the system to control the appliances in the form of SMS through an android application.

      2. Receiver GSM Handset

        The receiver GSM handset is used to receive the SMS sent by the user and then to transmit an acknowledgement or status to the users mobile. The receiver handset has to be equipped with an AT Modem and a valid SIM card. The handset has a built in AT modem with UART interface and supports most of the AT command instructions. This handset is attached with the microcontroller used to control the appliance through UART. AT Modem is a Modem which supports AT commands. The command set consists of a series of short text strings which combine together to produce complete commands for operations such as dialing, hanging up, and changing the parameters of the connection. Most modems follow the specifications of the Hayes command set. AT commands are instructions used to control a modem. AT is the abbreviation of Attention. Every command line starts with "AT" or "at". [10]

      3. Microcontroller Board ATmega 2560

      This is the main module of the whole system. On receiving a SMS text words are checked with predetermined format which contain commands to control the appliances and accordingly the appliances are switched ON or OFF. In case of home security the microcontroller is connected with sensors and in case of any discrepancy it will send a SMS to the owner. To read a message the microcontroller sends the appropriate AT command to the Receiver GSM Modem and it does the same in case of sending feedback message to the owner. [9]

      low power 5V circuit to switch a relatively high current on or off for example a bulb connected to the 220V mains supply.

      1. Sensors

        A sensor is a transducer whose purpose is to detect some characteristic present in the environment. It detects events or changes in quantities and provides a corresponding output, generally as an electrical or optical signal; for example, in our project we are using gas sensor (MQ7), smoke sensor (MQ2) and ultrasonic sensors which sense the gas, smoke and distances and send a certain voltage output to the microcontroller. The different sensors used in our project are explained as follows:-

        a). Ultrasonic Sensors

        Ultrasonic sensors are those sensors that convert ultrasound waves to electrical signals. In our project we are using ultrasound transceivers as it is both sending and receiving the ultrasonic sounds. This device work on a principle similar to that of transducers used in radar and sonar systems, which evaluate attributes of a target by interpreing the echoes from radio or sound waves, respectively. Ultrasonic sensors generate high frequency sound waves and evaluate the echo which is received back by the sensor, measuring the time interval between sending the signal and receiving the echo to determine the distance to an object. Passive ultrasonic sensors are basically microphones that detect ultrasonic noise that is present under certain conditions, convert it to an electrical signal, and report it to microcontroller which sends a message to the owner with the GSM modem to owner about theft. The ultrasonic sensor checks the distance between two points and reports it to the microcontroller. If the distance decreases i.e. someone is moving between the two points then it will sense less distance and send it to the microcontroller and the microcontroller will ring an alarm and send a feedback SMS to the owner through GSM modem.

        1. MQ2

          They are used in gas leakage detecting equipment in houses, industries and are suitable for detection of LPG, I- butane, propane, methane, alcohol, Hydrogen, smoke. In our project we are using it for detection of LPG gas leakage. If it detects any gas leakage then it will report to the microcontroller and the microcontroller will ring an alarm and send a feedback SMS to the owner through GSM modem.

        2. MQ7

        4) Relay Module

        The relay module drives (switches ON/OFF) the appliance according to the command sent in the SMS. The relay module is controlled by the microcontroller. It allows a

        They are used for detection of carbon monoxide gas. In our project we are using it for detection of smoke. If it detects any smoke then it will ring an alarm and report to the microcontroller and the microcontroller will ring an alarm and send a feedback SMS to the owner through GSM modem.

        Fig 2. Circuit Diagram

      2. Alarm

      A buzzer or beeper is an audio signaling

      Studio or the newer Atmel Studio, may also be used to develop software for the Arduino. [8], [11]

      device, which may be mechanical, electromechanical, or piezoelectric. In our project we are using a piezoelectric buzzer which is used as alarm when any gas or burglar is detected.

    2. SOFTWARE USED

      1. ARDUINO

        The open-source Arduino environment allows user to write code and upload it to the I/O board. The environment is written in Java. The Arduino development environment contains a text editor for writing code, message area, text console, and toolbar with buttons for common functions, and a series of menus. It connects to the Arduino hardware to upload programs and communicate with them. Arduino programs are written in C or C++. Arduino features, capable of compiling and uploading programs to the Board with a single click. Software written using Arduino is called sketches. These sketches are written in the text editor. Sketches are saved with the file extension .ino. It has features for cutting/pasting and for searching/replacing text. The message area gives feedback while saving and exporting and also displays errors. The console displays text output by the Arduino environment including complete error messages and other information. The bottom right-hand corner of the window displays the current board and serial port. The toolbar buttons allow you to verify and upload programs, create, open, and save sketches, and open the serial monitor. As the Arduino platform uses Atmel microcontrollers, Atmel's development environment, AVR

      2. APP INVENTOR

      App Inventor for Android is an open-source web application originally provided by Google, and now maintained by the Massachusetts Institute of Technology (MIT). [12] It allows to create software applications for the Android operating system (OS). It uses a graphical interface, which allows users to drag-and- drop visual objects to create an application that can run on Android devices. [13], [14]. Here we are making an android application for home automation, which will control the home appliances just by one click. The application consists of password protected security feature.

  3. ALGORITHM

    Step1:- START

    Step2:- Read SMS no.1 from SIM Step3:- Store the SMS in a String

    Step4:- Check whether the SMS is READ or UNREAD

    Step5:- If the SMS is UNREAD, extract the message from the SMS

    Step6:- Relay is controlled with the help of this message Step7:- A feedback SMS is sent back to the owners mobile

    Step8:- If SMS is READ, delete the message

    Step9:- Check if the value of MQ7 sensor is greater than 350 then jump to Step10 else jump to Step12

    Step10:- Send a feedback SMS to the owners mobile about gas leakage

    Step11:- Ring an alarm

    Step12:- Check if the value of MQ2 sensor is greater than 400 then jump to Step13 else jump to Step15

    Step13:- Send a feedback SMS to the owners mobile about the fire

    Step14:- Ring an alarm

    Step15:- Check if the value of Ultrasonic sensor is greater than 400 then jump to Step13 else jump to Step18

    Step16:- Send a feedback SMS to the owners mobile, warning him about the theft

    Step17:- Ring an alarm Step18:- Jump to step2

    Fig 3. Snapshot of the project

  4. FUNCTIONING OF GSM BASED HOME AUTOMATION AND HOME SECURITY SYSTEM:-

    The working of the project is divided into three parts which are home automation, home safety and security system. For the home automation we have designed an android application through which we can control the home appliances. This application is used to send a SMS to the GSM modem used in our project. This will read the SMS and send it to the microcontroller. The microcontroller will extract the message from the received SMS and control the relay module. The relay will turn on or off the appliances as ordered by the owner. The advantage of the project is even if the owner does not have an android phone the can send a SMS to the GSM modem to control the appliances.

    Similarly, for home safety system we are using smoke detector and LPG gas detector which will detect gas or

    smoke and send a feedback to the microcontroller. The microcontroller will check whether the values send by the sensors are above a certain value as shown in flow chart. Then it will send a feedback SMS to the owner through the GSM modem and also ring an alarm.

    For the home security system we are using ultrasonic sensor which will check the distance between the two points. If some intruder passes between the two points then the distance between the two points would decrease. The feedback of the distance is send back to the microcontroller. The microcontroller would send a feedback SMS to the owner through GSM modem and will also ring an alarm. The advantage in using this safety and security system is that the certain range at which the alarm rings and SMS is send is user defined so user can select any range accordingly at which the microcontroller will report.

  5. FLOW CHART:-

  6. CONCLUSION

In this paper we discussed our project on GSM based home automation, safety and security system which is very useful and also very economical. It provides simple and easy way to control the household appliances with a single SMS or by using an android application. The main advantage here is that even though the controlling can be done by the android application which has safety features but in absence of an android mobile phone one can control it by sending a normal SMS to the GSM modem. Also the safety and security system can be easily installed in the house and used. It informs the owner in case of fire, gas leakage and theft even when the owner is not in the house.

REFERENCES

  1. J. C. Nunes and J. C. M. Delgado, An Internet application for home automation, Electrotechnical Conference, 2000. MELECON 10th Mediterranean, Vol. 1, pp. 298 -301, 2000.

  2. Neng-Shiang Liang; Li-Chen Fu; Chao-Lin Wu; An integrated, flexible, and Internet-based control architecture for home automtion System in the Internet era, Proceedings ICRA 2002. IEEE International Conference on Robotics and Automation, Vol. 2, pp. 1101 1106, 2002

  3. Alkar, A. Z., & Buhur, U. (2005). An Internet Based Wireless Home Automation System for Multifunctional Devices. IEEE Consumer Electronics, 51(4), 1169-1174.

  4. Rifat Shahriyar, Enamul Hoque, S.M. Sohan, Iftekhar Naim; Remote Controlling of Home Appliances using Mobile Telephony, International Journal of Smart Home,Vol. 2, No. 3, July, 2008

  5. N. Sriskanthan and Tan Karande, Bluetooth Based Home Automation Systems, Journal of Microprocessors and Microsystems, Vol. 26, pp.281-289, 2002.

  6. Yuksekkaya, B.; Kayalar, A.A.; Tosun, M.B.; Ozcan, M.K.; Alkar, A.Z.;, "A GSM, internet and speech controlled wireless interactive home automation system," Consumer Electronics, IEEE Transactions on , vol.52,no.3,pp.837-843,Aug.2006

  7. Jia-Ching Wang; Hsiao-Ping Lee; Jhing-Fa Wang; Cai-Bei Lin; , "Robust Environmental Sound Recognition for Home Automation," Automation Science and Engineering, IEEE Transactions on , vol.5,no.1, pp.25-31, Jan. 2008

  8. Arduino Development Environment, http://arduino.cc/en/guide/Environment

  9. ATMEGA2560 microcontroller,

    http://www.atmel.com/Images/doc8161.pdf

  10. GSM Modems, http://www.rydolabz.com

  11. Arduino IDE, http://arduino.cc/en/main/software

  12. JW Tyler, Google App Inventor: A short history, http://jwtyler.blogspot.in/, 2010

  13. Ellen Spertus and J. Dominguez, App Inventor Developer Overview, 2014.http:// appinventor.mit.edu/appinventor-sources/

  14. M. N. Jivani, Sharon Panth, Home Appliance Control Ad-hoc Network System using App Inventor, International Journal of Emerging Technologies and Applications in Engineering, Technology and Sciences (IJ-ETA-ETS), ISSN: 0974-3588, pp.40-45, Vol. 1, Issue 7. 2014

Leave a Reply