Sei sulla pagina 1di 29

CONTROL OF HOME APPLIANCES USING ARDUINO AND

BLUETOOTH MODULE

A Mini Project Report submitted in partial fulfilment


of the requirement for the award of degree of

BACHELOR OF TECHNOLOGY

IN

ELECTRICAL AND ELECTRONICS ENGINEERING

Submitted by

G UMAMAHESWARI (16341A0222)
G LATHA (16341A0227)
K AVINASH (16341A0238)
K RANI (16341A0249)
S MOHINI (17345A0208)
Under the esteemed guidance of
Dr. D. DANALAKSHMI
Associate Professor
EEE Dept.
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

(Accredited by NBA, NAAC with ‘A’ Grade & ISO 9001:2008 Certified Institution)

GMR Nagar, Rajam – 532 127,


Andhra Pradesh, India.
April 2019
Department of Electrical and Electronics Engineering

CERTIFICATE

This is to certify that the Term paper Report entitled “CONTROL OF HOME
APPLIANCES USING ARDUINO AND BLUETOOTH MODULE” submitted by G
UMAMAHESWARI bearing JNTU. No.: 16341A0222, G LATHA bearing JNTU. No.:
16341A0227, K AVINASH bearing JNTU. No.: 16341A0238, K RANI bearing JNTU. No.:
16341A0249, S MOHINI bearing JNTU. No.: 17345A0208, has been carried out in partial
fulfilment of the requirement for the award of degree of Bachelor of Technology in
Electrical & Electronics Engineering Branch of GMR Institute of Technology, An
Autonomous Institute Affiliated to JNTUK, KAKINADA, is a record of bonafide work
carried out by her under my guidance & supervision. The results embodied in this report have
not been submitted to any other University or Institute for award of any degree/diploma.

Signature of the guide Signature of the HOD


Dr. D. DANALAKSHMI Dr. P. BHARANI CHANDRA KUMAR
Associate Professor Professor & HOD
Dept of EEE Dept of EEE
GMRIT, Rajam. GMRIT, Rajam
ACKNOWLEDGEMENT

To start with, we would like to express our gratitude to GMRIT for providing us an
opportunity to pursue B. Tech. The knowledge and experience that we gained from here
during our study period has been very valuable for us.

Firstly, We would like to extend our sincere thanks to our supervisor, Dr. D.
Danalakshmi for all her support and guidance during our project. Her valuable
suggestions and comments always served us, as a source of inspiration and
encouragement.

Our special thanks to the Professor& Head of the Department, Dr. P. Bharani Chandra
Kumar for his kind support, throughout our study period. We are grateful to thank all the
staff members of Electrical and Electronics Engineering Department for their Support,
during our study.

We would like to extend our sincere thanks to our Term Paper Coordinator, Mr. N.S.S.
Rama Krishna for all his support and valuable suggestions.

We wish to thank our respected Vice-principal, Dr. J. Raja Murugadoss for providing
support and stimulating environment in which project has been developed.

We wish to thank our respected principal Dr. C. L.V.R.S.V. Prasad for providing
support and stimulating environment in which project has been developed.

Finally, we would like to thank our B. tech Batchmates, whose support and
encouragement always helped me to gain our confidence

G UMA MAHESWARI (16341A0222)

G LATHA (16341A0227)

K AVINASH (16341A0238)

K RANI (16341A0249)

S MOHINI (17345A0208)

[1]
ABSTRACT

This system is designed to assist and provide support in order to fulfill the needs
of elderly and disabled in home. Automation of the surrounding environment of a modern
human being allows increasing his work efficiency and comfort. There has been a
significant development in the area of an individual’s routine tasks and those can be
automated. In the present times, we can find most of the people clinging to their mobile
phones and smart devices throughout the day. Hence with the help of his companion–a
mobile phone, some daily household tasks can be accomplished by personifying the use
of the mobile phone. Analyzing the current smart phone market, most users are opting for
Android based phones. It has become a second name for a mobile phone in layman terms.
Home Automation System (HAS) has been designed for mobile phones having Android
platform to automate a Bluetooth interfaced Arduino which controls a number of home
appliances like lights, fans, bulbs and many more using on/off relay. This paper presents
the automated approach of controlling the devices in a household that could ease the tasks
of using the traditional method of the switch. The most famous and efficient technology
for short range wireless communication- Bluetooth is used here to automate the system.
The HOME AUTOMATION SYSTEM for Android users is a step towards the ease of
the tasks by controlling one to twenty-four different appliances in any home environment.

