0% found this document useful (0 votes)
91 views

Home Automation Using NodeMCU Google Ass

This document is a project report on developing a home automation system using NodeMCU, Google Assistant, and other components. It was submitted by three students and certified by their course instructor and head of department. The report includes an abstract, introduction, list of required components, descriptions of the components, circuit diagrams, code, procedures, pin diagrams, explanations of the working, applications, advantages, disadvantages, and future scope of the project. It aims to allow voice control of home appliances like fans and lights using NodeMCU and Google Assistant.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views

Home Automation Using NodeMCU Google Ass

This document is a project report on developing a home automation system using NodeMCU, Google Assistant, and other components. It was submitted by three students and certified by their course instructor and head of department. The report includes an abstract, introduction, list of required components, descriptions of the components, circuit diagrams, code, procedures, pin diagrams, explanations of the working, applications, advantages, disadvantages, and future scope of the project. It aims to allow voice control of home appliances like fans and lights using NodeMCU and Google Assistant.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

A project report

on

Home automation using NodeMCU, Google assistant


Submitted by:
B. Uma Sankar Rao - 180060009
A. Rakesh - 180060011
S. Sumanth Prapulla - 180060013

Batch No. - 3
II / IV Bachelor of Technology
IN
Electrical and Electronics Engineering
( SEMESTER – IV)

ANALOG ELECTRONIC CIRCUIT DESIGN

18EC2103

Koneru Lakshmaiah Education Foundation

VADDESWARAM – 522 502


April 2020

i
Koneru Lakshmaiah Education Foundation

Department of Electrical and Electronics Engineering

Analog Electronic Circuit Design (18EC2103)

This is to certify that Mr. B. Uma Sankar Rao - 180060009, Mr. A. Rakesh -
180060011, Mr. S. Sumanth Prapulla - 180060013 of section 1 studying II / IV
B. Tech., in EEE has satisfactorily completed project “Home automation using
NodeMCU, Google assistant’’ in the IV semester during the academic year
2019 - 2020.

Signature of Course Instructor Signature of Course Coordinator

Signature of H. O. D.

ii
ACKNOWLEDGEMENT

We express great pleasure for me to express my gratitude to our honorable President


Sri. Koneru Satyanarayana, for providing the opportunity and platform with
facilities in accomplishing the project based laboratory. We express sincere
gratitude to our principal Dr. K. Subbarao for his administration towards our
academic growth.

We express sincere gratitude to our Head of the Department E. E. E. Dr. S.


V. N. Lalitha for her leadership and constant motivation provided in successful
completion of our academic semester. We record it as our privilege to deeply thank
for providing us the efficient faculty and facilities to make our ideas into reality.

We express my sincere thanks to our project supervisor Mr. Kasi Uday Kiran
for his novel association of ideas, encouragement, appreciation and intellectual zeal
which motivated us to venture this project successfully.

We are pleased to acknowledge the indebtedness to our lab technicians who


devoted themselves directly or indirectly to make this project success.

We express our deep gratitude and affection to our parents who stood behind
us in all our endeavours.

B. Uma Sankar Rao - 180060009

A. Rakesh - 180060011

S. Sumanth Prapulla - 180060013

iii
TABLE OF CONTENTS

S. NO. CONTENTS PAGE NO.

1 Abstract vi

2 Introduction viii

3 Components required ix

4 About components and x - xvii


requirements

5 Circuit diagram xviii – xix

6 Code xx

7 Procedure to make xxi


programing to ESP8266

8 Procedure to make xxv


automation via Blynk,
Google Assistant

9 Pin diagram of xxvi – xxvii


NodeMCU

10 Working xxviii

11 Applications xxix

12 Advantages xxx

iv
13 Disadvantages xxxi

14 Future scope xxxii

15 Conclusion xxxiii

***

v
ABSTRACT
The Home Automation System (HAS) is extension of current activities
performed inside the home and this Home Automation System can be developed
easily now a days, because of powerful computational devices and wireless sensor
network(WSN), to IoT-Based Smart Bank to Achieve Home Automation with
Gesture Detection and Control. The main objective of this project is to develop a
home automation system using an ESP8266 board being remotely controlled by any
Android OS smartphone. Modern houses are gradually shifting from conventional
switches to centralized control systems, involving remote controlled switches.

