Sindh Univ. Res. Jour. (Sci. Ser.) Vol.44 (2AB)101-104 (2012)
SNDH UNIVERSITY RESEARCH JOURNAL (SCIENCE SERIES) A Low Cost Secure Short Message Service Based Control for Home Appliances A. A. HAKRO, Y. XU, D.N. HAKRO*, I.A.ISMAILI*, I. MEMON** Department of Information Science and Electronic Engineering, Zhejiang University, Hangzhou 310027, People's Republic of China. Received 28th November 2011 and Revised 27th February 2012
Abstract: A human being has always been at a disadvantage to be present at one place to attain the machine, access information and control of an appliance which is installed at remote location. But due to the rapid advancements in electronics and telecommunication industry and overall science, we have been able to overcome some of these disadvantages to facilitate the human being which make life easier. We have designed and implemented a remote controlling application with a title “A Low Cost Secure SMS based control for home appliances“ as a step towards development of very low cost and more automated switching system controlled via SMS sent by a user located at a distance. The design and implementation is based on the short message service (mobile based SMS) which acts as a remote control for the multiple home appliances or electronic devices installed at home. At this stage our system is able to control up to 8 Devices simultaneously as well as the system can send SMS individually to an appliance. The system is capable of sending these messages (SMS) by applying security codes from mobile at a very nominal cost; in this regard this system can be called a secure SMS system at a lower cost. The system differs from other systems in checking and decoding of the SMS at receiver end, gets access of external memory (EEPROM) and by writing the status which may be accessed in case of power failure. Keywords: Short Message Service (SMS), Global System for Mobile communication (GSM), AT Commands, Microcontroller, EEPROM.
1.
INTRODUCTION Mobile operated systems are designed for monitoring and controlling devices wirelessly as well as remotely (Malik et al., 2009). Mobile operated systems have become a major part of many companies and in our everyday life (Alkar et al., 2005). Remote accessing using data link can help to make business more effective, smart and easy to use in daily life tasks (Liu 2009). Mobile operated systems enhance independence of both time and place any where any time. Applications of mobile operated system can be found in almost everyday environment including homes, hospitals, banks and offices (Malik et al., 2009) as well as use at very hazardous environment to perform switching where people can not reach like high temperature zone. Switches have become the necessity for controlling of the devices in this era (Khandare et al., 2010). Wireless remote controls are the backbone of controlling devices along with its matching brother infrared remote control, light activated switch have made human life very easier, while there are also some limitations like complexity and higher cost in
implementation and low security. However here we propose very low cost single microcontroller and single mobile phone based system, Which differs from other pervious related systems in that they do not provide security (Ahmad et al., 2011), while this system provides security in the sense of checking and decoding of the SMS at receiver’s end which is the guaranty of security for accessing the system from any cell phone number, it further differs from pervious proposed systems (Ahmad et al., 2011, Malik et al., 2009) which fail in power failure at the receiving end while this system shows stability in case of power failure by getting the access of external memory (EEPROM) and writing the status in it, which may be access in case of power failure. Currently our circuit can operate with eight devices since microcontroller has 04 ports while we can use 3 ports for devices so that 24 devices can be attached with small variations in our program. But if we use extension slot available in microcontroller port one (P-1) along with MUX(s) and DEMUX(s), then single port can be multiplexed into 256 i.e. 28 Thus we can operate 3*256=768 devices with extended hardware and system programming.
@Corresponding authors:
[email protected] Cell No. +8615168324851 *Institute of Information and Communication Technology University of Sindh Jamshoro, Sindh, Pakistan. **School of Computer Science and Engineering, university of electronic science and Technology, Chengdu Sichuan 610054, P.R of china.
A. A.HAKRO, et al., The SMS must be sent in the form of 0s and 1s (Binary coding) in which first 3 characters and last 1 character is a predefined code for security purpose. In the SMS pattern 0 represents ON and 1 represents OFF. The message must be in 4 characters as security code and 8-bit as data pattern like (7*600000000*) because at the receiving end the hardware circuit has 8-frame relay as shown in Fig:1.3, each relay for individual device which are controlled on the basis of ON and OFF. 2.
METHODOLOGY Various methods are common for designing mobile operated systems but our proposed system is more secure, economical as well as more reliable that is within the reach of common person. The proposed system’s Block diagram is shown (Fig 1.1).
102 further microcontroller checks the data bits for desired binary pattern in if the bits are other then 0s and 1s in the data pattern the microcontroller reads the particular bit from EEPROM where the previous status was stored, now the process of checking goes for finding for strike (*) which is normally placed in the end. When the process of receiving, checking and decoding is completed the microcontroller is ready to send the data to the relay port which provides the control function, further status of relay port data is written in to the external memory (EEPROM), this process is shown in (Fig:1.2). In this system we used assembly programming language which performs the tasks such as interrupt monitoring, reading SMS, checking of codes, providing delay, sending data to relays circuitry and writing the data in EEPROM. Operation Of The System When the microcontroller (Atmel 89C51) is powered ON, the main program will be loaded from the ROM. Microcontroller initiates reading data from EEPROM which is to be sent to relay circuitry through port 1 that is the corresponding relay. This data will be ON and OFF manner. Microcontroller continuously checks for external interrupt which is received from vibrator circuit of cell phone. If interrupt occurs the microcontroller will resets the interrupt input pin, take delay for 1 second and send AT commands to mobile phone. The timer starts counting time for 3 seconds for checking overflow.
Fig. 1.1: Block Diagram of System The designed circuit is based on microcontroller which is connected with a GSM based cellular network mobile phone (Ahmad et al., 2011), the microcontroller is interfaced with a mobile phone as shown in the (Fig:1.3) when the mobile phone receives a SMS, an interrupt is generated in microcontroller through the mobile phone vibrator circuit, which is activated on receiving of SMS, after wards the microcontroller sends AT commands (Attention Telephone commands) (AT commands for Sony Ericsson phones) to the mobile phone to read the SMS , since these AT commands are designed for mobile phone operations, microcontroller starts receiving SMS data serially and decodes data for further sending to relay port. The decoding process starts with checking of the bits if first three bits in the SMS pattern is correct then microcontroller initiates receiving data bits in form of 0s and 1s other wise restore the pervious status,
The microcontroller starts recording first three characters and also checks them until they are not according to desired pattern. If the first three characters code is correct then start recording data code until last character security code is not encountered. During recording its necessary to check for 0s and 1s data bits before any other character is being checked. If the character is 0 or 1 then store these bits and rotate left. If Character other than 0 and 1 in the data bits then replace the previous corresponding stored bit. Microcontroller sends recorded data to the relay port. Microcontroller writes recorded data into the external memory (EEPROM). Microcontroller resets the memory address.
A Low Cost Secure SMS Based…
103
Microcontroller deletes last five messages from cell phone memory. Microcontroller checks for interrupt repeatedly. (Fig:1.2) Start
The 6841G router was placed and connected in the laboratory of Institute of Information and Communication technology, University of Sindh. The message was sent through the Telenor mobile operator using the Sony Erricsson W810i phone model, message was received at the system’s receiving end and this message activated the system and the router was successfully restarted unattended. The process was repeatedly checked on various mobile phone models of various students and different local operators of mobile network. The system performed robustly and successfully in all experiments.
Read Main Program Read Data from EEPROM Send Data to Relay Port
Is Pin 3.2 Low?
Send 4 AT Commands 3 Seconds Timer Start
Red LED is ON
We also deployed this system in home for controlling the different appliances where we found that the system performed successfully as well as provided security and reliability. The system also performed successfully in the condition of power failure, the pervious status of Appliances remains same when power goes up, which is not available in pervious proposed systems. The list of controlled appliances is shown in (Table 1).
Is Timer not Overflow?
Is 02H bit not set?
Receive First Character Is first Character 7 ? Receive 2nd Character Is 2nd character * ?
3.
Receive 3rd Character Is 3rd Character 6? Set Bit 02H
Receive Data Bit Is Bit not ‘*’ ?
1
Is a Bit?
0
Send Data (21H) to Relay Other
Write Data in EEPROM
And 22H, Previous
Green LED is ON Delete Messages
We deployed this proposed system in Institute of Information and Communication technology, University of Sindh, where the system performed successfully.
Save Data Bit in 21H
Return
Fig.1.2: System flow chart Experimental work The proposed system has been tested on various devices with different mobile operators and different models of mobile phones (cell phones). Some of them demonstrations are listed here.
CONCLUSION AND APPLICATIONS The system proposed is an accelerated automated and more secure and low in cost while the accessibility is the simplified by making it accessible from anywhere. By spending a very small amount of money by sending one SMS from anywhere, the system was accessed remotely for controlling of multiple home appliances. As this system is based on SMS (GSM) technology (which is very economical in Pakistan) which is itself a prove of this system is cost effective. Hence it can be claimed that a reliable controlling of multiple home appliances have been developed at lower cost which is also provides security. There are many applications of this project, a low cost secure switching circuit for remote electronic devices through cell phone, such as Electronic home appliances, Electric Motors, Activate Alarms, Electronic Security Door/Gate Locks, Switch ON/OFF the water Pump Set, and Real Time Picture Capture from Remote Location (Online). The extended version of this project can be used in Industry where pressure, temperature, flow etc can be unmanned controlled.
A. A.HAKRO, et al.,
104
Fig. 1.3: Schematic Diagram of the System Table 1: List of controlled Appliances Sender
Sending Network
Receiver Network
Distance In Km
Response Of Device
6841 Network router
Sony Ericcson W810i
Telenor
Warid Tel
~ 400
Device restarted on receiving a SMS
Air Condition
Nokia N-70
Ufone
Telenor
~ 600
Micro Wave Ovens
I Phone-3
Mobilink
Ufone
~ 200
Refrigerator
Nokia 1100
Warid
Telenor
~ 350
Samsung b-3210
Zong
Moblink
~ 50
Device
Fan
REFERENCES: Ahmad, A.W., N. Jan, S. Iqbal, and C. Lee, (2011) implementation of ZigBee-based home security security monitoring and remote control system. Circuits and Systems (MWSCAS), 2011 IEEE. Publication Year: 2011 1 – 4. Alkar, A. Z. and U. Buhur (2005) An Internet Based Wireless Home Automation System for Multifunctional Devices. IEEE Consumer Electronics, 51 (4): 1169-1174. Developers guidelines, AT commands for Sony Ericsson phones. http://www.daimi.au.dk/~jones / sms/ packed/dg_at_r3a.pdf
Appliance Switched OFF, on receiving SMS Appliance Switched OFF, on receiving SMS Appliance Switched ON, on receiving SMS Appliance Switched OFF, on receiving SMS
Khandare, M. and S. Mahajan, (2010) Mobile Monitoring System for Smart Home Emerging Trends in engineering and Technology (ICETET, 2010) Publication, 848–852. Liu P. (2009) An Improved Short Message Security Protocol for Home Network Future Computer and Communication, FCC '09. International Conference on Digital Object Identifier: 10.1109/FCC.2009.12 Publication Year: 2009, 62- 65. Sikandar M., H. Khiyal, A. Khan, and E. Shehzadi (2009) SMS Based Wireless Home Appliance Control System (HACS) for Automating Appliances and Security. Issues in Informing Science and Information Technology, vol. (6): 887-894.