Vous êtes sur la page 1sur 44

SMART HOME - THE AASHRAYA

CHAPTER 1
INTRODUCTION
Nowadays everyone wants a facility which reduces their efforts time and provide an easier
way to compute their task. This project Aashraya helps with your routine helps with your
routine task in our homes. Home automation is being evolved daily as nowadays people
want luxuries, convenient, and comfortable life. Our project envisions an automated home
that will create new dimension in home automation. It comprises of advance Automatic
Gas Booking System, Water Level Maintainer, and Advanced Smart Intrusion Detection.
We will able to control the modules with the help of our mobile. This system automatically
fills the overhead tank and also automatically books an LPG refill. Different wireless
communication system such as Gsm module, and Wi-Fi module are used for wireless
communication along with other hardware such as T-relay, speakers, microphone, Arduino
UNO, camera. There will be customized application with user-friendly interface and
secured login and will store the details of the booking the refill. The user can manage the
home automation modules.

1.1 RATIONALE
Everyday a new technology evolves and one of them is IoT (Internet of Things) which is at a
boom in the market and gives us an advantage for a successful system. It was best suited to
develop our conventional style of operating the appliance and upgrade to automation. There are
several problems that can be solved through Internet of Things.
The purpose of the document is to collect and analyze all assorted ideas that have come up to
define the system, its requirements with respect to user. Also, we shall predict and sort out how
we hope this system will be used in order to gain a better understanding of the project, outline
concepts that may be developed later, and document ideas that are being considered, but may be
discarded as the project develops.

1.2 PROBLEM DEFINITION


Today people are looking at paths that leads to improve their life-style using the latest technologies that
are available. Any new facility or home appliance that promises to enhance their life-style is grabbed by
the consumers. The more such facilities and appliances are added, it becomes inevitable to have easy and
convenient methods and means to control and operate these appliances. Conventional wall switches are in
different parts of a house and thus necessitates manual operations like to switch on or off these switches
to control various appliances. It gets virtually impossible to keep track of appliances that are running and

Acropolis Institute of Technology & Research, Indore Page 1


SMART HOME - THE AASHRAYA

to monitor their performances. Along with this we are unable to use the resources optimally in our daily
routine. Conventional security has few leaks that is we are unable to communicate and see who comes at
our door when we are not at home. Traditionally, we have to indulge some time to water plants, and
sometimes. Traditionally, while filling the overhead tanks, it often happens that water overflows for a
period of time and hence resources get wasted.

1.3 PROPOSED SOLUTION


Automated system that is self sufficient to meager all the data ,analyses it and perform action as
needed, which helps us to control the devices from anywhere at anytime and give us the
feedback of the device. This a home automation system which is intended to provide details of
the appliance and helps to perform operations of electrical appliance via mobile such as Turning
on at whenever needed, live footage of home etc.
The module This module is Customised app with login module storing information like customer
name, gas agent, contact number etc. Through this app you can view the status of all the modules
This app will automatically book a gas a refill in case minimum threshold is crossed.
After that next module takes care of the problem of wasting unnecessary water. We can now use
the resources optimally. It includes automatic water filling of overhead TANK from the
underground water tanks until the threshold. The overhead tank will get filled automatically by
controlling the motor. We will also maintain a certain level of water in your underground tank.
Threshold will control the motor.
Last but not the least module which is an advancement to the previous intrusion detection. It will
provide with new features that are camera, microphone, speaker.It helps us to check who arrive
at our door and also view and interacts with that person through our mobile phone.

1.4 OBJECTIVE & SCOPE


The scope of the project includes the following: -
 Customised app with login module.

 Through this app user can view the status of all the modules

 App will automatically book a gas for refill in case minimum threshold is reached.

 Filling of overhead tank automatically by controlling the motor.

 Maintaining a certain level of water in underground tank.

 Camera, microphone, speakers are added to existing system.

 View and interacts with the person who arrived at the door using our mobile phone.

1.5 REPORT ORGANIZATION

Acropolis Institute of Technology & Research, Indore Page 2


SMART HOME - THE AASHRAYA

This thesis is organized as follows.

 Chapter 1 The introduction to the thesis is given in this section and it describes
the objectives, motivation and justification.

 Chapter 2 reviews numerous existing and emerging technologies that are related
to the work presented in this thesis under the title literature survey.
 Chapter 3 Analysis of the whole work is done by explaining the detailed work
performed in the project.
 Chapter 4 System Design of the whole work which includes the UML diagrams
such as Use Case, Activity diagram and Sequence diagram.
 Chapter 5 describes the various results that are obtained after the complete
implementation and screenshots of the project.
 Chapter 6 includes the testing part in the project.

 Chapter 7 includes the functional and non-functional requirements.

 Chapter 8 draws conclusions from the work described in previous chapters and
discusses possibilities for future development.
 Finally, in the last section i.e. Appendix, we have provided the user manual and
the references. This section is an exhaustive list of the journals and research
papers referred to during the preparation of the thesis.

Acropolis Institute of Technology & Research, Indore Page 3


SMART HOME - THE AASHRAYA

CHAPTER 2
LITERATURE SURVEY

