spcc documentation

39
Home Control System 2012 ABSTRACT We have been constricted to build up a Smart Homer Control System for new housing developer. As we all know that The Smart Home Control System is the part of the package for the home owners. The system is functioned in such a way that it is expected to control the assorted devices in the house and will be having central control keypad, through TCP/IP connections. ACKNOWLEDGEMENT We would like to thank lots of people for their support in this assignment. Firstly we would like to thank our lecturer for her support, compassion, and lastly her supervision on teaching us the program which was later used to develop this submission. Individual thanks should be given to our classmates who helped us with their assistance. We as group members were very co-operating and hardworking; we shared a lot of knowledge together and had a good experience in making this application. Lastly, I will finish up by saying that Google and YouTube helped us a lot in learning few unique techniques which we used to develop this application. 1 | Page

Upload: kumar-dzhunushaliev

Post on 23-Nov-2015

329 views

Category:

Documents


8 download

DESCRIPTION

Smart Home System,Asia Pacific UniversityNational Instruments LabView

TRANSCRIPT

Home Control System

Home Control System 2012

ABSTRACTWe have been constricted to build up a Smart Homer Control System for new housing developer. As we all know that The Smart Home Control System is the part of the package for the home owners. The system is functioned in such a way that it is expected to control the assorted devices in the house and will be having central control keypad, through TCP/IP connections. ACKNOWLEDGEMENTWe would like to thank lots of people for their support in this assignment. Firstly we would like to thank our lecturer for her support, compassion, and lastly her supervision on teaching us the program which was later used to develop this submission.Individual thanks should be given to our classmates who helped us with their assistance.We as group members were very co-operating and hardworking; we shared a lot of knowledge together and had a good experience in making this application.Lastly, I will finish up by saying that Google and YouTube helped us a lot in learning few unique techniques which we used to develop this application.

Table of ContentsABSTRACT1ACKNOWLEDGEMENT1INTRODUCTION3Features of Laboratory Virtual Instrument Engineering Workbench4Advantages of Home Control System5REQUIREMENTS OF DEVELOPING LANGUAGE5System Design6Protocol Design8Hardware Sensor/Devices14Critical Evaluation20Conclusion21APENDIX22Screen Shots:23Workload matrix:33Reference33

INTRODUCTIONLaboratory Virtual Instrument Engineering Workbench is different from other traditional programming languages such as Java and C programming. It is a graphical programming environment in which the applications are made using graphical notations.Laboratory Virtual Instrument Engineering can be used on various platforms such as Windows, Mac OS, Linux, Palm OS, Microsoft Pocket PC and Professional Android platforms, It also has a very elastic platform.Laboratory Virtual Instrument Engineering Workbench is supported by Virtual Instrument which basically, is the program running inside Laboratory Virtual Instrument Engineering Workbench, Virtual Instruction is intended to work on different platformswhich make its transfer very easy between different operating systems.Focusing on this project, we have given to develop a Home Control System Application using Laboratory Virtual Instrument Engineering Workbench. As the floor plan of the project has already been provided so we came up with a conclusion to design the home control system with the same plan. The user will be able to control almost all the device in home remotely.It is very much possible to develop these systems using Laboratory Virtual Instrument Engineering Workbench and without using any traditional codes.The system has been prepared in two main modules which are Client (Home System Controller) which provides the input interface from the user and Server (Home Design Plan) which is used to process and give a result as an output to the user by simulation. The above two explained modules are connected through TCP/IP networks. Following are the device which can be controlled by the system, lights curtains doors temperature alert system ACs Also Video Player and Web Browser will be built-in.Features of Laboratory Virtual Instrument Engineering Workbench

1. GLOBAL AND LOCAL VARIABLES:-When the data value needs to be manipulated in several VIS global variable comes in handy. One of the main advantages of using the global variable is that you only define data type once only.It can then be read from or written to in multiple Vis. But the use of the global variable is considered as the poor programming practice as they hide the flow of your application and create more overhead.Measurement result is a control being used in this VI.The result of the additionis being passed to the local variable of Measurement Result. Local variable can also be created by popping up on an indicator terminal or on a control as well as selecting Local variable from the create submenu.2. CUSTOMIZING CONTROLS:-Indicators and control can be saved, reused and also be customized in different VIs, which allows you to modify the built-in controls and indicators to accommodate your applications.This section describes the procedure for creating custom controls and type definitions.3. TYPE DEFINITION:-A type definition basically allows you to set the data type of a control which can also be saved to use in other VIs. If you want to the change the data type wants it to reflect in several VIs this may be very useful. The data type can be control and define from one location in type definition. When using cluster and enumerated type, Type definition is proven to be very practical. You will be only needed once to add items to these controls.Default values cannot be updated from a type denition.4. ATTRIBUTE NODES:-Attribute nodes are used for setting and getting attributes of a control or indicator during program execution. Attribute nodes provides the ability to change the location, appearance and other attribute programmatically, also with a remarkable amount of suppleness while designing and coding your application.Advantages of Home Control System Remote access application. Supports authentication on server side for greater security. Uses Secure Hash Algorithm to hash users credential data like passwords. Stores Login details and displays.REQUIREMENTS OF DEVELOPING LANGUAGEThe figure below shows all the Operating Systems which laboratory virtual instrument engineering workbench supports:

