Read Journal of Convergence Information Technology text version

Journal of Convergence Information Technology Volume 5, Number 1, February 2010

GSM Based Electrical Control System for Smart Home Application

Mohd Helmy Abd Wahab, Norzilawati Abdullah, Ayob Johari, Herdawatie Abdul Kadir Faculty of Electrical and Electronic Engineering Universiti Tun Hussein Onn Malaysia, 86400 Parit Raja, Batu Pahat, Johor Malaysia

doi: 10.4156/jcit.vol5.issue1.4

Abstract

This paper presents the development of GSM-based control home appliances for smart home system. The main aim of the prototype development is to reduce electricity wastage. GSM module was used for receiving short message service (SMS) from user's mobile phone that automatically enable the controller to take any further action such as to switch ON and OFF the home appliances such as light, airconditioner etc. The system was integrated with microcontroller and GSM network interface using assembly language. MPLAB software was utilized to accomplish the integration. The system is activated when user sends the SMS to controller at home. Upon receiving the SMS command, the microcontroller unit then automatically controls the electrical home appliances by switching ON or OFF the device according to the user order. In other word, it read message from the mobile phone and response to control the devices according to the received message. The prototype has been successfully developed and it could provide an effective mechanism in utilizing the energy source efficiently. GSM, Control, Smart Home

Keywords

home from long distance and low in maintenance and independent from any physical geographical boundary. At the present time, people use electrical energy as one of the main source of power of energy to operate any electrical device or appliance. Most of the people turn on the light for 24 hours per day when they are away from home. Leaving the light turned on continuously, lead to energy waste. Thus this project is proposed to develop a system is to facilitate the home owner to optimize usage of electricity remotely using SMS. Light turned on continuously and it lead to energy waste. Thus this research is carried out to provide a mechanism through the development of a prototype to provide a service to the home owner to optimize the usage of electricity through remote control using SMS services. The followings are the objectives of the research project to ensure it meets the aim. · To design a lamp and extension control system for smart home application using GSM network. · To design a circuit that can automatically switch ON and OFF the home appliance using PCB Wizard · To write a program that can send the SMS using assembly language in MPLAB software.

1. Introduction

The development of digital information has led the rapid change in human lifestyle. The use of electricity is very important as one of the main source of energy that is vital in today modern life. Some kinds of mechanism using available technology could be used to reduce wastage in electricity usage. Thus a prototype based on a microcontroller device using SMS is developed. It can automatically control any electrical equipment at home remotely using mobile phone. Hence the electrical energy saving in daily life can be made more efficient and effective. As the technology grows, SMS technology has been widely accepted as a part of medium of communication [1]. The purpose of using SMS is to provide widest coverage at minimal cost. Therefore the use of SMS would facilitate in controlling the electrical device at

2. Related Work

This section provides a previous study of related work regarding the application of SMS services in a various fields. Some previous researches have been studied to gain more information about current existing GSM control system that was previously implemented. It is necessary to know and understand how the software and hardware were used in the SMS controlled system development. This is to ensure that the study that currently being conducted contribute at certain level of application thus it become more efficient and practical. Several smart home projects such as Home Security with Messaging System [2], Security & Control System [3], and Remote and Security Control via SMS [5] were the three alarm system that were designed using

33

GSM Based Electrical Control System for Smart Home Application Mohd Helmy Abd Wahab, Norzilawati Abdullah, Ayob Johari, Herdawatie Abdul Kadir

SMS application to securely monitor the home condition when the owner are away or at night. A system as suggested by [2] triggered by SMS to the home owner to notify the owner of any incident happened around the house such as robbery or fire. The security system uses mobile phone with a combination of microcontroller circuit PIC16F877A which interfaced with the computer. The system work accordingly when the sensor actively triggered by any abnormal activity, then the PIC circuit also automatically activate the computer to send SMS to the owner using mobile phone modem. Meanwhile, the system developed by [3] is automating the power reading meter to send the energy consumed to e-billing system at authorized office. The system works by integrating the GSM modem that was embedded with digital kWh power meter. It utilizes the GSM network to send power usage reading using SMS to the authorized office. The authorized office collect and manage the received SMS message contains the meter reading to generate the billing cost and send back the cost to the respective consumer through SMS. The work presented by [4] is about the development of Integrated Water Billing System with SMS capability. The system is designed to facilitate the Water authorized to manage the monthly billing system without the use of human services. The system receives SMS from the meter to central databases. Then the information received is processed to generate current billing. The system again sends a SMS notification to the user regarding the total amount that has been billed. The system was implemented using Visual Basic and database in order to perform the prototype and the system works successfully in sending SMS to user for notification. Furthermore, the system developed by [5] is to control the switch for lamp, door and alarm system using Visual Basic 6.0 software. Visual Basic was chosen because it can easily communicate between computer and mobile phone. The system used computer and mobile phone to send and receive the text messages. Vehicle Speed Detection using SMS [6], presented the design of the black box for warning system to control the exceeding speed of express bus via SMS. The system consists of three main parts which is microcontroller circuit, relay driving circuit and also mobile phone. This project used PIC 16F873A, Nokia 3310 mobile phone and using JAL (Just another Language) software for the programming. The purpose of this project is to prevent the express bus driver from driving over the permitted speed limit as well as to educate the drive to obey the regulation; therefore the accident can be prevented as well. The system is activated when the speedometer in the black box