A Survey on an Efficient IOT Based Smart Home proposes an efficient implementation for IoT for
monitoring and automation system and it uses the portable devices as a user interface. Portable devices
can communicate with home automation network through an Internet gate, by means of low power
communication protocols like zigbee, Wi-Fi etc. This project aims at controlling home appliances via
Smartphone using Wi-Fi as communication protocol and Arduino mega 2560. The user here will move
directly with the system through a web-based interface over the web whereas home appliances like lights,
fan etc. are remotely controlled through easy website. This project also shows how to provide fully smart
environment condition monitoring by various sensors (Temperature, Humidity, Light and Level) for
providing necessary data to automatically detection and resolution of any problem in the devices. A
Remote Password Operated Home Appliances Control Project Algorithm was designed to read the data
from Wi-fi module , Initialize the LCD and UART protocol and display the status of the electrical loads
on LCD. The system is installed beside the conventional electrical switches on the wall. The risk of
dangerous electric shocks can be avoided by using low voltage switches. The system uses two GUIs- one
on the personal computer and the other on Smartphone. The status of the appliances i.e. weather it is
on/off can be known by using this GUI. Any changes in the status of the appliances, immediate intimation
is shown on the GUI. The window GUI will act as a server to forward or transmit any data to/from the
Smartphone and the main control board, after the Smartphone’s wifi is connected to the Bluetooth of the
computer. In case, the wi-fi connection between the PC or laptop and the control board fails, then
connection can be reestablished by using USB cable. The user can monitor and control the devices from
any remote location at any time using IOT. This project describes “Smart Home Automation using IOT “.
A System hardware is consist of many parts i.e. PCB, gas sensor, humidity sensor, LDR light sensor, load
cell, T-relay, MQ-5 smoke sensor, Node MCU, motion sensor, ultrasonic sensor and Arduino controller.

ADVANTAGES
(a) Adds Safety Through Appliance and Lighting Control
(b) Secures Home Through web control and Increases Convenience through Temperature Adjustment
(c) Save time
(d) Save money and increase convenience
(e) Allow to appliances control when out of town.

Acropolis Institute of Technology & Research, Indore Page 4


SMART HOME - THE AASHRAYA

This project describes that the Home automation is done so with electronics and communication
advancement. Platforms based on cloud computing help to connect to the things surrounding everyone so
that one can find it easy to access anything and everything at any time and place in a user friendly manner
using custom defined portals. Hence, cloud acts as a front end to access IoT. The exciting opportunities
yet to increase the connectivity and relationship of home devices for home automation purposes to the
internet. The model consists of different sensors , When the connection is established it will start reading
the parameters of sensors like p1, p2, p3 etc. The threshold levels for the required sensors are set as t1, t2,
t3 etc. The sensor data are sent to the web server and stored in the cloud. The data can be analyzed
anywhere any time. If the sensor parameters are greater than the threshold level then the respective alarm
a1, a2, a3 etc. will be raised and the required actuation is done for the controlling of the parameters. In the
proposed model the temperature, gas leakage, motion in the house is monitored. When there is a leakage
of gas in the house alarm is raised giving the alert sound. The required lights are turned on/off
automatically by detecting the light outside the house. The user can also monitor the electric appliances
through the internet via web server. If the lights or any electrical appliances are left on in hurry can be
seen and turned off remotely through simply typing the IP address of the web server.
This paper was an attempt to introduce ideas, movements, technical approaches and considerations for
strategic planning for the Internet of Things. It was a simple review of research in IoT models, privacy
issues and considerations for businesses to include in their way forward for IoT. Attempts are being made
to harness the seismic shift caused by the IoT movement. While unification or standardization is lacking it
seems like it may be left to economic competition on what moves forward.

2.1 BACKGROUND
There are several projects which are designed using IoT. We want to develop a similar
model by adding some unique features. Many existing models have features like
controlling of lights and fans, automatically ON and OFF of lights etc. but we have
included new features like automatic booking of LPG and gas leakage detection,
intrusion detection and live interaction through camera module, automatic watering of
plants, automatic filling of water tank, controlling of all electrical appliances with the
use of one application, use of rechargeable batteries to avoid inconvenience and in
future use of solar cells, performance of all sensors at one place. Smart Home – The
Aashraya is a home automation model which is intended to make everyone’s life easier
and comfortable.

Acropolis Institute of Technology & Research, Indore Page 5


SMART HOME - THE AASHRAYA

Arduino Mega 2560 - The Arduino Mega 2560 is a microcontroller board


