Documente Academic
Documente Profesional
Documente Cultură
This assignment is given to develop an entire view of Smart Home Control System by using
LabVIEW. Using the dedicated programming knowledge and implement it into the LabView
which known as the graphical programming software. The Smart Home system will function
in a way which is expected to control all the assorted devices in home by using a central pad
which contains all the control on it. The central pad will be connected to all the sensor and
associated device by using TCP/ IP connections.
Acknowledgement
This Smart Home system is the produce of continuous and academic provision from numerous
resources and people. As the developer of this system, I would like to express deepest gratitude
to the people who provided their support and guidance to help me complete this project.
In the beginning, I faced some difficulties in the initial stage of this assignment. I would like
to thank my module lecturer who provide constant encouragement and guidance to me. My
module lecturer has teach us the knowledge in LabVIEW programming and also inspired me
to complete this assignment in the given time frame. The recommendation given by lecturer
helps me to accomplish a good quality system.
I am fortunate that, I had a kind friend who also guide and assisted me in the system developing.
We do the assignment together by exchanging the ideas and teach each other in different field.
Also, I would like to thank Google and YouTube that helps me learnt various of new technique
and ideas to develop this system.
Introduction
Smart Home
A home is a place where one lives permanently, especially as a member of a family or
household. Home automation or Smart home is building automation for the home. It involves
the control and automation of lightning, temperature, ventilation, air conditioning and security.
A convenient home setup where appliances and devices can be automatically control remotely
from anywhere by using mobile or network device. A smart home has its devices
interconnected via Bluetooth or internet, which enable people to control the device under the
coverage of connection. Some control function such as security access, lights, refrigerator can
be controlled though one home automation system. (Anon., 2016)
Figure 1shows the devices or appliance that can be controlled using smart home automation system
Internet of things
Internet of things(IoT) is a interconnection via internet of computing devices embedded in
everyday objects, enabling send and receive data. This is the concept of basically connecting
any device with an on and off switch to the Internet. It includes everything such as smartphone,
heart monitor, alert sensors, lamps, wearable device and almost anything else can think of. The
development of internet of things in the future is established on “Anything that can be
connected will be connected”. This can make people life much easier for example, office
equipment knew when it was running low on supplies and automatically re-ordered more, a
sensors built-in to alert driver when the tire pressure is low. (Morgan, 2014)
IoT systems have applications across industries through their unique flexibility and ability to
be suitable in any environment. It can enhance data collection, automation, operation and more
through smart device and powerful enabling technology. (Anon., n.d.) As far as the reach of
Internet of Things, there are more than 12 billion device that can currently connect to the
Internet. And researchers at IDC estimate that bt 2020 there will be 26 times more connected
things than people (Stroud, n.d.)
Figure 3 shows the development scope of Internet of things
Project requirements
The requirement of this project is to create a Smart Home Control System to be installed in
house using LabVIEW programming language. This Smart Home Control System can let the
user control the home appliance by using the controller in LabView. The system consists of
two module which is main module and the second module connected to it using TCP/IP
connection. The main module basically is the user interface which is the controller that interact
with user. The second module is to receive the user controls from the first module using TCP/IP
connection.
I have used the LabVIEW software to build a Smart Home Control System to control home
appliances. The requirements of this project are to build a Smart Home Control System that
has various devices such as curtains, television, lights and doors which can be controlled by
the system. It is also has some additional functions such as power usage indicator, temperature
indicator to display the important message to the user. The interface of the server is illustrated
by the floor plan given to the developer.
Require parts and type of Sensors
This Smart Home Control System prototype is designed to assisted users daily home appliance
control which can be implement in the real life. In order to implement this system in real life,
some parts and sensor are required. According to the research, the parts and appropriate type
of sensors that can be implement in the Smart Home Control System are in below.
The Home Automation platform shown above consists of a Raspberry Pi device that is the brain
in the Home Automation platform. In addition, we have multiple Arduino devices sensor to
make sure to get data from different home appliance located in the home. (Technology, n.d.)
Raspberry PI
Using the Raspberry PI connect to the LabVIEW Smart Home System Control, and connect all
the sensors and appliance through TCP connection, user can access the Smart Home system by
using network. The home appliances like light, door lock, air conditioning, curtain are able to
be control through a web interface or a smartphone application. (Hacking, 2014)
Relay Circuit
Temperature Sensors
The temperature sensors are required to the Smart Home Control System to measure the
temperature in order to mention the current temperature to the users. The most common
temperature sensors are thermocouples, resistance temperature detectors and thermistors. The
sensors that I choose for this Smart Home system is the Thermocouples. Below figure shows
one of the sample Thermocouples. (Instrument, 2017)
Figure above shows the sample voltage sensor. This voltage sensor can use to sense or identify
and react to electrical signals. By connecting the sensors to every home appliances and connect
it to a Raspberry Pi and with dedicated LabView Program, the Smart Home Control System
can monitor the power usage and give advice to the user to lower the energy consumption once
it reach certain limit. (DX, n.d.)
Light Switch
Figure above demonstrate an example or light switch. By connecting this with the LED or light
bulb and connect to the Smart Home System Controller, the light switch ON/OFF function will
be successful implemented. Using the LabVIEW software to create dedicated light ON/OFF
controller, each time user press the button in the controller, the light will be turned ON, press
the button again the light will turned OFF. It also debounces the input, without which pressing
the button once would appear to the controller as multiple presses
Figure above shows the sample of smart door lock used to create the automation door. This
switch is mounted on every door in the user house and connecting this door lock to the Smart
Home Control System can enable the user can open and lock the door by simply pressing the
specific door button on the Smart Home Control Panel.
Curtain Motor
Figure above shows the curtain automation motor. By connecting the curtain motor to the Smart
Home System, user can open or close the curtain by simply press the curtain button in the Smart
Home System Controller.
System design
Storyboard Design
Flow Chart
Smart Home Control System (Client Site)
Start
Login
Access File
Display Error
Verify Username
Display Admin Page Admin Verify UserType True False
and Password
User
User Registration
Light Control
Display Smart Home
Control System
Input New
Username and Establish TCP
Password Connection
Door Control
Transmit input
Display Data/ Signal
Air Conditioner
Register Read User Input
Control
Successfull
Television Control
Stop
Curtain Control
Server Site (Receive Transmitted signal)
Start
Read Signal
Display
Error
True
Change Value
Light Control Display
Read Bytes Data Error
Curtain Control
If Value
False
Display Check Bytes Door Control Match
Not Match
Error Data
Air Conditioner
Control True
Match
Login
Login
Light Control
User <<extend>>
<<include>> Admin
Smart Home
<<extend>> Cutain
Control System Register New
Control
<<extend>> User
<<extend>>
<<extend>> Door Control
Air Conditioner
Television Control
Control
Activity Diagram
Implementation (System Design)
Login
At the beginning of the code, I use the Read Delimited Spreadsheet to read the text in the text
file and use the index array function to specify each column of text. When it comes to the while
loop, I use the login username to compare with the dedicated password which is in column 1.
And when it is true, then display login success and show the Smart Home control panel. For
the user type, it will check with the column 2 with the username to specify the user type. When
the user is admin, it will display the admin tab to enable the admin registration function.
Registration
In the registration function, the system will get user input using String control. Admin who is
the only one who register the user, need to input the user’s username, password and user type
of the particular user. After that, I use the build array function to insert the username, password
and user type into a 3-dimension array, and follow by a Write Delimiter Spread sheet to write
the array into the specific text file.
Smart Control Panel
Figure above shows the overall view of the Smart Home Control Panel. I put every Home
appliance control in a single tab. I doing this is by considering letting the user can easily view
and have access to each and every function of the Smart Home Control System in a single page
and it is also more clean and tidy.
Light Control
Figure above shows the code of the Light button in both Client and server site. For example,
when the user clicks the Kitchen Light button, the system will transmit a specific String which
is “KITL/T” or “KITL/F” to the server site. Follow by, the server site will forever wait for the
transmission, and when the data signal reach the server site, it will identify the signal and
compare the data signal in a case structure. When it is True the system will turn on the light,
and when it is false, the light will be turn off.
Curtain Control
Figure above shows the code of the curtain button in both Client and server site. In the
beginning, when the user clicks the curtain button, the system will transmit a specific String
which is “L2BC/T” or “L2BC/F” to the server site using the TCP connection. And when the
data signal reaches the server site, it will identify the signal and compare the data signal in a
case structure. When it is True the system will open the curtain, and when it is false, the curtain
will be close.
Door Control
Figure above shows the code of the door button in both Client and server site. When the user
clicks the Bedroom 2 door button, the system will transmit a specific String which is “BD2D/T”
or “BD2D/F” to the server site using the TCP connection. And when the data signal reaches
the server site, it will identify the signal and compare the data signal in a case structure. When
it is True the system will open the door, and when it is false, the door will be close.
Power Usage indicator
Figure above shows the Power Usage indicator of the Smart Home Control System. This is the
additional feature that I provide for the Smart Home system. This function will work when the
user turn on the light or Air conditioner, it will automatically add the voltage consumed and
indicate to the user using the power meter and the power usage bar. In addition, when the power
usage reach above 65, and the system will display a red LED light to tell the user to lower the
power to save electric.
Temperature indicator
Figure above shows the Temperature indicator and the Air conditioner control button. In real
life, the temperature will sense the current temperature and display it on the thermometer in the
Smart Home System Control panel. When the temperature is above 35 Celsius the system will
indicate the Temperature is high. Then the user can open the Air conditioner by the AC button
beside the thermometer to lower the temperature.
Television
Figure above shows the television control panel in Smart Home Control System. The user can choose
between Channel 1 and Channel 2 button to change the channel, and use the button below to
control the video.
Figure above shows the Play button code in the client site. When the user press the play button, the
system will transmit a specific String which is “TVPL/T” or “TVPL/T” to the server site by TCP
connection.
Figure 31 shows the play button code on the client site
Figure above shows the Play button code in the server site. When the server receives the play
button data signal from the client site, the system will open the Windows Media Player and the
Property of “Height”, “Width” and “stretch to fit” will fix the boundary of the Windows Media
Player, to let the video remains in the same resolution.
The Time and Date Indicator will display the current time and date to the user.
Protocol design
TCP/IP
As the Smart Home Control System requires data connectivity between the control panel and
the server module, I decided to use TCP/IP to establish the communication between this two
modules. The reason for choosing this type of connection is because TCP/IP are suitable to
private network to enable the interconnection between Smart Home controller and the home
appliances.
Figure 34 shows the TCP open connection on the Smart Home Controller
As figure above shows, To establish the TCP connection, 3 types of TCP will be used. There
are TCP Open Connection, TCP Write and TCP Close Connection. TCP Open Connection will
open the connection by setting the port number and the timeout ms. The port number is to
identify the unique connection port to send and receive signal. TCP write will write the data
according to the user input that need to be stored in memory and send it to the server site to be
initiated. TCP Close Connection will close the communication between the two model, as the
connection is closed, the data that stored in the memory will be automatically deleted.
Server model
Figure above shows the TCP connection on the server site. There are three types of TCP that
will be used in server model which are TCP Listen, TCP Read and TCP Close Connection.
TCP Listen will listen to the signal that have the same port number. If there is a signal by 5000
port number which the diagram above shows, the TCP listen will relay to TCP Read. TCP read
will read the signal and the Match Regular Expression will compare the signal(data) to perform
the action. Lastly, TCP Close Connection will close the connection.
Limitation
As all the things have pros and cons. There are few limitations of the Smart Home System
Control that will need to improve in the next development.
Light
For the Light control, the system can only turn the light on and off, and there is no controller
to provide the adjustment to the user to change the brightness of the light.
Curtain
For the curtain, the system only allowed one control at the single time. It means that it takes
times to open the curtain, and in the opening process, the user cannot control the other curtain
to be open and close.
Door
For the door function, it does not include the emergency close function which can press a button
and all the entrance will be lock at the moment.
Air conditioner
The Air conditioner can be only turn on and off but the Smart Home Control System. It does
not provide the control to adjust the Air conditioner.
Enhancements
The Smart Home Control System is a huge system which include in wide range. Because of
this, the developer required more time to implement more function into the system to make the
system become more functionality and efficiency. It also takes times to collect user
documentation, which can only apply the user recommendation in the next system update. The
first enhancement of the Smart Home Control System is to implement a online system into it.
It can enable the user to connect the system through the internet and can be access wherever
they are. This can make the user have much more flexibility to use this Smart Home Control
System. Besides, the system can be update to adapt more type of user and provide the privacy
and security access according to the priority level to each type of user. For example, the
children can only access some specific control of the system but not the control of whole system.
In addition, the system can be update to enable the biometric login. For example, if the use
smart phone which provide fingerprint sensor, the system will be allowed the user to use the
fingerprint sensor to login and get access to the Smart Home Control System.
Conclusion
In conclusion, the Smart Home Control System which is part of The field of Internet of
things(IoT) has been continuously develop in extreme speed. This kind of technologies can be
implement in daily’s life to helps people to achieve the automation of the home devices. This
can help users to connect and have control to home electrical device by using a portable device
like smart phone, which mean they can connected them to their home wherever they are. User
can control the home appliances by login into the system. This system is consisted of several
controls for example light, curtain, door open control and the television control. All of these
control work together as an application with the control of LabVIEW software. Besides,
LabVIEW provided the graphical user interface(GUI) which allowed user to easily learnt and
get used of this system. In future, this system can have continuously enhanced to perform more
efficient and also add some new control into it. The enhancement of the system is important to
let the users to interact with the system effortlessly.
I have learned numerous of virtual programming skills by using LabVIEW to develop a system.
Virtual programming is making the developer much easier to develop a system. At the end, I
am very grateful to have this module to help me learnt the things that I interest in.
User Manual
Login Page
The login page allowed user to type in the username and password to login to the system. User just
should type the username and password and press the login button to login to the system. The LED
light will become red when the Username or password is incorrect.
Smart Control Panel
When the user successful login to the Smart Home Control System, The Smart Home System
Tab will show up. In the Smart Home System tab, it contains 2 tab which is Smart Control and
Television.
Light Control- press each light button to turn on or off the light.
Curtain Control- press the curtain button to open or close the curtain.
Door Control- press the door button to open or close the door
Air Conditioner Control- press the AC button to turn on or off the air cond.
Power usage and Temperature indicator- Display the current power usage and temperature
to the user.
Date and Time indicator- Display the current date and time to user.
Entrance door indicator- LED will turn red to indicate the user that the entrance is open.
Television Control
In the television control panel user can access each control by simple pressing the buttons.
Channel 1 button- Open Channel 1.
Channel 2 button- Open Channel 2.
Play button- Play the video of the channel selected.
Pause button- Pause the video.
Stop button- Stop the video.
Back button- Fast Backward the video.
Forward button- Fast Forward the video.
Skip Back button- Skip back to the previous channel.
Skip Forward button- Skip back to the next channel.
Volume adjuster- Adjust the volume of the video.
Rate adjuster- Adjust the rate of the video.
Mute button- Mute the system.
Admin Page
When the admin login to the system, the admin page will show up. Admin can register new
user in this page by simply type in the User’s username, password and select user type and
press the register button.
Lab Exercise
Lab 1 (Calculator)
Lab 1a (Convert Degree Celsius to Fahrenheit)
Lab 1b (Basic Calculation of 2 numbers)
Lab 2a (Convert degree Celsius to Fahrenheit)
Lab 2b (Power meter and LED light indicator)
Lab 3a (Traffic Light)
Lab 3b (Junction Traffic Light)
Lab 4a (String length, Concatenated String, Array Size and Boolean LED
Button and Light)
Lab 5a (Client site, Button to turn on and off the LED light by using TCP
connection. Button place on the other module With TCP Listen and Read
function)
Lab 5b (Server site TCP connection, Receive the signal sent from the Client
site and turn on or off the LED lights)
Lab 6a (Input the text into text file using the input text bracket and call the
text in text file out display in the output text bracket.)
Lab 6b (Basic user login and register)
Lab 6c (User register and login with table showing the data in the text file)
Lab 7a (Customize the icon of the button)
Lab 7b (Client site, Connecting the button through TCP connection)
Lab7c (Server site, receive the TCP connection from the Client site)
Lab 8 (Television)
Gantt Chart
Marking Scheme
2. User interface 15
3. Software running without error. (ie. No runtime errors, syntax errors etc.) 10
7. Presentation 20
Total 100
References
Anon., 2016. Smart Home. [Online]
Available at: http://www.investopedia.com/terms/s/smart-home.asp
DX, n.d. DIY Electronic Bricks Voltage Detection Sensor Module for Arduino. [Online]
Available at: http://www.dx.com/p/diy-electronic-bricks-voltage-detection-sensor-module-for-
arduino-board-blue-green-331542#.WZvDYD6g_IU
[Accessed 2017].
Hacking, D., 2014. Web Based Automation For Your Home with Raspberry Pi!. [Online]
Available at: https://diyhacking.com/raspberry-pi-home-automation/
[Accessed 2017].
instrument, n., 2017. How to Measure Voltage, Current, and Power. [Online]
Available at: http://www.ni.com/white-paper/8198/en/#toc3
[Accessed 2017].