Professional Documents
Culture Documents
Abstract ...................................................................................................................................................... 2
Acknowledgement ..................................................................................................................................... 2
Introduction ............................................................................................................................................... 3
1. LabVIEW and Smart Home Control System ................................................................................... 3
2. LabVIEW Features .......................................................................................................................... 3
Project Requirement .................................................................................................................................. 5
Limitation and Assumption ........................................................................................................................ 5
Flowchart ................................................................................................................................................... 6
Server - Client......................................................................................................................................... 6
Protocol Design .......................................................................................................................................... 7
TCP/IP..................................................................................................................................................... 7
Control Interface .................................................................................................................................... 9
Indicator/Server Interface ..................................................................................................................... 9
Additional Features .................................................................................................................................. 12
Future Enhancements .............................................................................................................................. 12
Conclusion................................................................................................................................................ 12
Bibliography ............................................................................................................................................. 13
This project involves the development of Smart House Control System by using
LabVIEW as the platform. This project is built in purpose to use sensors to do the automation
and control the motors. This project is separated into two modules showing the client and server.
The client works as a remote control and the server works as the house.
Acknowledgement
First of all, I want to show my special thanks to my SPCC lecturer Mr. SEYED AMIR
HOSSEIN MOUSAVI for introducing LabVIEW and give the great knowledge on how to use
LabVIEW, so that I manage to finish this Smart House Project. I also show my gratitude to all
of my classmates, and my friends who have helped me so much in doing this projects. I really
appreciate the help and time from my lecturer and friends.
2. LabVIEW Features
LabVIEW has incorporated many function and feature in their application. Below are some
features of LabVIEW according to a university in Utah (University of Utah, 2008).
1. Global and Local Variables
In LabVIEW, Global variables is used when we need to manipulate data in several place.
It made us easier to manipulate the data and only need to define the data once. Global
variable can be used to write or read.
Smart Home Control System will be fulfilled by using LabVIEW because of its availability of
indicators and controls. For the virtualization of a smart home or server, we need at least a lamp,
door, curtain, and TV. For the remote, we need some button to controls the server. Then we need
to connect this two modules using a TCP/IP Connection. All of this requirement can be achieved
by using LabVIEW.
In this project, the server is based on virtualization only. This lead to some limitation that we
cannot do, like checking the temperature of a room. So we assume the temperature will up until
the normal temperature of a room which is 27°C when the AC is turned off.
We also assume only one user can logged in at each time so there is no collision of controls
between users.
Server Client
TCP/IP
In this project, we use a connection oriented or TCP/IP as our protocols and Client-Server as the
architecture. As stated by Beal, Client-Server architecture is a network architecture which a
computer become either client or server (Beal, 2002). Server is a powerful computer which
process any request from the client.
TCP/IP is a protocol that works like an addressing of house, but it address each computer and
device. IP consist of public IP and private IP. The difference is public IP is used to communicate
from one local area network to another, while private IP is used to determine the address of each
computer in that local area network. With the help of ports, a communication between each
application is possible while IP will establish a connection between hosts. A combination of IP
Address and Port Number is called Socket Address.
In the implementation of TCP connection in LabVIEW, we use our computer as both Client and
Server. So we put localhost or 127.0.0.1 as the address and for the port number, we can use
Dynamic ports which not controlled and not registered by IANA. Its range from 49,152 to
65,535.
In LabVIEW, we need to start the server first because server is always listening while client only
need to send data where needed only. Then the first thing to do in the implementation is assigning
an ID to each controls and send the length of concatenated ID with value, this will make a
flexibility of number of bytes that will be read on the server.
In the picture above, TCP Listen is used to open a service and continuously listen any incoming
request. We put the same number of port as the server which is 45000 and set the wait time to
-1 or forever. TCP Read is used to ready byte of binary and give the output in the form of string
We use 2 TCP Read because the number of bytes sent for ID and value is different for each case.
So we create the first TCP Write to send the length of string and the first TCP read to get the
number of string length for the second TCP Read Bytes to Read input. The received string then
will be split into ID and value. ID is for the case structure while the value is for changing the
indicator state.
Figure 1. This control in client shows login page and the tab control for each floor.
Indicator/Server Interface
1. Garage in Server Front Panel:
Figure 2. Garage in Server will open and close when the button switched.
Figure 3. This picture show the level 1 floor (38 indicators can be controlled)
Figure 3. This picture show the level 2 floor (16 indicators can be controlled)
Future Enhancements
1. Control enabled via web server
At future, it is possible to deploy the control interface into a webserver via a forwarded
IP and port. This feature will have much advantages, one of the example is checking IP
camera by logging in into their control interface.
2. Motor sensor and other sensors.
A Motor sensor can be used to automate light on or opening a door when a user enter the
corresponding room. Some sensor like rain sensor also can be used to automate curtain
closed when raining. Then temperature sensor to automate Air conditioner.
Conclusion
By using LabVIEW, automation can be achieved easily and more flexible. Smart Home
Control System is one of the example of automation in home. It also enables the user to control
their home with only by remote or by their own device.