based on the ATmega2560. It has 54 digital input/output pins (of which 15 can
be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a
16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and
a reset button. It contains everything needed to support the microcontroller;
simply connect it to a computer with a USB cable or power it with a AC -to-DC
adapter or battery to get started.

Node MCU - The NodeMCU (Node MicroController Unit) is an open source


software and hardware development environment that is built around a very
inexpensive System-on-a-Chip (SoC) called the ESP8266.

T-relay - A relay is an electrically operated switch that can be turned on


or off, letting the current go through or not, and can be controlled with
low voltages, like the 5V provided by the Arduino pins.

Load cell - A load cell is a transducer that is used to create an electrical


signal whose magnitude is directly proportional to the force being measured. We
are using it for measuring gas weight.
LDR sensor - An LDR is a component that has a (variable) resistance that changes with
the light intensity that falls upon it. This allows them to be used in light sensing circuits.

Ultrasonic sensor - Ultrasonic sensors work on the principle of reflected sound waves
and are used to measure distance. One sensor can detect others operating nearby.
Distance is then estimated by the time interval between sensor and object.

Acropolis Institute of Technology & Research, Indore Page 6


SMART HOME - THE AASHRAYA

CHAPTER 3
SYSTEM REQUIREMENT SPECIFICATION
System analysis patterns or analysis are conceptual models, leading to specifications of a
new system. Analysis is a detailed study of various operations performed by a system and
their relationships within and outside the system. During analysis, data are collected on
the available files, decision points and transactions handled by the present system.

HARDWARE REQUIREMENTS

Operating System : Android 6.0 or above


RAM : 256 MB, 2GB recommended
Hardware Devices : Smart phone
Hard disk : 10 GB or more
Display : Touch screen

SOFTWARE REQUIREMENTS

Technology : Internet of Things


Language Used : C/C++
Database : My SQL
User Interface Design : Android

Acropolis Institute of Technology & Research, Indore Page 7


SMART HOME - THE AASHRAYA

CHAPTER 4
SYSTEM ANALYSIS AND DESIGN
Based on the user requirements and the detailed analysis of a system, the system is
designed. This is the phase of system designing. It is a crucial phase in the development
of a system. It includes the UML diagrams.

4.1 SYSTEM ANALYSIS

System development has two major component- system analysis and system design. It
refers to the process of examining a business situation with the intent of improving it
methods and procedures.

This home automation system is divided into three parts. Firstly, interacting and
communicating with the person through a mobile application with the help of camera,
microphone and speaker. Secondly, automatically filling of overhead tank by controlling
the water motor. Thirdly, automatic booking of gas refill. Next was to analysis if these
functions are achievable through IoT and how they will interact with each other. Not only
cost analysis but also an evaluation was to be made to check if the selected components
were feasible to do so.

Acropolis Institute of Technology & Research, Indore Page 8


SMART HOME - THE AASHRAYA

4.1.1 REQUIREMENT ANALYSIS


Requirements analysis, also called requirements engineering, is the process of determining user
expectations for a new or modified product. These features, called requirements, must be
quantifiable, relevant and detailed.
 User Friendly Interface:
User can easily manage system locally or remotely, through easy to use and simple
mobile application.
 Security:
Only authorized user can login to the system in order to manage, control and monitor its
own system only.
 Low Cost:
As discussed earlier in literature survey, all existing home automation system such as
Alexa and Google home are available only at high cost, thus resulting in our project to be
advantageous in terms of cost over such system.
 Large Area of Coverage:
Through GSM module or wi-fi module, the user can connect, control & view the system
through mobile application from anywhere in the world, thus giving a large area of
coverage to interact with the system.
 Less Use of Resources:
Not only the system has such functions that prevent wastage of water and electricity but
also the system itself runs on low power rechargeable batteries or less electricity.
Thereby, reducing the overall consumption of non-renewable resources.
 Low Maintenance and Durability:
As the system runs on indestructible software program and low power batteries, the
system is long lasting and requires rare maintenance only when a hardware component
gets naturally damaged.

4.1.2 OBJECT ORIENTED ANALYSIS


Object oriented analysis is the process that groups items that interact with one another, typically

Acropolis Institute of Technology & Research, Indore Page 9


SMART HOME - THE AASHRAYA

by class, data or behavior, to create a model that accurately represents the itended purpose of the
system as a whole.
Each individual module in the system corresponds to an object each having its own data and
methods.
All the subcomponents in each object and the several objects themselves interact with each other
through a micro-controller, Arduino Mega and a GSM or wi-fi module.
Some objects, namely Advance Intrusion Detection and Gas Booking inherit their basic function
, i.e. detectPerson() and measureGas() respectively from the previously made minor project.
Data Hiding is implemented through authorization and authentication of user such that only the
intended user is able to view, control and monitor only its own system.
Moreover a simple and easy to use graphical user interface helps to achieve data abstraction.

4.1.3 ARCHITECTURAL SPECIFICATION

A description of a software and electronics system in terms of its hardware and software
components and their interactions. In systems development, an architectural specification
is the set of documentation that describes the structure, behavior, and more views of that
system.

Firstly, let us consider the architectural specification in the terms of hardware components
of the system.

The system comprises of various sensors in all modules such as load cell, ultrasonic, PIR
sensor, etc which act as activators of the system. These sensors continuously sends their
data to the heart of the system, its micro-controller (Arduino Mega) which is responsible
for managing, controlling and communicating to all the parts of system.

This micro-controller has an in-built memory which stores the software program to
control and manage the system. When a particular sensor triggers the system, the
corresponding activator is activated such as a camera, water motor or notification alert to
user.

Now let us consider the architectural specification in terms of software components of the

Acropolis Institute of Technology & Research, Indore Page 10


SMART HOME - THE AASHRAYA

system. A part of software is embedded in Arduino while other includes a mobile


application to view, control and use the features of the system. Along with application a
database is built to store relevant information of user and recent data.

4.1.4 FEASIBILITY ANALYSIS


Feasibility analysis is very important in order to improvise the project after initiation so that we
can have better and precise result. This project can be implemented using affordable electronic
and software technology making it economically, technically and operationally feasible

Economic feasibility
This project is based on IoT (Internet of Things) and few electronic components like Arduino
mega and uno, camera module, relay switches etc. which are affordable , made it economically
feasible to implement.

Technical Feasibility
This project is based on wireless technology and embedded system which are reasonably in
phase with currently used technology. Therefore, it is very much favored by the technology.

Operational Feasibility
This software will have very easy to use, user friendly interface so it will be pretty much
operable by anyone having little experience of using android phone. It could be helpful for
physically disabled person too, controlling home appliances with the click of button . So its
operationally feasible.

4.1.5 DEVELOPMENT METHOD


It is the process of dividing software development work into distinct phases to improve design,
product management.

The development method used in this system is incremental method. Incremental model is a
process of software development method where the whole system is broken down into multiple
standalone modules undergone analysis design, implementation (coding), testing/verification.

Since all the modules in this project are independent of each other and standalone, the system is
designed in modular fashion. It allows easier implementation as well as easier modification at
later stages. Since a change in one module will not affect the others.

Each module of the system was individually analyzed, designed, coded and tested. At the end all
development modules were integrated as a whole system and the entire system as one was tested.

Acropolis Institute of Technology & Research, Indore Page 11


SMART HOME - THE AASHRAYA

4.2 SYSTEM DESIGN

4.2.1 USE CASE DIAGRAM

A use case diagram in the Unified Modeling Language (UML) is a type of behavioral
diagram defined by and created from a Use-case analysis. Its purpose is to present a
graphical overview of the functionality provided by a system in terms of actors, their
goals (represented as use cases), and any dependencies between those use cases. The main
purpose of a use case diagram is to show what system functions are performed for which
actor. Roles of the actors in the system can be depicted. Use Case diagrams are formally
included in two modeling languages defined by the OMG: the Unified Modeling
Language (UML) and the Systems.

Acropolis Institute of Technology & Research, Indore Page 12


SMART HOME - THE AASHRAYA

Figure 4.2.1 Use Case of User-Admin

4.2.2 USE CASE SPECIFICATION

Use-case name: Manage categories and sub-categories

Use-case description: This use case details the category for selecting a process where
the user can browse through the different categories and select one category to view

Acropolis Institute of Technology & Research, Indore Page 13


SMART HOME - THE AASHRAYA

courses.
Primary actor: Admin/User

Precondition: The user/administrator successfully runs the application to view the


homepage and browse different courses.
Post-condition: The user successfully selects a category to view in a particular course.

Basic Flow:

 Run the application

 View the home page

 Browse the categories

 Select a category

 Browse the details of the particular course.

4.2.3 ACTIVITY DIAGRAM

Activity diagram is another important diagram in UML to describe dynamic aspects of the
system. Activity diagram is basically a flow chart to represent the flow form one activity
to another activity. The activity can be described as an operation of the system. Activity
diagrams provide a way to model the workflow of a business process. Activity diagrams
can also be used to model code-specific information, such as a class operation. Activity
diagrams are very similar to a flowchart because of modelling a workflow from activity to
activity. An activity diagram is basically a special case of a state machine in which most
of the states are activities and most of the transitions are implicitly triggered by
completion of the actions in the source activities. Each activity represents the
performance of a group of actions in a workflow. Once the activity is complete, the flow
of control moves to the next activity or state through a transition.

Acropolis Institute of Technology & Research, Indore Page 14


SMART HOME - THE AASHRAYA

Figure 4.2.3 Activity Diagram of Smart Kitchen


4.2.2 Activity diagram for Smart Intrusion

Acropolis Institute of Technology & Research, Indore Page 15


SMART HOME - THE AASHRAYA

Figure 8: Activity Diagram of Intrusion Detection

4.2.3 Activity diagram for Smart Water Level Maintainer

Acropolis Institute of Technology & Research, Indore Page 16


SMART HOME - THE AASHRAYA

Figure 9: Activity Diagram for Smart Water Level Maintainer

Acropolis Institute of Technology & Research, Indore Page 17


SMART HOME - THE AASHRAYA

4.2.4 SEQUENCE DIAGRAM

A sequence diagram is a graphical view of a scenario that shows object interaction in a


time- based sequence, what happens first, what happens next. Sequence diagrams
establish the roles of objects and help provide essential information to determine class
responsibilities and interface.
This type of diagram is best used during early analysis phases because they are simple
and easy to comprehend. A sequence diagram has two dimensions: typically, vertical
placement represents time and horizontal placement represents different objects.

4.1.1 Sequence Diagram for Smart Kitchen

Figure 4. Sequence Diagram for Smart Kitchen

Acropolis Institute of Technology & Research, Indore Page 18


SMART HOME - THE AASHRAYA

4.1.2 Sequence Diagram for Smart Intrusion Detection

Figure 5. Sequence Diagram for Smart Intrusion Detection

4.1.3 Sequence Diagram for Smart Water level maintainer

Acropolis Institute of Technology & Research, Indore Page 19


SMART HOME - THE AASHRAYA

Figure 6: Sequence Diagram for Smart Water level maintainer

Acropolis Institute of Technology & Research, Indore Page 20


SMART HOME - THE AASHRAYA

4.2.5 DATA FLOW DIAGRAM

A Data Flow Diagram (DFD) is a structured analysis and design tool that can be used for
flowcharting. A DFD is a network that describes the flow of data and the processes that
change or transform the data throughout a system. This network is constructed by using a
set of symbols that do not imply any physical implementation. It is the starting point of
the design phase that functionally decomposes the requirements specifications down to
the lowest level of detail. DFD can be considered to an abstraction of the logic of
information-oriented or a process-oriented system flow-chart.

Acropolis Institute of Technology & Research, Indore Page 21


SMART HOME - THE AASHRAYA

CHAPTER 5

PROJECT IMPLEMENTATION AND


OUPUT SCREENS
SCREENSHOTS

Acropolis Institute of Technology & Research, Indore Page 22


SMART HOME - THE AASHRAYA

IMPLEMENTATION OF SYSTEM

 PREPARE THE INFRASTRUCTURE

Many modules of the proposed system are implemented into a production environment
that is separate and distinct from where the solution was developed and tested. When you
are ready for implementation, the production infrastructure needs to be in place.

 VISIT ORGANIZATION INVOLVED IN PROJECT

Part of the implementation work is to check the work of any other groups that have
similar work implemented.

Acropolis Institute of Technology & Research, Indore Page 23


SMART HOME - THE AASHRAYA

 IMPLEMENT TRAINING

Users require attending training or more informal coaching sessions. Training that takes
place close to the time of implementation should be made part of the actual
implementation plan.
 INSTALL THE PRODUCTION SOLUTION

The solution needs to be moved from development to test. It must be made sure all of the
production components are implemented successfully, including new hardware,
databases, and program code.

Acropolis Institute of Technology & Research, Indore Page 24


SMART HOME - THE AASHRAYA

 CONVERT THE DATA


Changing data from one format to another, needs to take place once the infrastructure and
the solution are implemented
 PERFORM FINAL VERIFICATION IN PRODUCTION

Test the production solution to ensure everything is working as expected. The first check
is just to make sure everything is up and appears okay. The second check is to actually
push data around in the project, to make sure that the project is operating as it should.
 IMPLEMENT NEW PROCESS AND PROCEDURE

Changes are required to be made to processes as well. These changes should be


implemented at the same time that the actual project is deployed.
 MONITOR THE SOLUTUON

Some period of time is spent in monitoring the implemented solution. If there are
problems that come up immediately after implementation, programmer should address
and fix them.
// Load Cell
#include "HX711.h"
#define CLK A2
#define DOUT A3

HX711 scale(DOUT, CLK);


float calibration_factor = 150000; //-106600 worked for my 40Kg max scale setup

//Soil MOisture

int sensor_pin= A0;


int output_value ;

//DHT Sensors

Acropolis Institute of Technology & Research, Indore Page 25


SMART HOME - THE AASHRAYA

#include<dht.h>
dht DHT11;

int ledPin = 35; // choose the pin for the LED


int inputPin = 4; // choose the input pin (for PIR sensor)
int pirState = LOW; // we start, assuming no motion detected
int val = 0; // variable for reading the pin status

//LDR Sensor variables


int LDR=A4;
int LDRValue=0;
int light_senstivity=400;

//Ultrasonic variables
int trigPin = 3;
int echoPin = 2;

// defines variables
long duration;
int distance;

//gas leakage
float gasPin;
float gas_sensor=A1;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);

