Home Intelligent System

Embed Size (px)

Citation preview

  • 8/7/2019 Home Intelligent System

    1/51

    Home Intelligent System Based on EmbeddedInternetT.Kirupavathy

    M.E. (Embedded and Real Time Systems)

    Dept Of EEE

    P.S.G. College of Technology

    Coimbatore

    [email protected]

    C.L.Vasu

    Asst. Professor,

    Dept Of EEE,

    PSG College of Technology,

    Coimbatore

    [email protected]

    Abstract Aim of home automation is to control home

    devices from a central control point. In this paper, we present thedesign and implementation of a low cost but yet flexible and

    secure internet based home automation system. The system is

    designed to be low cost and flexible with the increasing variety of

    devices to be controlled. The design is based on a stand alone

    embedded system board integrated into a PC-based server at

    home. The home appliances are connected to the input/output

    ports of the embedded system board and their status are passed

    to the server through Ethernet interface. The home appliances

    can be monitored and controlled locally via the embedded system

    board, or remotely through a web browser from anywhere in the

    world provided that an Internet access is available. The system is

    scalable and allows multi-vendor appliances to be added with no

    major changes to its core. Password protection is used to block

    unauthorized users from accessing the appliances at home. If the

    Internet connection is down or the server is not up, the

    embedded system board still can control and operate theappliances locally. ARM cortex family of processor (LM3S6965)

    is used in this proposed system.

    Index Terms Home Automation, Embedded System, LM3S6965,

    internet, server.

    I INTRODUCTION

    Due to the rapid development in computer and networktechnology, the use of Internet has been expandingexponentially. It is now extensively used as a reference tool for personal, educational, commercial, and industrial use. Formany years the Internet has been used extensively in browsinghomepages, searching for information, chatting, downloadingand uploading information. Due to the rapid development ofnew technologies such as JAVA, the Internet has also started to

    serve as a medium that allows monitoring, control, andinteraction with machine and devices. The Internet can be usedin home automation which provides many features rangingfrom efficient use of energy to increased comfort, greatersafety and security. Even over large distances the user can

    monitor and control his/her home gate, oven, refrigerator and

    water the garden without any human intervention.

    This paper introduces a solution for embedded system, access

    internet, through which we can remote access, monitor and

    maintain conveniently. The solution is based on web

    technology. ARM cortex (LM3S6965) receives the monitored

    information from sensor module and processes based on the

    collected information. Web server maintains the information

    about the home environment. The designed system will beopen to expansion and will enable control of different types of

    devices. The system is designed to be low cost however at the

    same time more flexible alternative with respect to similar

    systems.

    II LITERATUREREVIEW

    Designing a home automation system for monitoring andControlling various devices in remote locations can be done

    through a variety of communication options such as wireless

    LAN technologies, dial-up modems, private radio networks,

    satellite communication, Internet, cellular network and so on.

    Several studies on home automation have been done using

    different types of control methods.

    The work in [1] showed how home appliances could be

    controlled by an integrated system. However, the proposed

    system is based on a dedicated network and has never been

    tested on the Internet. Moreover, the system only shows how

    to solve home automation problems at the software level;

    hardware aspects were not considered. Nunes and Delgado [2]

    proposed an Internet application that allows local and remote

    monitoring and control of a home. The application adopted anobject oriented approach to represent each home component

    as an object that is connected to a server at home. The

    research was carried out using a model for the application but

    no real experiments were done. The paper does not discuss the

  • 8/7/2019 Home Intelligent System

    2/52

    hardware implementation and assumes that home

    appliances have built-in controllers and are ready for Internet

    access. The power and usefulness of Java in Internet

    applications have been under thorough testing by several

    researchers. The design and implantation of a portable, light-

    weight user interface for a home automation system is

    proposed in [3-4]. The emphasis was on the use of Java in

    developing software user interfaces to provide remote access

    to the home control system. Sriskanthan proposed an

    automation system that can control home appliances from a

    PC using Bluetooth [5]. However, the system cannot be

    controlled remotely through the Internet. Wong introduced a

    phone-based system for home and office automation using a

    hardware-based remote controller for home appliances [6].

    Communication takes place via a dedicated telephone line not

    via the Internet. A similar system has been designed for

    remote home automation using the telephone by Coskun and

    Ardam [7].

    The real time monitoring has been an important feature that

    can be used in the home automation systems. As a change in

    the status of the devices occurs, the user can be informed inreal time. In this paper, we present an attractive low-cost

    solution for home automation via the Internet. Using Internet

    access, home Owners can remotely monitor and controlalmost any appliance at home. Local control is also offered in

    our design. Appliances at home are connected to an embeddedsystem board (LM3S6965). The control code on the board

    operates the appliances and communicates with the server.

    The user can interact with the home automation system from

    anywhere at any time. Furthermore, the system is flexible and

    scalable. Additional home appliances can be integrated into

    the system with little modification.

    III HARDWARELAYOUTDESIGN

    Fig. 3 Hardware System Layout

    As the above Fig.3 shows, the home appliances are

    connected to the board (LM3S6965). The status of the

    appliances will be monitored by the controller. The controller

    sends all its status information to the server. Hence a remote

    client can access the information about the home environment.

    IV SYSTEMSTRUCTURE

    The system has a controller to process and control information.

    The proposed system includes the following modules. Sensor

    module, processor module, Ethernet interface module, web

    server module. The below Fig.4 shows the outline structure of

    the proposed system.

    Fig. 4 Block diagram of the proposed system

    A. Sensor ModuleSensors are used to sense the external environment. In this

    proposed system, the sensors are used to sense the home

    environment. Fire detection sensor senses and sends

    information to the controller if it detects fire in home. Gas

    leakage sensor gives information to the controller if it detectsany gas leakage. Temperature sensor is connected to water

    heater and it sends the information to the controller about the

    present temperature of the heater. Threshold value is set and if

    the sensed temperature value exceeds the threshold, then the

    controller switches off the water heater by itself.

    B.LM3S6965LM3S6965 belongs to ARM cortex family of processors.

    Cortex M3 processors are low power processors that features

    low gate count, low interrupt latency and low cost debug that

    are intended for deeply embedded applications that require

    fast interrupt response features. The processor implements the

    ARM architecture v7-M. The architecture is optimized for

    small footprint embedded applications. To reduce gate count

    and enhance system flexibility, the cortex M3 has migrated

    from the banked shadow register exception model of the ARM

    7 to a stack based exception model.

    This paper uses this LM3S6965 microcontroller for

    monitoring and control of the home environment. Input is

    given from the sensor module and based on the sensed

    information, processing is carried on. Input is given to any of

    the 4 ADC channels available in the LM3S6965 board.

    C.ETHERNET CONTROLLERAn Ethernet controller is a small chip that handles all the data

    that are exchanged between two computers via the Internet, a

    LAN or WAN. They come in a variety of different pinconfigurations including 48,100, 256, 276 and 883.

    LM3S6965 has integrated Ethernet controller. In this proposed

    system, LM3S6965 supports Ethernet interface and network

    transformer HR961160C which is connected between

    Microcontroller LM3S6965 and connector RJ45.HR961160C

    Sensor

    Module

    ARMMicrocontroll

    er

    LM3S6965

    Ethernet

    Controlle

    r

    Embedded

    Web Server

  • 8/7/2019 Home Intelligent System

    3/53

    is a 1:1 transformer with a smaller package and it supports

    10M/100M Ethernet.

    D.EMBEDDED WEBSERVEREmbedded web server refers to import Web Server at the

    scene to monitor and control equipment, in the support of

    appropriate hardware platforms and software systems, transfertraditional monitor and control equipment into an internet

    based, possessed with TCP/IP protocol as the underlying

    communication protocol and Web server technology as itscore. The resources of embedded devices is limited, and do

    not able to handle multiple user requests, so the specifically

    designed embedded Web server are needed instead of Apache

    used in Linux.

    V IMPLEMENTATIONOFDYNAMICWEBPAGE

    Webpage can be created using HTML. In order to implement

    the web page, the terms used are as follows.

    A. DHCP SERVER

    Dynamic Host Configurationprotocol (DHCP) is an autoconfiguration protocol used on IP networks. Computers that

    are connected to IP networks must be configured before they

    can communicate with other computers on the network.DHCP allows a computer to be configured automatically,

    eliminating the need for intervention by a network

    administrator. It also provides a central database for keeping

    track of computers that have been connected to the network.

    This prevents two computers from accidentally beingconfigured with the same IP address. In the absence of DHCP,

    hosts may be manually configured with an IP address. In

    addition to IP addresses, DHCP also provides other

    configuration information, particularly the IP addresses of

    local caching DNS resolvers. Hosts that do not use DHCP for

    address configuration may still use it to obtain other

    configuration information.

    B. CGIThe Common Gateway Interface (CGI) is a standard that

    defines how web server software can delegate the generation

    of web pages to a stand-alone application, an executable file.

    Such applications are known as CGI scripts; they can be

    written in any programming language, although scripting

    languages are often used.

    C. HTMLHTML, which stands for Hyper Text Mark-up Language, is

    the predominant markup language for web pages. HTML is

    the basic building-blocks of WebPages. HTML is written in

    the form of HTML elements consisting oftags, enclosedin angle brackets (like ), within the web page

    content. The purpose of a web browser is to read HTMLdocuments and compose them into visual or audible web

    pages. The browser does not display the HTML tags, but uses

    the tags to interpret the content of the page. HTML elements

    form the building blocks of all websites. HTML

    allows images and objects to be embedded and can be used to

    create interactive forms. It provides a means to

    create structured documents by denoting

    structural semantics for text such as headings, paragraphs, lists,

    links, quotes and other items. It can embed scripts in

    languages such as JavaScript which affect the behavior of

    HTML WebPages.

    E.DYNAMIC WEB PAGEAn IP address must be assigned for each and every devices

    connected to a network. This is done through DHCP server orby means of manual configuration. If the web server has the

    setup of DHCP then ip address is assigned automatically else

    manual configuration of IP address is done.

    VI IMPLEMENTATION OF WEB TECHNOLOGY

    Web technologies acts as the interface between web servers

    and their clients. This information includes markup languages,

    programming interfaces and languages, and standards for

    document identification and display. Initially web pages

    should be created by writing commands in html. Webpage can

    be created as per the requirement. The system is developed in

    such a way that the web page gets the update from the sensor

    module once after 2 seconds. The following are the steps

    involved in the implementation of web technology.

    a) Users in the client browser make a request to the Web

    server. The below Fig.6 shows the screenshot of the web

    browser requesting for the web page that has the informationabout the home environment.

    Fig.6 Browser requesting for a webpage

    b) Web server will make a judgement on the request. Web

    server will transfer file directly to the client browser if the

    request is a static file, else Web server will activate the CGIprogram.

    c) Daemon of Web server create a sub process which sets

    environment variables that establishes two standard I/O data

    channels between the server and the external CGI process

    d) Web server startup the CGI program that URL specified.

    CGI program read and process client's input data through

    environment variables and standard input Stdin and calling the

    appropriate external program in accordance with the request.

  • 8/7/2019 Home Intelligent System

    4/54

    Fig.6.1 Webpage requested by the browser

    e) CGI will pass the result through the standard output Stdout

    to the server daemon after processing, and then daemon

    transfer results back to the client browser in HTML format.

    The above Fig.6.1 shows the web page that got displayed as a

    result of the request given by the web browser through the http

    address.

    VII SYSTEMTESTING

    The system is tested by enabling the connection betweenvarious modules as said in the previous discussion. The below

    Fig7.1 shows the real set up of the system. Ethernet controller

    is inbuilt in LM3S6965.This controller has Ethernet

    transformer HR961160C that can be connected to RJ45 port of

    a computer. Ethernet transformer minimises the loss of data

    transferred by the ethernet controller. Various sensors are

    connected to the controller in order to monitor the home

    environment. The setup as shown in the below Fig.7.1, will be

    placed at home. LM3S6965 will maintain a web server.

    Fig.7.1 Physical connection of the system

    The monitored information is sent to the webpage

    dynamically. The data in the server gets updated every 2

    seconds. Web pages in the server can be accessed only if the

    IP address of the server is known. Browser requests the web

    page through the http address.

    The below Fig.7.2, shows the web page requested by the

    browser. The web page in the Fig shows the current status of

    the home environment. It shows the current date, time,

    temperature in the home environment, any detection of fire at

    home, any gas detection and the current status of the door i.e.,

    it shows whether the door is closed or opened.

    Fig.7.2 Real Time Status of the home environment

    Home Environment icon in Fig.6.1, has a link that displays the

    screen (Fig.7.2) that has the output of various sensors. Thus

    from this screen, the user can monitor the home environment.

    Home control icon has a link that displays the page to control

    various home appliances. This control application is showed

    in the below Fig.7.3. The home appliance can be controlled

    through the web page.

    Fig.7.3 Real Time Control Of the home appliance

    Home details icon in the Fig.6.1, has a link to display the

    home details which include various appointments, medical

    records and various information about the family members.Any additional information required, can be added to this web

    page.These details should be updated by the member of the

    house manually. The below Fig.7.4 shows the home details

    maintained in the server.

  • 8/7/2019 Home Intelligent System

    5/55

    Fig.7.4 Screen shot of the web page showing home details

    From anywhere in this world, the user can view any

    information related to the home. In order to avoid unwanted

    people to view the details, password can be set.

    CONCLUSION

    A web-based home automation system was designed,

    implemented and tested. The system uses an off-the-self

    Stand-alone embedded system board that can monitor and

    control home appliances locally without the need for internet

    conductivity. Once the user decides to use the remote

    monitoring and control activities via the World Wide Web,

    he/she can enable the remote access software engine to allow

    remote access via the servers parallel port to monitor and

    control the appliances from any web bower. A software

    algorithm was developed using high-level languages to

    monitor and control the appliances locally or remotely. The

    system is scalable and new devices can be added with no

    changes to the core. The client interface is a simple home page

    with friendly Graphical User Interface (GUI). The system

    allows multi-vendor appliances to be added with no major

    changes.

    REFERENCES

    [1] Neng-Shiang Liang; Li-Chen Fu; Chao-Lin Wu; An integrated, flexible,and Internet-based control architecture for home automation system in the

    Internet era, Proceedings ICRA '02. IEEE International Conference on

    Robotics and Automation, Vol. 2, pp. 1101 1106, 2002.

    [2] J. C. Nunes and J. C. M. Delgado, An Internet application for home

    automation, Electro technical Conference, 2000. MELECON 10thMediterranean, Vol: 1, pp. 298 -301, 2000.

    [3] P. M. Corcoran, F. Papai and A. Zoldi, User Interface Technologiesfor Home Appliances and Networks, IEEE Transactions on Consumer

    Electronics, Vol. 44, No. 3, pp. 679-685, August 1998.

    [4] P. M. Corcoran and J. Desbonnet, Browser Style Interfaces to Home

    Automation Network, IEEE Transactions on Consumer Electronics, pp.1063-1069, November 1997.

    [5] N. Sriskanthan and Tan Karande, Bluetooth Based Home Automation

    Systems, Journal of Microprocessors and Microsystems, Vol. 26, pp. 281-289, 2002.

    [6] Wong, E.M.C, Phone-based remote controller for home and office

    automation, IEEE Transactions on Consumer Electronics, Vol. 40 No.1, pp.28 34, February 1994.

    [7] Ismail Coskun and H. Ardam, A Remote Controller for Home andOffice Appliances by Telephone, IEEE Transactions on Consumer, Vol. 44,

    No. 4, pp. 1291-1297. November 1998.

    [8] Chengyi Cui,Xiangjun Jiang,Study and Design of Embedded Web Server

    based on ARM9

    [9] www.Texas Instruments.com.

    [10] www.keil.com.