remotely controlled home automation system

6 downloads 217185 Views 250KB Size Report
The Android application [4] is our attempt to make the ... microcontroller. Fig 3 gives the block diagram for the design. All devices are remotely controlled by PC ...
IEEE International Conference on Advances in Engineering & Technology Research (ICAETR - 2014), August 01-02, 2014, Dr. Virendra Swarup Group of Institutions, Unnao, India

REMOTELY CONTROLLED HOME AUTOMATION SYSTEM Nikhil Singh, Shambhu Shankar Bharti, Rupal Singh, Dushyant Kumar Singh1 1 Assistant Professor, Dept of CSE, MNNIT Allahabad ABSTRACT: This paper describes an investigation into the potential for remote controlled operation of home automation systems. It considers problems with their implementation, discusses possible solutions through various network technologies and indicates how to optimize the use of such systems. The home is an eternal, heterogeneous, distributed computing environment (Greaves, 2002) which certainly requires a careful study before developing any suitable Home Automation System (HAS) that will accomplish its requirements. Nevertheless the latest attempts at introducing Home Automation Systems [1] in actual homes for all kinds of users are starting to be successful thanks to the continuous standardization process that is lowering the prices and making devices more useful and easier to use for the end user. Even so several important issues are always to be handled strictly before developing and installing a Home Automation System; factors like security, reliability, usefulness, robustness and price are critical to determine if the final product will accomplish the expected requirements. KEYWORDS – Home Automation System, Microcontroller, Android, Server.

1.

INTRODUCTION

We are in an age where we have too much work but lesser time, quite a lot of responsibilities but an equal proportion of emergencies to leave them unattended. A major one of those “unattended” responsibilities is our duty towards future generations and save power. Sitting in our room with the air conditioner on, we get an urgent call, and we leave the room at once, with the appliances unattended and still running. A 1kW AC will consume 1 kWh of energy, equal to 3.6 million joules. This magnitude of energy is approximately equal to the energy released by explosive of 857.14 grams of TNT. Within that one hour, around 1.05 kg of CO2 would be produced. If the same AC is left open like this for each day in a 30-day month, imagine the consequences. The energy produced would be sufficient to land a 95-tonne aircraft at typical landing speed. Additionally, it will incur an extra cost of Rs 200 at just 1 hour run per day. All this data is just for a single AC running for one hour per day in a month. Imagine how much energy is wasted by the entire home appliances combined, running for the hours in a day with no use. Sadly, our lives have been running in such a pace that it is almost impossible to keep track of running lights,

regularly check for appliances running uselessly, and switch them off. At this point of environment turmoil, Wi-Fi based home automation [2] comes to our rescue. It offers the user complete access control of the appliances through a remote interface. In this way, even if you’re already on your way to office after locking the house, you can still check the status of your appliances and turn them on or off. Automation is the use of control systems and information technology to control equipment, industrial machinery and processes, reducing the need for the human intervention. In the scope of industrialization, automation is a step beyond mechanization. Mechanization provided human operators with machinery to assist them with the requirements of work while automation greatly reduces the need for human sensory and mental requirements as well. Automation plays an increasingly important role in the global economy and in daily experience. Engineers strive to combine automated devices with mathematical and organizational tools to create complex systems for a rapidly expanding range of applications and human activities. Many roles for human in industrial process presently lie beyond the scope of automation. Automation has a notable impact in a wide range of highly visible industries beyond manufacturing. 2.

SYSTEM ARCHITECTURE

The paper presents an architecture which uses an android phone, a laptop (computer), a microcontroller, and a switching circuit. The android phone is used to run the designed application to control the appliance. The Laptop acts as a server, communicating the commands to the microcontroller, which in turn, switches the relay, turning on or off the desired appliance. Additionally, the request to turn a device on/off can also be given through web interface, which communicates with the server Laptop directly. The Fig 1 explains this network of remote appliances. All devices are remotely controlled by PC which is connected through the port to microcontroller. LCD screen used to display the current status of home appliances. Motion sensor used for counting number of people inside the home. The brief description of the components is as follows-

978-1-4799-6393-5/14/$31.00 ©2014 IEEE

IEEE International Conference on Advances in Engineering & Technology Research (ICAETR - 2014), August 01-02, 2014, Dr. Virendra Swarup Group of Institutions, Unnao, India

A. MICROCONTROLLER The microcontroller IC [3] is actually the ATmega16 IC having 16 kb of flash memory. This device receives the serial request from the laptop, interprets it and transfers the request to the corresponding relay switching circuit. This device is programmed in Embedded C programming language using Code Vision AVR. Upon receiving the request from the server, the USART interrupt service routine is called, request is read and interpreted in this service routine, and the program moves back to initial state, ready to receive further requests.

