Beruflich Dokumente
Kultur Dokumente
Certified that the project work entitled “Home Automation System” being
submitted by Ankit (1702914908) for the partial fulfillment of MCA-IV
offered by Dr. A.P.J. Abdul Kalam Technical University during the
academic year 2017-2018 is an original work carried out by the student
under my supervision, and this work has not formed the basis for the award
of any degree, diploma or such other titles.
Supervisor
Mr. Prashant Agrawal
Associate Professor
KIET Group of Institutions, Ghaziabad
External Examiner
Date:
i
CERTIFICATE
Certified that the project work entitled “Home Automation System” being
submitted by Lalit Ujjwal (1702914928) for the partial fulfillment of
MCA-IV offered by Dr. A.P.J. Abdul Kalam Technical University during
the academic year 2017-2018 is an original work carried out by the student
under my supervision, and this work has not formed the basis for the award
of any degree, diploma or such other titles.
Supervisor
Mr. Prashant Agrawal
Associate Professor
KIET Group of Institutions, Ghaziabad
External Examiner
Date:
ii
CERTIFICATE
Certified that the project work entitled “Home Automation System” being
submitted by Sumit Malik (1702914943) for the partial fulfillment of
MCA-IV offered by Dr. A.P.J. Abdul Kalam Technical University during
the academic year 2017-2018 is an original work carried out by the student
under my supervision, and this work has not formed the basis for the award
of any degree, diploma or such other titles.
Supervisor
Mr. Prashant Agrawal
Associate Professor
KIET Group of Institutions, Ghaziabad
External Examiner
Date:
iii
CERTIFICATE
Certified that the project work entitled “Home Automation System” being
submitted by Udai Pratap Singh (1702914944) for the partial fulfillment
of MCA-IV offered by Dr. A.P.J. Abdul Kalam Technical University during
the academic year 2017-2018 is an original work carried out by the student
under my supervision, and this work has not formed the basis for the award
of any degree, diploma or such other titles.
Supervisor
Mr. Prashant Agrawal
Associate Professor
KIET Group of Institutions, Ghaziabad
External Examiner
Date:
iv
ACKNOWLEDGEMENT
ANKIT
LALIT UJJWAL
SUMIT MALIK
UDAI PRATAP SINGH
v
ABSTRACT
vi
TABLE OF CONTENT
vii
CHAPTER 5 : APPLICATION DESCRIPTION 16-20
CHAPTER 6 : INTERFACE REQUIREMENTS 21-47
6.1 Customer Interface
6.2 Hardware Interface
6.3 Software Interface
CHAPTER 7 : APPLICATION SECURITY 48-53
7.1 Common Security Threats
7.2 Technical Security Features
CHAPTER 8 : RESULT & DISCUSSIONS 54-55
8.1 Problem Faced
CHAPTER 9 : ADVANTAGES 56-58
CHAPTER 10 : LIMITATIONS & FUTURE 59-61
10.1 Limitations
10.2 Future Enhancement
10.3 Budget Analysis
CHAPTER 11 : CONCLUSION & BIBLIOGRAPHY 62-63
viii
TABLE OF FIGURES
ix
CHAPTER 1
PROJECT OVERVIEW
1.1: INTRODUCTION
1
The popularity of home automation has been increasing greatly
in recent years due to considerable affordability and simplicity
through smartphone and tablet connectivity.
2
1.2: PROBLEM STATEMENT
1.3: OBJECTIVES
3
iii. To provide ease to the old age people or physically handicapped
people, who are unable to even walk properly.
1.4: SCOPES
4
1.5: APPLICATIONS
5
CHAPTER 2
LITERATURE REVIEW
As per our survey, there exist many systems that can control
home appliances using android based phones/tablets. Each system
has its unique features. Currently certain companies are officially
registered and are working to provide better home automation system
features. Following models describes the work being performed by
others. N. Sriskanthan explained the model for home automation
using Bluetooth via PC. But unfortunately the system lacks to
support mobile technology.
6
University College, Faculty of Technology has done a Master’s thesis
on “Home Automation” [5]. This project of his is quite interesting
and challenging on the other hand. The author has developed a home
automation system which is quite similar to the concept we’re trying
to implement in our project. His H.A system has got Raspberry pi
tied together with Arduino controller for the controlling of a number
of devices, unlike ours. Similarly, his project has conceptualized to
integrate both the LAN network and Internet for two different aspect
of the same project idea, however has not managed to do so. Also, he
uses a website based user side application for controlling the home
appliances through a web browser, this is striking difference between
his project and what we’re trying to do.
7
Apart from the actual projects we consulted, we also did some
research on the background of this field, studied about the basics and
foundations necessary to carry out this project. For instance, we went
through the book “Raspberry Pi Home Automation with Arduino” by
Andrew K. Dennis. It’s an excellent read for the beginners to jump
into the field of Home Automation. It deals with the necessary
background details required to build a H.A system. It talks about
Raspberry Pi, Arduino controller, database design and all sorts of
things.
Last but not the least, the book “Designing the Internet of
Things” by Adrian McEwen and co. gives a great deal of knowledge
on the concept of Internet of Things which ranges from the day to
day examples of IoT based projects, the information of taking you
prototype to manufacturing. This book is really a good take on IT
based entrepreneurship.
8
Other helpful resources are the online sources like official
Raspberry Pi documentation and resource site [7] which has detailed
information about how to get started with the Raspberry Pi,
configuration details, forum discussions and whole lot of useful stuffs
like setting up the apache server on pi. Also, it has information
regarding setting up the Raspberry Pi camera module, taking pictures
and video using the Python pi camera module, connecting a physical
button with the GPIO pins and programming it to control the camera.
9
CHAPTER 3
FEASIBILITY ANALYSIS
10
3.3: 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 a button.
So it is operationally feasible.
11
CHAPTER 4
PROJECT MANAGEMENT
12
4.1.1: Experimentation
13
4.2: BLOCK DIAGRAM
Android Bluetooth
Application Device
Arduino UNO
14
4.3: GANTT CHART
Gantt Chart
23-Jan-18 12-Feb-18 4-Mar-18 24-Mar-18 13-Apr-18 3-May-18 23-May-18
Requirements Gathering
Feasibility Study
Analysis
Design
Implementation
15
CHAPTER 5
APPLICATION DESCRIPTION
16
2. Then home page of the application will be opened and looks like this:
17
3. Then application will request to open the Bluetooth, if already open then
it will show 4 switches to operate with.
18
4. Currently there is a timer based on seconds to automatically turn off the
particular appliance after the timer ends.
19
5. User can also rename the switch name as per the name of electrical
appliance connected to the switch.
20
CHAPTER 6
INTERFACE REQUIREMENT
The design or layout of our will be very clear and very interactive to
the customer.
When the customer opens the application the home page will
appear.
Then it will ask you to add an electrical device you have to control.
1. Arduino Uno
2. Bluetooth HC 05
3. 4- Channel Relay Circuit
4. Jumper Wires
5. Android Phone
6. AC Power Adapter
21
6.2.1: Arduino Uno
22
considered the most user-friendly and popular board, with boards being sold
worldwide for less than 5$.
Pins
LED: There is a built-in LED driven by digital pin 13. When the pin is
HIGH value, the LED is on, when the pin is LOW, it's off.
VIN: The input voltage to the Arduino/Genuino board when it's using an
external power source (as opposed to 5 volts from the USB connection
or other regulated power source). You can supply voltage through this
pin, or, if supplying voltage via the power jack, access it through this
pin.
5V: This pin outputs a regulated 5V from the regulator on the board.
The board can be supplied with power either from the DC power jack (7
- 20V), the USB connector (5V), or the VIN pin of the board (7-20V).
Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and
can damage the board.
23
3V3: A 3.3 volt supply generated by the on-board regulator. Maximum
current draw is 50 mA.
GND: Ground pins.
IOREF: This pin on the Arduino/Genuino board provides the voltage
reference with which the microcontroller operates. A properly
configured shield can read the IOREF pin voltage and select the
appropriate power source or enable voltage translators on the outputs to
work with the 5V or 3.3V.
Reset: Typically used to add a reset button to shields which block the
one on the board.
Special Pin Functions
Each of the 14 digital pins and 6 Analog pins on the Uno can be used as
an input or output, using pinMode(),digitalWrite(), and digitalRead()
functions. They operate at 5 volts. Each pin can provide or receive 20 mA
as recommended operating condition and has an internal pull-up resistor
(disconnected by default) of 20-50k ohm. A maximum of 40mA is the value
that must not be exceeded on any I/O pin to avoid permanent damage to the
microcontroller.The Uno has 6 analog inputs, labeled A0 through A5, each
of which provide 10 bits of resolution (i.e. 1024 different values). By
default they measure from ground to 5 volts, though is it possible to change
the upper end of their range using the AREF pin and the analogReference()
function.
24
In addition, some pins have specialized functions:
Serial: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX)
TTL serial data. These pins are connected to the corresponding pins of
the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: pins 2 and 3. These pins can be configured to
trigger an interrupt on a low value, a rising or falling edge, or a change
in value.
PWM(Pulse Width Modulation) 3, 5, 6, 9, 10, and 11 Can provide 8-bit
PWM output with the analogWrite() function.
SPI(Serial Peripheral Interface): 10 (SS), 11 (MOSI), 12 (MISO), 13
(SCK). These pins support SPI communication using the SPI library.
TWI(Two Wire Interface): A4 or SDA pin and A5 or SCL pin. Support
TWI communication using the Wire library.
AREF(Analog References: Reference voltage for the analog inputs.
Communication
25
needed. However, on Windows, a inf file is required. The Arduino Software
(IDE) includes a serial monitor which allows simple textual data to be sent
to and from the board. The RX and TX LEDs on the board will flash when
data is being transmitted via the USB-to-serial chip and USB connection to
the computer (but not for serial communication on pins 0 and 1). A
SoftwareSerial library allows serial communication on any of the Uno's
digital pins.
This setup has other implications. When the Uno is connected to either
a computer running Mac OS X or Linux, it resets each time a connection is
made to it from software (via USB). For the following half-second or so,
the bootloader is running on the Uno. While it is programmed to ignore
malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is
opened.
26
6.2.2: Bluetooth HC 05
Introduction
module, designed for transparent wireless serial connection setup. The HC-
05 Bluetooth Module can be used in a Master or Slave configuration,
making it a great solution for wireless communication. This serial port
Bluetooth module is fully qualified Bluetooth V2.0+EDR (Enhanced Data
Rate) 3Mbps Modulation with complete 2.4GHz radio transceiver and
baseband. It uses CSR Blue core 04‐External single chip Bluetooth system
27
The Bluetooth module HC-05 is a MASTER/SLAVE module. By
default the factory setting is SLAVE. The Role of the module (Master or
Slave) can be configured only by AT COMMANDS. The slave modules
cannot initiate a connection to another Bluetooth device, but can accept
connections. Master module can initiate a connection to other devices. The
user can use it simply for a serial port replacement to establish connection
between MCU and GPS, PC to your embedded project, etc. Just go through
the datasheet for more details File:Datasheet.pdf
Hardware Features
Software Features
Slave default Baud rate: 9600, Data bits:8, Stop bit:1,Parity:No parity.
28
Auto‐pairing PINCODE:”1234” as default.
Pin Description
ENABLE:
When enable is pulled LOW, the module is disabled which means the
module will not turn on and it fails to communicate. When enable is left
open or connected to 3.3V, the module is enabled i.e the module remains
on and communication also takes place.
Vcc:
Supply Voltage 3.3V to 5V
GND:
Ground pin
TXD & RXD:
These two pins acts as an UART interface for communication
STATE:
It acts as a status indicator. When the module is not connected to /
paired with any other Bluetooth device, signal goes Low. At this low state,
the led flashes continuously which denotes that the module is not
paired with other device. When this module is connected to/paired with
any other Bluetooth device, the signal goes high. At this high state, the led
blinks with a constant delay say for example 2s delay which indicates that
the module is paired.
29
6.2.3: Button Switch
As we know that Vcc and gnd of the module goes to Vcc and Gnd of
Arduino. The TXD pin goes to RXD pin of Arduino and RXD pin goes to
TXD pin of Arduino i.e. (digital pin 0 and 1).The user can use the on board
Led. But here, Led is connected to digital pin 12 externally for betterment
of the process.
30
Program for HC-05 Bluetooth Module
The Bluetooth SPP PRO has three types of communication mode. Here
Byte stream mode is used to communicate. So select that mode and give the
input as 1, as soon as the input has given the led will turn on and for 0 led
will turn off.
6.2.5: 4 Channel 5V Relay Modules
31
as lights, electric fans and air condition. A relay can be used to control high
voltages with a low voltage by connecting it to an MCU.
Principle of relay
Add a certain voltage to the coil and some currents will pass through
the coil thus generating the electromagnetic effect. So the armature
overcomes the tension of the spring and is attracted to the core, thus closing
the moving contact of the armature and the normally open contact (or you
may say releasing the former and the normally closed contact). After the
coil is de-energized, the electromagnetic force disappears and the armature
32
moves back to the original position, releasing the moving contact and
normally closed contact. The closing and releasing of the contacts results in
power on and off of the circuit.
Features
Each relay has NO and NC ports, easier to connect and control the
connected devices
For Arduino
Step 1:
Connect the signal terminal IN4、IN5 of 8-channel relay to digital port
3,2 of the Sun Founder Arduino Mega2560 board, and connect an LED at
the output terminal. Pay attention to that there are only two sub modules of
33
the 8-channel relay are used in this example, but you can use the 4 sub
module freely.
4-channel relay------- Arduino Mega2560
IN4---------------- 3
IN5---------------- 2
Step 2:
34
6.2.6: Jumper Wire
1. Android Studio3.0.1
2. Arduino IDE 1.8.2
35
and designed primarily for touchscreen mobile devices such
as smartphones and tablets. In addition, Google has further
developed Android TV for televisions, Android Auto for cars, and Wear
OS for wrist watches, each with a specialized user interface. Variants of
Android are also used on game consoles, digital cameras, PCs and other
electronics.
36
monthly active users, the largest installed base of any operating system, and
as of 2017, the Google Play store features over 3.5 million apps.
Applications
37
on Apache Cordova for porting Chrome HTML 5 web applications to
Android, wrapped in a native application shell.
38
Memory management
Development
39
including Google's own, ultimately ship with a combination of free and
open source and proprietary software, with the software required for
accessing Google services falling into the latter category.
Linux kernel
40
without Linux, there is no Android". Ars Technica wrote that "Although
Android is built on top of the Linux kernel, the platform has very little in
common with the conventional desktop Linux stack".
41
Android is a Linux distribution according to the Linux
Foundation, Google's open-source chief Chris DiBona, and several
journalists. Others, such as Google engineer Patrick Brady, say that
Android is not Linux in the traditional Unix-like Linux distribution sense;
Android does not include the GNU C Library (it uses Bionic as an
alternative C library) and some of other components typically found in
Linux distributions.
With the release of Android Oreo in 2017, Google began to require that
devices shipped with new SoCs had Linux kernel version 4.4 or newer, for
security reasons. Existing devices upgraded to Oreo, and new products
launched with older SoCs, were exempt from this rule.
Software stack
42
compatible libraries. Development of the Linux kernel continues
independently of Android's other source code projects.
For its Java library, the Android platform uses a subset of the now
discontinued Apache Harmony project. In December 2015, Google
announced that the next version of Android would switch to a Java
implementation based on the OpenJDK project.
43
for low-frequency CPUs. At the same time, Bionic is licensed under the
terms of the BSD licence, which Google finds more suitable for the
Android's overall licensing model.
Aiming for a different licensing model, toward the end of 2012, Google
switched the Bluetooth stack in Android from the GPL-licensed BlueZ to
the Apache-licensed BlueDroid.
Android does not have a native X Window System by default, nor does
it support the full set of standard GNU libraries. This made it difficult to
port existing Linux applications or libraries to Android, until version r5 of
the Android Native Development Kit brought support for applications
written completely in C or C++. Libraries written in C may also be used in
applications by injection of a small shim and usage of the JNI.
Android has another operating system, Trusty OS, within it, as a part of
"Trusty" "software components supporting a Trusted Execution
Environment (TEE) on mobile devices." "Trusty and the Trusty API are
subject to change. [..] Applications for the Trusty OS can be written in
C/C++ (C++ support is limited), and they have access to a small C library.
[..] All Trusty applications are single-threaded; multithreading in Trusty
userspace currently is unsupported. [..] Third-party application development
is not supported in" the current version, and software running on the OS and
processor for it, run the "DRM framework for protected content. [..] There
44
are many other uses for a TEE such as mobile payments, secure banking,
full-disk encryption, multi-factor authentication, device reset protection,
replay-protected persistent storage, wireless display ("cast") of protected
content, secure PIN and fingerprint processing, and even malware
detection."
Open-source community
45
6.3.2: Android Studio
46
Gradle-based build support
Android-specific refactoring and quick fixes
Lint tools to catch performance, usability, version compatibility and
other problems
ProGuard integration and app-signing capabilities
Template-based wizards to create common Android designs and
components
A rich layout editor that allows users to drag-and-drop UI components,
option to preview layouts on multiple screen configurations.
Support for building Android Wear apps
Built-in support for Google Cloud Platform, enabling integration with
Firebase Cloud Messaging (Earlier 'Google Cloud Messaging') and
Google App Engine
47
CHAPTER 7
APPLICATION SECURITY
48
availability or 18 months from last sale of the device via the Google
Store." The following October, researchers at the University of
Cambridge concluded that 87.7% of Android phones in use had known but
unpatched security vulnerabilities due to lack of updates and support. Ron
Amadeo of Ars Technica wrote also in August 2015 that "Android was
originally designed, above all else, to be widely adopted. Google was
starting from scratch with zero percent market share, so it was happy to give
up control and give everyone a seat at the table in exchange for adoption.
[...] Now, though, Android has around 75–80 percent of the worldwide
smartphone market—making it not just the world's most popular mobile
operating system but arguably the most popular operating system, period.
As such, security has become a big issue. Android still uses a software
update chain-of-command designed back when the Android ecosystem had
zero devices to update, and it just doesn't work". Following news of
Google's monthly schedule, some manufacturers, including Samsung and
LG, promised to issue monthly security updates, but, as noted by Jerry
Hildenbrand in Android Central in February 2016, "instead we got a few
updates on specific versions of a small handful of models. And a bunch of
broken promises".
49
half of devices in use at the end of 2016 had not received a platform
security update in the previous year", stating that their work would continue
to focus on streamlining the security updates program for easier deployment
by manufacturers. Furthermore, in a comment to TechCrunch, Ludwig
stated that the wait time for security updates had been reduced from "six to
nine weeks down to just a few days", with 78% of flagship devices in North
America being up-to-date on security at the end of 2016.
Patches to bugs found in the core operating system often do not reach
users of older and lower-priced devices. However, the open-source nature
of Android allows security contractors to take existing devices and adapt
them for highly secure uses. For example, Samsung has worked with
General Dynamics through their Open Kernel Labs acquisition to
rebuild Jelly Bean on top of their hardened microvisor for the "Knox"
project.
50
7.2: TECHNICAL SECURITY FEATURES
51
used instead, in which users are prompted to grant or deny individual
permissions to an app when they are needed for the first time. Applications
remember the grants, which can be revoked by the user at any time. Pre-
installed apps, however, are not always part of this approach. In some cases
it may not be possible to deny certain permissions to pre-installed apps, nor
be possible to disable them. The Google Play Services app cannot be
uninstalled, nor disabled. Any force stop attempt, result in the app restarting
itself. The new permissions model is used only by applications developed
for Marshmallow using its software development kit (SDK), and older apps
will continue to use the previous all-or-nothing approach. Permissions can
still be revoked for those apps, though this might prevent them from
working properly, and a warning is displayed to that effect.
52
revealed that "the tested antivirus apps do not provide protection against
customized malware or targeted attacks", and that "the tested antivirus apps
were also not able to detect malware which is completely unknown to date
but does not make any efforts to hide its malignity".
53
CHAPTER 8
54
As it was our first take on the hardware design, for instance, the
fabrication of PCB with varieties of electronic components, we faced a lot
of complexities and the overall process was a challenging one.
55
CHAPTER 9
ADVANTAGES
The advantages of this project are as follows: Firstly, it has the capacity
to be in command of the user-desired electrical device through real time
server. The live-in settings can be suggested when the class room is left
unattended during break time, holiday, and in-control of class room settings
through real time server.
The effective advantages of this Home Automation project can be discussed
under the following headings:
First and foremost installation cost is least to establish the system. Just
need an internet network and little circuitry for developing the overall
system.
For developing the system users need to install the little circuit board
containing a low cost microcontroller, motion sensor, BJT and relay with
the final appliances.
56
9.3: ACCESSIBILITY
9.4: HANDINESS
57
9.6: SAVES TIME
It is obvious that today‘s world is busier than in days what went before.
People are constantly running from place to place; work to accomplish
everything on the never-ending ―to-do‖ list. Just because of the up-to-the-
minute character of a house mechanization system, they never have to be
concerned about running house to open the door for their kids after school
or making a fast discontinue at home in order adjusting household items.
The phrase ―It‘s better to be safe than sorry‖ can be taken relatively
literally at this time. Shielding yourself, your house and your corporation is
a matter of common sense. Of course, it is always good to start at the basis:
fit excellent physical security, like burglary-proof windows and locks. But
also electronic security is, in various cases, a necessity; even a dread room
is among the possibilities.
58
CHAPTER 10
10.1: LIMITATIONS:
59
10.2: FUTURE ENHANCEMENT
In future we are going to include the timer using clock of the smart
phone itself. Looking at the current situation we can build cross platform
system that can be deployed on various platforms like iOS, Windows.
Limitation to control only several devices can be removed by extending
automation of all other home appliances. Network can be connected to
internet and Security cameras can be controlled from other places, allowing
the user to observe activity around a house or business. Security systems
can include motion sensors that will detect any kind of unauthorized
movement and notify the user. Scope of this project can be expanded to
many areas by not restricting to only home.
The following section consists of the budget analysis of the project, that
is, the total budget for the development of the project and the operational
and maintenance cost that follows after the implementation of the project.
60
10.3.2: Operation and Maintenance cost:
Internet Service Provider cost = Rs. 1500 per month (broadband internet)
61
CHAPTER 11
11.1: CONCLUSION
Hence, the idea to create a fully working home automation system with
facility to control and monitor appliances has been finally realized. The
output of this project is an array of home appliances that are controlled over
the internet with the help of a mobile app and the facility to stream the
video live, as well. This project is a successful outcome of continuous and
tireless effort from all the project members, supervisors, college faculty,
colleagues and other helping hands.
This project has been a really great experience and opportunity to learn
and to experiment. Moreover, the authors got the chance to closely
experiment and learn about what goes into designing and developing home
automation systems. We are very much delighted that we explored this
topic as our major project title and in a way, created a version of home
automation system of our own, and to be closely related with the
technology that is of a great interest of study and research today and is sure
to revolutionize the way of living of people in the days to come.
62
11.2: BIBLIOGRAPHY
Websites:
1:https://www.developer.android.com/
2:https://www.stackoverflow.com/
63