Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

PHCET Department of Electrical Engineering

“Smart Home Automation Using Arduino and


Android Application”

A Project Submitted to the


University of Mumbai, Mumbai
In partial fulfilment of the course work leading to
Bachelor of Engineering
In
Electrical Engineering
By
Mr. Pratik Pravin Bhosale
Ms.Nisarga Khushalji Kadam
Ms. Shweta Vasanta Tade
Ms. Leena Prasad Vichare
Under the guidance of
Prof. Pranita Chavan.

Department of Electrical Engineering


Pillai HOC College of Engineering & Technology
Rasayani – 410207
[2021-22]
PHCET Department of Electrical Engineering

Mahatma Education Society’s


Pillai HOC College of Engineering & Technology,
Rasayani – 410207
2020-2021

CERTIFICATE

This is to certify that the project titled, “Smart


Home Automation
Using Arduino and Android Application”, duly submitted by the
following students-
Mr. Pratik Bhosale
Ms.Nisarga Kadam
Ms. Shweta Tade
Ms. Leena Vichare

has been completed under my supervision in a satisfactory manner in a partial


fulfilment of the requirements for the award of Bachelor’s Degree in Electrical
Engineering to be conferred by the University of Mumbai. In my opinion, the
work embodied in this report is comprehensive and fit for evaluation.

Project Guide
(Prof. Pranita Chavan)

Forwarded for Further Perusal:

Prof. Pranita Chavan Seal of Department Dr. J W Bakal

HOD Principal
PHCET Department of Electrical Engineering

PROJECT APPROVEL SHEET

The Project titled “Smart Home Automation using Arduino and Android
Application” Submitted by the students
Mr. Pratik Bhosale
Ms.Nisarga Kadam
Ms. Shweta Tade
Ms. Leena Vichare

Is examined and approved by the examiners.

Sign -------------------------- Sign -----------------------

Name ------------------------- Name ---------------------

(External Examiner) (Internal Examiner)

Date:

Place: RASAYANI
PHCET Department of Electrical Engineering

DECLARATION

We declare that this written submission represents my ideas in my


own words and where others' ideas or words have been included, we
have adequately cited and referenced the original sources. We also
declare that we have adhered to all principles of academic honesty and
integrity and have not misrepresented or fabricated or falsified any
idea/data/source in my submission. We understand that any violation
of the above will be cause for disciplinary action by the Institute and
can also evoke penal action from the sources which have thus not been
properly cited or from whom proper permission has not been taken
when needed.

--------------------

(Signature)

Mr. Pratik Pravin Bhosale

Ms. Nisarga khushalji kadam

Ms. Shweta Vasanta Tade

Ms. Leena Prasad Vichare


PHCET Department of Electrical Engineering

ACKNOWLEDGEMENT

We would like to express my sincere gratitude towards my guide,


Prof.Pranita Chavan for the help, guidance and encouragement, he
provided during the special topic Project. This work would have not
been possible without his valuable time, patience and motivation. It
was great learning and an honor being her student. We indebted to the
entire team in the Department of Electrical Engineering. They
supported us with scientific guidance, advice and encouragement, they
were always helpful and enthusiastic and this inspired me in my work.
We take the privilege to express our sincere thanks to Dr. J.W.Bakal,
our principal for providing the encouragement and much support
throughout my work. Last but not least, we would like to thank our
family for always encouraging us and supporting us throughout life
PHCET Department of Electrical Engineering

CONTENT
ABSTRACT
Chapter No. Chapter Name Page No

Chapter 1 Introduction 1

Literature Review
Chapter 2 2.1 Review of Related Literature 2-3
2.2 Review of Studies

Design Methodology
3.1 Block Diagram
Chapter 3 4-10
3.2 Circuit diagram
3.3 HC-05 Bluetooth module
Chapter 4 Design ARDUINO UNO 11
Chapter 5 Software Implementation 12-15
Chapter 6 2 -Two channel relay 16-17
Chapter 7 Flow chart 18
Chapter 8 Result 19-20
Chapter 9 Application 21
Chapter 10 Conclusion 22
Chapter 11 Future scope 23
Chapter 12 Reference 24
PHCET Department of Electrical Engineering