i. Principle The circuit works on the principle of switching operation of the transistor. The transistor operates in the saturation and the cut-off region for this operation. Thus, it works on two points on the load line of the V-I characteristics. When base current is zero, it acts as open switch (cut-off) and when base current acquires a threshold value it acts as closed switch (saturation). ii. Working When a particular pin of microcontroller goes high, a +5V is applied on the base of the transistor. This induces the flow of base current thereby driving the transistor from cut-off into saturation and it acts as closed switch. Thus a +12V Dc voltage is applied across the relay coils which triggers (turns on) the relay and in turn the relay circuit gets closed and the pins P2 and P5 are shorted thereby applying the +220V AC supply across the device and the device turns on. C. LAPTOP SERVER

Fig1. Control Flow

B. RELAY BASED CIRCUIT This is the actual circuit that is operated upon by the microcontroller IC, giving remote access to appliances turning them on and off. Fig 2 gives its explicit working details.

Fig 2: RELAY BASED CIRCUIT

The Laptop acts as a server which takes input from remote server and android mobile and in turn directs the microcontroller to control various home appliances. This server is always kept on so that the devices inside the house can always be controlled from far away locations and also wirelessly through mobile phone. The server receives request from either the phone through Wi-Fi or through internet to turn on or off a particular appliance. D. ANDROID MOBILE The Android application [4] is our attempt to make the user appliance interaction seamless and effortless. The application is highly flexible and can pertain to all house or office needs or design types, and can list any number of devices in any fashion. IT shows their current state as well as allows the user to change the state of the appliance. The range is fair, limited by the Wi-Fi range. Android is open source and Google releases the code under the Apache License. This open source code and permissive licensing allows the software to be freely modified and distributed by device manufacturers, wireless carriers and enthusiast developers. Additionally, Android has a large community of developers writing applications ("apps") that extend the functionality of devices, written primarily in a customized version of the Java programming language. Android's open nature has further encouraged a large community of developers and enthusiasts to use the open source code as a foundation for community-driven projects, which add new features for advanced users or bring Android to devices which were officially released running other OS.

978-1-4799-6393-5/14/$31.00 ©2014 IEEE

IEEE International Conference on Advances in Engineering & Technology Research (ICAETR - 2014), August 01-02, 2014, Dr. Virendra Swarup Group of Institutions, Unnao, India

3.

SYSTEM IMPLEMENTATION

This chapter will discuss about the design of home automation system. Our design consist a light bulb, a motion sensor and a fan. The bulb and the fan are connected through a relay based circuit to microcontroller and the motion sensor is directly connected with microcontroller. Fig 3 gives the block diagram for the design. All devices are remotely controlled by PC which is connected through the port to microcontroller. LCD screen used to display the current status of home appliances. Motion sensor used for counting number of people inside the home. A. ATMEGA 16 MICOCONTROLLER The ATmega16 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega16 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.

defined as data communication equipment). It is commonly used in computer serial ports. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors. C. SIMULATORS

1. Tera Term: Tera Term (rarely TeraTerm) is an opensource, free, software implemented, terminal emulator (communications) program. It emulates different types of computer terminals, from DEC VT100 to DEC VT382. It supports telnet, SSH 1 & 2 and serial port connections. It also has a built-in macro scripting language (supporting Oniguruma regular expressions) and a few other useful plugins.

2. Proteus Design Suite: Proteus is software for microprocessor simulation, schematic capture, and printed circuit board (PCB) design. It is developed by Labcenter Electronics. One of the main features of Proteus is the Virtual System Modelling (VSM) that combines mixed mode SPICE circuit simulation, animated components and microprocessor models to facilitate co-simulation of complete microcontroller based designs.

3. Code Vision AVR: CodeVision AVR is an Integrated Development Environment for programming the Atmel AVR Series of Microchips. CodeVisionAVR features an Automatic Program Generator (CodeWizardAVR) for the new XMEGA devices. Fully dockable windows that allow flexible customization of user’s workspace. This is a redesigned split file pane editor allows viewing/editing two files at the same time.

4. VSPE (Virtual Serial Port Emulator): Serial port emulation is useful especially when there is a lack of available physical serial ports. Communication between software and/or devices which would otherwise require extra physical connections can be benefited by using a virtual COM Port emulator. Virtual serial ports lets you send or receive data over a TCP/IP port using any serial communication program. Using serial port emulation one can split a real COM port between a numbers of virtual serial ports. This makes it possible to supply data from a single serial device to a number of different applications. Fig 3: System Design

