Home Automation Management with WLAN ( 802 . 11 g ) and RF Remote Control

The home automation becomes important, because it gives the user the comfort and ease for using the home devices. The implementation and design of wireless home automation control use two methods, WLAN technology and RF remote control handheld to control selective home devices with integral security and protected system. The devices have been distributed in two rooms, each room has own board, these boards are connected to the desktop personal computer (PC) through one serial port RS-232 via microcontroller. The software consists of Assembly Language for programming microcontroller (AT89C51and AT89C2051) and Visual Basic Language that use to communicate between PC and two boards, also it use to design Graphical User Interface (GUI) which involving all devices needed to display in Home PC screen . The system is low cost and flexible with the increasing variety of devices to be controlled.


Introduction
The home automation is control of home devices from a central control point, automation is today's fact, where more things are being completed every day automatically, usually the basic tasks of turning on or off certain devices and beyond, either remotely or in close proximity [1].
The concept of the RF-based systems is to use the underlying wireless data network such as IEEE 802.11 (Wi-Fi) [2].
The popularity of wireless networks in home has increased in recent years, and the advanced computer technology has made the personal digital device to commonly have the capability to communicate through the wireless network.Hence, it is suitable to use RF-based location determination system to estimate the location of the personal digital device in a home environment with high data rate transmission, supporting multimedia applications may be feasible in WLAN [3].
One of the possible applications are wireless networks for home automation.Imagine a private home equipped with motion, light, temperature and other sensors and actuators for opening the door, dimming the light, controlling the heating and so on [4].It can be as basic as dimming lights with a remote control or as complex as setting up a network of items in your home (such as a thermostat, security system, lighting and appliances) that can be programmed using a main controller [3].The basic idea of home automation is to employ sensors and control systems to monitor a dwelling, and accordingly adjust the various mechanisms that provide heat, ventilation, lighting, and other services.The automated "intelligent" home can provide a safer, more comfortable, and more economical dwelling [4].
In an intelligent home automation system there are many possible solutions for how and from where to control the automation system and single devices; a user interface can be a computer-based system, a mechanical switch, a single light, a loudspeaker with a microphone or a some kind of personal remote controller for all the home appliances, the home appliances can be controlled using normal PC, laptop or table PC by standalone software or web-based user interface [5].In the near future all electronic appliances in a home will be networked: PCs, telephones, stereos, refrigerators and even washing machines, heating and air conditioning, previously controlled by a single, fixed, manual thermostat, can now be managed by an intelligent controller with remote-access capabilities [6,7,8].
In this paper, a home automation control system has been designed by choosing two rooms, each room has control board with microcontroller, these two boards are connected to the desktop (PC) through one serial port (RS-232).By using RF remote control and WLAN between desktop and laptop being easily realized from any place in the home.

The WLAN System Design
This section focuses on the hardware part, which consists of designing two boards, RF remote control, WLAN (802.11g) and sensors.These two boards are connecting to the desktop Home PC through one serial port (RS-232) as shown in figure (1).
The Circuit in (board 1) as shown in figure (2) consist of several component such as AT9C51, MC1488, MC1489, 74LS374, 74LS244, comparator, ULN2803, relays and resistances, the heart of the wireless home control system is microcontroller type Atmel (AT89C51) which is running on 12 MHz clock speed.The inputs of microcontroller consist of (sensors, RF remote control and serial port RS-232) signals, the microcontroller receives these signals and analysis it then distributed these signals to devices to turn on/off.The board1 function is to control of all room1 devices with protection system through WLAN and RF remote control handheld.
The second board ( board 2) as shown in figure (3) consist of several components such as Microcontroller (AT89C2051), MC1488, MC1489, 47LS244, 74LS374, ULN2803 and comparator, the board 2 function is to control room devices with protected system through WLAN and RF remote control handheld.
The input Red LEDs in the two boards represent as indicator, which represent the input signal coming from (RF remote control, Manual Switch and Master PC) to the board while output Green LEDs represent the output signal from board to turn device on/off.The Lamp and Fan in board1 are connected to the output Green LEDs in order to show the user in the home that the devices are operating properly.