I. ABSTRACT
This project presents a design and prototype implementation of new
home automation system that use Wi-Fi technology as a network
infrastructure connecting its parts. The proposed system consists of
two main components; the first part is the server (web server), which
presents system core that manages, controls, and monitors users’
home. Users and system administrator can locally (LAN) or remotely
(internet) manage and control system code. Second part is hardware
interface module which provides appropriate interface to sensors and
actuator of home automation system. Unlike most of available home
automation system in the market the proposed system is scalable that
one server can manage many hardware interface modules as long as it
exists on Wi-Fi network coverage. System supports a wide range of
home automation devices like power management components, and
security
components. The proposed system is better from the scalability and
flexibility point of view than the commercially available home
automation systems.
PHCET Department of Electrical Engineering

CHAPTER 1
INTRODUCTION

Smart home automation is an upcoming technology that allows us to


control the homes or places with the help of device. Here we propose to use
smart home automation using Arduino and android application in order to
control home appliances, thus automating modern homes.
Smart home automation system is designed and implemented to assist and
provide support in order to fulfill the needs of elderly and disabled. The world is
moving fastly towards automation. People have less time to handle any work or
appliance and they sometimes in a hurry even forget to switch off lights and fans
manually so automation is a simple way to handle any device or machine and it
will work on our desire. We also developed an Arduino based home automation
system. Arduino is connected to the Bluetooth module which receives the
information from the user. Arduino also is connected to the relay, which
receives information from Arduino UNO and performs the operation. We used
HC-05 Bluetooth module. We control the system by mobile application through
this Bluetooth module.Here,we control light, fan. Automation is the most
frequently spelled term in the field of electronics. The controlling device for the
automation in the project is an Arduino UNO. The data sent from PC over Wi-Fi
will be received by Wi-Fi module connected to 9 Arduino UNO. Arduino UNO
reads the data and decides the switching action of electrical devices connected to
it through Relay. Automation is the most frequently spelled term in the field of
electronics. The hunger for automation brought many revolutions in the existing
technologies. These had greater importance than any other technologies due to
its user-friendly nature.

Smart Home Automation Using Arduino and Android Application Page 1 of 35


PHCET Department of Electrical Engineering

CHAPTER 2
LITERATURE REVIEW
2.1 Review of Related Literature:
When people think about home automation, most of them may imagine living in
a smart home: One remote controller for every household appliance, cooking the
rice automatically, starting air conditioner automatically, heating water for bath
automatically and shading the window automatically when night coming. To
some extent home automation equals to smart home. They both bring out smart
living condition and make our life more convenient and faster.

2.2 Review of Studies:


In their paper, Tan, Lee and So (2002) proposed the development of an
Internet-based system to allow monitoring of important process variables from a
distributed control system (DCS). This paper proposes hardware and software
design considerations which enable the user to access the process variables on
the DCS, remotely and effectively.

Potamitis, Georgia, Fakelakis, and Kokkinakis, G. (2003) suggested the use of


speech to interact remotely with the home appliances to perform a particular
action on behalf of the user. The approach is inclined for people with disability
to perform real-life operations at home by directing appliances through speech.
Voice separation strategy is selected to take appropriate decision by speech
recognition

In the year 2006, S. M. Anamul Haque,S. M. Kamruzzaman and Md. Ashraful


Islam proposed a system entitled “A System for Smart-Home Control of

Smart Home Automation Using Arduino and Android Application Page 2 of 35


PHCET Department of Electrical Engineering

Appliances Based on Time and Speech Interaction” that controls the home
appliances using the personal computer. This system is developed by using the
Visual Basic 6.0 as programming language and Microsoft voice engine tools for
speech recognition purpose. Appliances can be either controlled by timer or by
voice command. 14 Ciubotaru-Petrescu, Chiciudean, Cioarga, and Stanescu
(2006) present a design and implementation of SMS based control for
monitoring systems. The paper has three modules involving sensing unit for
monitoring the complex applications. A processing unit, that is microcontroller
and a communication module that uses GPRS modem or cell phone via serial
port RS-232. The SMS is used for status reporting such as power failure.