Keywords: Home automation, Smart home, home appliances, Bluetooth, Arduino,


Android.

[2]
MOTIVATION

In present scenario, electricity scarcity is the one of the major problems which
the people are facing in everyday life. Resources should be used economically to
conserve them for future use since they are limited and will expire on one day. So, we
need to conserve energy daily to conserve our energy. To overcome the situation a
system is to be proposed such that the electrical appliances should be turned OFF when
not in use. It is difficult for the user to switch OFF the electrical appliances when the
switches are located far away from them. So, a system is needed to operate the
electrical appliances from a distance. All of us need to conserve energy but the great
deal is finding out the best ways to conserve energy and save power. Many methods
were proposed for this conservation strategy. But here a system is proposed at low-cost
to unplug the fans and light when it is not in use.

[3]
INDEX
Chapter page

CHAPTER 1. INTRODUCTION 5

CHAPTER 2. COMPONENTS DESCRIPTION 8

CHAPTER 3. CIRCUIT DIAGRAM 14


3.1 Block Diagram 14

3.2 Circuit Diagram 15

CHAPTER 4. WORKING OF THE PROJECT 16

CHAPTER 5. CODE AND RESULTS OF THE PROJECT 18

CHAPTER 6. CHALLENGES, FUTURE WORK AND APPLICATIONS 23

CONCLUSION 26

REFERENCES 27

[4]
CHAPTER 1

INTRODUCTION

Home automation is which allows the operations of various home appliances


more convenient and saves energy. Home automation is ease for the disabled and elderly
people and also reduces the human labor. The main advantage is controlling and
managing the appliances from the array of sources like smart phones, tablets, laptops.
Home automation term generally refers to the term smart home technology. Smart home
technology is nothing but controlling the appliances in a smart way. The information
from the appliances is been communicated to the user and the appliances.
Communication between the home appliances and the user is been trending in this world
with the invention of different techniques. The main theme of this home automation
involves the saving energy. With the energy saving concept, home automation makes life
easier. It consists of the automatic controlling of the all the appliances either by wired or
wireless communication. Centralized control of lighting equipment, air conditioners,
fans, lights is also been carried away. The general architecture of the home automation
system is given by below block diagram.

Fig1.Architecture of home automation system

[5]
The main components of the home automation system consist of the sensors, controllers,
controlling system and user interface.

Device appliances:

The appliances which we are going to control by the smart home technology.

Sensor:

Detects the signal generating to control the appliances.

Central controller:

it is an interface that communicates with the user interface to control the appliance.

User interface:

It acts as a like a monitor or phone by giving commands to control the system.

The user interface is connected through a transmission medium like the modules
(wireless), Ethernet (wired) in order to control the appliances. We have different types of
home automation system.

Power line-based home automation:

This type of home automation is not expensive and do not require additional cables to
transfer the information. But this system includes large complexity and requires
additional circuits and device.

Wired home automation:

In this type of home automation system all the equipment in the home are connected to
the main controller through the cable. Actuators are attached to the equipment to
communicate with the main controller. The complete operation is centralized by the
computer will regularly communicates to the main controller.

[6]
Wireless home automation:

It is an expanded form of the wired home automation system. It is nothing but the wired
home automation which involves the wireless technologies like Wi-Fi, Bluetooth,
Arduino, DTMF, Zigbee to achieve the remote operation. Taking the example of the
GSM home automation as it allows the control of the home equipment by an SMS to the
modem of the GSM.

Bluetooth based home automation:

