Sie sind auf Seite 1von 32

Home Automation System

Submitted in partial fulfillment of the requirements for the award of degree of


Submitted to:
Miss Ayesha

Submitted By:

NAME: - Kapil Shukla, Tushar Verma, Shammy raj

Roll No: - 17BCS1057, 17BCS1058, 17BCS1077


Chandigarh University, Gharuan

May 2019

First and foremost, I would like to take this opportunity to thank our mentor Miss
Ayesha for her guidance and advice on this project. At the same time I also won’t
forget my group participant and also friends to because they were quite good with
sharing some of their information to compete this project successfully. Last but not
least, I am very grateful to our college, lectures and friends where they gave us
enough of time to complete this project and at the same time I would like to thank
my friends and classmates who helps me a lot to complete this project.

Thank you

The main objective of this project is to develop a home automation system using an
Arduino board with wifi module being remotely controlled by an Android OS smart phone.
As technology is advancing so houses are also getting smarter. Modern houses are
gradually shifting from conventional switches to centralized control system, involving
remote controlled switches. This paper presents a low cost flexible and reliable home
automation system with additional security using Arduino microcontroller, with IP
connectivity through local Wi- Fi for accessing and controlling devices by authorized user
remotely using Smart phone application. The proposed system is server independent and
uses Internet of things to control human desired appliances starting from industrial machine
to consumer goods. The user can also use different devices for controlling by the help of
web-browser, smart phone or IR remote module.

To demonstrate the effectiveness and feasibility of this system, in this paper we present a
home automation system using Arduino UNO microcontroller and esp8266-01 as a
connectivity module. It helps the user to control various appliances such as light, fan, TV
and can take decision based on the feedback of sensors remotely. We have tested our
system through conducted experiment on various environmental conditions.

Key Words and Phrases: Arduino Uno Controller; Internet of things ( Iot ); Esp8266-01;
Wi-Fi network; Home automation system.
List of Figures

Figure No. Title Page No.

1. Unified modeling language
2. Block diagram of home automation system
3. An open standard protocol
4. Relay module connection
5. Circuit Digram
Table of Contents

Sr. No. Topic Page No.










. . .
. . .
. . .

While the cost of living is going up, there is a growing focus to involve technology to lower those
prices. With this in mind the Smart Home project allows the user to build and maintain a house that is
smart enough to keep energy levels down while providing more automated applications. A smart
home will take advantage of its environment and allow seamless control whether the user is present
or away. With a home that has this advantage, you can know that your home is performing at its best
in energy performance.
The Internet of things (Iot) devices not only controls but also monitors the electronic, electrical
and various mechanical systems which are used in various types of infrastructures. These devices
which are connected to the cloud server are controlled by a single user (also known as admin)
which are again transmitted or notified to the entire authorized user connected to that network.
Various electronics and electrical devices are connected and controlled remotely through
different network infrastructures. Web browser present in laptop or smart phone or any other
smart technique through which we can operate switches, simply removes the hassle of manually
operating a switch. Now a day’s although smart switches are available they proves to be very
costly, also for their working we required additional devices such as hub or switch. As there is
rapid change in wireless technology several connectivity devices are available in the market which
solves the purpose of communicating medium with the device and the micro-controller. Starting
from Bluetooth to Wi-Fi, from ZigBee to Z-wave and NFC all solve the purpose of
communicating medium. RF and ZigBee are used in most wireless networks. In this project we
have taken ESP8266-01 Wi-Fi module which is programmed through Arduino UNO to control
various devices.
The rest of sections in this paper are organized as follows: Section II provides a system
overview of the system. The hardware design is explained in Section III, Section IV discusses
about the software design and experimental results are discussed in Section V. At the end the
paper concludes by looking at the future research and recommendations which are required to
make the system more effective.


Arduino Uno is based on ATmega328 microcontroller (MCU). It consists of 14 digital input/output

pins, six analogue inputs, a USB connection for programming the onboard MCU, a power jack, an
ICSP header and a reset button. It is operated with a 16MHz crystal oscillator and contains everything
needed to support the MCU. It is very easy to use as you simply need to connect it to a computer
using a USB cable, or power it with an AC-to-DC adapter or battery to get started. The MCU onboard
is programmed in Arduino programming language using Arduino IDE.