Two different modules are required in this project to communicate with each other so that they are controlled remotely; these two modules basically use sockets to communicate. A socket is a combination of port number and IP address. Client requires servers IP and its port number for these modules to communicate.To detect any request from the client server with an IP address and specific port number, the other server is active and always has to be active, after this; if necessary the other server replies back an output to the client server. By using Laboratory Virtual Instrument Engineering Workbench this task has been successfully completed. This program is having a good potential of carrying out mathematical calculations from a very basic level to high level formulas, It also supports Booleans, String and Integers.

System DesignServer Flow Chart

Client Flow ChartProtocol DesignTCP/IP Communication in LAB VIEW (Laboratory Virtual Instrument Engineering Workbench)TCP/IP also referred as Transmission Control Protocol/Internet Protocol allows the users to communicates and connect over unified networks (network of a network/Internet) and single networks. TCP/IP is one of those communications which provides friendly user interface to users that in some way eases the process of connecting and ensuring authentic communication with the network between two or more systems.In LABVIEW 2010 to access TCP/IP functions,you have to go under Functions Menu, select Data Communications and then Protocols, there you will see TCP palette for TCP communications.The computer can act either as the client or the server on the same machine with the help of this communication; it uses the local host IP Address of the machine.The figure below shows different models of TCP/IP communication:

1. TCP OPEN CONNECTION

TCP open connection successfully helps the user to establish networks connection with the address and service name.

Address: it is the address with which you want to establish a connection.Remote port or service nameaccept only a numeric or a string input.Timeout ms: It determines the time, in milliseconds, for the function to write bytes to a device before the function to completes and return an error.Error in: checks the error conditions that occurs before this node runs.Local port: it is the local connection port.Connection ID out:returns the same value as connection ID.Error out: have the error information.

2.TCP write

TCP writes make possible for the user to write data over the TCP network connection.

Connection ID: is a network connection that uniquely identifies the TCP connection.Data in: contains the data you want to write to the connectionTimeout ms: Its determines the time, in milliseconds, for the function to write bytes to a device before the function to completes and return an error.Error in: checks the error conditions that occurs before this node runs.Connection ID out:returns the same value as connection ID.Bytes written: is the number of bytes the VI writes to the connection.Error out: have the error information.

3.TCP Read

TCP read reads the number of the bytes from a TCP network forwarding the result in data out.

Mode: indicates the behavior of the read operation.Connection ID: is a network connection that uniquely identifies the TCP connection.Bytes to read: reads the number of the bytes.Timeout ms: It determines the time, in milliseconds, for the function to write bytes to a device before the function to completes and return an error.Error in: checks the error conditions that occurs before this node runs.Connection ID out:returns the same value as connection ID.Data out: have the data that reads from TCP connection.Error out: have the error information.

4.TCP close

TCP close closes an existing TCP network connection.Connection ID: is a network connection that uniquely identifies the TCP connection.Error in: checks the error conditions that occurs before this node runs.Connection ID out:returns the same value as connection ID.Error out: have the error information.

5. TCP listens

TCP listen creates a listener and for valid connection at the port specified by the user.It has the following outputs; Connection ID. Remote address. Remote port. Error out.

Hardware Sensor/DevicesIn order to get the home control system working in real world the following hardware devices/sensors should be implemented:1. Sliding doors:-To make it possible for the user to open/close the doors from the distance the sliding door or similar door are required. Sliding door because the user may keep the open for a certain periods of time before it automatically closes.The opening and the closing function of the sliding doors is motorized by the use of the optical and motion detection sensors.These sensors are mounted over the automatic door or are integrated into the door framing from above or the side. Depending on the style of the door or application the automatic doors can be hung or installed in several ways. The Image below shows the one of the motors used to automatically open/close the door.http://image.made-in-china.com/2f0j00iBjtGdKarCbs/Sliding-Door-Mechanism-HH180-.jpg