scale.set_scale(110000); //Calibration Factor obtained from first sketch


scale.tare(); //Reset the scale to 0

Acropolis Institute of Technology & Research, Indore Page 26


SMART HOME - THE AASHRAYA

pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
pinMode(13,OUTPUT);

//Temperature lights
pinMode(22,OUTPUT);
pinMode(24,OUTPUT);

//PIR Lights
pinMode(33,OUTPUT);
pinMode(35,OUTPUT);

//LDR lights
pinMode(48,OUTPUT);
pinMode(50,OUTPUT);
pinMode(52,OUTPUT);

// Soil moisture
pinMode(53,OUTPUT);
//UltraSonic
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input

delay(1000);
}

void loop() {
// put your main code here, to run repeatedly:
Serial.println("--------------------------------------------------------------");
digitalWrite(9,LOW);
digitalWrite(35,LOW);
digitalWrite(24,LOW);

soilMoisture();

Acropolis Institute of Technology & Research, Indore Page 27


SMART HOME - THE AASHRAYA

delay(500);
dhtSensor();
delay(500);
ldrSensor();

ultrasonicSensor();

pir_Sensor();
delay(400);

gasleakage();
delay(600);

loadcell();
delay(1000);

Serial.println("--------------------------------------------------------------");
delay(1500);
}