In this home automation project circuit, Pins 10 and 11 of Arduino are connected to pins TXD and
RXD of the Bluetooth module, respectively, as shown in Fig. 6.

Pins Gnd and Vcc of the Bluetooth module are connected to Gnd and +3.3V of Arduino board
respectively. Pins 2, 3 and 4 are connected to the three relays (RL1, RL2 and RL3) of the relay board.
Pins Vin and Gnd of the relay board are connected to pins Vin and Gnd of Arduino board,


Arduino IDE is an open-source software program that allows users to write and upload code within a
real-time work environment. As this code will thereafter be stored within the cloud, it is often utilized
by those who have been searching for an extra level of redundancy. The system is fully compatible
with any Arduino software board.

Main Functions and Uses:-

Arduino IDE can be implemented within Windows, Mac and Linux operating systems. The majority
of its components are written in JavaScript for easy editing and compiling. While its primary
intention is based around writing codes, there are several other features worth noting. It has been
equipped with a means to easily share any details with other project stakeholders. Users can modify
internal layouts and schematics when required. There are in-depth help guides which will prove
useful during the initial installation process. Tutorials are likewise available for those who might not
have a substantial amount of experience with the Arduino framework.


Blynk is a Platform with iOS and Android apps to control Arduino, Raspberry Pi and the likes
over the Internet. It's a digital dashboard where you can build a graphic interface for your project by
simply dragging and dropping widgets.

It's really simple to set everything up and you'll start tinkering in less than 5 mins. Blynk is not tied
to some specific board or shield. Instead, it's supporting hardware of your choice. Whether your
Arduino or Raspberry Pi is linked to the Internet over Wi-Fi, Ethernet or this new ESP8266 chip,
Blynk will get you online and ready for the Internet of Your Things.


Arduino is an open source electronics prototyping platform based on flexible, easy-to-use hardware
and software. It is intended for artists, designers, hobbyists and anyone interested in creating
interactive objects or environments.

It is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital input/output pins
(of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, 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.The Uno differs from all preceding boards in that it does not
use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to
version R2) programmed as a USB-to-serial converter. The Uno is a microcontroller board based on
the ATmega328P. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6
analog inputs, a 16 MHz quartz crystal, 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.

Esp 8266:-
The ESP8266 WiFi Module is a self contained SOC with integrated TCP/IP protocol stack that can
give any microcontroller access to your WiFi network. The ESP8266 is capable of either hosting an
application or offloading all Wi-Fi networking functions from another application processor. Each
ESP8266 module comes pre-programmed with an AT command set firmware, meaning, you can
simply hook this up to your Arduino device and get about as much WiFi-ability as a WiFi Shield
offers (and that’s just out of the box)! The ESP8266 module is an extremely cost effective board with
a huge, and ever growing, community. This module has a powerful enough on-board processing and
storage capability that allows it to be integrated with the sensors and other application specific
devices through its GPIOs with minimal development up-front and minimal loading during runtime.
Its high degree of on-chip integration allows for minimal external circuitry, including the front-end
module, is designed to occupy minimal PCB area. The ESP8266 supports APSD for VoIP
applications and Bluetooth co-existance interfaces; it contains a self-calibrated RF allowing it to
work under all operating conditions, and requires no external RF parts. There is an almost limitless
fountain of information available for the ESP8266, all of which has been provided by amazing
community support. In the Documents section below you will find many resources to aid you in
using the ESP8266, even instructions on how to transforming this module into an IoT (Internet of
Things) solution!

Fig. Esp 8266 i.e wifi module

A relay is an electrical device which is generally used to control high voltages using very low voltage
as an Input. This consists of a coil wrapped around a pole and a two small metal flaps (nodes) that are
used to close the circuit. One of the nodes is fixed and other is movable. Whenever electricity is
passed through the coil, it creates a magnetic field and attracts the moving node towards the static
node and the circuit gets completed. So, just by applying small voltage to power up the coil we can
actually complete the circuit for the high voltage to travel. Also, as the static node is not physically
connected to the coil there is very less chance that the Microcontroller powering the coil gets
damaged if something goes wrong.

