Automated Home Appliances Control using Embedded Web Server

In modern construction in industrialized nations, most homes have been wired for TV, lights and fans etc. Many household tasks were automated by the development of specialized automated appliances. In this project we are going to create the embedded web server so that we can control the electrical devices through online by using either computer or by using smart phone. The purpose of this project is to design a control system that able to control a system device remotely from distance and monitoring condition of the system in real-time as well. This project shows how to set up an Arduino with Ethernet shield as a web server. The web servers in this Project are used to serve up web pages that can be accessed from a web browser and allows our hardware to be controlled from web browser. Starting from basic, our example for this project is simple. We want to access our device by switching ON-OFF LED and monitor analog input data acquisition from web server, which are the computer and Arduino connected to the same network.


Introduction
Home computerization alludes to the utilization of PC and data innovation to control home apparatuses and gimmicks, (for example, windows or lighting).Frameworks can go from basic remote control of lighting through to complex PC/micro-controller based systems with differing degrees of insight and mechanization.Home robotization is embraced for reasons of straightforwardness, security and vitality proficiency.In current development in industrialized countries, most homes have been wired for electrical force, phones, TV For instance, a heater can send a ready message when it needs cleaning or an icebox when it needs benefit.In the event that nobody should be home and the caution framework is situated, the home mechanization framework could call the holder.
In straightforward establishments, robotization may be as clear as turning on the lights when a man goes into the room.In cutting edge establishments, rooms can sense the vicinity of a man inside as well as know who that individual is and maybe situated fitting lighting, temperature, music levels or TV.A web server is an information technology which will compute the request via HTTP.It is a network protocol which is used to transfer the request from the user via web browser to the World Wide Web.The web server can be embedded into the embedded systems so that we can control or access the information from them.So the combination of web server and embedded devices are called as embedded web server.The above layout is explained in the different stages:  In the first stage the request from the client is send to the router. From the router the data is send to the Ethernet shield. From the Ethernet shield the data is transferred into Arduino board. From the board pins the data is goes through relay board. The relay board acts as a switch and it controls the home appliances.

Requirement Analysis
The system contains both hardware & software components which are classified as Table 1 and Table 2. A. Arduino IDE: it is a tool which is used to develop the source code .We can write it in 'c' language.And it consists of some of the basic library functions for developing code in some of the areas like of controlling, using MYSQL connecting, EEPROM, Ethernet, GSM, liquid crystal etc.In this at first we have set the serial port, select the type of board on which we are doing project.Then it consists of basic examples in the above mentioned areas so based upon our project we have to improve or add the addition code.After writing the code we have to save it JTI ISSN: 2303-3703  and compile it, if our code has any errors then it shows in java language or else if our code has no errors then we can upload code into the Arduino board.Arduino drivers: For dumping the code into the Arduino board.B. Arduino UNO: in our project we use Arduino UNO for controlling the automated home appliances and also for detecting the power from the devices.It consists of some of the parts like AT mega 328.which consists of 14 digital pins, 6 analog pins, USB connecter, reset button, crystal oscillator, with a clock speed of 16 MHZ, operating voltage of 5v, ICSP header, out of 14 digital pins 0 and 1 are used for serial communication.AT mega has 3 KB out of which 2 KB SRAM, 1 KB EEPROM.C. Arduino Ethernet shield: Arduino Ethernet shield is a device which is used as embedded web server.When it is attached to the Arduino UNO the data from the Ethernet shield is transfer to Arduino UNO with the help of 10,11,12,13 pin of Arduino.Pin 10 in the Arduino is used for selecting the W5100 which will provide network stack of both TCP and UDP protocols.Ethernet shield connected to router with the help of RJ45.theEthernet shield consists of some of led lights on it which will give information in the following way  PWR: -it will ON when it gets power from the Arduino board.
 LINK: -it will ON when the shield receives or transfers any data. 100M: -it will ON when the network has a speed of 100 Mb/s  RX: -it will ON when Ethernet shield is receiving the data.
 TX: -it will ON when Ethernet shield is transferring the data.
 COLL: -it will ON when network collision occurs.D. USB: it is elaborated as Universal Serial Bus it is mainly used for interfacing some of devices like computer speakers, sound cards, modems, Ethernet adapters etc. in this we used USB for interfacing computer to the Arduino UNO board for dumping the code into the Arduino board and also used for giving the power supply to the board.The USB types differs in there data rate, supply voltage, temperature range and number of channels etc. E. Ethernet Cable: Ethernet cable is network cable which is used for connecting the clients in the local area network.In our project we used Ethernet cable for connecting the Ethernet shield to the router so that the router will search for the clients in particular networks and if the client is available then it will used for receiving and transmitting the data in between the Ethernet shield and client so it will acts as antenna for detecting the signals or client systems either it may be pc's or smart phones.F. Web browser: web browser is software which is used for get or presenting or transferring information from client system to the World Wide Web.In our project when we type the IP adders of the Arduino board then the Ethernet shield along with the router makes the connection between the client system and the Arduino board.G. Router: router is a device which is used as antenna for receiving, transferring the data to and from the internet to the client systems.And the routers are differ in their speed, cost and size etc.In our project we use router for getting the information from the client system and transferring the data to the Ethernet shield and vice versa.H. Relay board: relay board is a switch which is used to control electromagnet with the help of small input signal in other word's we can say that with the help of small input signal from the Arduino board the relay will operates as switch between the NO and NC.Where NO is normally opened, and NC normally closed.By default the COM port main power is connected to NC.If we give the sign from the input devices then the COM port will switch's to NO.We can connect normal home appliances to those NC and NO pin's.I.