//------------------------------------------------------------------------------------------------------------------------------
------
//Soil MOisture
//------------------------------------------------------------------------------------------------------------------------------
------

void soilMoisture()
{
output_value= analogRead(sensor_pin);
output_value = map(output_value,550,0,0,100);
Serial.print("Mositure = ");

Acropolis Institute of Technology & Research, Indore Page 28


SMART HOME - THE AASHRAYA

Serial.print(output_value);
Serial.println("%");

if(output_value<=15)
{
digitalWrite(53,HIGH);
}
else
{
digitalWrite(53,LOW);
}
}

//------------------------------------------------------------------------------------------------------------------------------
------
//DHT sensor
//------------------------------------------------------------------------------------------------------------------------------
------

void dhtSensor()
{
DHT11.read11(6);
Serial.print("Temperature = ");
Serial.println(DHT11.temperature);
Serial.print("Humidity = ");
Serial.println(DHT11.humidity);

//------------------------------------------------------------------------------------------------------------------------------
------
//LDR sensor

Acropolis Institute of Technology & Research, Indore Page 29


SMART HOME - THE AASHRAYA

//------------------------------------------------------------------------------------------------------------------------------
------

void ldrSensor()
{
LDRValue=analogRead(LDR);//MORE THE DARKNESS HIGHER THE VALUE
Serial.print("Light Intensity = ");
Serial.println(LDRValue);
if(LDRValue<light_senstivity)
{
digitalWrite(52,LOW);
digitalWrite(50,LOW);
digitalWrite(48,LOW);

}
else
{
digitalWrite(52,HIGH);
digitalWrite(50,HIGH);
digitalWrite(48,HIGH);
}
}

//------------------------------------------------------------------------------------------------------------------------------
------
//UltraSonic sensor
//------------------------------------------------------------------------------------------------------------------------------
------

void ultrasonicSensor()
{
digitalWrite(trigPin, LOW);
delay(100);

Acropolis Institute of Technology & Research, Indore Page 30


SMART HOME - THE AASHRAYA

// Sets the trigPin on HIGH state for 10 micro seconds


digitalWrite(trigPin, HIGH);
delay(100);

digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
//delay(1000);
int duration = pulseIn(echoPin, HIGH);
// Calculating the distance
int distance= duration*0.034/2;
if(distance>50)
digitalWrite(22,HIGH);
else
digitalWrite(22,LOW);
Serial.print("Distance: ");
Serial.println(distance);

//------------------------------------------------------------------------------------------------------------------------------
------
//PIR sensor
//------------------------------------------------------------------------------------------------------------------------------
------

void pir_Sensor(){

val = digitalRead(inputPin); // read input value


if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, HIGH); // turn LED ON
Serial.print("PIR Sensor");
if (pirState == LOW) {
// we have just turned on

Acropolis Institute of Technology & Research, Indore Page 31


SMART HOME - THE AASHRAYA

Serial.println(" Motion detected!");


// We only want to print on the output change, not state
pirState = HIGH;
}
}
else {
digitalWrite(ledPin, LOW); // turn LED OFF
if (pirState == HIGH){
// we have just turned of
Serial.println(" Motion ended!");
// We only want to print on the output change, not state
pirState = LOW;
}
}
}