Jawarkar, Ahmed, Ladhake, and Thakare (2008) propose remote monitoring


through mobile phone involving the use of spoken commands. The spoken
commands are generated and sent in the form of text SMS to the control system
and then the microcontroller on the basis of SMS takes a decision of a particular
task.

Prof. Era Johri Dept. Of Information and Technology K.J.Somaiya College of


Engineering VIDYAVIHAR, MUMBAI “Remote Controlled Home Automation
Using Android Application via Wi-Fi Connection

Smart Home Automation Using Arduino and Android Application Page 3 of 35


PHCET Department of Electrical Engineering

CHAPTER 3
DESIGN METHODOLOGY

3.1 BLOCK DIAGRAM

Fig 1. Block Diagram of Smart Home Automation using Arduino and Android
Application

3.1.1 Working of block diagram:

1. Android Device (Android application): - The use of Wi-Fi-connected


tablets, smartphones and mobile devices is starting to generate explosive growth
in industrial automation and process control. Integration of mobile technology
is changing the landscape rapidly because it reduces costs, improves operating
efficiency, boosts productivity and increases throughput using existing people
and resources.

2. HC-05 Bluetooth module: - It is very easy to pair the HC-05 module with
microcontrollers because it operates using the Serial Port Protocol (SPP).
Simply power the module with +5V and connect the Rx pin of the module to the
Tx of MCU and Tx pin of module to Rx of MC

Smart Home Automation Using Arduino and Android Application Page 4 of 35


PHCET Department of Electrical Engineering

3.Arduino: - Arduino is a tool for making computers that can sense and control
more of the physical world than your desktop computer. It's an open-source
physical computing platform based on a simple microcontroller board, and a
development environment for writing software for the board. Arduino can be
used to develop interactive objects, taking inputs from a variety of switches or
sensors, and controlling a variety of lights, motors, and other physical outputs.
Arduino projects can be stand-alone, or they can communicate with software
running on your computer (e.g., Flash, Processing.)

4.2 channel relay: - This is a 5V, 10A 2-Channel Relay interface board. It can
be used to control various appliances, and other equipment's with large current.
It can be controlled directly with 3.3V or 5V logic signals from a
microcontroller (Arduino, 8051, AVR, PIC, DSP, ARM, ARM, MSP430, TTL
logic).

Smart Home Automation Using Arduino and Android Application Page 5 of 35


PHCET Department of Electrical Engineering

3.2 Circuit diagram

Fig 2:- Circuit diagram

3.2.1 Working of Circuit Diagram: -

 VCC and GND pin of the Bluetooth module is connected to the 5V and

GND pin of Arduino respectively. The TX pin of Bluetooth is connected

to the RX pin of Arduino and the RX pin of Bluetooth is connected to the

TX pin of Arduino. The rest of the pins of the Bluetooth module are

remained open.

 VCC and GND of the relay module are connected to the 5V and GND pin

of Arduino respectively. IN1 and IN2 pin of the relay is connected to D6

and D5 pin of the Arduino respectively.

Smart Home Automation Using Arduino and Android Application Page 6 of 35


PHCET Department of Electrical Engineering

 Now connections for the light and fan. We are taking light and fan which

are operated in 220 to 230V. So, one wire (preferably -Ve or neutral wire)

of the power supply is connected to the light and the other wire

(preferably +Ve or phase) is cut and one end is connected to the common

pin of a relay and the other end is connected to NO (Normally Opened)

pin of the relay. The same is done for the fan keeping it parallel with light.

Smart Home Automation Using Arduino and Android Application Page 7 of 35


PHCET Department of Electrical Engineering

3.3 HC-05 Bluetooth module

Fig 3:- HC -05 Bluetooth module

3.3.1Where to use HC-05 Bluetooth module

The HC-05 is a popular module which can add two-way (full-duplex)


