1. 1 | P a g e
CHAPTER 1
INTRODUCTION
_____________________________________________________________________________
1.1 Problem Statement:
While people are pursuing ever-growing high quality of their lives today. This leads to more and
more facilities and home appliances poured into their buildings. How to control and manage
these versatile facilities and appliances in a house?
Usually conventional wall switches are located in different corners of a house and, thus
necessitate the need of manual operations like pressing to turn the loads on or off. It becomes
very difficult for the elderly or physically handicapped people to operate them. How to help
them?
1.2 Objectives:
To construct a wireless home automation system controlled by a smartphone specifically an
android device.
To design and implement cost effective home automation system yet an efficient one.
To design a user friendly and a safe system to control home appliances especially aimed to aid
the elders and handicapped.
1.3 Motivation:
Have you ever wondered about home automation which would give the facility of controlling
tube lights, fans and other electrical appliances at home using a remote control? Off course, Yes!
But, are the available options cost-effective? If the answer is No, we have found a solution to it.
We have come up with a new system called Arduino based home automation using Bluetooth.
This system is super-cost effective and can give the user, the ability to control any electronic
device without even spending for a remote control. This project helps the user to control all the
electronic devices using his/her smartphone.
1.4 Historical Background:
Home automation began to increase in popularity in the late 1990s and early 2000s as internet
technology developed fast and smart homes suddenly became a more affordable option. Most of
the Smart home appliances that exist nowadays only have the provision of turning the machines
ON and OFF. There are many systems available that aim to automate using NFC, Bluetooth and
Wi-Fi. The existing system consists of a procedure to interact with the appliances, which usually
2. 2 | P a g e
includes pressing a button at some location within the application on your smart device. While
some also have the provision to do so with the help of specific command. Many smart home
appliances are available nowadays, which includes Amazon Echo, Google Home and Apple
Home Kit, this is in order to bring home automation to every household.
3. 3 | P a g e
CHAPTER 2
EXPERIMENTAL SETUP AND PROCEDURE
______________________________________________________________________________
2.1 Methodology:
In designing a home automation system, one or more suitable platforms are used in order to build
a reliable and flexible system that can be easily operated and adapted for a new household
appliance.
Therefore, for the purpose of this project some specific deliberate choices were made on the type
of platforms, hardware components and mode of operation of the home automation system.
6. 6 | P a g e
2.4 Schematic Diagram:
2.5 Hardware Components:
The list of components mentioned here are specifically for controlling 4 different loads.
Arduino Uno R3 Development Board
HC – 05 Bluetooth Module
4 Channel Relay Board Operates On 5V
Male to Female Jumper Wires
USB D Type for reprograming the Arduino
Laptop
Android Phone or Tablet (Bluetooth enabled)
9 V Power supply
7. 7 | P a g e
2.6 Project Cost:
Sr. No Component Cost in PKR
1 Arduino Uno R3 Development Board 700
2 HC-05 Bluetooth Module 300
3 4 Channel Relay Board Operate on 5V 300
4 USB D type for Reprograming the Arduino 100
5 Male to Female Jumper Wires 50
6 9V Power Supply 60
8. 8 | P a g e
CHAPTER 3
EXPERIMENTAL RESULTS
_____________________________________________________________________________
3.1 Test Results:
Implementation of Home Automation In the implementation process firstly, we have tested the
home automation part. For home automation we have used all our sensors as input, Arduino
mega as the controller and lights as appliances or output. In this process optimum and auto
modes are tested separately. We have checked weather the conditions for turning on fan and
lights work properly or not, as shown in Fig. After succeeding this part we moved into the next
phase which is controlling over an android app.
Implementation of home automation
9. 9 | P a g e
Controlling from Android Application In this phase we have controlled the above operation
mentioned earlier from an android phone. We have used “blynk” which is an open application
for beginners to test IoT stuffs. We 26 have tested our home automation modes from this app.
For this case we needed the blynk app installed in our phone. On the other hand another
controller NodeMCU is added with the arduino. So the process is command was sent through the
blynk app to internet towards the NodeMCU which is connected to internet via Wi-Fi. The
NodeMCU takes input from internet and according to input it gives output to the arduino mega.
Arduino mega than works according to the home automation algorithms. Like when optimum
mode on is pressed in the blynk app, the command is sent to NodeMCU via internet. Than the
NodeMCU will make the pin high which is assigned to optimum mode on. So the NodeMCU’s
output is the input of arduino mega. Arduino mega now gets an input pin high which is actually
telling the arduino to run the optimum mode part. This is how the appliances was controlled from
blynk app.
Controlling from app Node MCU & Blynk App.
10. 10 | P a g e
Controlling from App
This is the final phase of implementation. We have used android based application Node
MCU App & Blynk App. After that we went for final testing. The control process is the
same as previous. When a button is pressed in the app, it will send the instruction related to
that particular button to NodeMCU through internet. The NodeMCU than gives output as
instructed. As the output of the NodeMCU is the input of the arduino mega, so the arduino
will execute its algorithm based on input. Like if active mode on button is pressed in
NodeMCU app than NodeMCU will make the pin high which is assigned for active
mode on. Next, arduino mega will get the input as high which is assigned for active mode.
Than it will perform the active mode. As a result all the appliances will turn on.
Controlling from app Node MCU & Blynk App.
As shown in Fig modes are being controlled by smart phone with android app. This is
how modes are being checked weather they work properly. This system worked with a
high accuracy rate.
11. 11 | P a g e
CHAPTER 4
CONCLUSION
______________________________________________________________________________
4.1 Conclusion:
The home automation system has been experimentally proven to work satisfactorily by
connecting sample appliances to it and the appliances were successfully controlled from a
wireless mobile device. We learned many skills such as soldering, wiring the circuit and other
tools that we use for this project and was able to work together as a team during this project.
The Bluetooth client was successfully tested on a multitude of different mobile phones from
different manufacturers, thus proving its portability and wide compatibility. Thus, a low-cost
home automation system was successfully designed, implemented and tested.
12. 12 | P a g e
REFERENCES:
1. www.autogates.com.my
2. www.usautomatic.com
3. www.amazinggates.com
4. www.microchip.co.uk
5. www.quora.com
6. www.engineeringproject.com
7. www.efy.com
8. www.electronicsworldforyou.com
13. 13 | P a g e
A. PROGRAMING
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
}
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")
{