Professional Documents
Culture Documents
Documentation PDF
Documentation PDF
INTRODUCTION
1.1 Background
The “Home Automation” concept has existed for many years The terms “Smart
Home”, “Intelligent Home” followed and has been used to introduce the concept of
networking appliances and devices in the house. Home automation Systems (HASs)
represents a great research opportunity in creating new fields in engineering, and
Computing. HASs includes centralized control of lighting, appliances, security locks
of gates and doors and other systems, to provide improved comfort, energy efficiency
and security system. HASs becoming popular nowadays and enter quickly in this
emerging market. However, end users, especially the disabled and elderly due to their
complexity and cost, do not always accept these systems.
Due to the advancement of wireless technology, there are several different of
connections are introduced such as GSM, WIFI, and Bluetooth. Each of the
connection has their own unique specifications and applications. Among the four
popular wireless connections that often implemented in HAS project, WIFI is being
chosen with its suitable capability. The capabilities of WIFI are more than enough to
be implemented in the design. Also, most of the current laptop/notebook or
Smartphones come with built-in WIFI adapter. It will indirectly reduce the cost of this
System.
1
1.2 OBJECTIVES
Android controlled Smart Home Automation should be able to control the home
appliances wirelessly with effectively and efficiently.
Controlling home appliances using motion detection
To develop a code which includes the features of detecting the motion and controlling
the appliances.
Initiating a mail during emergency
To develop a code for initiating a mail whenever it is found that the temperature has
gone beyond specified range indicating fire emergency.
Extensible platform for future enhancement
The application is to be highly extensible, with possibility of adding features in the
future as needed.
1.3 SCOPE
The project aims at designing a prototype for controlling the home appliances that can
be controlled wirelessly using motion detection. The system can be used in a wide
range of areas. The system integrated with different features can be applied in the
following fields.
• The system can be used in home, small offices to the big malls
The system can be used from home to offices to control the electrical
appliances.
• For the development of technology friendly environment
The system incorporates the use of technology and making smart home
automation. By the use of day to day gadgets we can utilize them for different
prospective.
2
CHAPTER II
LITERATURE REVIEW
2.1 Bluetooth based home automation system using cell phones:
In Bluetooth based home automation system the home appliances are connected to the
Arduino BT board at input output ports using relay. The program of Arduino BT
board is based on high level interactive C language of microcontrollers; the
connection is made via Bluetooth. The password protection is provided so only
authorized user is allowed to access the appliances. The Bluetooth connection is
established between Arduino BT board and phone for wireless communication. In this
system the python script is used and it can install on any of the Symbian OS
environment, it is portable. One circuit is designed and implemented for receiving the
feedback from the phone, which indicate the status of the device.
2.2 Zigbee based home automation system using cell phones:
To monitor and control the home appliances, the system is designed and implemented
using Zigbee.. The device performance is record and store by network coordinators.
For this the Wi-Fi network is used, which uses the four switch port standard wireless
ADSL modem router. The network SSID and security Wi-Fi parameter are
preconfigured. The message for security purpose first process by the virtual home
algorithm and when it is declared safe it is re-encrypted and forward to the real
network device of the home. Over Zigbee network, Zigbee controller sent messages to
the end. The safety and security of all messages that are received by the virtual home
algorithm. To reduce the expense of the system and the intrusiveness of respective
installation of the system Zigbee communication is helpful.
2.3 GSM based home automation system using cell phones:
Because of the mobile phone and GSM technology, the GSM based home automation
is lure to research. The SMS based home automation, GPRS based home automation
and dual tone multi frequency (DTMF) based home automation, these options we
considered mainly for communication in GSM.
2.4 Home automation using RF module:
The important goal of Home Automation System is to build a home automation
system using a RF controlled remote. Now technology is accelerating so homes are
also getting smarter. Modern homes are deliberately relocating from current l switches
3
to centralized control system, containing RF controlled switches. Today traditional
wall switches situated in various parts of the home makes it laborious for the end user
to go near them to control and operate. Even further it turns into more problematic for
the old persons or physically handicapped people to do so. Home Automation using
remote implements an easier solution with RF technology. In order to accomplish this,
an RF remote is combined to the microcontroller on transmitter side that sends
ON/OFF signals to the receiver where devices are connected. By operating the stated
remote switch on the transmitter, the loads can be turned ON/OFF globally using
wireless technology.
2.5 Home automation using Android ADK:
The devices of home are associated to the ADK and the Connection is established
between the Android device and ADK. The devices of house are linked to the
input/output ports of the board (EMBEDDED SYSTEM) and their current situation
will have passed to the ADK. The microcontroller board (Arduino ADK) is based on
the ATmega2560. It has a USB host connection to associate with Android based
phones, and that is based on the MAX3421e IC. The two important features of
Android Open Accessory Protocol 2.0(AOAP) are as follows: It has audio output that
is from the Android device to the component and it also support for the component
serves as one or more Human Interface Devices (HID) to the Android device. This
paper depends upon Android and Arduino platform in which both are FOSS(Free
Open Source Software). Including motion sensors for safety systems will detect an
unauthorized action and it will automatically notice the user through cell phone or the
security system.
2.6 Cloud Based home automation system
Home Automation using cloud based system focuses on the design and
implementation of home gateway to collect data about data from home appliances and
then send to the cloud-based data server to get store on Hadoop Distributed File
System, it is processed using MapReduce and use to implement a monitoring tasks to
Remote user Presently home Automation System is persistently developing its
resilience by assimilating the current characteristics which gratify the rising interest of
the people. This paper presents the design and development of home automation
system that use the cloud computing as service. The current system consists of three
4
important units: the first part is cloud server, handle and controls the data and
information of client and users and the status of devices The hardware interface
module is the second part which implement the relevant connection to the actuators
and sensing devices which give the physical service. Last part is Home Server, which
construct the hardware device and gives the user interface. This paper focus to build
the web services using cloud which is need for security and storage and availability of
the data. The current system is cost efficient, reliable and comfortable which also
gives a secured home automation system for entire family. The system is made up of
various client modules for various platforms.
2.7 Raspberry pi home automation with wireless sensors using smart phone
Home Automation System has been developed with Raspberry Pi by reading the
algorithm and subject of the Email. Raspberry Pi guarantees to be an efficient
platform for implementation powerful, and economic smart home automation. home
automation using Raspberry pi is better than any other home automation methods in
several ways. For example, DTMF (dual tone multi-frequency) using home
automation, the call tariff is a big demerit, which is not the problem in their proposed
method. In Home Automation using web server, the design of web server and the
memory space required is dismissed by this method, because it just uses the already
established web server service given by G-mail. LEDs were used to identify the
switching action. This System is efficient and flexible interactive.
5
CHAPTER-III
METHODOLOGY
3.1 BLOCK DIAGRAM
The major modules used in this project are ultrasonic sensor which is used for motion
detection and DHT-11 which is used as a temperature sensor This DHT-11 is used to
measure the humidity percentage and temperature in the surroundings. When these
sensors are given the power supply through arduino, the ultrasonic sensor detects the
motion and turns on the respective appliances. As the temperature exceeds a given
value, the mail is sent as a warning to the respective person.
6
3.2 CIRCUIT DIAGRAM
3.3 WORKING
The Home Automation using Arduino and Ultrasonic Sensor is a simple project,
where the lights in the room will automatically turn on upon detecting a human
motion and stay turned on until the person has left or there is no motion.
Working on this project is very simple and is explained here.Initially, when there is no
human movement, the ultrasonic Sensor doesn’t detect any person and its OUT pin
stays LOW. As the person enters the room, the change in ultrasonic radiation in the
room is detected by the ultrasonic Sensor.As a result, the output of the ultrasonic
Sensor becomes HIGH. Since the Data OUT of the ultrasonic Sensor is connected to
Digital Pin of Arduino, whenever it becomes HIGH, Arduino will activate the
appliances by making the appliances pin HIGH.This will turn the Light ON. The light
stays turned ON as long as there is a movement in front of the sensor.If the person
takes a nap or leaves the room, the ultrasonic Radiation will become stable (there will
be no change) and hence, the Data OUT of the ultrasonic Sensor will become LOW.
This in turn will make the Arduino to turn OFF the appliances and the room light will
be turned OFF.
7
3.4 Hardware Environment
● Arduino as the controller for its processing power and large developer
community.
● Nodmcu used to send the mail.
● Sensors are used to sense the movement of the Human.
8
3.6 Hardware Description
❖ Arduino
❏ Arduino is an open-source electronics platform based on easy-to-use
hardware and software. Arduino boards are able to read inputs - light
on a sensor, a finger on a button, or a Twitter message - and turn it into
an output - activating a motor, turning on an LED, publishing
something online. You can tell your board what to do by sending a set
of instructions to the microcontroller on the board. To do so you use
the Arduino programming language (based on Wiring), and the
Arduino Software (IDE), based on Processing.
❏ Over the years Arduino has been the brain of thousands of projects,
from everyday objects to complex scientific instruments. A worldwide
community of makers - students, hobbyists, artists, programmers, and
professionals - has gathered around this open-source platform, their
contributions have added up to an incredible amount of accessible
knowledge that can be of great help to novices and experts alike.
9
❖ Nodemcu
❖ Ultrasonic Sensor
10
❖ LED
Fig.1.6 LED
❖ Fan
Fig.1.7 Fan
11
❖ Temperature Sensor DHT-11
❏ The DHT11 is a basic, low-cost digital temperature and humidity sensor.
❖ Buzzer
Fig.1.9 Buzzer
❏ A buzzer is a small yet efficient component to add sound features to our
project/system. It is very small and compact 2-pin structure hence can be
easily used on breadboard, Perf Board and even on PCBs which makes this a
widely used component in most electronic applications
12
3.7 CODE
Code for Ultrasonic Sensor
#include "dht.h"
#define dht_apin A0 // Analog Pin sensor is connected to
dht DHT;
// defines pins numbers
const int trigPin = 10;
const int echoPin = 11;
int led = 12;
// defines variables
long duration;
int distance;
void setup(){
Serial.begin(9600);
delay(500);//Delay to let system boot
Serial.println("DHT11 Humidity & temperature Sensor\n\n");
delay(1000);//Wait before accessing Sensor
void loop(){
//Start of Program
DHT.read11(dht_apin);
13
Serial.print(DHT.humidity);
Serial.print("% ");
Serial.print("temperature = ");
Serial.print(DHT.temperature);
Serial.println("C ");
if(DHT.temperature>=50)
{
digitalWrite(7,HIGH);
}
else
{
digitalWrite(7,LOW);
}
//Fastest should be once every two seconds.
14
if(distance<=30)
digitalWrite(led,HIGH);
else
digitalWrite(led,LOW);
}// end loop()
Code for getting the mail via NODEMCU
#include <ESP8266WiFi.h>
const char* ssid = "Gnsarma1"; // Enter the name of your WiFi Network.
const char* password = "hyderabad"; // Enter the Password of your WiFi Network
char server[] = "mail.smtp2go.com"; // The SMTP Server
WiFiClient espClient;
void setup()
{
pinMode(D0,INPUT);
Serial.begin(115200);
delay(10);
Serial.println("");
Serial.println("");
Serial.print("Connecting To: ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print("*");
}
Serial.println("");
Serial.println("WiFi Connected.");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
// byte ret = sendEmail();
while (1){
15
if(digitalRead(D0)==HIGH){
byte ret = sendEmail();
delay(10000);
}
}
}
void loop()
{
}
byte sendEmail()
{
if (espClient.connect(server, 2525) == 1)
{
Serial.println(F("connected"));
}
else
{
Serial.println(F("connection failed"));
return 0;
}
if (!emailResp())
return 0;
Serial.println(F("Sending EHLO"));
espClient.println("EHLO www.example.com");
if (!emailResp())
return 0;
Serial.println(F("Sending auth login"));
espClient.println("AUTH LOGIN");
if (!emailResp())
return 0;
Serial.println(F("Sending User"));
16
espClient.println("bWFoZXNoLmJhYnVAdGVjaG9sdXRpb24uY29t"); // Your
encoded Username
if (!emailResp())
return 0;
Serial.println(F("Sending Password"));
espClient.println("ODY4NjE4MDM4M20=");// Your encoded Password
if (!emailResp())
return 0;
Serial.println(F("Sending From"));
espClient.println(F("MAIL From: mahesh.babu@techolution.com")); // Enter Sender
Mail Id
if (!emailResp())
return 0;
Serial.println(F("Sending To"));
espClient.println(F("RCPT To:dharanisanthoshi99@gmail.com")); // Enter Receiver
Mail Id
if (!emailResp())
return 0;
Serial.println(F("Sending DATA"));
espClient.println(F("DATA"));
if (!emailResp())
return 0;
Serial.println(F("Sending email"));
espClient.println(F("To:dharanisanthoshi99@gmail.com")); // Enter Receiver Mail Id
// change to your address
espClient.println(F("From:mahesh.babu@techolution.com")); // Enter Sender Mail
Id
espClient.println(F("Subject: ESP8266 test e-mail\r\n"));
espClient.println(F("the temperature prescribed is exceeded.\n"));
espClient.println(F("immediate action to be taken chances of fire is high."));
espClient.println(F("if ignored fire may breakout."));
espClient.println(F("."));
17
if (!emailResp())
return 0;
Serial.println(F("Sending QUIT"));
espClient.println(F("QUIT"));
if (!emailResp())
return 0;
espClient.stop();
Serial.println(F("disconnected"));
return 1;
}
byte emailResp()
{
byte responseCode;
byte readByte;
int loopCount = 0;
while (!espClient.available())
{
delay(1);
loopCount++;
if (loopCount > 20000)
{
espClient.stop();
Serial.println(F("\r\nTimeout"));
return 0;
}
}
responseCode = espClient.peek();
while (espClient.available())
{
readByte = espClient.read();
Serial.write(readByte);
}
18
if (responseCode >= '4')
{
return 0;
}
return 1;
}
19
CHAPTER-IV
RESULTS & DISCUSSION
4.1 RESULT
Whenever the ultrasonic sensor detects an object within its range, the LED glows.
20
The above picture shows the humidity and temperature values along with the distance
in which the object is placed.
21
Whenever the temperature exceeds a given range, the above mail is sent to the owner
of the house ,giving a warning about the rising temperature which might lead to a fire
in the house.
22
4.2 APPLICATION
● Controlled electrical fixtures such as lights and air conditioners
● Simplified garden or lawn management
● HVAC
● Controlled smart home appliances
● Enhanced safety and security at home
● Water and air quality control and monitoring
● Voice based home assistant supporting natural language
● Smart locks and switches
23
CHAPTER-V
FUTURE ENHANCEMENTS / RECOMMENDATIONS
❖ Smart home automation and IoT are creating a lot of buzz in the IT industry.
Daily lives have been made simpler, better, and more comfortable with the
increasing number of smart homes and connected devices.
❖ Smart homes have changed the way people live. For example, how about
turning on the air conditioning of your home before actually stepping inside?
How about asking Alexa to play your favorite music and get weather updates
while you are still in the kitchen preparing dinner? Smart home automation
can do even more than that — it has become the future of our lives.
24
❖ Yet, it is said that 2019, as well as the years to come, will be promising for the
smart home industry. Here are predictions for smart home devices:
25
a good thing as more people, today, are depending on their appliances to take
on a major part of the workload.
REFERENCES
● https://www.arduino.cc/en/main/software
● http://www.amazinggates.com/
26
● https://www.elprocus.com/wireless-home-automation-using-intern
et-of-things/
● http://www.microchip.co.uk/
● http://www.quora.com/
● http://www.engineeringproject.com/
● http://www.electronicsworldforyou.com/
27
28
29
30
31
32
33
34
35
36
37