//------------------------------------------------------------------------------------------------------------------------------
------
//GAS leakage
//------------------------------------------------------------------------------------------------------------------------------
------

void gasleakage(){
gasPin=analogRead(gas_sensor);
Serial.print("Gas Leakage = ");
Serial.println(gasPin);
if(gasPin>430)
{
digitalWrite(8,HIGH);
}
else
{

Acropolis Institute of Technology & Research, Indore Page 32


SMART HOME - THE AASHRAYA

digitalWrite(8,LOW);
}
}

//------------------------------------------------------------------------------------------------------------------------------
------
//Load Cell
//------------------------------------------------------------------------------------------------------------------------------
------

void loadcell()
{
Serial.print("Weight: ");
Serial.print(scale.get_units(), 3); //Up to 3 decimal points
Serial.println(" kg"); //Change this to kg and re-adjust the calibration factor if you follow lbs

if(Serial.available())
{
char temp = Serial.read();
if(temp == 't' || temp == 'T')
scale.tare(); //Reset the scale to zero
}

Acropolis Institute of Technology & Research, Indore Page 33


SMART HOME - THE AASHRAYA

CHAPTER 6
TESTING
This document defines all the procedures and activities required to prepare for of the
functionalities of the system which are specified in the document. The objectives of
the test plan are to define the activities to perform testing, define the test deliverables
documents
and to identify the various risks and contingencies involved in testing.
Software testing is a critical element of software quality assurance and represents the ultimate
review of specification, design and code generation. Once source code has been generated
software must be tested to uncover and correct as many errors as possible before delivery to
the
customer. Our goal is to design a series of test case that have a high likelihood of finding
errors.
That's where software testing techniques come into the picture. These techniques provided
systematic guidance for designing test that
1. Exercise the internal logics of the software components.
2. Exercise the input and output domain of the program to uncover errors in program function,
behavior performance.
Testing of the software leads to the uncovering of errors in the software functional and
performance requirements are met. Testing also provide a good indication of software
reliability
as software quality as whole. The results of the different faces of testing are evaluated and
then
compare with the expected results. If the errors are uncovered they are debugged and corrected.

6.1 TEST APPROACH


Firstly we have performed testing on every sensor individually like on load cell,
ultrasonic sensor, MQ5 smoke sensor, motion sensor, LDR light sensor, humidity
sensor etc. After performing testing on each and every sensor , we have integrated
all the devices and connected it to the arduino mega 2560 micro controller with the
Acropolis Institute of Technology & Research, Indore Page 34
SMART HOME - THE AASHRAYA

help of jumper wires. And , lastly we have performed testing on integrated model,
observed the results and verified it.
So, here we followed the approach of piecing together of systems to give rise to
more complex systems, thus making the original systems sub-systems of the
emergent system, which is known as bottom up approach.

6.2 TEST PLAN


A Software Test Plan is a document describing the testing scope and activities. It is the basis for
formally testing any software/product in a project. Since the system was designed in a modular
fashion, a bottom up approach where all moduls were tested that this unit testing and later
intergration testing was carried out.
The objectives of test plan are:
a) Finding defects which may get created by the programmer while developing the software.
b) Gaining confidence in and providing information about the level of quality.
c) To prevent defects.
d) To make sure that the end result meets the business and user requirements.
e) To ensure that it satisfies the BRS that is Business Requirement Specification and SRS that is
System Requirement Specifications.
f) To gain the confidence of the customers by providing them a quality product.