http://www.freemanmarine.com/_images/20040520_DualAxisGraphic.jpg

2.CENTRALIZED AIR CONDITIONThe user can control the temperature of the house or certain number of rooms from just one or two controllers by central A/C. The figure below shows how central A/Cs and their controller look.

http://www.amana-hac.com/Portals/1/AMN_HowAC.jpg

3. ALARM SYSTEMTo make the alarm system more successful we can execute various numbers of sensors and devise depending on the user requirement and lifestyle. The number of sensors and devices implementing can be Intercom, Motion sensors, Siren and strobe lights, duress code, etc. Moreover, we can also place the sensor like smoke detector to save the house from hazards and accidents.The below image show some of the sensors mentioned below:

http://www.toptenz.net/wp-content/uploads/2011/04/Smoke-Detector.gif

http://www.sciencelearn.org.nz/var/sciencelearn/storage/images/contexts/just-elemental/sci-media/images/smoke-detector-operation/174268-1-eng-NZ/Smoke-detector-operation_full_size_landscape.jpg

4- ELECTRICAL CURTAIN RAILSElectrical curtain rails are required to make it possible for the user to open or close the curtains from a remote location. The image below demonstrates exactly how this the electric curtain rails work.

http://www.electriccurtain.org/2010/05/goelst-electric-curtain-rail-model-6200/

Critical Evaluation

1. SECURITYUser convenience and security are the two main aspects while developing this Home Control System, we have mentioned below the few advantages of using LABVIEW (Laboratory Virtual Instrument Engineering Workbench)1. LABVIEW has clear text, proper design and meaningful icons which designate their purpose.2. For security purpose SHA1 also known as Secure Hash Algorithm has been used to hash the password before it is sent to the systems database.3. All data is legitimate within the sever for security purposes.2. SYSTEM LIMITATIONSAs we keep going creating this program we discover that LABVIEW has few limitations as well which are mentioned below:1. The system cant be executed in real life mechanism as it is the simulation programming software.2. It can be fully used by those who have the certain amount of knowledge about the software.3. This Home Control System cant be used through internet, for instance lets say a browser.3. FUTURE ENHANCEMENTSSeveral characteristics are supposed to be included and put into action in this home control system. Few of them are listed below:1. The Home Control System should have the facility to support access via internet so that the system can be controlled from a relatively long distance.2. Audio/video features can be added for user accessibility.3. Put into action the usage of this application through cellular devices.

Conclusion

Closing up, our Home Control System software can be regarded as a pleasing product.Almost all the requirement and tasks of this project has been fulfilled, although there are minor logic errors.Update, Read, create and delete the basic database functions are operating perfectly in all controls such as the lights, curtains, doors, temperature and alert system.The system has been designed carefully considering security as one of the main criteria. The use of Graphical User Interface made it very easy for the user to use the system.

APENDIXTo make it understand for the user, we have provided our user with a step to step guide on how to use our Home smart control system The step can be diversified into various tabs based on their functions. Those tabs are Door controls, Lights controls, Curtain controls, Television Controls and Management Controls. Various other tabs are also found in some tab and they are labeled according to their functionality to easy the usage of this particular application. Main functions of these tabs are as follow:- Tab controlThese are two tabs one for ground floor and one for level 1. If you are willing to control Ground level, Press on the Ground level tab or otherwise you can press on level 1 Door control Press/tab the switch to unlock the door in the server side. Press/ tab the switch again to lock the door. Curtain control Use the slider to control the size of the curtain closure in the server side. Press/tab the switch for the auto-slide the curtains Light ControlPress/ tab the switch to turn on the lights in the server side. Press/tab the switch again to turn it off Television controlTab the appropriate labeled switch to turn in the TV ON/OFF, play, Pause and stop. Choose the channel using drop down list/ combo box-like control. Use the slider to control the volume of the television.Screen Shots:

Workload matrix:

********************

System Application

Level-060%15%10%15%

Level-120%10%60%10%

Video100%---

Browser and Login100%---

Documentation10%70%10%10%

Reference

Boca Raton. (2001). LabVIEW Advanced Programming Techinques. Available:http://www.physics.utah.edu/~bergman/3620-6620/supp/LV_Adv_Prog/2049ch02.pdf. Last accessed 10-Dec-2012.TCP Listen VI. (-). TCP Listen VI. Available:http://zone.ni.com/reference/en-XX/help/371361H-01/lvcomm/tcp_listen/#Output3. Last accessed 10-Dec-2012.

32 | Page