Professional Documents
Culture Documents
Home Automation Report
Home Automation Report
1. Introduction 5–6
3. System Analysis 14 –
4. Feasibility Analysis 15 – 16
5. System Design 17 – 21
6. Coding 21 – 32
7. Testing 33 – 40
9. Future Scope 53
10. Conclusion 54
11. Bibliography 55
1
INTRODUCTION
The IoT project developed here is built on Arduino UNO. The Arduino is one of
the earliest and most popular prototyping boards. So It is assumed that the reader
has gone through the project how to get started with the arduino and done all the
things discussed in it. The visitor counter circuit is designed using PIR sensors.
The Arduino based IoT device simply passes the count of the visitors to serial
monitor. As the people enter the room the light will turn on.
Depending upon the sensors interruption, the system identifies the entry and exit
of the visitor. On the successful implementation of the system, it displays the
number of visitor present in the auditorium or hall. This is an economical cost
reducing system when implemented in places where the visitors have to be
counted and controlled. Counting the visitors can be time consuming so it helps
to maximize the efficiency and effectiveness of employees, time saving and sales
potential of an organization, etc.
The Arduino Uno does the above job. It receives the signals from the sensors,
and this signal is operated under the control of software called Arduino(IDE).
Also in addition the total number of person in the room be incremented value or
2
decremented value will always be displayed in the Serial Monitor thus makes
this system a very user friendly.
3
HARDWARE AND PLATFORM
The hardware part mainly consists of a digital computer, an Arduino Uno board,
Pyroelectric Infrared Sensor module, Resistor, Buzzer, as equipments used.
Platform is IOT here. This are being discussed along with their specific
functions.
B. PIR SENSOR :
PIR sensor detects a human being moving around within approximately 10m
from the sensor. This is an average value, as the actual detection range is
between 5m and 12m.PIR are fundamentally made of a pyro electric sensor,
which can detect levels of infrared radiation. For numerous essential projects or
items that need to discover when an individual has left or entered the area. PIR
sensors are incredible, they are flat control and minimal effort, have a wide lens
range, and are simple to interface with.
4
Most PIR sensors have a 3-pin connection at the side or bottom. One pin will be
ground, another will be signal and the last pin will be power. Power is usually up
to 5V. Sometimes bigger modules don’t have direct output and instead just
operate a relay which case there is ground, power and the two switch
associations. Interfacing PIR with microcontroller is very easy and simple. The
PIR acts as a digital output so all you need to do is listening for the pin to flip
high or low. The motion can be detected by checking for a high signal on a
single I/O pin. Once the sensor warms up the output will remain low until there
is motion, at which time the output will swing high for a couple of seconds, then
return low. If motion continues the output will cycle in this manner until the
sensors line of sight of still again. The PIR sensor needs a warm-up time with a
specific end goal to capacity fittingly. This is because of the settling time
included in studying nature’s domain. This could be anyplace from 10-60
seconds.
The PIR sensors are more complicated thanthe other sensors as they consists of
two slots. These slots are made of a special material which is sensitive to IR. The
Fresnel lens is used to see that the two slots of the PIR can see out past some
distance. When the sensor is inactive, then the two slots sense the same amount
of IR.The ambient amount radiates from the outdoors, walls or room,etc.
When a human body or any animal passes by, then it intercepts the first slot of
the PIR sensor. This causes a positive differential change between the two
bisects.When a human body leaves the sensing area,the sensor generates a
negative differential change between the two bisects. The infrared sensor itself is
housed in a hermetically sealed metal to improve
humidity/temperature/noise/immunity. There is a window which is made of
typically coated silicon material to protect the sensing element.
5
C. ULTRASONIC SENSOR :
D. RELAY MODULE :
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.
We’ve used a relay module has two channels. There are other models with one,
four and eight channels. This module should be powered with 5V, which is
appropriate to use with an Arduino. There are other relay modules that are
powered using 3.3V, which is ideal for ESP32, ESP8266, and other
microcontrollers.
A type of relay that can handle the high power required to directly control an
electric motor or other loads is called a contactor. Solid-state relays control
power circuits with no moving parts, instead using a semiconductor device to
perform switching. Relays with calibrated operating characteristics and
6
sometimes multiple operating coils are used to protect electrical circuits from
overload or faults; in modern electric power systems these functions are
performed by digital instruments still called "protective relays".
7
BLOCK DIAGRAM AND CIRCUIT DIAGRAM
BLOCK DIAGRAM:
The basic Block diagram of the bidirectional visitor counter with automatic light
controller is shown in the above figure. Mainly this Block diagram consists of
the following essential blocks.
1. Power Supply
3. Arduino micro-controller
1. Power Supply:-
Here we used +12V and +5V dc power supply. The main function of this block
is to provide the required amount of voltage to essential circuits. +12voltage is
given. +12V is given to relay driver. To get the +5V dc power supply we have
used here IC 7805, which provides the +5V dc regulated power supply.
This is one of the main parts of our project. The main intention of this block is
to sense the person. For sensing the person and light we are using the light
dependent register (LDR). By using this sensor and its related circuit diagram we
can count the persons.
3. Arduino Microcontroller:-
The most important advantage with Arduino is the programs can be directly
loaded to the device without requiring any hardware programmer to burn the
program. This is done because of the presence of the 0.5KB of Bootloader which
allows the program to be burned into the circuit.
9
4. Relay Driver Circuit:-
This block has the potential to drive the various controlled devices. In this block
mainly we are using the transistor and the relays. One relay driver circuit we are
using to control the light. Output signal from AT89S52 is given to the base of
the transistor, which we are further energizing the particular relay. Because of
this appropriate device is selected and it do its allotted function.
5. Buzzer :-
This is used in our project to just buz when there is someone enters the room.
CIRCUIT DIAGRAM
10
SYSTEM ANALYSIS
After analyzing the requirements of the task to be performed, the next step is to
analyze the problem and understand its context. The first activity in the phase is
studying the existingsystem and other is to understand the requirements and
domain of the new system.
Both the activities are equally important, but the first activity serves as a basis of
giving the functional specifications and then successful design of the proposed
system. Understanding the properties and requirements of a new system is more
difficult and requires creative thinking and understanding of existing running
system is also difficult, improper understanding of present system can lead
diversion from solution.
System analysis is conducted for the purpose of studying a system or its parts in
order to identify its objectives. It is a problem solving technique that improves
the system and ensures that all the components of the system work efficiently to
accomplish their purpose.
11
FEASIBILITY ANALYSIS
12
The operation of the device follows a programming procedure. In the
detection section, the infrared sensor signal is interrupted by a passing visitor.
The interruption of the signal from the IR transmitter, it sends another signal
to the microcontroller. The PIC16F877A microcontroller works as an
Analogue to Digital Converter (ADC), thus it processes the analog data by
converting the analog signal to digital. Then, the appropriate signals are sent
to the output devices of the system to ensure optimum functionality. The
microcontroller also sends data to the LCD screen to inform the user on the
state of the system.
The first step in the software development is deciding the serial number,
which indicates the number of input/output ports and the memory size of the
microcontroller to be used. Programming flow for software development is
provided by designing a flow chart.
The software that is used in this design is WIZ-C for the PIC16F877A
microcontroller. WIZ-C provides successful match featuring a highly
advanced Integrated Development Environment (IDE), American National
Standards Institute (ANSI) compliant compiler, a broad set of hardware
libraries, comprehensive documentation.
13
SYSTEM DESIGN
Sequence diagrams map out complex architecture, but they can be surprisingly
easy to create. Sequence diagrams are a popular subset to UML, so if you’re new
to the topic, use our sequence diagram tutorial to familiarize yourself and find
different ways you can use sequence diagrams to map out your technical process
and infrastructure.
14
To accomplish these goals, you must first identify the components of your
system that should be diagrammed. The first necessary set of components are the
objects. The objects, sometimes called actors, are the principal players that
perform tasks and send messages.
For example, in a login sequence, two of the objects would be the potential
visitor or user and the login page a visitor uses to interact with the platform
they’re attempting to log into. The other set of components you must identify are
the messages the objects will send. What information is passed from one object
to another?
In the user authentication process we describe, the messages show how a user
enters information into the browser to gain access to the webpage and how the
web browser will then cross-check credential to the designated application.
Lucidchart has an entire UML shape library with all the standard shapes needed
to create professional sequence diagrams. Click on "Shapes" in the upper-left
corner of the editor and select "UML" in the Shape Library Manager to add
UML shapes to your toolbar.
Lucid Chart speeds up the process of creating sequence diagrams with our
sequence markup feature. This feature allows users to create beautiful sequence
diagrams faster and with less hassle. By automating the process, you can
generate a sequence diagram simply by typing your markup order directly into
the editor.
Just navigate to the UML Sequence shape library, and click ―Use Markup.‖ A
text pad will open, where you can type out the order of your sequence and its
rules. When you’re ready, click ―Build‖ and click back out into the editor to see
your new automatically generated sequence diagram.
15
Manually build a sequence diagram
Once the UML shape library is enabled, it’s easy to add your shapes to the
canvas with a simple drag-and-drop action. Add rectangles to the top of the
canvas, one for each object, and label each rectangle with the name of the object.
If the object is both external and internal to the system, you may choose to use
an actor symbol instead of a rectangle. You can find this symbol in the use case
diagram section of the toolbox.
The sensor placed on the outside of the room is named as Sensor 1 and the
sensor, which is placed on the inside is named Sensor 2.
When a person tries to enter the room, Sensor 1 detects the person first and then
Sensor 2. This action will indicate the 8051 Microcontroller that the person is
entering the room.
Hence, the microcontroller will turn on the light and also increments the visitor
counter to 1. If there are more visitor, the microcontroller will keep the light
turned on and increments the visitor counter accordingly.
When a person tries to leave the room, Sensor 2 detects the person first and then
Sensor 1. This process will make the microcontroller to understand that a person
is trying to leave the room and hence, it will decrement the count of visitors. The
microcontroller will not turn off the light until the last person has left the room.
16
Hardware design
The whole system design is divided into three parts to design a smart home
appliance control system. First one is to design the smart system in the
breadboard and control the designed system.
Second part is to display part design to count the value in smart system. And
third Finally, the smart home appliance control system is formed a complete
integrated system. In this project Arduino development board is more efficient.
The whole system consists of many sub-systems. The block diagram of the
whole system is given the Figure 4.1.
17
Components Used in the System
1k Resistance
Variable resistance
One buzzer
18
CODING
/*
* ------------------------------------------------------------------------------------------
This project shows when there is dark in the room,and someone enters the room
,PIR will
detect motion, the light will be turned on, and count number of person enter the
room.
When there is light in the room, it doesn't matter how many people will come
inside,
*--------------------------------------------------------------------------------------------
*/
19
int prevstate =0; //for PIR sensor states
void setup()
Serial.begin(9600);
pinMode(LIGHT, INPUT_PULLUP);
pinMode(RELAY, OUTPUT);
20
// define pin 7 as Input for PIR
pinMode(PIR, INPUT);
pinMode(BUZ, OUTPUT);
pinMode(UStp,OUTPUT);
pinMode(USep,INPUT);
//end of setup()
void loop()
delay(1000);
21
//detect LDR input,i.e, HIGH or LOW
int L=digitalRead(LIGHT);
int P=digitalRead(PIR);
/*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
Serial.println("---Motion Detected.---");
22
{
currentstate=1;
delay(1000);
else
currentstate=0;
pirstate=LOW;
23
}
tone(BUZ,100,100);
ctr=ctr+1;
Serial.println(ctr);
delay(1000);
24
} //end of counter if-conditon
if(ctr>=1)
Serial.println("***---light is ON---***");
/*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
//truning trigger on
digitalWrite(UStp,LOW);
delayMicroseconds(2);
digitalWrite(UStp,HIGH);
25
delayMicroseconds(5);
duration = pulseIn(USep,HIGH);
distance = ((duration/2)/29.1);
else
26
{
Serial.print("Distance : ");
Serial.println(distance);
Serial.println(ctr);
L=digitalRead(LIGHT);
if(L==LOW)
27
Serial.println("---External light---(turning off light)");
delay(1000);
if(ctr==0)
else
28
//if there is light present already
delay(1000);
29
TESTING
1. The first includes unit testing, where in each module is tested to provide its
correctness, validity and also determine any missing operations and to verify
whether the objectives have been met. Errors are noted down and corrected
immediately. Unit testing is the important and major part of the project. So
errors are rectified easily in particular module and program clarity is increased.
In this project entire system is divided into several modules and is developed
individually. So unit testing is conducted to individual modules.
2. The second step includes Integration testing. It need not be the case, the
software whose modules when run individually and showing perfect results, will
also show perfect results when run as a whole. The individual modules are
clipped under this major module and tested again and verified the results. This is
due to poor interfacing, which may results in data being lost across an interface.
A module can have inadvertent, adverse effect on any other or on the global data
structures, causing serious problems.
3. The final step involves validation and testing which determines which the
software functions as the user expected. Here also some modifications were. In
the completion of the project it is satisfied fully by the end user.
30
Software Testing is an empirical investigation conducted to provide
stakeholders with information about the quality of the product or service
under test, with respect to the context in which it is intended to operate.
Software Testing also provides an objective, independent view of the
software to allow the business to appreciate and understand the risks at
implementation of the software. Test techniques include, but are not
limited to, the process of executing a program or application with the
intent of finding software bugs. It can also be stated as the process of
validating and verifying that a software program/application/product meets
the business and technical requirements that guided its design and
development, so that it works as expected and can be implemented with the
same characteristics.
31
like the real data processed by the program. Testing is carried out during the
implementation phase to verify that the software behaves as intended by its
designer and after the implementation is complete. The following are the
standard procedures for testing which the content based image retrieval has gone
through:
2. A test configuration that includes test plans, test cases and test tools. Tests
are conducted and all the result is evaluated. These test results are
compared with expected results. When erroneous data are uncovered, an
error is implied and debugging commences.
Test Planning
32
Testing Process
Systems are built out of subsystems which are built out of modules which are
composed of procedures and functions. The testing process proceeds in stages
where testing is carried out incrementally in conjunction with system
implementation.
Testing Strategies
Black box testing alludes to test that are conducted at the software interface.
These are used to demonstrate the software functional operations whose input is
properly accepted and the outputs are correctly produced.
33
Test cases design technique to a well-planned series of steps that the result in
successful construction software:
1. Unit Testing
2. Integration Testing
3. Validation Testing
4. System Testing
1. Unit Testing
Unit test focuses on verification effort for the smallest unit of software design
module. This is also known as module testing, the individual modules of ―SNMP
SIMULATOR‖ tested. In this testing step each module was found to be working
satisfactorily with regard to the expected output from the module. Important
control paths are tested to uncover within the boundary. The relative complexity
of tests and errors are deleted as result is limited by conditions.
The local data structure is examined to ensure that the data stored temporarily
maintains its integrity during all steps in algorithms executions. Boundary
conditions are tested to ensure that all statements in a module have been
executed at least once. All error-handling paths are testing.
Testing is done for the incorrect variable name, inconstant data types, underflow,
overflow etc.
34
2. Integration Testing
3. Validation Testing
5. Output Testing
After performing the validation tests, the next step is the output testing of the
proposed system. No system is useful, if it does not produce the required output
in the specified format. Considering the format required the user tests the output
generated or displayed by the system under consideration .Here the output
format on the screen is found to be correct as the format was designed in the
system design phase according to the user needs. For the hard copy also the
35
output comes out as specified requirements by the user. Hence, output testing
does not result in any correction in the system.
User acceptance is a key factor for the success of any system. The system under
consideration is tested for user acceptance by constantly keeping in touch with
perspective system user, as is done with regard to the following points:
4. Format of Outputs
Taking various kinds of test data does the above tests. Preparation of test data
plays a vital role in system testing. After preparing the test data, the system
under study is tested using the test data. While testing the system using data, the
errors are again uncovered. These errors are again corrected by using the above
testing steps and corrections are also noted for future use.
7. System Testing
After the system is implemented successfully, the training of the user is one of
the most important subtasks of the developer. For the purpose, the user manuals
are prepared and handed over to the user to operate the developed system. Both
the hardware and software securities are made to run the developed system
successfully in future.
36
System testing is actually a series of different test whose primary purpose is to
fully exercise the computer-based system, including recovery testing during
crashes, security testing for unauthorized users etc.
8. Validation Testing:
At the validation level, testing focuses on user visible actions and user
recognizable output from the system. Validations testing is said to be successful
when software functions in a manner that can be reasonably expected by the
customer.
c) Gray box testing Grey box testing is the combination of black box and
white box testing.
37
SOFTWARE QUALITY ASSURANCE :-
The IEEE Standards for the Software Quality Assurance Plans states that
the plan should contain the following sections:
I. Purpose
III. Management
IV. Documentation
X. Code Control
38
A. Purpose, Scope and Overview:
This plan establishes the SQA activities performed throughout the life
cycle of the Touché . Specifically, this SQA Plan will show that the SQA
function is in place for this project. It will show that the SQA group has a
reporting channel to senior management that is independent of the project
manager, the project’s software engineering group,
The goal of the SQA program is to verify that all software and documentation to
be delivered meet all technical requirements.
B. Reference documents:
C. Management:
An IEEE standard lays down three aspects that should be covered in the
Software Quality Assurance Plan:
39
Organization: The organization section includes the roles of the team
members, their hierarchy etc. It is important that the head of the
Software Quality Assurance (SQA) function in the organization has the
adequate authority to be able to perform independent verification that the
processes are adhered to.
The following describes the functional groups that influence and control
software quality.
40
d). Software Design/Development is responsible for :
e). Software Test is responsible for: Verifying, Implementing the software test
practices, processes, and procedures as defined in program/project planning
documents.
Verifying the quality factors are implemented in the system (software and
hardware).
41
j). Systems Engineering Process Office (SEPO) is responsible for:
improvement.
Development activities are taking place. One or more SQA tasks can be
42
b) Responsiblities: The project manager and design/development teams
haveprimary responsibility for the quality controls applied during the
development of the software project.
Approve the plan of the audits for the project which are to be
carried out by quality personnel.
Carry out planned internal audits of the project to assess compliance with
quality objectives.
Agree on corrective action with the project manager for any
discrepancies, non-conformities found and ensure that corrective action is
taken.
Evaluate defect trends and take appropriate action.
43
D. Documentation:
This section describes the procedures used by SQA to verify that the
quality assurance provisions of this SQA Plan and applicable standards,
practices, conventions, and metrics are met.
The following measurements will be made and used to determine the cost and
schedule status of the SQA activities: SQA milestone dates (planned)
44
a. SQA milestone dates (completed)
The review and audits sections of Software Quality Assurance Plan will
state which technical and managerial reviews will be undertaken and how
they will be carried out. The ANSI standard suggests that the following
would be a minimum set of reviews:
45
Physical Audit: This is held to verify that the software and its
documentation are internally consistent prior to delivery to the user.
G. Configuration Management:
This section of the Software Quality Assurance plan describes the system,
which ensures that software problems are documented and resolved. It should be
a closed-loop system. All the problems should be promptly reported at
appropriate level, acted upon and resolved. Each problem should be analyzed to
determine its significance and causes and classified by category and each
problem must have severity level and a priority number.
For each problem, some corrective action and a target completion date should be
identified. The appropriate level of management should be made aware of the
problems and adverse trends. The corrective action taken will be evaluated
to ensure that it solved the problem without introducing any new
problems. Management should monitor the status of all unresolved problems.
Tools - SQA software tools include, but are not limited to, operating
system utilities, debugging aids, documentation aids, checklists, structuring
preprocessors, file comparators, structure analyzers, code analyzers, standards
46
auditors, simulators, execution analyzers, performance monitors, statistical
analysis packages, software development folder/files, software traceability
matrices, test drivers, test case generators, static or dynamic test tools, and
information engineering CASE tools.
I. Code Control:
47
J. Media Control:
Fire Damage
Water Damage
Energy Variations
Structural Damage
Pollution
Unauthorized Intrusion
K. Supplier Control:
48
L. Records collection, maintenance and retention:
Implementation
15 Days
Testing
10 Days
Coding
15 Days
Design
20 Days
Analysis
10Days
Gantt Chart
49
FUTURE SCOPE AND FURTHER ENHANCEMENT
By using this circuit and proper power supply we can implement various
applications Such as fans, tube lights, etc.
By modifying this circuit and using two relays we can achieve a task of opening
and closing the door.
Initially for the limitation of time and required fund we were able to develop just
a home appliance control system.
The system will also work using Laser sensor. So, we have a big work scope in
this sector. We hope that, we will be able to complete all the features needed for
its ultimate applications.
We can also use it for a classroom or big hall to provide light only in that part
which have people there.
We can also improve or update this project for fan, door, windows etc.
50
CONCLUSION
The smart home appliance control system was designed and developed for
minimizing the wastage of electricity.
We use 5V from Arduino board and use 12V DC power supply for relay
connection.
We use the photodiode for receiving laser light because it is low cost, low noise,
59 excellent linearity in output photocurrent over 7 to 9 decades of light intensity
and fast response times.
Finally, we design and develop a Arduino base smart home appliance control
system.
We fix the entire problem that we have. Finally, we successfully achieve our
primary goals.
We see that our smart home appliance control system is efficient and the
production cost is low. So, our smart home appliance control system is suitable
for commercial.
51
BIBLIOGRAPHY
en.wikipedia.org
Beginner’s Guide to understand IOT [online]
Prof, Asha Rawat ―Automated Room Light Controller with Visitor
Counter‖, Imperial Journal of Inter Disciplinary Research, Vol. 2, Issue 4,
2016
Lnkedin Slide Share for ―Home Automation using Sensors‖
52