6.3 Features to be tested

a) Components Validation
 Device Hardwar
 Embedded Software
 Application
 Cloud infrastructure
 Network Connectivity
 Third party software

b) Function Validation
 Interaction between device
 Basic device Testing (Start/Stop/Restart/Interrupt)
 Error Handling
 Valid Calculation

c) Performance Validation
 Data transmit Frequency

Acropolis Institute of Technology & Research, Indore Page 35


SMART HOME - THE AASHRAYA

 Multiple request handing


 Synchronization
 Interrupt testing
 Device performance
 Consistency validation

d) Security and Data Validation


 Validate data packets
 Verify data loses or corrupt
 Data encryption/decryption
 Data values
 Roles and Responsibility & its Usage Pattern

6.4 Features not to be tested

 Account Registration – Registration needs not to be tested because it will be done at the time of
installation

 Network security – Network security is out of our scope.

 Managing user database – It is out of our scope.

6.5 Testing tools and Environment

Testing tools
a) Software
 Arduino IDE

b) Hardware
 Test the voltage output of sensors through voltmeter and multimeter.
 Wi-fi connectivity.
 Reliability of batteries for power.
 Usability of each and every sensors.

Environment

 Model must have access to internet connection.


 Power is needed.

Acropolis Institute of Technology & Research, Indore Page 36


SMART HOME - THE AASHRAYA

6.6 Test cases

Test Case
Test Case Description Test Result
Number
Wi-Fi Module.
Node MCU
T-001 Used for wireless Successful
ESP8266
connectivity.
For performing automatic water
T-002 PCB Successful
maintaining function in tanks

T-003 T -relay For multiple switches Successful


For capturing and recording
T-004 Camera module Successful
images

T-005 Microphone / Speaker For audio uses Successful

T-006 Load cell Fo For measuring weight Successful

T-007 Ultrasonic sensor For measuring distance Successful

T-008 Arduino Mega Microcontroller Successful


2560

6.6(a) :- Test Cases

CHAPTER 7

FUNCTIONAL AND NON-

Acropolis Institute of Technology & Research, Indore Page 37


SMART HOME - THE AASHRAYA

FUNCTIONAL REQUIRMENTS

7.1 PERFORMANCE REQUIREMENT


The product shall take initial load time depending on internet connection strength. The
performance shall depend upon hardware components of the client as well as the hardware which
we are using to make our project. Speed of the internet connection from the remote system and
the speed of the connection to the server will affect the performance. The home automation
system is designed to be capable of operating even with slow internet connection. In addition to
this the sensors also affect the performance of the system.

7.2 RELIABILITY
High Reliability is the measure of how a product behaves in varying circumstances and our
project is reliable because there are less chances of errors and exceptions as it will work on
predefined function. The probability that our project will perform required function without
failure would depend on good internet speed. In addition to this we will be using rechargeable
batteries which makes the product reliable.

7.3 AVAILABILITY
The product is available to everyone. The users are able to use the product with their
Smartphone's from anywhere within a certain range. The services are available to the user as
long as there is a good internet access in Smartphone. An authorized login is provided to the
client so that he/she may login while sitting anywhere.

7.4 SECURITY
Security is the ability to remain protected from unauthorized access. Our application is well
secured as an authorized login will be provided to the client which would take care that only an
authenticated person will be able to access it.

Acropolis Institute of Technology & Research, Indore Page 38


SMART HOME - THE AASHRAYA

7.5 MAINTAINABILITY
Maintainability of system is done by administrator. While making the project we used a good
quality sensors so that they can be easy to maintain and also provide durability. The sensors
which we used are fault tolerant as well.

7.6 PORTABILITY
This project works on an android application, mobile phones are highly portable and can be
easily carried anywhere by users. Popularity of android is another important aspect as most of
users are aware of android user interface which makes it easy to use and increases scope of this
system. In our project we are using GSM as well as wi-fi module so that user will be able to
operate it while sitting anywhere.

7.7 RESPONSE TIME


Various sensors are used to make up an IoT based project and the response time of these sensors
is very less. These sensors respond very quickly to give the data value as the time it takes to
process is in milliseconds which helps to process very quickly under certain circumstances.

7.8 SCALABILITY
Scalability is the ability of a system or process to handle growing amount of work in a capable
manner or its ability to be enlarged to accommodate that growth. Our system is scalable as all we
have to do is increase the power supply. And if we have to operate more than one appliances
then all we have to do is increase the hardware components helping it to operate.

7.9 FAULT TOLERANCE


Fault tolerance refers to the ability of a system to continue operating without interruption when
one or more of its components fail. Our system is fault tolerant as we are using rechargeable
batteries so that there will be no problem of power supply and the system works without failure.