wireless functionality to your projects. You can use this module to
communicate between two microcontrollers like Arduino or communicate
with any device with Bluetooth functionality like a Phone or Laptop. There
are many android applications that are already available which makes this
process a lot easier. The module communicates with the help of USART at
9600 baud rates hence it is easy to interface with any microcontroller that
supports USART. We can also configure the default values of the module by
using the command mode. So, if you looking for a Wireless module that could
transfer data from your computer or mobile phone to microcontroller or vice
versa then this module might be the right choice for you. However, do not
expect this module to transfer multimedia like photos or songs; you might
have to look into the CSR8645 module for that

Smart Home Automation Using Arduino and Android Application Page 8 of 35


PHCET Department of Electrical Engineering

3.3.2 HC-05 Pinout Configuration: -

Pin Pin Name Description


Numbe
r
1 Enable / This pin is used to toggle between Data Mode
Key (set low) and AT command mode (set high). By
default, it is in Data mode
2 Vcc Powers the module. Connect to +5V Supply
voltage
3 Ground pin of module, connect to system
Ground ground.
4 TX – Transmits Serial Data. Everything received via
Transmitter Bluetooth will be given out by this pin as serial data.
5 RX – Receive Serial Data. Every serial data given to
Receiver this pin will be broadcasted via Bluetooth

6 State The state pin is connected to on board LED, it


can be used as feedback to check if Bluetooth is
working properly.

7 LED Indicates the status of Module

Blink once in 2 sec: Module has entered


Command Mode

Repeated Blinking: Waiting for connection in


Data Mode

Blink twice in 1 sec: Connection successful in


Data Mode
8 Button Used to control the Key/Enable pin to toggle
between Data and command Mode

Smart Home Automation Using Arduino and Android Application Page 9 of 35


PHCET Department of Electrical Engineering

3.3.3 HC-05 Technical Specifications

 Serial Bluetooth module for Arduino and other microcontrollers

 Operating Voltage: 4V to 6V (Typically +5V)

 Operating Current: 30mA

 Range: <100m

 Works with Serial communication (USART) and TTL compatible

 Follows IEEE 802.15.1 standardized protocol

 Uses Frequency-Hopping Spread spectrum (FHSS)

 Can operate in Master, Slave or Master/Slave mode

 Can be easily interfaced with Laptop or Mobile phones with

Bluetooth.

Smart Home Automation Using Arduino and Android Application Page 10 of 35


PHCET Department of Electrical Engineering

CHAPTER 4

Design of Arduino UNO