Fig. Relay Module


This USB to TTL converter combine the USB-232-1 (USB to Single RS232 Adapter) and TTL-232-1
(Port-powered RS232/TTL converter) allows you to convert USB to TTL/CMOS compatible levels
and vice versa. It can be used to set up APC220 Radio Data Module (SKU: TEL0005) wireless
module. It can be used as STC microcontroller program downloader.


 Three different bulbs of three different color i.e. White, Red and Blue and a Plastic Fan.
 Jumper wires: - A jumper wire (also known as jumper wire, or jumper) is an electrical wire,
or group of them in a cable, with a connector or pin at each end (or sometimes without them –
simply "tinned"), which is normally used to interconnect the components of a breadboard or
other prototype or test circuit, internally or with other equipment or components, without

Fig.1 UML diag. of a home automation system

Above is a unified modeling language diagram (UML) of a basic home automation system which
consists of a transceiver, which is used to send a signal which is received by a receiver. Also it consists of a
controller which controls the basic objects that are connected in the home automation system. It controls an
intrusion sensor, a fire sensor, basic light bulbs and a fan.

Fig.2 Block diagram of a home automation system

Fig. 2 is a basic block diagram of a home automation system. It uses Arduino Uno which is connected
with a wifi module i.e. ESP8266 wifi module. Also with the help of cloud and Blynk App, this homeautomation
system can be easily controlled by an Android OS system i.e. a user’s mobile phone.
Fig. 3 An open standard protocol for a home automation system

Fig. 4 Relay module connection

Fig. 5 Circuit Diagram


This project is about how one can connect an electric bulb (or any device) with an Arduino Uno using a
Relay Module. It also covers connecting Arduino with Android devices and then rem otely switching the
device off/on.


One can control high voltage electronic devices using relays. A relay is actually a switch which is
electrically operated by an electromagnet. The electromagnet is activated with a low voltage, for example 5
volts from a microcontroller and it pulls a contact to make or break a high voltage circuit.

HL-52S Relay Module:

This project uses the HL-52S 2 channel relay module, which has 2 relays with rating of 10A @ 250 and 125
V AC and 10A @ 30 and 28 V DC. The high voltage output connector has 3 pins, the middle one is the
common pin and from the markings one of the two other pins is for normally open connection and the other
one for normally closed connection.

4-Channel Relay Module

On the other side of the module we have 2 sets of pins. The first one has 6 pins, a Ground and a VCC pin for
powering the module and 4 input pins In1, ln2, ln3 and In4. The second set of pins has 3 pins with a jumper
between the JDVcc and the Vcc pin. With a configuration like this the electromagnet of the relay is directly
powered from the Arduino Board and if something goes wrong with the relay the micro controller could get

Steps to follow:
Step 1: Connect the Arduino with the USB with your system.
Step 2: Connect ground pin of Arduino with the ground pin of Relay Module, VCC pin on relay module with
5V on Arduino and finally pin 7 in Arduino with ln1 on relay module.

Step 3: Upload the code given below to Arduino and switch on the current supply of bulb through circu it
Steps to be followed on Android Phone:
Step 1: Install the “Blynk” app from Google Play store and click on the “Create New" button.
Step 2: Name your Project and select your IoT board (Arduino) then click on "Email" and finally
on "Create". Remember to change the Auth Token in the code by the one sent on your mail by Blynk.

Step 3: Add a Button on the screen and long press to configure it.
Step 4: Name the button to “Bulb” change the color and select the output as D7 i.e. digital pin 7.

Step 5: Click on the play button on the top left of the screen.
The project is all set and now one can control the electrical bulb by pressing the bulb button on the Andr oid


* 1. Optional, but recommended.

* Connect additional USB-serial adapter to see the prints.

* 2. Edit auth token and upload this sketch.