If the home automation uses the Bluetooth module then it is Bluetooth based home
automation. Bluetooth based home automation is a wireless based home automation is
obtained at low cost and easy to install in the existing home. Researches proved that it
was the system faster than compare to the other technologies. It has the ability to transmit
the data of 3mbps within a range of 10m to 100m depending on the type of Bluetooth
device used. There are different types of the Bluetooth modules that we use to control the
appliances.

Arduino based home automation:

The home automation which involves the Arduino module for the control of appliances it
is termed to be Arduino based home automation. We generally have different Arduino
modules to which the code is dumped into it for the control of appliances.

Here, in this project Arduino and Bluetooth module used for the control of the bulbs and
other appliances. Arduino used for the interfacing the code for Bluetooth module and 4
channel relays board is used for which the appliances are connected to control and the
sufficient code is processed to this Arduino as well as Bluetooth module for the control of
things.

[7]
CHAPTER 2

COMPONENTS DESCRIPTION

The different components required for our project are given below:

1. Arduino Uno.
2. Printed Circuit Board.
3. Android phone.
4. Bluetooth module (HC-05).
5. Android application. (to control the Arduino via Bluetooth).
6. Some Resistors.
7. Jumping Wires.
8. Relays Modules.
9. Light Bulbs.
10. Switch board.

By having the above components, we can have the following procedure flow for the
continuation of the project:

Fig2: Project flow

[8]
ARDUINO UNO:

The Arduino Uno is a microcontroller board based on the ATmega328. It has a 16 MHz
ceramic resonator, 14 digital input/output pins (of which 6 can be used as PWM outputs),
6 analog inputs, a USB connection, a power jack, an ICSP header, and a reset button.
This board is very simple and can be easily used, everything you need to support the
microcontroller is in this board, just plug it in a computer via USB cable and power using
an AC-to-DC adapter or battery to get started. The difference seen in the Arduino Uno is
that it does not use the FTDI USB-to-serial driver chip but, it has the Atmega16U2
(Atmega8U2 up to version R2) programmed as a USB to-serial converter.

Fig.4 Arduino UNO

Arduino UNO specifications:

Microcontroller: ATmega328

--Operating Voltage: 5V

Input Voltage (recommended): 7-12V

Input Voltage (limits): 6-20V

[9]
Digital I/O Pins: 14 (of which 6 provide PWM output)

Analog Input Pins: 6

DC Current per I/O Pin: 40 mA

DC Current for 3.3V Pin: 50 mA

Flash Memory: 32 KB of which 0.5 KB used by bootloader

SRAM: 2 KB (ATmega328)

EEPROM: 1 KB (ATmega328)

Clock Speed: 16 MH

BLUETOOTH MODULE HC-05:

Operating voltage: 5 v

Master/ Slave: master/slave is a model for a communication protocol in which one


device or process known as the master controls one or more other devices or processes
known as slaves. H05 module works in three modes master mode, slave mode and slave
loop mode. It can sit as master or slave using AT command.

Enable bin: it can be connected to 5V or left without connecting this allow the module to
work but in case of connecting it to ground it doesn’t work.

Key pin: some modules doesn’t contain this pin so a wire could be welded to it. This pin
has two modes AT mode which allow the user to enter commands to it and connection
mode which allow the connection between device.

HC-05 Specification:

Bluetooth protocal: Bluetooth Specification v2.0+EDR

Frequency: 2.4GHz ISM band

[10]
Modulation: GFSK(Gaussian Frequency Shift Keying)

E-mission power: ≤4dBm, Class 2

Sensitivity: ≤-84dBm at 0.1% BER

Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps

Security: Authentication and encryption

Profiles: Bluetooth serial port

Power supply: +3.3VDC 50mA

Working temperature: -20 ~ +75Centigrade

Di-mension: 26.9mm x 13mm x 2.2 mm

Fig.5 Bluetooth module

[11]
-

Fig.6 Pin description of HC-05

RELAY MODULE:

Fig.7 4 -Channel relay module

Relays are the Hulks (tm -DC Comics) of the electronics world. Often dumb and simple,
but DANG they can control lots of power. These are ideal in situations where you need to