Step down transformer: step down transformer is one which is used to convert high voltage into low voltage.In this it consists of less number of turns in secondary side when compare to primary side.In our project we used (6v 550ma) transformer such that it check's for the presence of voltage for the automated devices.The input of the transformer is connected to the input pins of automated devices and the input voltage of 230v is converted into 6v analog signal by step down transformer and this 6v analog is converted into 5v dc and it is given to the Arduino board so that the Arduino board can detect the presence of power for the automated devices.J. Home Appliance: the home appliances are devices like lights, fans, T.V, fridge, A.C's etc. those devices are converted into automated home appliances by using the method of 2 way switching in our project where 1 switching is done throw normal switch and other switching is done throw relay with the help of Arduino.

Design process
After writing the code and uploading it into the board.Open the web browser and type the IP address that you had entered in the code then the connection will be established between the client systems and the Arduino board so that we can control or detect the status of the devices.The html code will helps to display the data that Arduino had send in the web browser.Suppose if we send a data like off the light by clicking on the button which is developed using html language this data will goes to the Ethernet shield with the help of router and after that to the Arduino board from the Ethernet shield so the Arduino board is connected to the home appliances with the help of relay board.The pin to which the light was connected will get the input 0 from client and this 0 will be transferred to the relay, as relay will acts as the switch it will switch the device from ON statue to OFF statue.
Similarly if we want to detect the input from the device to check whether it is ON or OFF statue the transformers will detect the input power from the device and it will convert this input power from 230v to 5v and this 5v will be given to the Arduino board and this Arduino will check whether particular pin is 0 OR 1 if it is 0 then it will send the data has particular device is in OFF statue or if it is 1 then it will send the data has particular device is in ON statue.So by seeing this information on the web browser by the client he/she can operate the devices.Step 4: check the status and control the home appliances.
Step 5: if power is on Step 6: if the light is in on the state, then off it.Else do nothing.
Step 7: if the fan is in on the state, then off it.Else do nothing.
Step 8: if charging is in on the state, then off it.Else do nothing.
Step 9: if the light is in on the state, then off it.Else do nothing.
Step 10: stop.In this phase we have written the source code for our project, we have used some of the predefined commands in the Arduino IDE.While writing the code we have assumed 4 device as the home appliances, for controlling those devices we have taken 4 pins in the Arduino board and for detecting the status of the home appliances we have taken 4 more pins.B. Hardware implementation:-In this we have made the connection between the Arduino, relay board and home appliances since we have taken 4 pins (ex:-2, 3, 4 and 5) as controlling pins we have connected those pins to the relay board.The relay board consists of 4 relays and each relay consists of 3 output pins (NO, NC and COM) and 1 input pin form the Arduino board.We have used 2 way switch for the controlling the devices while we are in at home.Since the 2 way switch consists of 3 pins in which 2 pins as the normal pin and one pin as the COM pin.So we have made a connection between those 2 pins with the NO and NC pins of relay board, the COM pin of relay board was given to the 230v power supply and COM pin of switch was given to the one of the home appliance and the power for the relay board was given with 12v adaptor.Similar connections were made to remaining relays and switches.And for giving the status of the devices to the Arduino board we have to convert the voltage from 230v to 5v for this purpose we have used the transformer of 6v and made the connections between the transformer inputs and inputs of each home appliance so we can give the 5v for the Arduino board.

Testing
In this phase we have tested in both software and hardware side.In the software side we tested the Ethernet module and in the hardware side we have tested working of relay board and home automated devices.Software testing:-

Applications
 For controlling the home automated devices. For controlling motor's and detecting the temperature and humidity in the agriculture side. We can also use it in military, hospital and education side also. We can Control any device wireless from long distance. By connecting to the XAMPP or WAMPP we can receive the data from some of the devices.

Conclusion
Ethernet can be applied to perform control function from distance in a remote area.By using embedded web server, the control functions are performed through an application made on a website.Microcontroller as embedded web server could be applied as client or server to perform control function.HTML programming can be integrated with C language and both of

Future Scope
In future we can improve the project by connecting more number of automated home appliances like T.V's, A.C's, fridge and washing machine etc. and we can improve the range of the router by adding the repeaters in between the server and client we the distance is out of router's range.

Figure 4 .Figure 5 .
Figure 4. Initial stage where no button is pressed

JTI
ISSN: 2303-3703  Automated Home Appliances Control using Embedded Web Server (Y.Mahesh) 21 them embedded.Into Flash memory microcontroller.Synchronization both of them act as embedded web server control device.

Table 1 .
Software Components

Table 2 .
Hardware Components