exceeds the speed limit permitted by Department of Transportation (JPJ), thus, SMS text notification is sent to JPJ for record. Moreover, the projects for Acquiring Water Level and Temperature Status via SMS [7] also has similarity with this project. This project utilized PIC 16F877 and MPLAB IDE software for programming. The project was designed to detect level and temperature of the water in a pool. The system functions when the level of water and the temperature in pool exceed the desired limits. At the same time the PIC circuit will automatically interface to the mobile phone and send the alert message to the user. A very similar project also have been implemented by Serasidis Vasilis [8], who has developed and designed a device that can control variety of electrical home appliance using SMS. The system works based on the order message from user through mobile phone which is ON or OFF. This system also utilized mobile phone as a receiver which connected to the microcontroller. The circuit can control 8 electrical home appliances at any one time. It is used AT 9052313 microcontroller and Ericsson T10s mobile phone as a receiver at home. The software for programming that was used is MPLAB IDE. Besides that, Noraini [9] presented the used of RS232 devices computer and controlling system as hardware and RS232 interface with Visual Basic 6.0 as software to control lamp and fan. The system activates when microcontroller send ON or OFF to the devices via computer.

34

Journal of Convergence Information Technology Volume 5, Number 1, February 2010

Research and Study

Planning

and unit test is performed to ensure its error free then final testing to indicate the integration is free from error. Troubleshooting activity executes if error is encountered. 3.1 Block Diagram

Mobile Phone Microcontroller PIC16F873A Output - Extension - Lamp

Hardware development using Proteus 7.0 Professional software.

Interfacing programming using assembly language. Used MPLAB IDE software.

Hardware Testing

Compile

Troubleshoot Error YES NO NO Simulate Error YES

Figure 2: Block diagram of the project

Error NO

YES

Combination of Hardware and Software

Test

Modify programming and Troubleshoot the Hardware

OK

NO YES Finalize and Complete

Figure 2 illustrates the block diagram of the home appliance control system using SMS. The Mobile Phone is integrated with the microcontroller PIC16F873A, which receives SMS message from user Mobile Phone and sends a command to PIC to control whether to turn ON or OFF the output. The Mobile Phone also sends status reporting to the user regarding the electrical appliance. The system utilizes a low cost microcontroller that is currently available in the market. The development of this device involves with both hardware and software to provide a preferable results. 3.2 Hardware Development There were four important components used in the project. The hardware consists of power supply circuit, PIC16F873A circuit MAX232 circuit and relay 9Vdc. 3.2.1 Power Supply Circuit

Figure 1: Project development flow chart Previous works presented above discussed some related work using SMS text notifications on several field of application including smart home, transportation and meter reading. Thus this project was developed utilizes the SMS text notification sent to the device without using any computer interface. There is still little of application that provides feedback from the system once interaction has been made to the system.

3. Project Work

This section describes the methodology used to perform the development. The flow of the development is depicted in Fig. 1 Figure 1 illustrates the flowchart for overall project development. The initial process in flowchart involves in a research regarding the project background and literature review. Based on research, the problem is formulated as well as objective and scope of the project has been defined. The next process is to plan how the project or problem formulated be organized and possible solution are arranged systematically. The project is then divided into two parts; hardware design and interfacing. The Proteus 7.0 software has been chosen in the circuit design, while the MPLAB IDE is to program the PIC using assembly language. The final circuit design then finally be printed on the PCB board

Power supply circuit is built to supply the power or voltage to the circuit. For this project, the circuit needs only 5V voltage supply. Input supply for this circuit consists of 9V battery. Therefore Voltage regulator is used to provide 5V DC regulated voltage from the unregulated 9V input voltage. LM7805 is used as the voltage regulator for the circuit. The LM7805 is chosen to filter the 5V voltage for the circuits. A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. Hence, two capacitors are used to stabilize the voltage supply and to reduce the ripples of the voltage source. The power supply circuit is shown in Figure 3.