[12]
comfortably control AC or DC power levels. Transistors and FETs can do the same job,
but often not with the convenience and reliability of a good old relay. Use this 4 Channel
Relay Module board to interface any Microcontroller with Electrical Appliances/Loads.
Can also be used in driving high power motors.4-channel relay output modules, relay
output contacts 250A 10A. Input IN1, IN2, IN3, IN4, the signal line LOW effective.
VCC, GND power input, can relay a separate power supply relay power input of JD-
VCC.

Fig.8 jumper wires

Fig.9 Resistors

[13]
CHAPTER 3
CIRCUIT DIAGRAM
The basic block diagram for the Arduino based home automation using Bluetooth module
is given below.

Fig.10 Basic block diagram of this project

The basic block diagram includes the Arduino connected to the relay module and it was
interfaced by the Bluetooth module. After processing the code for both Arduino and the
Bluetooth the appliances connected to the relay module will be worked based on the
android application.

[14]
Fig.11 Circuit diagram for the project

In the above-mentioned circuit diagram, the Arduino is connected to the relay module
and the Bluetooth is connected to the Arduino based on the pin configuration. The relay
module is connected to the respective appliances that we are supposed to control. Based
on the that we dumped the connections done as per the circuit diagram the project was
proceeded further.

[15]
CHAPTER 4

WORKING OF THE PROJECT

4.1. Construction of the project:

 Connecting Arduino Uno with Bluetooth Module (HC-05): The VCC (+5v) of
Bluetooth module is connected to the +3.3v of Arduino Uno and HC-05 GND pin
to Arduino Uno GND pin. The Tx and Rx pins of HC-05 is connected to Rx and
Tx of Arduino Uno.

 Connecting Arduino Uno with Relay module: The VCC and GND pins of relay
module is connected to +5v and GND of Arduino Uno. Input pins of relay module
are connected to the 8th, 9th, 10th, 11th pins of the Arduino Uno.

 Connecting of Bulbs to Relay module: Connect the bulbs in series with relay
module. A relay acts as a switch. So, connections are made as per the switch
connections.

 Uploading the Code to Arduino Uno: Firstly, remove the Tx and Rx pins of
Arduino Uno. Now install the Arduino app in the system and connect the Arduino
Uno to the System by using USB cable. Choose tools, board and Arduino Uno to
find the connected board in Arduino menu. Choose the correct serial port of the
connected board. Now click the upload button. After uploading connect the Tx
and Rx pins of Arduino.

 Controlling the setup from a Smartphone: Firstly, download the Arduino


Bluetooth Control app from broxcode on Android device. Open the app on
Smartphone. It will ask for Bluetooth permissions then click ok. Next it will list
all the available devices then click on HC-05. Once clicking on the device then it
connected to the transceiver. It would now prompt to enter the mode that you

[16]
wish to use. Select “Switch mode”. Now set values for ON and OFF and clicks
submit.

4.2. Working of the project:

In this project, using the above discussed set up one can turn on any electrical appliance
into smart device that can be controlled from Smartphone. The working of the project is
explained here:

 A low cost-efficient smart home system is designed.


 This system has two main modules: the hardware interface module and software
communication module.
 The heart of the system is Arduino Uno microcontroller which is capable of
functioning as a micro web server and acts as interface for all the hardware
modules.
 HC-05 is Bluetooth device used for wireless communication with Bluetooth
enabled device. It communicates with microcontroller using serial
communication.
 After making hardware interfacing, HC-05 has 3.3v level for Rx/Tx and Arduino
Uno can detect this level. There is no need to shift transmit voltage level of HC-
05 module but there is need to shift the transmit voltage level from Arduino Uno
to receive data pin of HC-05 module.
 By transmitting voltage levels, the communication can be established between the
modules. Now send data from Smartphone to HC-05.
 For communication purpose Smartphone requires android application for
transmitting and receiving data.
 Now connect the mobile to HC-05 using Arduino Bluetooth control app. Once the
Bluetooth in Android phone is turned on the app is started. After connecting the
mobile to HC-05 turn ON and OFF the lights using respective switches.