Ever thought of a life where you could just command your home appliances to work
as you need just by using your voice. Coming days we are going to use automated
houses which are activated. This project will demonstrate, controlling home
electronic appliances like T. V. , fans, lights etc., using the internet and your voice
and that too low budget.

Today’s, smart objects in the Internet of Things(IOT) are able to detect their state
and share it with other objects across the Internet, thus collaboratively making
intelligent decisions on their own. Humans always find alternatives around them to
carry out their work smoothly. Service provisioning in IOt should also be made
capable of providing similar or alternate objects that are aligned with user
requirements, current context and previous knowledge without any human
intervention. With advancement of automation technology, life is getting simpler
and easier in all aspects. Now a day’s Automatic systems are being preferred over
manual systems. Traditional methods of household chores are replaced by
automation systems which are adaptable with the modern world. The manual
systems are not more acceptable by the new generation people, so traditional
methods are to be replaced. We have reported an effective implementation for the
vi
Internet of Things used for monitoring regular domestic conditions by sensing
systems. Architecture of home automation is based on appliances NodeMCU,
mobile application, web application, relays.

vii
INTRODUCTION
The main objective of this project is to develop a home automation system
using an Arduino board with Bluetooth being remotely controlled by any Android
OS smartphone....Modern houses are gradually shifting from conventional switches
to centralized controlsystem,involving remote controlled switches.

Ever thought of a life where you could just command your home appliances to work
as you need just by using your voice?Gone are the days where you have to be a
billionaire like TonyStark to have an automated house which is voice activated.In
this short tutorial I’m going to show you how you can control your electronic
appliances like T.V,fans,light set cover the internet with your voice and that to under
a low budget.You can follow this tutorial even if you have no prior knowledge about
Programming or NodeMCU.So lets begin learning HomeAutomation Using
NodeMCU and GoogleAssistant.

Home automation is anything that enables you to use your home’s lighting, heating
and appliances more conveniently and efficiently. It can be as simple as remote or
automatic control of a few lights, or it can be a complete system that controls all
major parts of your home. Custom set to your own personal preference.

It focuses on wireless home automation technologies - these are easy to retrofit into
existing homes now need for new wiring and no ripping up the carpets or drilling
holes in the walls.

Each technology has its own unique features and benefits that makes some more
suited to particular applications, whilst others can be seen for all general home
automation installations.

viii
Components required:

1. Bread board
2. ESP8266
3. Relay
4. Connecting wires
5. DC fan
6. LED
7. Mobile phone with Google assistant
8. Blynk app
9. Arduino IDE
10.Wi-Fi router or mobile Hotpost
11.IFTTT web application

ix
About components and requirements:

Bread board is a construction base for prototyping of electronics. Originally the


word referred to a literal bread board, a polished piece of wood used for slicing
bread. In 1970s the solderless breadboard because available and now a days the term
“breadboard” is commonly used to refer to these.

Because the solderless breadboard does not require soldering, it is reusable. This

It easy to use for creating temporary prototypes and experimenting with circuit
design. For this reason, solderless breadboards are also popular with students and
in technological education. Older breadboard types did not have this property. A
stripboard and similar prototyping printed circuit boards, which are used to build
semi-permanent soldered prototypes or one-offs, cannot easily be reused. A variety
of electronics systems may be prototyped by using breadboards, from small analog
and digital circuits to complete central processing units.

x
ESP8266 board is a low cost Wi-Fi module, is a self contained System-On-Chip
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.

The chip first came to the attention of Western makers in August 2014 with the ESP-
01 module, made by a third-party manufacturer Ai-Thinker. This small module
allows microcontroller to connect to a Wi-Fi network and make simple TCP/IP
connections using Hayesstyle commands. However, at first there was almost no
English-language documentation on the chip and the commands it accepted. The
very low price and the fact that there were very few external components on the
module, which suggested that it could eventually be very inexpensive in volume,
attracted many hackers to explore the module, the chip, and the software on it, as
well as to translate the Chinese documentation.

xi
Relay is an electrically operated switch. It consists of a set of input terminals for a
signal or multiple control signals, and a set of operating contact terminals. The
switch may have any number of contacts or multiple contact forms, such as make
contacts, break contacts, or combinations thereof.

Relay are used where it is necessary to control a circuit by an independent low-power


