Home Automation Using Labview
Home Automation Using Labview
Home Automation Using Labview
1 Introduction
1.1 Introduction
With the development of new electronic technologies and their integration with older,
traditional building technologies, smart house is at last becoming a real possibility. The Smart
House Project is initiated in the early 1980’s as a project of the National Research Center of the
National Association of Home Builders (NAHB) with the cooperation of a collection of major
industrial partners. Smart House is not a new term for science society but is still far more away
from people’s vision and audition. This is because recent various works have been done in
designing the general overview of the possible remote access approaches for controlling devices
or in cases simulating the Smart House itself and designing the main server the design and
implementation of an off-the-shelf Smart House remote control application has been limited to
simply the computer. Now-a-days, home automation are being exercised intensively as to setup
standards for building efficient smart home suited to custom and regional requirements. When
the person is not available in home it is not necessary to turn on and off the electrical appliances
manually. At prevents the wastage of electricity [1].
1.3 Motivation
Smart home management has always seemed like a futuristic paradise. When entering the
room, lights turn on, fans that activate when the temperature is too high, entire rooms changing
its ambient at specific hours or when presence is detected, anyone you tell about these things
1
think it’s a future, unreachable perfect home. But they are all wrong. This kind of devices
Probably, because of how hidden these devices are from the daily markets. A single look to
any of these technologies’ web page will show us how easy, and yet not expensive, customizing
in homes, adding controllable elements to it. But there is still a big concern about these devices:
How to control? Which is in the market for decades. People have been building their own ideal
home over the last years. Then, why is this still a “future” topic? It is obvious that there is still
a lot of work to be done in the area. The most important thing is to get the people know about
these technologies, and make their control as simple as possible, while still offering a good
amount of customization. Maybe one of the most interesting topics about these technologies is
to get a centralized, technology-independent system from which anyone can control their
home. It must be simple, intuitive, yet powerful and solid. Lab VIEW is selected for the project.
It is easy and convenient language. It is some time called G language developed by National
instrument NI. As a reason of drastic developments in the field of wireless communications
these days, the applications of this technology can be used in various sectors for making daily
tasks comfortable and easy. One such application can be used for control of electrical
appliances which results in effective and efficient use of electrical power reducing the loss.
This area has yet to be explored in major parts of the world. So we would like to take this
opportunity to put forward a cost effective method for the wireless switching of the electrical
appliances [2].
2
1.5 Objectives
The main objective of this paper is to increase the accuracy and speed of thesystem and to
monitor the internal lighting system , external lighting system , temperature system
andsecuritysystem .The mainaimof thedesign provided in this project is todevelop asystem to
have wireless tcontrol of home electrical appliances .The device can be made sure to be
available at a low cost so that everyone can afford it. This is basically a device built for home
appliances control system that can provide remote access to house hold electrical appliances at
low cost and in efficient way. The electrical devices connected in the home,office or any place,
consume electrical power,and there isan absolute necessity of saving of power as per present
day situations . Smart home automation has been developed to automatically achieve
someactivities performed frequently indaily lifeinorder toobtain more comfortable and easier
life.Smart home system has introduced to achieve following goals.Maintain and provide high
standard security to home and office.Save electricity and use
natural resources in a convenient way.
1.6.1 Reliability
Reliability is one such factor that every electrical system should have in order to render its
services without malfunctioning over a long period of time. The proposed system has developed
to keep in mind the energy crisis in Pakistan.
1.6.2 Cost
The design is implemented at a very economical price. The total cost incurred by us in
designing this kit is very less and further we have developed the Lab VIEW based Home
Automation which is more economical rather than just interfacing those which are readily
available in the market.
3
1.6.3 Applications
The application includes remote controlling of home appliances and lighting systems in an easy
way. Also, home security and monitoring can be achieved. Can easily be install in in office and
home. And maintain and operated easily.
1.6.5 Goals
The most important goals of home automation are to provide convenience for the owner.
Additionally, value can be realized by using automation to save energy and to provide security
and peace of mind. Finally, we all appreciate the fun and excitement of experiencing the latest
technology in our home or business. While there are many home automation solutions
available today, they vary widely in terms of affordability, reliability and most importantly
with their ability to withstand the all-important test of time. It is true that everything you install
today will at some point in the future be considered obsolete. There are steps, however, that
you can take to minimize this undesirable consequence. It all starts with the creation of a
realistic vision for your project.
4
1.7.2 Six Channel Arduino Relay
The Arduino Relay module allows a wide range of microcontroller such as Arduino, AVR, PIC,
ARM with digital outputs to control larger loads and devices like AC or DC Motors,
electromagnets, solenoids, and incandescent light bulbs. This module is designed to be
integrated with 6 relays that it is capable of control 6 relays. The relay shield use one QIANJI
JQC-3F high-quality relay with rated load 7A/240VAC,10A/125VAC,10A/28VDC.The relay
output state is individually indicated by a light-emitting diode [3].
5
1.7.5 Buzzer Alarm
A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical,
or piezoelectric (piezo for short). Typical uses of buzzers and beepers include alarm
devices, timers, and confirmation of user input such as a mouse click or keystroke [3].
1.7.6 Dht11 Temperature Sensor The digital temperature and humidity sensor DHT11 is a
composite sensor that contains a calibrated digital signal output of temperature and humidity
. The technology of a dedicated digital modules collection and the temperature and humidity
sensing technology are applied to ensure that the product has high reliability and
excellent long-term stability .The sensor includes a resistive sense of wet component and an
NTC temperature measurement device , and is connected with a high -performance 8-bit
microcontroller . The schematic diagram of the Humidor Sensor Module. Only three pins are
available for use: VCC, GND, and DATA. The communication process begins with the DATA
line sending start signals to DHT11, and DHT11 receives the signals and returns an answer
signal.
6
CHAPTER 2
2 LITERATUREREVIEW
2.1 History and Background
Now-a-days there is huge advancement in communication sector, almost everyone have access
to mobile phones and Laptop thus the world has indeed become a global village. At any given
moment, any person across the world can be contacted with the help of a mobile phone.
Computer can not only be used for the calling and sending SMS but also new ideas can be
generated and techniques can be developed from it that can further enhance its capabilities.
There are huge technological advancements in wireless communication like Infra-red and
Bluetooth which mostly took place in the recent years showing that further improvements are
on the horizon to make our lives easier and comfortable. Having wireless control of almost all
the things in a person’s life is a growing interest and many systems are developed providing
such controls. With the inception of home automation labor saving machines were first priority
of inventors. Self-contained electric or gas powered home appliances became viable in the
1900s with the introduction of electric power distribution and led to the introduction of water
heaters in 1889 later washing machines in 1904 followed by refrigerators, sewing machines,
dishwashers, and clothes dryers. In recent history i.e. 1975 X10 the first general purpose home
automation network technology was developed, which is a communication protocol for
electronic devices. It primarily uses electric power transmission wiring for signaling and
control, where the signals involve brief radio frequency bursts of digital data and remains the
most widely available. By 1978, X10 products included a 16 channel command console, a lamp
module, and an appliance module. Soon after came the wall switch module and the first X10
timer. In a research by ABIin United states 1.5 million home automation systems were installed
by 2012. Here our main objective is to design a system that will enable us to have a complete
control of the interface on which it is based [4].
7
home system tools, but there they are so expensive and complex. They are complex and difficult
to maintain. if a simple module is damaged all the system be damaged.
2.3 Problem in Traditional System
Hence Pakistan is developing country so houses and offices aren’t properly adopted smart home
technology. In traditional system electric switches are fixed at the wall and some time at the
corner of wall so it will be very difficult for elders, disabled and children to turn on or off the
electric appliances. The traditional complex wiring electric supply system can cause a big
damage of electricity due to non-reliable wires, sometime it can cause of damage of expensive
appliance due to variable voltage electric supply companies. It can easily be shot circuit and
open wires can cause an injury or may be death. The short circuit can be easily converted into
fire and easily burn a complete house or offices. There are following drawbacks in the system.
Reliability Problem
Security Problem
Installation Problem
Maintenance
Cost
2.3.1 Reliability issue
Reliability, describes the ability of a system or component to function under stated conditions
for a specified period of time. Availability, Testability, maintainability and maintenance are
often defined as a part of "reliability “. Traditional Wiring electric system is time wasting and
non-reliable. It need lots of efforts to be spend. Stripping too much wire can lead to sparks as
hot conductors can make contact with each other, causing sparks and potential fires. Copper is
being rejected by the semi-conductor industry as being unreliable as a bonding agent. In a
recent study conducted by SEMI, the main research arm of the semiconductor industry, most
respondents in the field held that copper wire as a bonding agent was unreliable, unproven
and inefficient. Further, many in the field held in the survey that they thought copper was
unsuited for many complex wiring projects. Also. when the wire run is too long, there might
be some voltage drops associated with it, causing the wire to underperform and carry less
current than it is designed for.
8
2.3.2 Security issue
Traditional wiring system is not completely secure. The human body is a good conductor of
electricity. That means electricity flows easily through our bodies. Why? Because electricity
moves quickly through water - and the human body is 70 percent water! Another fact to
remember is that electricity always tries to find the easiest path to the ground. Overhead electric
lines may cause serious injury or death if contacted. Maintain safe distances from electric lines
at all times. Avoid using ladders, poles or other tools in situations where they may come in
contact with overhead lines. Adults should call the electric company if they need to work near
lines. Short circuits can cause us serious fire in office and house which led to a very serious
incident.
9
than fiber optic cable as a result of this. Therefore, the problem of copper storage is related
to its penchant to be oxidized at relatively normal temperatures.
2.4.1 Convenience
The convenience factor here is enormous. Being able to keep all of the technology in your
home connected through one interface is a massive step forward for technology and home
management. Theoretically, all you’ll have to do is learn how to use one app on your
smartphone and tablet, and you’ll be able to tap into countless functions and devices
throughout your home. This cuts way back on the learning curve for new users, makes it
easier to access the functionality you truly want for your home
2.4.2 Flexible
Smart home systems tend to be wonderfully flexible when it comes to the accommodation
of new devices and appliances and other technology. No matter how state-of-the-art your
appliances seem today, there will be newer, more impressive models developed as time goes
on. Beyond that, you’ll probably add to your suite of devices as you replace the older ones
or discover new technology to accompany your indoor and outdoor spaces. Being able to
integrate these newcomers seamlessly will make your job as a homeowner much easier, and
allow you to keep upgrading to the latest lifestyle technology
2.4.3 Secure
When you incorporate security and surveillance features in your smart home network, your
home security can skyrocket. There are tons of options here -- only a few dozens of which
are currently being explored. For example, home automation systems can connect motion
detectors, surveillance cameras, automated door locks, and other tangible security measures
throughout your home so you can activate them from one mobile device before heading to
10
bed. You can also choose to receive security alerts on your various devices depending on the
time of day an alert goes off, and monitor activities in real-time whether you’re in the house
or halfway around the globe.
11
there are some key features that will make the job easier and your interaction with your system
more enjoyable. The beauty of an automation system is its ability to tie diverse electronic
devices together so they can perform as one unified system. Getting these devices to work
cohesively can be simple or complex, depending on the “openness” of the automation system.
The more open a system is, the easier it will be for the lights, thermostats, audio/video
equipment, security devices, motorized shades and other electronics to communicate with each
other. Automation is all about being able to control things in your home. Remote access
capabilities allow you to monitor your home’s environment and alter the settings of the lights,
thermostats and other gear if necessary all from your laptop, cellphone or iTouch. Remote
access also allows your installer to tweak your system without having to make a house call,
which is always cheaper and more convenient. technology will continue to evolve, introducing
a completely new generation of products to the marketplace. In the future, you may also want
to add new rooms—like a recently finished basement or an addition off the back—to your
automation network. Or, you may simply want to start out with just a few features when you
first put in your system then add new capabilities later as you have the money. For these reasons,
it’s important that a home automation system can be easily expanded vertically to incorporate
additional products and horizontally to support additional rooms.
12
CHAPTER 3
3 METHODOLOGY
3.1 Introduction
Methodology mean the detail description and definition of every activity perform in completing
the project as well as every tool use for solving problems faced in the project. The complete
planning from start till end and the each and every tool use in the project data collection methods
and all other things like SDLC model use in the project every person connect directly and
indirectly every helping material are all collectively called methodology of the project. If the
requirements are done will, the software design flows logically and smoothly. Conversely, if
the requirements are done poorly, the resulting design is awkward and the coding is more
difficult. Methodology helps the system developers to take one step at a time towards
accomplishing the full system.
3.2.3 Observation
The other method used for data collection is observation, while observing the other Home
Automation Systems working criteria. On the basis of defects found impervious system and on
13
the basis of what the people like the data for development of new System were collected. The
data collected contains problems in the existing system. Various problems were there in the
existing in those systems which will discuss in detail.
14
methodology may include the pre-definition of specific deliverables and artifacts that are
created and completed by a project team to develop or maintain an application. There are
various software development life cycle models defined and designed which are followed
during the software development process. These models are also referred as Software
Development Process Models [5].
Following are the most important and popular SDLC models followed in the industry & minus.
Waterfall Model
Iterative Model
Spiral Model
V-Model
Big Bang Model.
Evolutionary Prototyping Model.
Agile development
Incremental Software Development model
15
Figure 3.1: Incremental Process Model [5]
16
Figure 3.2 : Incremental Process Model [5]
The system is put into production when the first increment is delivered. The first increment is
often a core product where the basic requirements are addressed, and supplementary features
are added in the next increments. Once the core product is analyzed by the client, there is plan
development for the next increment.
17
Highest priority requirement is tackled first
Once the incremented portion id developed, requirements for that increment are frozen
18
Start from POC (Proof of Concept) —> Viable product --> Beta/Incremental
delivery/release.
19
Table 3.1: Why Used ISD model in Project
Iterative
Evolutionary and
Factors Waterfall V-Shaped Prototyping Spiral Incremental Agile
Unclear User
Requirement Poor Poor Good Excellent Good Excellent
Unfamiliar
Technology Poor Poor Excellent Excellent Good Poor
Complex
System Good Good Excellent Excellent Good Poor
Reliable system Good Good Poor Excellent Good Good
Short Time
Schedule Poor Poor Good Poor Excellent Excellent
Strong Project
Management Excellent Excellent Excellent Excellent Excellent Excellent
Cost limitation Poor Poor Poor Poor Excellent Excellent
Visibility of
Stakeholders Good Good Excellent Excellent Good Excellent
Skills limitation Good Good Poor Poor Good Poor
Documentation Excellent Excellent Good Good Excellent Poor
Component
reusability Excellent Excellent Poor Poor Excellent Poor
3.5 Summary
The data for project development is collected by using above techniques and methods, and then
the data is analyzed in data analysis technique / methods. The analyzed data is then applied in
software development approach / method to develop this game to entertain and provide fun for
people.
20
CHAPTER 4
21
is developing in LabVIEW and Arduino. The data need for developing above application was
collected through data collection method; here the data collected is analyzed. In the analysis of
data various tools and techniques are compared with the requirement of developing new system.
we came to the conclusion that LabVIEW and Arduino is the best option which have been used
and utilized by most of the developers around the globe and found it more convenient [6].
22
4.4 System Requirements
System requirements are defined in software requirement. Software requirement specification
(SRS) is the representative statement required to system developers. These required documents
define requirement definition and requirement specification. It should set out what the system
should do without specifying how it should be done. Requirement in this document is complete
and consistent. A System Requirements Specification (SRS) (also known as a Software
Requirements Specification) is a document or set of documentation that describes the features
and behavior of a system or software application. It includes a variety of elements that attempts
to define the intended functionality required by the customer to satisfy their different users. In
addition to specifying how the system should behave, the specification also defines at a high-
level the main business processes that will be supported, what simplifying assumptions have
been made and what key performance parameters will need to be met by the system [8].
System Requirements is further categories in two:
Functional Requirements
Non-Functional Requirements
4.5 Functional Requirements
Requirements, which are related to functional aspect of software is called functional
requirements. They define functions and functionality within and form the software system.
The Functional requirement is actual behavior of system it define system functionality and its
components. Function take inputs perform behavior and generate output.
23
burglar alarm and light both modules. So when PIR sensor detect any object it turns on light
and burglar alarm starts
4.7.1 Security
The login system should be robust where only authorized users can be login to the system and
use the system. Only manager has the user name and password, only manager can login into
the system. Other persons cannot login into the system and system will not be open with
incorrect user name and password.
4.7.2 Maintainability
Since the system may be developed in the future by adding other features, it should be easily
maintainable. In future new functionalities will be added like biometric system and credit card
transaction. The new functionalities will be easily maintainable in the Home Automation
system.
4.7.3 Availability
Smart home system will be available any time to use. Smart Home Automation system is Home
management system user can open it any time and control it, on off, add and dim and device.
4.7.4 Response Time
The minimum response time between click and perform must be less than 0.5 seconds. The
maximum response time between click and reaction will be two seconds.
24
4.7.5 Performance
The system runs according to the required software and hardware.
4.7.6 Usability
The system is user-friendly has a beautiful GUI and the keys will respond according to the
number of clicks.
25
Figure 4.1
4.10.1 LabVIEW.
LabVIEW offers a graphical programming approach that helps us visualize every aspect of
your application, including hardware configuration, measurement data, and debugging. This
26
visualization makes it simple to integrate measurement hardware from any vendor,
represent complex logic on the diagram, develop data analysis algorithms, and design
custom engineering user interfaces. LabVIEW has two layouts front panel and block
diagram. We will discuss both in detail.
27
4.10.1.2 LabVIEW Block Diagram.
The block diagram contains the graphical source code of a LabVIEW program. The concept
of the block diagram is to separate the graphical source code from the user interface in a
logical and simple manner. Front panel objects appear as terminals on the block diagram.
Terminals on the block diagram reflect the changes made to their corresponding front panel
objects and vice versa. The black diagram of our project is given bellow.
28
Block Diagram of LabVIEW
Figure 4.3
29
4.10 Arduino Code.
Arduino code is written in C++ with an addition of special methods and functions, which we’ll
mention later on. C++ is a human-readable programming language. When you create a ‘sketch’
(the name given to Arduino code files), it is processed and compiled to machine language.
4.11 Arduino IDE
The Arduino Integrated Development Environment (IDE) is the main text editing program used
for Arduino programming. It is where you’ll be typing up your code before uploading it to the
board you want to program. Arduino code is referred to as sketches. The source code of our
program with comments is given below.
Define Value
int st=0;
int lldr=0;
int tempp=0;
int m1=0;
int m2=0;
dht.begin();
pinMode(2,INPUT);
pinMode(3,INPUT);
pinMode(4,INPUT);
pinMode(6,OUTPUT);
30
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);
31
CHAPTERR 5
5 SYSTEM DESIGN
5.1 Introduction
Design is the process of defining the architecture, components, modules, interfaces, and data
for a system to satisfy specified requirements. System design is the way toward characterizing
the engineering, parts, and information for a system to fulfill indicated necessities. System
design could be viewed as the utilization of system hypothesis to item improvement. Systems
design could be seen as the application of systems theory to product development [10].
32
separately. The simplest and the high level DFD is level 0 DFD and the level of the DFD
increase the detail also increase with level.
33
5.5 Level 1 DFD
It distinguishes real information streams and information stores furthermore attempt to broaden
the procedure. The level 1 DFD has diverse parts it has the information and game, Menu,
choices have play, resume (Esc), and quit sound of the amusement and after finishing the
principle level.
34
5.6 Workflow Diagram
A workflow diagram portrays a progression of activities that characterize a vocation or how
function ought to be finish. A work flow diagram pictures how assignments will stream between
resources, whether they’re machines or individuals and what conditions permit the grouping to
advance. This work process can be outlined or portrayed with a flowchart using unique boxes
and diamond or it can be made with depictions of real-life objects using graphics and pictures
that represent customers, forms, finance, products, shipping, payment, and more. For software
development, a work flow diagram characterizes a progression of steps a procedure must
execute reliably. A Workflow diagram (WFD) is a graphical representation of the "flow" of
work through an information system, modeling its process aspects. enabled by
the systematic organization of resources into processes that transform materials, provide
services, or process information [12]. From a more abstract or higher-level perspective,
workflow may be considered a view or representation of real work.
35
Figure 5.3 Work Flow Diagram
36
5.7 Physical design
The physical design relates to the actual input and output processes of the system. This is
explained in terms of how data is input into a system, how it is verified / authenticated, how it
is processed and how it is displayed [13].
37
CHAPTER 6
38
6.2 Black Box Testing
Black Box texting is the checking of functionality of the software and checking of input output
of the system developed. Black box testing, which is also known as behavioral, opaque-box,
closed-box, specification-based or eye-to-eye testing, is a Software Testing method that
analyses the functionality of a software/application without knowing much about the internal
structure/design of the item that is being tested and compares the input value with the output
value. The main focus in black box testing is on the functionality of the system as a whole. The
term ‘behavioral testing’ is also used for black box testing. Behavioral test design is slightly
different from black-box test design because the use of internal knowledge isn’t strictly
forbidden, but it’s still discouraged. Each testing method has its own advantages and
disadvantages. There are some bugs that cannot be found using the only black box or only white
box technique. Majority of the applications are tested by black box method. We need to cover
the majority of test cases so that most of the bugs will get discovered by a black-box method.
This testing occurs throughout the software development and testing life cycle i.e. in Unit,
Integration, System, Acceptance, and regression testing stages [14]. There are many types of
black box texting some are given bellow.
39
product. Usability testing lets the design and development teams identify problems before they
are coded. The earlier issues are identified and fixed, the less expensive the fixes will be in
terms of both staff time and possible impact to the schedule. During a usability test, you will
learn if participants are able to complete specified tasks successfully and identify how long it
takes to complete specified tasks. Find out how satisfied participants are with your Web site or
other product. Identify changes required to improve user performance and satisfaction. And
analyze the performance to see if it meets your usability objectives [15].
40
Table 6.1: Smart Home Automation System
Test 1
Result
Test Passed Successfully.
41
Table 6.2: Functionality Test
Environment: LabVIEW.
Pre-requisite: Checking All the Sensors working properly input and output.
Method
• Open LabVIEW
• Login
• Supply Power to Module.
• Give input on GUI of LabVIEW.
• Check output for specific input.
Result
Test Passed Successfully.
42
Table 6.3: Module Testing
43
Chapter 7
44
This system aims to decrease power consumption and overall money spent while still allowing
for the user to be comfortable and all the things in the house be autonomous.
45