[17]
CHAPTER 5
CODE AND RESULT OF THE PROJECT
CODE:
SOFTWARE USED: ARDUINO SOFTWARE

Arduino code for home automation using Bluetooth module:


#include <SoftwareSerial.h>

SoftwareSerial btSerial(2,3); // RX & TX

String inputs;

#define relay1 2 //Connect relay1 to pin 2

#define relay2 3 //Connect relay2 to pin 3

#define relay3 4 //Connect relay3 to pin 4

#define relay4 5 //Connect relay4 to pin 5

int val1=0;

int val2=0;

int val3=0;

int val4=0;

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

[18]
digitalWrite(relay1, HIGH); //Switch relay1 off

digitalWrite(relay2, HIGH); //Swtich relay2 off

digitalWrite(relay3, HIGH); //Switch relay3 off

digitalWrite(relay4, HIGH); //Swtich relay4 off

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")

if(val1==0)

digitalWrite(relay1,LOW);

[19]
val1=1;

else

digitalWrite(relay1,HIGH);

val1=0;

delay(100);

else if(inputs == "b")

if(val2==0)

digitalWrite(relay2,LOW);

val2=1;

ccccc else

digitalWrite(relay2,HIGH);

val2=0;

delay(100);

[20]
else if(inputs == "c")

if(val3==0)

digitalWrite(relay3,LOW);

val3=1;

else

digitalWrite(relay3,HIGH);

val3=0;

delay(100);

else if(inputs == "d")

if(val4==0)

digitalWrite(relay4,LOW);

val4=1;

else

digitalWrite(relay4,HIGH);

[21]
val4=0;

delay(100);

inputs="";

RESULT:

Fig.12 Arrangement of the Components

[22]
Fig.13 ON position of both lights through mobile app

CHAPTER 6
CHALLENGES, FUTURE WORK AND
APPLICATIONS
Some problems and issues were encountered during this project. Bluetooth several
tests and wiring and unwiring is in order. This problem was tackled by using relay
modules. connection between the android phone and the Arduino-Uno board was
unsuccessful in the early stages of this project. This problem was encountered when the
xbee Bluetooth module was meant to be used for this project. This problem has been
tackled by online search on the matter and finally replacing the xbee module with the
HC-05 Bluetooth module. Another issue it was using the relay modules and connecting
them. At first normal relays were intentioned to be used in the project however soldering
them into a breadboard was troublesome because of the whole not matching the relay
pins and the breadboard needed specific modification, not to mention connecting
everything using soldering iron is not the ideal way .

APPLICATIONS:

 Using this project, we can turn on or off appliances remotely i.e. using a phone or
tablet.
 The project can be further expanded to a smart home automation system by
including some sensors like light sensors, temperature sensors, safety sensors etc.
and automatically adjust different parameters like room lighting, air conditioning
(room temperature), door locks etc. and transmit the information to our phone.
 Additionally, we can connect to internet and control the home from remote
location over internet and also monitor the safety. Future Development of the
project
 Arduino based device control using Bluetooth on Smartphone project can be
enhanced to control the speed of the fan or volume of the buzzer etc.

[23]
 Home automation and Device controlling can be done using Internet of Things –
IOT technology.
 We can replace Bluetooth by GSM modem so that we can achieve device
controlling by sending SMS using GSM modem

 Any day-to-day, repeatable process is automatable with smart home applications.


The greater the control and flexibility of these processes, the more energy and
cost savings the resident experiences, which are factors anyone who pays utilities
strives to moderate.
 Lighting Control: Leaving the Dark Ages and Stepping Into the Light Smart
lighting allows you to control wall switches, blinds, and lamps. You’re able to
schedule the times lights should turn on and off.
 HVAC Regulation: No Longer Burned by Your Heating Bill With automated
HVAC you are able to reduce the heat when a room is unoccupied, and increase
or decrease it at specific times based on your schedule and occupancy.
 Lawn Irrigation Systems: If a rainstorm develops and deposits two inches of