D1

1N4007

U1

1 VI

7805 VO 3

GND

B1

12V

R1

2.2k

2

+88.8

Volts

C1

100uF

C2

47uF

D2

LED-RED

35

GSM Based Electrical Control System for Smart Home Application Mohd Helmy Abd Wahab, Norzilawati Abdullah, Ayob Johari, Herdawatie Abdul Kadir

Figure 3: Power Supply circuit 3.2.2 PIC16F877A Circuit

contacts when it detect signal from the PIC circuit. Figure 5 shows the relay that has been used for this project. This relay needs 9 Vdc supply for the coil voltage.

The PIC16F873A circuit is the main circuit that consist the extension and lamp as the output. This circuit is connected to the MAX232 circuit for serial communication. The PIC16F873A circuit is used as a controller that control the input and output signal and used to convert the analog signal to a digital signal.

Figure 5: Relay for switching. 3.3 Software Development MPLAB software is computer program used to program the microcontroller. Assembly language is used to program the microcontroller of the PIC16F873A type. This microcontroller is divided into several main parts which are RA0-RA1 as the input pins, RB2-RB3 as the output pins. RC6 and RC7 pins are used as transmit and receive.

Figure 4: PIC16F873A circuit 3.2.3 MAX232 Circuit This MAX232 chip was used in the circuit for interface between the Receiver module (RX module) and the computer. This is only to display the AT command. Utilizing MAX232 enables communication between the computer and the receiver module (RX module) via serial port. The Max232 also acts as a buffer driver, converting the digital logic 0 to 5 V receiver signal into the RS232 standard ­12 to +12 V signal. The MAX232 requires five external 1uF capacitors, which are used to generate the +12 and ­12 V swing. 3.2.4 Relay Relay is used in the circuit because it is an electrical operated switch that connected to the output. A relay in this system is an electrical switch that opens and closes under the control of PIC16F873A microcontroller. The relay switch connections are usually labeled as Common (COM), Normally Closed (NC) and Normally Open (NO). The circuit is connected to COM and NO if it is switched to ON when relay coil in ON while to switch OFF the circuit connect the COM and NC together and then the relay coil is in OFF state. Therefore, the output was connected to COM and NO. As a result the relay

START

Initialized all peripherals (Ports, UART and Variables) Receiving and Reading SMS messages

Delete Previous SMS Message

Compare Passwords

VALID

INVALID

Send the signal to output circuits

END

Figure 6: System Flowchart 3.4 System Flowchart Figure 6 shows the flowchart to implement the programs using MPLAB IDE. All the peripherals used

36

Journal of Convergence Information Technology Volume 5, Number 1, February 2010

in the program were initialized. In the coding, ASCII code was used in declaring the coding for received and read SMS message. A declare delete SMS coding is used to avoid the SMS interrupt with the previous message. It occurs when there are no such codes that valid to the password, the previous message deleted. After that the coding was written for comparing the suitable password, if the password is invalid then the PIC loop back to receiving and reading SMS for searching the valid password that matches between the two mobile phones. When the code for program validated, the signal is sent to the required output based on the password.

(b) Figure 7: (a) Prototype System, (b) SMS received upon activating the system Figure 7(a) ­ (b) show the system prototype and SMS received when the system is activated. The prototype is activated when the 9Vdc power is applied to the circuit. 4.2 Extension Switch ON Activated

4. Results

This section describes the output of the implemented system. Several testing has been performed to ensure it's executed and produce the intended result. The prototype system is designed to receive SMS from user mobile phone to the mobile phone connected to the PIC16F873A circuit that acts as a GSM modem. This can be performed by dialing the mobile phone number which has been set in the PIC16F873A. For security reason, the system is protected with a user defined password. The incoming message is deleted by the microcontroller upon completing the requested process, and the message does not longer exist in the connected mobile phone which acts as GSM modem. The system then replies a message to user mobile phone reporting the status of the devices (turned ON or turned OFF). The status message is to remind the user regarding the current state of the appliances. 4.1 Activate the System

(a)

Figure 8: Turn ON the extension Figure 8 show the extension is ON when the user sends a command 1stpegn to turn on the extension. The system reply back to the user to report the extension current states is ON. 4.3 Extension Switch OFF Activated

(b)

(a)

37

GSM Based Electrical Control System for Smart Home Application Mohd Helmy Abd Wahab, Norzilawati Abdullah, Ayob Johari, Herdawatie Abdul Kadir