signal, or where several circuits must be controlled by one signal. Relays were first
used in long-distance telegraph circuits as signal repeaters: they refresh the signal
coming in from one circuit by transmitting it on another circuit. Relays were used
extensively in telephone exchanges and early computers to perform logical
operations.

xii
DC fan are powered with a potential of fixed value such as the voltage of a battery,
it is used for cooling motors and transmissions, for cooling and drying people, also
used in cooling of IC in C. P. U.

Google assistant is an artificial intelligence-power virtual assistant developed by


Google that is primarily available on mobile and smart home devices. Google
assistants can engage in two-way conversations. Actions on Google allows 3rd party
developers to build apps for google assistant. Letting third-party device makers
incorporate their own “Actions on Google” commands for their respective products.

Incorporating text-based interactions and more languages. Allowing users to set a


precise geographic location for the device to enable improved location-specification
queries.

Google Assistant, in the nature and manner of Google now, can search the Internet,
schedule events and alarms, adjust hardware settings on the user's device, and show
information from the user's Google account. Unlike Google Now, however, the
Assistant can engage in a two-way conversation, using Google's natural language
processing algorithm.[

xiii
IFTTT is a freeware web-based service that creates chain of simple conditional
statements called applet is triggered by changes that occur within other web services
such as Gmail etc. For example, an applet may send an e-mail message if the user
tweets using a hashtag, or copy a photo on Facebook to a user’s archive if someone
tags a user in a photo. In addition to the web-based application, the service runs on
iOS and Android. Triggers are the “this” part of an applet. They are the items that
trigger the action. For example, from an RSS feed, you can receive a notification
based on a keyword or phrase. Actions are the "that" part of an applet. They are the
output that results from the input of the trigger.

Applets (formerly known as recipes) are the predicates made from Triggers and
Actions. For example, if you like a picture on Instagram (trigger), an IFTTT app can
send the photo to your Dropbox account (action).[21]

Ingredients are basic data available from a trigger—from the email trigger, for
example; subject, body, attachment, received date, and sender’s address

xiv
Blynk is a platform with IOS and Android apps to control Arduino, Raspberry Pi
and likes over the internet. It’s a digital dashboard where you can build a graphics
interface for your project by simply dragging and dropping widgets.

Blynk works over the Internet. This means that the hardware you choose
should be able to connect to the internet. Some of the boards, like Arduino Uno will
need an Ethernet or Wi-Fi Shield to communicate, others are already Internet-
enabled: like the ESP8266, Raspberri Pi with WiFi dongle, Particle Photon or
SparkFun Blynk Board. But even if you don’t have a shield, you can connect it over
USB to your laptop or desktop (it’s a bit more complicated for newbies, but we got
you covered). What’s cool, is that the list of hardware that works with Blynk is huge
and will keep on growing. The Blynk App is a well designed interface builder. It
works on both iOS and Android, so no holywars here, OK?

xv
Arduino IDE(Integrated Development Environment) is a cross-platform application
that is written in functions from C and C++. It is used to write and upload programs
to Arduino Compatible boards, but also, with the help of 3rd party cores, other
vendor development boards.

xvi
Connecting wires, allows an electrical current or signal to travel from one point on
a circuit to another because signal or current needs a medium through which to move.
In basic circuits, the wire comes from one terminal of a power source, such as a
battery.

WiFi hotspot is simply an area with an accessible wireless network. The term is
most often used to refer to wireless networks in public areas like airports and coffee
shops. Users can even create their own mobile hotspot using a cell phone or an
external device that can connect to a cellular network.

xvii
Circuit diagram

The Home automation is operating with Nodemcu esp8266 controller and the
command is given by the Blynk android application in a mobile phone using the wi-
fi network. The Nodemcu esp8266 as inbuilt wi-fi module and the devices
connected with Home automation. Both wi-fi is connected with an authentication
token .For demonstration in this project DC appliance and power supply are used,
NodeMCU Vin and Ground were given to voltage supply either micro USB also
power supply will be given. Digital Pins D0, D1 are connected to relay IN1, IN2
respectively and VCC and Ground of relays connected parallel to Vin and ground.
For appliances connection will connected to output pins holder of relays.

xviii
A home automation system is an automating the bulk of electronic and electrical
tasks with in a home.It uses a combination of hardware and software to enable
control and management over appliances and devices within a home.Home
automation not only refers to reduce human efforts but also energy efficiency and
time saving.Here we are performing home automation by using ESP8266–WiFiSoC
and Blynk PlaystoreApp.

xix
Code

#define BLYNK_PRINT Serial

#include <ESP8266WiFi. h>

char auth [ ] = "tJkoRhpp51-4MEVRUAng6vEC7J4ia0W9";

// auth token from Blynk app.

char ssid[ ] = "Your network name";

char pass[ ] = "Your network password";

void setup( )

Serial. begin(9600);

digitalWrite(D0, HIGH);

digitalWrite(D1, HIGH);

Blynk.begin(auth, ssid, pass);

void loop( )

Blynk.run ( );

xx
Procedure to make coding to ESP8266

● Open Arduino IDE.


● Click on Sketch, select include library and select Manage libraries.
● Users can see the dialog box, search blynk in the search bar.
● Click on Install.
● It took a few minutes depending on the user's data speed.
● Click on File, select preferences paste this link given below in Additional
Boards Manager URLs.

http://arduino.esp8266.com/stable/package_esp8266com_index.json

● Click on OK.
● Click on tools, select board managers, search nodemcu in the search bar.
● Click on install.
● Click on files, select examples, select Blynk, select board WiFi, select
ESP8266_Standalone.
● Users can get code for ESP8266_standalone. Just few will edit i.e., auth
token, network name, network password.
● These two syntax play a major role while operating appliances, whenever
WiFi connected to NodeMCU with power supply they get automatically
operated, to reduce this drawback this syntax will help.

Syntax: digitalWrite (pin no. , HIGH);

According to your requirement of appliances, users have to include them in


programming NodeMCU.

xxi
Procedure to make automation via Blynk, Google assistant

Here there are two way to control our appliances those are through Blynk, Google
assistant

Through Blynk

● First install Blynk app in a mobile phone i.e., Android or iPhone.


● Then the user logs in with their respective mail ID.
● Users receive a token in mail which they need for programming.
● Furtherly the user receives an auth token for Blynk this place a major role.
● Add a new project named as Home automation.
● Arrange button according to user requirement.
● Select board, edit pin number.
● Up to here setup of blynk ready.
● Copy and paste auth token in ESP8266 in Arduino IDE.

Up to here automation can control through mobile phones.

Through Google assistant

● For Google assistant service, IFTTT web application will help.


● Users have to create an account, which they can use for their Google assistant.
● Click on explore, select create applet.
● Then the web page displays if this then that.

xxii
● Click on If This, type Google assistant in search of that web page search bar,
simply choose your service.
● Click on say a simple phrase.
● Fill the space accordingly to what they are asking.

Example: turn on light, for this google assistant can replay OK, turning on
light.

● Click on create trigger.

xxiii
 Click on Then That, choose webhooks services.
● On selecting webhook services, click on make a web request.

xxiv
● Fill the space according to the images. For URL, blynk server required in
command prompt (CMD) type this command below

>> ping blynk-cloud.com

● The required IP address: 188.166.206.43

http://188.166.206.43/AuthTokenThatYouReceived/update/PinNumberNodeMCU

● Example:http://188.166.206.43/abcd123483A/update/D1
● Check out the pin diagram of NodeMCU with respect to Arduino.
● Example: If D0 then D16
● Body is used to give signal i.e., ON and OFF for ON - [“0”], for OFF[“1”]
● Click on create action, and end with finish.

xxv
Pin diagram of NodeMCU with respective to Arduino Uno

Here D0, D1…. are digital pins of NodeMCU next to that GPIO16, GPIO5….are
arduino pins i.e., they are actual pins to update in URL link in webhooks. Users
have to observe this diagram.

xxvi
NodeMCU provides access to the GPIO (General Purpose Input/Output) and a pin
mapping table is part of the API documentation.

I/O index ESP8266 pin

0 GPIO16

1 GPIO5

2 GPIO4

3 GPIO0

4 GPIO2

5 GPIO14

6 GPIO12

7 GPIO13

8 GPIO15

9 GPIO3

10 GPIO1

11 GPIO9

12 GPIO10

xxvii
Working

The Home Automation System is operating with NodeMCU ESP8266 controller and
the command is given by the Blynk application in a mobile phone using the WiFi
network. The NodeMCU ESP8266 has an inbuilt WiFi module and the devices
connected with Home Automation System. Both WiFi is connected with an
authentication token.

The heart of today’s project is the WiFi enabled board that needs no introduction to
the ESP8266 based NodeMCU_development board. It is an open source platform
for developing WiFi based embedded systems and it is based on the popular
ESP8266 WiFi module, running the NodeMCU firmware. NodeMCU was born out
of the desire to overcome the limitations associated with the first versions of the
ESP8266 module which was not compatible with breadboards. It was difficult to
power and even more difficult to program. The NodeMCU board is easy to use.
Low cost and that quickly endeared it to the heart of makers and it is one of the most
popular boards today. For this project two channel relay modules are added to the
ESP8266 board. The project flow involves the control of NodeMCU’s GPIO from
a webpage on any device connected on the same network as the board. The status
of the GPIO’s control the coil of the relays and causes the relay to alternate between
normally open(NO) and normally close(NC) condition depending on the state of the
GPIO, thus effectively turning the connected appliance “ ON” or “ OFF”.

Now the operation is gone by giving supply either Micro USB or Vin, GND. It can
operate by Blynk application in mobile phone i.e., Android or iPhone by manual and
via Google Assistant with voice. The Hardware is well operated according to our
action.

xxviii
Application

● Lighting control
● Lawn/Gardening management
● Smart home appliances
● Improved home safety and security
● Home air quality and water quality monitoring
● Better infotainment delivery
● Most preferable language based voice assistant

xxix
Advantages

● It can operate anywhere through the world.


● Security against burglars.
● It is available at low cost.
● Voice control home function.
● Managing all of your home devices from one place. The convenience factor
here is enormous.
● Flexibility for new devices and appliances.
● Maximizing home security.
● Remote control of home functions.
● Increased energy efficiency.
● Improved appliance functionality.
● Home management insight.

Reduce human efforts: As this system works automatically humans do not require
to apply more efforts.

Multitasking: Multiple functions are done at the same time without the efforts of
the human.

Reduce time: As this system is multitasking so the time required will be less.

xxx
Disadvantages

● Due to improper network connection may lead to failure of working.


● Those who don’t afford WiFi connection bills, they can’t buy these products.

Cost, The disadvantage of a smart home system or Home automation system is the
cost. There are quite a number or companies that provide smart home systems, but
all of them are quite expensive. This also might be expensive.

Dependency on the internet, the basic requirement for the smart home system is
the internet.

xxxi
Future scope

Using this system as a framework. The system can be expanded to include


various other options which could include home security features like capturing the
photo of a person moving around the house and storing it onto the cloud. This will
reduce the data storage that using the CCTV camera which will record all the time
and stores it. The system can be expanded for energy monitoring or weather stations.
This kind of a system with respective changes can be implemented in the hospitals
for disable people or in industries where human invasion is impossible or dangerous
and it can also be implemented for environmental monitoring.

Future scope for the home automation systems involves making homes even smarter.
Homes can be interfaced with sensors including motion sensors, light sensors and
temperature sensors and provide automated toggling of devices based on conditions.
Home automation offers a global standard for interoperable products.

The home automation market is primarily driven by growing need for effective
solutions in various domestic applications such as lighting, safety and security,
energy management, entertainment, heating, ventilation, and air conditioning.

xxxii
Conclusion

The Home automation using Internet of Things has been experimentally


proven to work satisfactorily by connecting simple appliances to it and the
appliances were successfully controlled remotely through internet. The designed
system not only monitors the sensor data like temperature, gas, light, motion sensor
but also actuates a process according to the requirement. For example, the switch
gets dark. It also stores the sensor parameters in the cloud (Gmail) in a timely
manner. This will help the user to analyse the condition of various parameters in the
home anytime anywhere.

The home automation using Internet of Things has been experimentally proven to
work satisfactorily by connecting simple appliances to it and the appliances were
successfully controlled remotely through Internet. Home automation is undeniably
a resource which can make a home environment automated. People can control their
electrical devices via these home automation devices and set up controlling actions
through mobile. In future this product may have high potential for marketing.
Further it can be demonstrated from computer instead of mobile phones for
controlling appliances of any large places like industries, hospitals, institutions etc.,
centrally.

xxxiii

You might also like