rainwater on your lawn, the automated sprinkler detects the saturation and
disables its scheduled watering. Conversely, the system will be alerted to dry
conditions and supply the necessary amount of nourishment, without over-
watering.
 Security Systems: Naturally, there is a great deal of scrutiny regarding the level of
trust in controlling your home’s security system via a mobile device, but it begs
earnest exploration when weighing the potential benefits and peace of mind it
provides homeowners.

PROS OF HOME AUTOMATION:

 1.Security Tap your finger to turn on the lights when you get home so you
worried about what’s hiding in the shadows, or in your pathways. Or automate to
turn on when you aren’t home to look like you are to ward off potential robbers.

[24]
Door locks are another automated home product that can increase your home
security.
 2.Energy Efficiency Increase your home’s energy efficiency by remotely
powering off systems and appliances when they aren’t in use. In addition to the
standard home automation products that give you active control, some products
actively monitor systems and arm the homeowner with knowledge, insight and
guidance to achieve greater control and energy efficiency.
 3.Savings Home automation literally pays off. When you are able to use home
systems and appliances only when needed, the savings will be apparent in the first
utility bill. No more wasting money on lights left on when you aren’t home, or
spending money on gas to drive home because you forgot to lock the door.
Monetary savings are apparent, but you’ll also be saving time. No wasted trips
home, no running through the house turning everything off, no time spent
worrying about what was or wasn’t turned off.
 4.Convenience Don’t you hate having to rely on neighbors to watch your house
when you’re gone? With home automation, convenient control of your home is at
your fingertips. You don’t have to trust someone else with your most valued
possessions.

CONS OF HOME AUTOMATION:

 1.Cost of Intelligence Installing state-of-the-art features inside a home results in a


higher price tag for the property. The cost of an intelligent home that makes our
lives convenient is high because some of the technology is relatively new. The
cost of living expenses such as utilities, maintenance and repair of the technology
can be expensive as well.
 2.Technology Learning Curve Owning a smart home means having to learn how
to use your home. Unlike traditional homes, smart home technology requires you
to adapt to the innovations within your living area such as security systems, air
units and a remote that controls your entire house. For the technology-savvy
family, the smart home will help achieve convenience faster, but for others, it will

[25]
take reading manuals and learning how-to before the benefits of convenience pay
off.
 3.Video Surveillance Video surveillance can be a wonderful tool in heightening
security and deterring crime, but when the technology falls into the wrong hands,
issues of privacy can occur. Security sensors within the doors and walls of a smart
home use wireless technology to transfer signals to a central control unit that
notifies emergency officials of any foreign activity.

CONCLUSION

This report confers on the conclusion of Bluetooth Based Home


Automation System Using Android Phone and discusses some future recommendation. It
can be concluded that CONTROL OF HOME APPLIANCES USING ARDUINO AND
BLUETOOTH MODULE was a success. This system consists of an Arduino-Uno board,
a Bluetooth Module, an Android phone, power sockets, home appliances and an android
Application. It is user friendly and it is cost effective. Also, it can be concluded that the
objectives of this project have been successfully met and they are as follows: Constructed
a wireless home automation system controlled by a smartphone specifically an android
device. Designed and implement cost effective home automation system yet an efficient
one. Designed a user friendly and a safe system to control home appliances especially
aimed to aid the elders and handicapped. There are some recommendations for Future
works. Some of them are, better to use relay modules and connect it directly than using
normal relays with PCB, try to find a way to amplify the Bluetooth module signal to
work in greater distance, Test each and every component before using them especially the
relays for safety purposes. And this project was nothing but a prototype one further in
future I hope there will be more scope for this home automation in real time applications.

[26]
REFERENCES

[1].Ming Yan and Hao Shi, “SMART LIVING USING BLUETOOTHBASED


ANDROID SMARTPHONE”, 2013.
[2]. The official Bluetooth Website: http://www.bluetooth.com/Pages/Fast-
Facts.aspx
[3]. The official Arduino Website: http://arduino.cc/en/Guide/Introduction
[4].Ahmed Sirajuddin Ahmed Alhaj, “Home Automation System Using Arduino”,
University Technology Malaysia

[27]

Potrebbero piacerti anche