RF Remote Control Handheld
The RF remote control system is using 433MHz, which is a frequency allocated for all sorts of radio frequency controllers.Coding is necessary to prevent the interference and security.The RF remote control transmitter consist of four switches, each switch has different function for example the switch (SW1) use to turn the ceiling fan (ON) and the switch (SW2) use to turn the device (OFF).The microcontroller receives this signal through RF receiver circuit then provides the special code of the selective device.WLANs are operated in a completely insecure manner, representing an easy-to attack target for even the most unskilled attackers, who happen to pass by near a building where an IEEE 802.11gWLAN is operating therefore, in WLANs there is a stronger need for security than in their wired counterparts [9].The IEEE 802.11g group has been responsible for setting the standards in wireless LANs, focusing on Data link layer and Media access control sub-Layer of the Open System Interconnect (OSI) model [10].
The most widely used version of IEEE 802.11, has the maximum throughput of 11 Mbps.The most common standards for wireless network connectivity are the IEEE 802.11b/g/a [IEEE 80211].The maximum theoretical speed is 54 Mbps, which is however shared among all the customers connected on the same wireless access point [11].There are four methods that have been used for remote control of Desktop Home PC via WLAN: 2-Netmeeting Method using your PC and the Internet, you can now hold face-to-face conversations with friends and family [13].3-pcAnywhere method built-in 256-bit encryption and enhanced video performance help make communications much more secure and fast [14].4-Client/server method describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfills the request [15].
The above methods were applied to the system and pcAnywhere method is the best one because it has (40 m) long range, better security and it needs one person to communication between two computers.

Smoke Sensor Interfacing
The protected system is represented by the Smoke Sensor used for sensing the smoke in any place in rooms.This device is interfaced with the microcontroller AT89C2051 in board 2 as shown in figure (5).The activation of this device will alarming and shutting down all electrical devices by microcontroller.The same method as shown in figure ( 5) is use to connect Motion Detector Sensor.

Software Development
The firmware for the microcontroller was developed using assembly language.Visual basic language was used to design the GUI (graphical user interface) screen that contains all devices in the home.

Assembly Language Program
The flowchart is shown in fig.(7) used for Home Automation by using the microcontroller.The initialization and reset (Serial Port, Timers and Variables) was selected then microcontroller read inputs (Sensor, RF, Manual Switch and Serial Port).The order goes to the device to turn on or off.At the same time the microcontroller give handshake signals to the Desktop PC to display the situation of the device.Fig. (7)

Visual Basic Language
In this paper has been used Visual Basic Language to make connection between master Home PC and boards through program written by using Visual Basic Language.Also the Visual Basic Language has been used to design the graphical user interface.The GUI consist of screen that contains the all devices in the home and by using this screen can the user turn the device on/off from any place inside the home or outside it.The figure (8) illustrate this screen.3-The PCanywhere method is the best because it is more secure and confident from other methods and it needs one person to communication between two computers.4-The system provides alarming and shutting down all electrical devices at fire and smoking conditions.

Board 2 Switches
Board 1 Switches

Figure ( 4 )Fig.( 4 )
Fig.(4) Interface Between RF Receiver and AT89C51 in Board 12.2 WLAN (802.11g)In2003, IEEE released 802.11g that extended 802.11bPhysical layer to support data transmission rates of up to 54 Mbps in the 2.4 GHz band.Many IEEE 802.11gWLANs are operated in a completely insecure manner, representing an easy-to attack target for even the most unskilled attackers, who happen to pass by near a building where an IEEE 802.11gWLAN is operating therefore, in WLANs there is a stronger need for security than in their wired counterparts[9].The IEEE 802.11g group has been responsible for setting the standards in wireless LANs, focusing on Data link layer and Media access control sub-Layer of the Open System Interconnect (OSI) model[10].The most widely used version of IEEE 802.11, has the maximum throughput of 11 Mbps.The most common standards for wireless network connectivity are the IEEE 802.11b/g/a [IEEE 80211].The maximum theoretical speed is 54 Mbps, which is however shared among all the customers connected on the same wireless access point[11].There are four methods that have been used for remote control of Desktop Home PC via WLAN: Desktop Control allows the user to remotely control any computer, running under the Microsoft Windows system in a TCP/IP local area network or the Internet.The user can see a remote desktop on his or her own screen and use the mouse and keyboard to control the connected computer remotely[12].

Home Automation Management with WLAN (802.11g) and RF Remote Control
Programming Microcontroller With Protection System Flow Chart