Acropolis Institute of Technology & Research, Indore Page 39


SMART HOME - THE AASHRAYA

And even we are using good quality sensors so that they work properly throughout.

7.10 SUPPORTABILITY
Supportability is the capability of the total system design to support operations and readiness
needs throughout the life-cycle of a system at an affordable cost. Our system shows
supportability as it is reliable, durable and low maintenance because of which the overall cost of
the project is very less. In addition to this we are using good quality sensors so that system
becomes easy to maintain. Even the cost of our system is less as compared to the other system
available in market and even it is reliable even if the cost is less.

Acropolis Institute of Technology & Research, Indore Page 40


SMART HOME - THE AASHRAYA

CHAPTER 8
CONCLUSION
This project proposes a low cost, secure and a remotely controlled solution The Iot based home
automation system has achieved the target to control electric appliance automatically to save resources
and to provide an easier, comfortable & convenient lifestyle. The project also presents a basic level of
remotely controlling home appliance & also monitor the system through a mobile application. Similarly,
modular design concept was adopted in hardware development for better functionality & greater
reliability. Along with giving various merits over other existing system it also gives high performance,
reliability, scalability, durability, etc.

FUTURE ENHANCEMENT
 Automatically rechargeable batteries.
 Fingerprint and face detection door unlock system.
 Smart bathroom
 All the wireless communication work can be done through GSM module.

Appendix A:

GLOSSARY

SR NO. WORDS MEANINGS

1 Authentication Process of establishing who you are.


2 Authorization Permission to access non-public information or
use equipment that is either fully or partially
restricted. Process of establishing what you can

Acropolis Institute of Technology & Research, Indore Page 41


SMART HOME - THE AASHRAYA

do.

3 Browser A software tool used to read electronic


documents. Mosaic, netscape and Lynx are the
most popular browsers.

4 Client/server A relationship in which client software obtains


services from a server on behalf of a person.

5 Crash A computer system is said to crash when it stops


working for some reason and must be restarted.
6 Database A collection of interrelated data values that may
be integrated permanently into a single
connected structure or integrated temporarily for
each interrogation, known as a query.
7 Database A systematic approach to storing, updating,
management securing and retrieving information stored as
system data items, usually in the form of records in one
or more files.

8 Error message A message that reports the detection of an error.

9 Execute To interpret a computer instruction and carry out


the operations specified in the instruction.

10 GUI Graphical User Interface. Defines a format for


scroll bars, buttons, menus, etc., and how they
respond to the user.

Acropolis Institute of Technology & Research, Indore Page 42


SMART HOME - THE AASHRAYA

Appendix B:

REFERENCES
1. k. Galatsis, W. Woldarsla, Y.X. Li and K. Kalantar-zadeh, “A Vehicle air quality monitor
using gas sensors for improved safety”,
report in Recent Researches in Applications of Electrical and Computer Engineering.
[2]. K. Galatsis, W. Wlodarsla, K. Kalantar-Zadeh and A. Trinchi, “Investigation of gas
sensors for vehicle cabin air quality
monitoring”, National Conference on Synergetic Trends in engineering and Technology (STET-
2014), International Journal of
Engineering and Technical Research ISSN: 2321-0869
[3]. “Smart Gas Cylinder Using Embedded System”, Issn (Online) 2321 – 2004 Issn
(Print) 2321 – 5526, International Journal Of
Innovative Research In Electrical, Electronics, Instrumentation And Control Engineering Vol. 2,
Issue 2, February 2014.
[4]. “Design and Implementation of an Economic Gas Leakage Detector” A.
MAHALINGAM, R. T. NAAYAGI,1, N. E.
MASTORAKIS§ Department of Engineering Systemsschool of Engineering, University of
Greenwich (Medway Campus)Chatham
Maritime, Kent ME4 4TBUNITED KINGDOM, article in Recent Researches in Applications of
Electrical and Computer
Engineering.
[5]. Fraiwan, L.; Lweesy, K.; Bani-Salma, A.; Mani, N, “A wireless home safety gas
leakage detection system”, Proc. of 1st Middle
East Conference on Biomedical Engineering, pp. 11-14, 2011.
[6]. Johansson, A.; Birk, W.; Medvedev, A., “Model-based gas leakage detection and
isolation in a pressurized system via Laguerre
spectrum analysis”, Proc. of IEEE International Conference on Control Applications, pp. 212-
216, 1998.
[7]. Lopes dos Santos, P.; Azevedo-Perdicoúlis, T.- P.; Ramos, J.A.; Jank, G.; Martins de
Carvalho, J.L.; Milhinhos, J., “Gas pipelines

Acropolis Institute of Technology & Research, Indore Page 43


SMART HOME - THE AASHRAYA

LPV modeling and identification for leakage detection”, Proc. of American Control Conference,
pp. 1211-1216, 2010.
[8]. Lopes dos Santos, P.; Azevedo-Perdicoúlis,T,P.Ramos,J.A.; Martins de Carvalho,
J.L.; Jank, G.; Milhinhos, “An LPV modeling and
identification approach to leakage detection in high pressure natural gas transportation
networks”, IEEE Transactions on Control
Systems Technology, vol. 19, pp. 77-92, 2011.

Acropolis Institute of Technology & Research, Indore Page 44

Vous aimerez peut-être aussi