* 3. Run the script (script located in "scripts" folder of library root,

* e.g. 'blynk-library/scripts') for redirecting traffic to server:

* for Windows:
* 1. Open cmd.exe

* 2. Write (put your path to the blynk-ser.bat folder):

* cd C:\blynk-library\scripts

* 3. Write (COM4 is port with your Arduino):

* blynk-ser.bat -c COM4

* 4. And press "Enter", press "Enter" and press "Enter"

* 4. Start blynking! :)


#include <SoftwareSerial.h>

SoftwareSerial DebugSerial(2, 3); // RX, TX

#define BLYNK_PRINT DebugSerial

#include <BlynkSimpleStream.h>

// You should get Auth Token in the Blynk App.s

// Go to the Project Settings (nut icon).

char auth[] = "Your Auth Token";

void setup()

// Debug console

// Blynk will work through Serial


Blynk.begin(auth, Serial);

void loop();


Contribution of roll number 17BCS1057:-
Roll number 17BCS1057 i.e. Kapil shukla, applied his knowledge in coding and helped in figuring
out the proper code that is required for the arduino Uno board to run efficiently. Also since we aim to
run our home automation system using a mobile phone, he along with Roll number 17BCS1058 i.e.
Tushar Verma made the code for esp8266 i.e. wifi module in order to connect the home automated
devices with the mobile phone. In order to form the above mentioned codes he devoted his mind to
IoT i.e. internet of things to understand its concept and most importantly to understand how it works
in home automation system.

Contribution of Roll number 17BCS1058:-

Roll number 17BCS1058 i.e. Tushar Verma, helped in connecting with wifi module i.e. ESP8266
connect the home automated devices to the remote controller. Also he assembled the circuits and
maximum caution in order for the project to work properly. He used his communication skills to make
all the required documents i.e. Problem phase report of the project, Synopsis etc along with the help of
roll number 17BCS1077 i.e. Shammy raj. Also he was helpful in arranging and making the circuit and
understand all the pins of the microcontroller, how a relay board functions, how much input voltage
the circuit can endure, etc. Thus his contribution along with others played an important role in
completion of the project.
Contribution of roll number 17BCS1077:-
Roll number 17BCS1077 i.e. Shammy Raj, helped in coding the Arduino UNO board and esp8266
which played an important role in working of the home automated system. Also he made all the
possible and important connections in the circuit. He made sure that the right amount of input voltage
is given to the circuit. He also went market to market to purchase all the required elements for the
project. And he also collected all the desirable information for working of the home automation


Fig 2
Fig 3

Fig1,2 and 3 are the screenshots of the Arduino Code that we have used in this project. This code
holds the upmost importance in this project. This code basically provides the user to have the control
over the home automation system. It basically gives access to the Blynk App that we have used, with
the help of which the user can control or give the respective commands to the appliances, three
different bulbs and a plastic fan in this case.
The above image is the first step of the execution of the batch file. A batch file is a computer file
which contains a list of instructions to be carried out in turn.

In the above screenshot which port is being getting used or will be used is inserted in the terminals.

This happens after the Arduino code is compiled and run.

In the above screenshot, the serial USB batch file is executed successfully executed and the Blynk
App gets the access to the Arduino code which is later used by the user in order to use the desirable

The screenshot down below is the screen shot of the Blynk App that we are using in order to control
our respective appliances. After the Arduino code is executed successfully, it provides the user the full
control. As you can see in the screenshot, there is button beneath i.e. an ON/OFF button using which
we can turn on or turn off the respective light.
As it is very evident from the above two figures that when the Blynk app is used i.e.
when the ON button is clicked, the white bulb switches on and when Off button is
clicked it is switched off. Also in this project we have used three bulbs of different
colors. Thus when the any switch is tapped, the respective bulbs or fan works.