Arduino is a tool for making computers that can sense and control more of the
physical world than your desktop computer. It's an open-source physical
computing platform based on a simple microcontroller board, and a
development environment for writing software for the board. Arduino can be
used to develop interactive objects, taking inputs from a variety of switches or
sensors, and controlling a variety of lights, motors, and other physical outputs.
Arduino projects can be stand-alone, or they can communicate with software
running on your computer (e.g., Flash, Processing.

The boards can be assembled by hand or purchased preassembled; the open-


source IDE can be downloaded for free.. 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 an AC-to-DC adapter or
battery to get started.

Smart Home Automation Using Arduino and Android Application Page 11 of 35


PHCET Department of Electrical Engineering

CHAPTER 5
Software implementation

String inputs;
#define relay1 2 //Connect relay1 to pin 9
#define relay2 3 //Connect relay2 to pin 8
#define relay3 4 //Connect relay3 to pin 7
#define relay4 5 //Connect relay4 to pin 6
#define relay5 6 //Connect relay5 to pin 5
#define relay6 7 //Connect relay6 to pin 4
#define relay7 8 //Connect relay7 to pin 3
#define relay8 9 //Connect relay8 to pin 2
void setup()
{
Serial.begin(9600); //Set rate for communicating with phone
pinMode(relay1, OUTPUT); //Set relay1 as an output
pinMode(relay2, OUTPUT); //Set relay2 as an output
pinMode(relay3, OUTPUT); //Set relay1 as an output
pinMode(relay4, OUTPUT); //Set relay2 as an output
pinMode(relay5, OUTPUT); //Set relay1 as an output
pinMode(relay6, OUTPUT); //Set relay2 as an output
pinMode(relay7, OUTPUT); //Set relay1 as an output
pinMode(relay8, OUTPUT); //Set relay2 as an output
digitalWrite(relay1, LOW); //Switch relay1 off
digitalWrite(relay2, LOW); //Swtich relay2 off
digitalWrite(relay3, LOW); //Switch relay1 off
digitalWrite(relay4, LOW); //Swtich relay2 off
digitalWrite(relay5, LOW); //Switch relay1 off
digitalWrite(relay6, LOW); //Swtich relay2 off

digitalWrite(relay7, LOW); //Switch relay1 off


digitalWrite(relay8, LOW); //Swtich relay2 off

Smart Home Automation Using Arduino and Android Application Page 12 of 35


PHCET Department of Electrical Engineering

}
void loop()
{
while(Serial.available()) //Check if there are available bytes to
read
{
delay(10); //Delay to make it stable
char c = Serial.read(); //Conduct a serial read
if (c == '#'){
break; //Stop the loop once # is detected after a word
}
inputs += c; //Means inputs = inputs + c
}
if (inputs.length() >0)
{
Serial.println(inputs);

if(inputs == "A")
{
digitalWrite(relay1, LOW);
}
else if(inputs == "a")
{
digitalWrite(relay1, HIGH);
}
else if(inputs == "B")
{
digitalWrite(relay2, LOW);
}
else if(inputs == "b")
{
digitalWrite(relay2, HIGH);
}
else if(inputs == "C")
{
digitalWrite(relay3, LOW);
}
else if(inputs == "c")

Smart Home Automation Using Arduino and Android Application Page 13 of 35


PHCET Department of Electrical Engineering

{
digitalWrite(relay3, HIGH);
}
else if(inputs == "D")
{
digitalWrite(relay4, LOW)
}
else if(inputs == "d")
{
digitalWrite(relay4, HIGH);
}
else if(inputs == "E")
{
digitalWrite(relay5, LOW);
}
else if(inputs == "e")
{
digitalWrite(relay5, HIGH);
}
else if(inputs == "F")
{
digitalWrite(relay6, LOW);
}
else if(inputs == "f")
{
digitalWrite(relay6, HIGH);
}
else if(inputs == "G")
{
digitalWrite(relay7, LOW);
}
else if(inputs == "g")
{
digitalWrite(relay7, HIGH);
}
else if(inputs == "H")

Smart Home Automation Using Arduino and Android Application Page 14 of 35


PHCET Department of Electrical Engineering

{
digitalWrite(relay8, LOW);
}
else if(inputs == "h")
{
digitalWrite(relay8, HIGH);
}
inputs="";
}
}

Smart Home Automation Using Arduino and Android Application Page 15 of 35


PHCET Department of Electrical Engineering

CHAPTER 6

2 -Two channel relay

Fig 5: diagram of 2 (Two) channel relay

This is a 5V, 10A 2-Channel Relay interface board. It can be used to control
various appliances, and other equipment's with large current. It can be controlled
directly with 3.3V or 5V logic signals from a microcontroller (Arduino, 8051,
AVR, PIC, DSP, ARM, ARM, MSP430, TTL logic).

It has a 1x4 (2.54mm pitch) pin header for connecting power (5V and 0V), and
for controlling the 2 relays.

Smart Home Automation Using Arduino and Android Application Page 16 of 35


PHCET Department of Electrical Engineering

The pins are marked on the PCB: -


 GND - Connect 0V to this pin.

 IN1 - Controls relay 1, active Low Relay will turn on when this input goes
below about 2.0V

 IN2 - Controls relay 2, active Low Relay will turn on when this input goes
below about 2.0V

 VCC - Connect 5V to this pin. Is used to power the opto couplers

Specifications: -

 High current relay, AC250V 10A, DC5V 10A

 2 LEDs to indicate when relays are on

 Works with logic level signals from 3.3V or 5V devices

 Opto isolation circuitry

Smart Home Automation Using Arduino and Android Application Page 17 of 35


PHCET Department of Electrical Engineering

CHAPTER 7
Flow chart

Fig 6:- flow chart

We have to first initialize the Bluetooth module and then we have to


checkwhether the Bluetooth is connected or not. And then when the input is
given to the light as seen in the flow chart the light will turn on and turn off and
the same goes for the fan as seen in the figure above.

Smart Home Automation Using Arduino and Android Application Page 18 of 35


PHCET Department of Electrical Engineering

CHAPTER 8
Result

Fig 7:- OFF state of lamp

Smart Home Automation Using Arduino and Android Application Page 19 of 35


PHCET Department of Electrical Engineering

Fig 8: - ON State of lamp

Smart Home Automation Using Arduino and Android Application Page 20 of 35


PHCET Department of Electrical Engineering

CHAPTER 9
Application

1. Heating, ventilation and air conditioning (HVAC): -


it is possible to have remote control of all home energy monitors over the
internet incorporating a simple and friendly user interface.
2. Lighting control system: -
A "smart" network that incorporates communication between various lighting
system inputs and outputs, using one or more central computing devices.
3. Appliance control and integration;
With the smart grid and a smart meter, taking advantage, for instance, of high
solar panel output in the middle of the day to run washing machines.
4. Home robots and security:
A household security system integrated with a home automation system can
provide additional services such as remote surveillance of security cameras
over the Internet, or access control and central locking of all perimeter doors
and windows.
5. Home automation for the elderly and disabled.

Smart Home Automation Using Arduino and Android Application Page 21 of 35


PHCET Department of Electrical Engineering

CHAPTER 10
Conclusion

While wearing down this endeavor we have grabbed a lot of finding out about
various modules being used in this errand. We are glad we can Built this Project
as apart in this endeavor and set up new musings. We believe the assignment
completes as needed and the data grabbed in the midst of this period will be
used in our future corporate life. Additionally, we might want to include that
home computerization is the fate of places of new world. Home automation is a
resource which can make home environment Automated. People can control
their electrical devices via. Smartphone These home automation devices and set-
up controlling action through mobile. In future these products may have high
potential for marketing.

Smart Home Automation Using Arduino and Android Application Page 22 of 35


PHCET Department of Electrical Engineering

CHAPTER 11
Future scope

1) The going with stage for home robotization advertise will happen subject to a
couple of key overhauls in the progression open in Automation, for example,
improvement in Wireless Automation blueprints and moreover bringing down of
regard appears as the market starts perceive home mechanization use in more
noteworthy volumes. A couple of examples that we foresee for this time of the
business are,
2) Big associations like Philips, Siemens and Schneider will as time go on bring
out truly mass-market mechanization things with interfacing with UI in any case
at lower esteem point as contrast with today, and more people will be able to
bear the cost of the things.
3) Solution commitments will bit by bit move to an all the more straightforward
structure, where next to two or three key parts, customers will have the ability to
buy and use the Automation things themselves without the guide of any specific
ace.
4) Future Scope for the home automation system involves making homes even
smarter. If, this is actually implemented everywhere in the future like classroom,
labs of the respective colleges etc. There will be a huge saving of electricity and
that is all we need is “TO SAVE ELECTRICITY’’.
5) More energy can be conserved by ensuring occupation of the house before
turning on devices and checking the brightness and turning off the light if not
necessary.
6) The system can be integrated closely with the home security solutions
enhancing the safety for home owners.

Smart Home Automation Using Arduino and Android Application Page 23 of 35


PHCET Department of Electrical Engineering

CHAPTER 12
References

1.Kumar Shimi, S.L. (2015),’’Voice recognition-based home automation system


for paralyzed people.’’
2.Silviu Folea,Daniela Bordencea,Casiana Hotea,Honoriu Valean(24 may
2012),’’Smart home automation system using wi-fi power devices.’’
3.A.Elshafee,K.A.Hamed(2012),’’Design and implementation of a wi-fi based
home automation system.

Smart Home Automation Using Arduino and Android Application Page 24 of 35


PHCET Department of Electrical Engineering

Smart Home Automation Using Arduino and Android Application Page 25 of 35


PHCET Department of Electrical Engineering

Smart Home Automation Using Arduino and Android Application Page 26 of 35


PHCET Department of Electrical Engineering

Smart Home Automation Using Arduino and Android Application Page 27 of 35


PHCET Department of Electrical Engineering

Smart Home Automation Using Arduino and Android Application Page 28 of 35

You might also like