B. SERIAL PORT RS-232 is the traditional name for a series of standards for serial binary single-ended data and control signals connecting between DTE (data terminal equipment) and DCE (data circuit-terminating equipment, originally

D. MOBILE PHONE APPLICATION A perfect way of implementing user-appliance interface seamlessly is through the PL Home Automation app, developed by us. The application lists all the rooms and appliances and shows their current state, including the options to turn them on and off. Home Automation app opens with a basic layout for the home or office, which is changeable and highly flexible. The application has been

978-1-4799-6393-5/14/$31.00 ©2014 IEEE

IEEE International Conference on Advances in Engineering & Technology Research (ICAETR - 2014), August 01-02, 2014, Dr. Virendra Swarup Group of Institutions, Unnao, India

programmed using the Eclipse Helios editor. Fig 4 gives the android interface.

F. HOME CIRCUIT The program is designed such that if no one is at home then all home appliances automatically switched off. For designed purpose we have used Proteus Design Suite. The design consist a simple home automation design having a “motion sensor” for counting number of people inside home, “a speed controlled fan” ,”a light bulb”, ”a LCD” for displaying status of home appliances. “a microcontroller ic” for controlling devices “a port” for connection purpose.

G. INTEGRATION OF HOME CIRCUIT WITH ANDROID APPLICATION AND ONLINE INTERFACE

E. ONLINE INTERFACE/ADMIN PANEL

The server receives on/off request (for fan speed of fan request) for controlling various household appliances. This server receives signal through android application and online interface. With the help of this signal, the Python script located on the server gets activated and the script sends request to the serial port attached to the microcontroller. The microcontroller is coded in such a way that when it gets signal from the port, it controls the corresponding home appliance attached to it.

Another way of controlling the appliances is through the admin panel online. Apart from mere control on devices, the admin panel has variety of other powers. Here it can also be specified which mobile device can control the appliances through the PL Automation app. The unique device ID gets integrated with the server for security, ensuring no other device can get access to appliances. You can add multiple devices, and revoke access for existing ones.

The Python script contains two variables, “on_off” for identifying the appliance(e.g f for fan,b for bulb) and “object” for controlling it(e.g 0 for off, 1 for on in case of bulb; in case of fan 0,1,2,3 for off, low, medium, high speed respectively). This script receives the values of these variables “on_off” and “object” from the android application or online interface. This script uses these values to send corresponding values to the port which in turn forwards it to the microcontroller.

Fig 4: Android Interface

The microcontroller consists of several pins. When a particular pin of microcontroller goes high, a +5V is applied on the base of the transistor. This induces the flow of base current thereby driving the transistor from cut-off into saturation and it acts as closed switch. Thus a +12V Dc voltage is applied across the relay coils which triggers (turns on) the relay and in turn the relay circuit gets closed and the few pins are shorted thereby applying the +220V AC supply across the device and the device turns on. 4.

CONCLUSION

Through the effective and thorough implementation of Home Automation System, we can safely deduce the following: Fig 5: Online Web Panel

978-1-4799-6393-5/14/$31.00 ©2014 IEEE

IEEE International Conference on Advances in Engineering & Technology Research (ICAETR - 2014), August 01-02, 2014, Dr. Virendra Swarup Group of Institutions, Unnao, India

REFERENCES [1] K. Bromley, M. Perry, and G. Webb. "Trends in Smart Home Systems, Connectivity and Services", www.nextwave.org.uk, 2003. [2] A. R. Al-Ali and M. Al-Rousan, "Java-based home automation system", IEEE Transactions on Consumer Electronics, vol. 50, no. 2, pp. 498-504, 2004. [3] N. Sriskanthan, F. Tan and A. Karande, "Bluetooth based home automation system", Microprocessors and Microsystems, Vol. 26, no. 6, pp. 281-289, 2002. [4] H. Ardam and I. Coskun, "A remote controller for home and office appliances by telephone", IEEE Transactions on Consumer Electronics, vol. 44, no. 4, pp. 1291-1297, 1998.

Fig 6: Android App controlling home

1. With little power consumption, the devices can be successfully controlled remotely. The additional power consumption is only of the server, which can be reduced by choosing a lighter server like a mobile device. In return, the appliances are controlled from a considerable distance, marking a significant utilization of energy.

[5] T. Saito, I. Tomoda, Y. Takabatake, J. Ami and K. Teramoto, "Home Gateway Architecture And Its Implementation", IEEE International Conference on Consumer Electronics, pp. 194195, 2000. [6] N. Kushiro, S. Suzuki, M. Nakata, H. Takahara and M. Inoue, "Integrated home gateway controller for home energy management system", IEEE International Conference on Consumer Electronics, pp. 386-387, 2003.

2. The system can be easily incorporated with all kinds of home and office designs. The android application as well as the Admin panel can be easily twisted and edited to present the layout of any house or office block, and as such, the system can be easily integrated with all kinds of architectural designs. 3. The switching circuit is fool proof and consumes little power of its own. The transistor is used in combination with the relay, so that the overall circuit does not consume excess power as a relay alone would have consumed, and the efficiency and power saving motive of the project is fulfilled. The larger the system for which it is implemented, the more the power savings. 4. The system is fully secure and safe giving complete freedom and power to the user. The Admin Panel providing total control to the user to add/remove devices entitles the user to easily change to a new mobile phone and remove the old one from the device list. The Panel is password protected with options to change the password, ensuring no one but the user has access to it.

978-1-4799-6393-5/14/$31.00 ©2014 IEEE