In this project, a novel architecture for low cost and flexible home control and monitoring system
using Android based Smart phone is proposed and implemented. The proposed architecture utilizes
a micro web server and Bluetooth communication as an interoperable application layer for
communicating between the remote user and the home devices. Any Android based Smart phone
with built in
support for Wi-Fi can be used to access and control the devices at home. When a Wi-Fi
connection is not available, mobile cellular networks such as 3G or 4G can engine thus eliminating
the need for an external voice recognition module. This method of controlling such applications is
referred to as automation. The experimental setup which we designed has its focal point on
controlling different home appliances providing 100% efficiency. Due to advancement in technology,
Wi-Fi network is easily available in all places like home, Office Building and Industrial Building so
proposed wireless network easily controlled using any Wi-Fi network. The wiring cost is reduced.
Since less wiring is required for the switches. This also eliminates power consumption inside the
building when the loads were in off conditions. This system is also platform independent allowing
any web browser in any platform to connect ESP8266-01. The system is fully functional through
android application known as “ESP8266 Wifi control”. The delay to turn ON is 3 sec and turn OFF is
2 sec for any load.


2018 holds even more promise for the smart home industry, as devices like Google Home, Alexa and
Amazon Echo become more commonplace and artificial intelligence becomes more sophisticated.

1. The Next Security and Privacy Crisis

We have shared our digital footprint for convenience. With smart home technology, we are sharing
our physical footprint. It is not a matter of if but when these systems will be compromised, and the
consequences could be much more severe than lost social security numbers. Addressing security and
privacy will become a fundamental concern that will shape this industry.
2. Integration of Smart Home Devices

Integration will make or break smart home technology. Navigating goofy AI misunderstandings for 12
appliances and the front door is not the way of the future. But can smart homes make sure you
remembered to turn off all the lights? Lock up? De-activate alarms upon recognizing your face? I
believe we will see more integration that supports homeowners in 2018.

3. A Greater Role For Artificial Intelligence

I'm wrapping up repairs and renovations on an investment property, and we opted to install a bunch of
Nest and Ring products to better secure our investment. The video surveillance is great, but I can see
AI being used to automate threat detection and maybe more proactively alert us if something goes
awry. This would revolutionize the human aspect of remote video monitoring.

4. A Focus On Surveillance And Appliances

Homeowners will like the idea of more cool ways to control their homes. Surveillance has become
more necessary to combat crime, as more people work from home and want to protect their physical
and intellectual property. Appliances also could be a focus since people would like their
appliances to take on more of the workload.

5. New Smart Home Use Cases

In 2017, the majority of applications revolved around security and thermostats, and the devices did not
interoperate. In 2018, smart home device makers will take a platform approach, and the devices will
interoperate and new use cases will emerge such as appliance diagnostics, energy conservation and the
prevention of major damages during natural disasters.

6. Homeowner Data Sharing

Sharing the data of homeowners with businesses will probably be the next big thing in smart home
technology. Having your fridge order the food you need or setting the lights and preferred temperature
for your arrival is what is coming soon. The data that you share with the smart devices will be of great
interest to the companies that build such products.

7. Increased Efficiency, Control And Customization

AI is set to disrupt the home. Technology will become much more efficient, and we will be
able to control everything from appliances to radio volume to security from one central place. As a
matter of fact, as AI develops, we eventually won't need to manually control anything, as these
devices will automatically adjust to our preferences.

8. Customer Service as a Differentiator

With more and more smart home devices entering the market, there is an opportunity for forward-
thinking companies to use customer service as a differentiator. An IoT environment can present a
number of challenges for consumers ranging from basic troubleshooting to privacy concerns.
Companies that are innovative and knowledgeable about delivering customer service excellence will
stand out.

9. More Security Concerns

We’ll see a proliferation of integrated platform solutions from big players in tech. Amazon will offer
in-home food delivery straight to your fridge, leveraging its smart home platform. However, security
will be a concern; a customer’s home could be robbed by a contractor. I also see a future where
passwords are leaked or homes get hacked, and that’s something the big players need to plan for.

10. Higher Cross-Compatibility Standards

I’m hoping for some real progress on standards. The smart home market has huge potential, but it’s
still too fragmented. Consumers shouldn’t have to think about whether they want to invest in Nest,
Amazon’s Echo line or products that support Apple’s Homekit. In 2018, I expect to see greater cross-
compatibility and less focus on platform lock-in.