Figure 9: Extension Switch OFF Activated Figure 9 shows the extension is OFF when the user sends a command 2runegn to turn off the extension. The system reply back to the user to report the extension current states is OFF. 4.4 Lamp Switch ON Activated

Figure 11: Lamp Switch OFF Activated

5. Analysis

The prototype works accordingly to automatically switch ON and OFF the extension and lamp remotely by using SMS. In order to activate the system, power supply 9Vdc is supplied to the PIC circuit. When the system is activated, the user mobile phone receives the status report that the system has been activated. The system switches ON and OFF the extension and lamp when the user sends password that matches with the password created for both device. At the same time the user mobile receives the status report as shown in the result. The summary for the command is illustrated in Table 1. Table 1 List of Command

System Response when the Mobile Phone receives messages. Status Report to User Mobile Phone EXTENSION STATUS IS ON EXTENSION STATUS IS OFF LAMP STATUS IS ON LAMP STATUS IS OFF

Password Command From User Mobile Phone

Figure 10: Lamp Switch ON Activated Figure 10 shows the lamp is switched on when the mobile phone receives message from the user. Figure 10 shows the lamp is ON when the user sends a command 3offbat to turn on the lamp. The system reply back to the user to report the extension current states is ON.

1stpegn 2runegn 3offbat 4baton

The extension turn ON The extension turn OFF The lamp turn ON The lamp turn OFF

4.5 Lamp Switch OFF Activated

Figure 11 shows the lamp was switched OFF when the mobile phone receives the message from user mobile phone that order to switch OFF the lamp. The lamp is OFF when the user sends a command 4baton to turn off the lamp. The system reply back to the user to report the extension current states is OFF.

6. Conclusion

The prototype was successfully developed and met the three stated objectives. The system can automatically switch ON and OFF the extension and lamp remotely using SMS. The integration of software and hardware has performed a good task in producing the SMS system. However, there are several weaknesses had been identified which can be further improved in the future such as the system could

38

Journal of Convergence Information Technology Volume 5, Number 1, February 2010

provide better performance by intelligently send notification upon power failure, provide a flexible function by supporting both manual and automatic control as well as provide an option for the user to control the appliance through web-based system. In addition, the system is very practical when the user is away from home due to it can control the electrical home appliances remotely as long as the mobile phone gets the coverage.

7. References

[1] Le Bodic, Gwenael, (2005), "Mobile Messaging: SMS, EMS, and MMS", 2nd Ed. John Wiley. [2] Mohd Shahir Mohamad Suhaimi (2008). "Home Security with Messaging System" Universiti Tun Hussein Onn Malaysia: Thesis Sarjana Muda. [3] Tan, H.G.R. Lee, C.H.R. Mok, V.H. (2007). "Automatic Power Meter Reading System using GSM Network." In Proceeding on Power Engineering Conference 2007. 3-6 Dec 2007, Kuala Lumpur, pp. 465-469. [4] Mohd Helmy Abd Wahab, Siti Zarina Mohd Muji, Fazliza Md. Nazir. Integrated Billing System through GSM Network. In Proceeding of 3rd International Conference on Robotics, Vision, Information and Signal Processing 2007 (ROVISP2007), Penang, Malaysia, 28 ­ 30 November 2007. [5] Lock K.A (2004). "Remote and Security Control Via SMS." Kolej Universiti Tun Hussein Onn Malaysia:Thesis Sarjana Muda. [6] Elia Nadira Sabudin, Siti Zarina Mohd Muji, Mohd. Helmy Abd Wahab, Ayob Johari, Norazman Bin Ghani. GSM-based Notification Speed Detection for Monitoring Purposes. Proceeding of IEEE International Symposium of Information Technology, 26 ­ 28 August 2008, KLCC, Kuala Lumpur. [7] Mohd Noor Bin Abdullah (2008). "Acquiring Water Level and Temperature Status via SMS." Universiti Tun Hussein Onn Malaysia: Thesis Sarjana Muda. [8] Serasidis Vasilis (2003). "SMS Remote Control, For Ericsson T10 GSM Mobile Phone" Retrieved at http://www.serasidis.gr . [9] Noraini Binti Abdul Samat (2005). "Kawalan lampu dan kipas Menggunakan Komputer", Kolej Universiti Tun Hussein Onn Malaysia: Thesis Sarjana Muda.

39

Information

Journal of Convergence Information Technology

7 pages

Find more like this

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

943715


You might also be interested in

BETA
DME Client User Guide 3.5.8
How To cut your network simcard to the new Apple Micro 3FF Format using the Rebel Micro Simcard Cutter- cutting tool. | Rebel Simcard Blog
http://www.ericsson.com/enterpr.PDF
POST-CONFERENCE REPORT