11. Smart Kitchen Gadgets

I think we're going to see more and more smart kitchen gadgets come on the market, such as rice
cookers that are connected to Alexa, smart crockpots and integrated apps. We'll be able to ask Alexa
how much time is left on the device or control them from our smartphones at work.

12. Smart Spaces Outside Of The Home

Naturally, smart home tech will continue to become more accessible and inexpensive to the
mainstream. As consumers become accustomed to the conveniences that come with smart tech, they
will begin to seek out these efficiencies outside of the home. Next year, we’re likely to see an uptick
in commercial smart building tech, particularly in offices seeking to adapt to more mobile workplace

13. The Replacement Of 'Test Phase' Products With Better Alternatives

As more technology and innovations are brought to the market, automation will make the home
experience simpler and more pleasant. Next year will see an increase in the gadgets released in the
IoT sphere. However, as this technology is relatively new, the testing phase will see the
cleaning out of multiple products that are replaced by better alternatives.

14. Increased Voice Control Integration

Home technologies will integrate into so much more of our daily lives. Voice control of technologies
that are included in your phone, TV, home audio and even car dashboard will be commonplace by the
end of 2018. Voice is going to be the breakthrough advancement that really allows these
technologies to become ubiquitous.
1. K. Venkatesan and Dr. U. Ramachandraiah, Networked Switching and PolymorphingControl of
Electrical Loads with Web and Wireless Sensor Network, 2015 International Conference on
Robotics, Automation, Control and Embedded Systems (RACE), Chennai, (2015), 1-9.
2. ShopanDey,Ayon Roy and SandipDas, Home Automation Using Internet of Thing , IRJET, 2(3)

3. VishwatejaMudiam Reddy, NareshVinay, TapanPokharna and Shashank Shiva Kumar Jha,

Internet of Things Enabled Smart Switch, Thirteenth International Conference on Wireless and
Optical Communications Networks (WOCN), Hyderabad, (2016),1-4
4. Warsuzarina Mat Jubadi and NormaziahZulkifli, Programmable Infrared Accessory Light
Switch, International Conference on Intelligent and Advanced Systems, Kuala Lumpur,(2007),
5. Shih-Pang Tseng, Bo-Rong Li, Jun-Long Pan, and Chia-Ju Lin, An Application of Internet of
Things with Motion Sensing on Smart House, International Conference on Orange Technologies,
Xian, (2014), 65-68.
6. Mandurano, Justin, and Nicholas Haber. House Away: A home management system, IEEE Long
Island Systems, Applications and Technology Conference (LISAT), Farmingdale, NY, (2012), 1-
7. Zhen Bi, Smart home with ZigBee hardware simulation and performance evaluation,
International Conference on Mechatronic Sciences, Electric Engineering and Computer (MEC),
Shengyang, (2013), 2139-2142.
8. S. Karaca, A. Şişman and İ. Savruk, A low cost smart security and home automation system
employing an embedded server and a wireless sensor network, International Conference on
Consumer Electronics - Berlin (ICCE-Berlin), Berlin,(2016), 73-77.
9. T. Thaker, ESP8266 based implementation of wireless sensor network with Linux based web-
server, Symposium on Colossal Data Analysis and Networking (CDAN), Indore, (2016), 1-5
10. Y. P. Zhang, T. Liu, Z. X. Yang, Y. Mou, Y. H. Wei and D. Chen, Design of remote control
plug, 2015 IEEE International Conference on Applied Superconductivity and Electromagnetic
Devices (ASEMD), Shanghai, (2015), 29-30.
11. A. M. D. Celebre, A. Z. D. Dubouzet, I. B. A. Medina, A. N. M. Surposa and
R. C. Gustilo, Home automation using raspberry Pi through Siri enabled mobile devices,
International Conference on Humanoid, Nanotechnology, Information
Technology,Communication and Control, Environment and Management (HNICEM), Cebu
City,( 2015), 1-6.

12. R. Piyare, and S.R. Lee, Smart home-control and monitoring system using smart phone, The 1st
International Conference on Convergence and its Application, 84, (2013) 83-86.