Anurag
Anurag
A project
A project
Reportsubmitted
Report submittedininpartial
fulfilment of the of the
fulfilment
requirements for for
requirements thethe
award
awardof the degree
of the of of
degree
BACHLEOR OFOF
BACHLEOR TECHNOLOGY
TECHNOLOGY
IN IN
ELECTRICAL AND
ELECTRICAL ELECTRONICS
AND ELECTRONICS
BYBY
ANURAG GAURAV
ANURAG GAURAV
(BTECH/15168/19)
(BTECH/15168/19)
DEPARTMENT OFOF
DEPARTMENT ELECTRICAL AND
ELECTRICAL ELECTRONICS
AND ENGINEERING
ELECTRONICS ENGINEERING
BIRLA INSTITUTE
BIRLA OFOF
INSTITUTE TECHNOLOGY
TECHNOLOGY
MESRA, OFF
MESRA, CAMPUS
OFF PATNA
CAMPUS PATNA
PATNA-800014
PATNA-800014
2023
HOME AUTOMATION USING IoT INCORPORATING IEEE PROTOCOLS
A project
Report submitted in fulfilment of the
requirements for the award of the degree of
BACHLEOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS
BY
ANURAG GAURAV
(BTECH/15168/19)
PATNA-800014
2023
ii
STUDENT DECLARATION
a. The work contained in the project report titled “Home Automation using IoT
incorporating IEEE protocols” is original and has been done under the
general supervision of my supervisor/guide “Dr. Mayank Singh”.
b. The work has not been submitted to any other Institute for any degree or
diploma.
c. I have followed the guidelines provided by the Institute in writing the project
report.
d. I have conformed to the norms and guidelines given in the Ethical Code of
Conduct of the Institute.
e. Whenever I have used materials (data, theoretical analysis, and text) from other
sources, I have given due credit to them by citing them in the text of the project
report and giving their details in the references.
f. Whenever I have quoted written materials from other sources, I have put them
under quotation marks and given due credit to the sources by citing them and
giving the required details in the references.
iii
DECLARATION CERTIFICATE
This is to certify that the work presented in the project report entitled
“Home Automation using IoT incorporating IEEE protocols” in partial
fulfilment of the requirement for the award of Degree of Bachelor of Engineering
in Electrical and Electronics Engineering of Birla Institute of Technology Mesra,
Ranchi is an authentic work carried out under my supervision and guidance.
Date:
iv
CERTIFICATE OF APPROVAL
It is understood that by this approval, the undersigned does not necessarily endorse
any conclusion drawn or opinion expressed therein, but approves the project for
the purpose for which it is submitted.
(Chairman)
Patna-800014
v
ACKNOWLEDGMENT
First, I would like to express my gratitude to the almighty. I have taken an effort in
this major project. However, this would not have been possible without the kind
support and help of many individuals. I would like to express my deepest
appreciation to all those who provided me with the possibility to complete this
project.
Special gratitude to my final year project guide Dr. Mayank Singh, for his,
continued encouragement, support, guidance, and constant supervision as well as
for providing necessary information regarding the completion of the project. I am
eternally grateful for the things- both academic and non-academic that I have
learned from him. His encouragement helped me to complete this project.
Date:
vi
ABSTRACT
This project shows the design and pilot execution of an innovative, inexpensive
home control system that uses Wi-Fi technology to link its component
components.
The suggested system has two major parts; the first is the cloud server, which
provides the management and control system core.
Users and system administrators can handle and control system code directly
(LAN) or remotely (internet). The second component is the hardware interface
module, which offers the sensors and actuators of the home automation system
with the proper interface.
To carry out the automated process, we used Node MCU and a variety of devices.
This method is intended to help and offer assistance so that the requirements of the
elderly and disabled can be met at home. The system's smart home idea also raises
standards of life in homes.
vii
TABLE OF CONTENT
Acknowledgement vi
Abstract vii
List of Figures ix
List of Tables xi
List of Abbreviations xii
Chapter 1 INTRODUCTION 1
1.1 Motivation 1
1.2 Project Objective 2
1.3 Organization of report 2
Chapter II LITERATURE REVIEW 3
2.1 Research papers 3
2.2 About IoT 8
2.3 IoT protocols 14
2.4 IEEE standards for an IoT 16
2.5 Components description 18
Chapter III PROBLEM FORMULATION 32
3.1 Problem definition 32
3.2 Existing model 32
3.3 Proposed model 33
3.4 Main features of the prototype 34
3.5 Block diagram & Flowchart 34
3.6 Circuit diagram 37
3.7 Project layout 37
3.8 Setting up the system 38
3.9 Hardware assembly 39
Chapter IV RESULTS 41
Chapter V CONCLUSION AND FUTURE SCOPE 44
REFERENCES 45
APPENDIX A(DATASHEETS & CODE) 46
PUBLICATION & CERTIFICATION 56
viii
LIST OF FIGURES
ix
A.2 4 Channel relay 53
A.3 Arduino mega 54
A.4 Block diagram of Arduino mega 55
A.5 Power tree of Arduino mega 55
x
LIST OF TABLES
xi
LIST OF ABBREVIATION
xii
CHAPTER I
INTRODUCTION
With a network of tangible things linked to the internet, enabling them to communicate
with one another and share data, we are experiencing the AI, 5G & IoT phase of the
computing technology transformation.
Using a variety of tangible components that are interconnected to generate wireless
sensor connectivity for data transfer.
With the help of the fundamental elements—hardware, data, software, and connectivity
which make it possible to join digital atoms with physical ones, data will actually make
sense thanks to the work of physical entities, software will regulate analysis and enable
actions, and connectivity will link all available resources.
1.1. Motivation
Home computerization creates a smarter home and is used to provide a better and more
advantageous way of living. The beauty of a house computerization structure is that it is
extremely adaptable, flexible, and its capabilities are only limited by our imagination.
[1] It's time to progress towards limitless choices of such a prototype as the IoT unrest is
just around the corner.
1|P a ge
1.2. Project objective
Appliance control using wireless technology (through manual control via phone
and through sensors).
Sensors should be able to communicate to each other.
Channels for safe communication between the application and the Node MCU
using secure Wi-Fi protocols to prevent other devices from taking control of the
HAS. [2]
To make sure it follows the IEEE protocols which are necessary for a device to
be called an IoT device.
The remaining sections of the study are divided into distinct parts. IoT and its protocols
are discussed in depth in Chapter II, along with the standards established by the IEEE
that must be met for a device to be referred to as IoT and a short overview of the
components used. The next chapter in the document, Chapter III, describes the
methodology used to create the suggested system and the steps necessary to make it.
Chapter IV, our final chapter, contains all the findings. Last but not least, Chapter V
summarizes this work's main contributions and offers some suggestions for its potential
future applications.
The datasheets for the component parts and the necessary codes are both included in the
two appendices at the conclusion.
2|P a ge
CHAPTER II
LITERATURE REVIEW
In this chapter we are going to review about the previous papers published and what work
is done till now. And we are also going to discuss about the IoT, its protocols and what
are the standards for an IoT device set the IEEE. And lastly we are going to have a brief
discussion about the components that we are going to use while making this prototype.
Some research papers used IoT based home automation systems are:
3|P a ge
2. [2] 2017 This study presents a way for creating a Home
Automation System (HAS) at a low expense
using Wi-Fi. It makes the idea of gadgets
communicating with one another clear. A smart,
linked home's environmental, safety, and energy
factors can be monitored and controlled using a
Wireless Sensor Network (WSN) that is Wi-Fi
based. The HAS is divided into various parts,
including sensors for temperature and humidity,
gas leak detection, fire and burglar alarms,
regulation of load and switching and current and
voltage monitoring, and rain sensing. A
smartphone application is used to fulfil the main
HAS requirement to watch and manage devices.
The programme is created with Android Studio
using the JAVA framework, and the user
interface is demonstrated. The main goal of this
article is to create a flexible, cost-effective device
management system that uses a variety of sensors
to record different parameters.
3. [3] 2017 This paper focuses on developing a voice-based
home automation system that is fully functional
and uses the IoT, AI, & NLP to provide a useful,
affordable way to work with home appliances that
use various technologies like GSM, NFC, etc.
The tools are all seamlessly integrated into one
main interface, which is the mobile device.
Genuino MK1000, also known as Arduino
MK1000, is used in the prototype. Instead of
using complex computer instructions, the user in
this initiative is free to communicate with the
household equipment using his or her own speech
and everyday English. The Internet of Things is
4|P a ge
established when the products are linked to the
mobile using an Arduino. The Arduino Boards
are connected to the utilities and designed to react
to inputs from mobile devices.
4. [7] 2018 This study centres on a system that offers easy-to-
use home automation features that also includes a
video module and offers protection for the house.
In essence, the Android software turns a
smartphone into a remote control for all
household equipment. With motion sensors,
security is accomplished if movement is detected
at the home's entryway; a notification is sent that
includes a real-time picture of the front door. The
owner of the home will receive this notice online,
enabling the programme to start sending
notifications. Therefore, the proprietor can
activate the alert system in the event of an
intrusion or switch on the utilities, such as
opening the entrance if a visitor. The system
makes use of a Raspberry Pi, a diminutive device
that serves as the system's host.
5. [6] 2019 This article details a smart house management
controller's step-by-step process. With the aid of
design management, it employs IoT to transform
household tools into smart and intelligent
gadgets. An energy-efficient device is created that
uses IoT connectivity to directly reach the smart
home. The suggested system primarily needs the
Node MCU microcontroller device, IFTTT to
understand voice instructions, Adafruit, a MQTT-
compatible library acting as a “MQTT broker”, &
Arduino IDE to programme the microcontroller.
To manage the smart house, this multimodal
5|P a ge
system combines Google Assistant with an online
application. The primary controller unit for the
smart house is linked to a Wi-Fi network that is
always accessible. In order to avoid the Wi-Fi
connection from disconnecting, the primary
controller is built to automatically join the best
network and be connected to the auto power
backup.
6. [9] 2019 This article suggests a method for reducing
computation overhead in current smart house
systems that use a variety of encryption
technologies, such as AES, ECHD, hybrid, etc.
These systems link different sensor devices using
an intermediary gateway. A technique for
automation with sensor-based learning is offered
by the suggested model. The device was
developed using a temperature monitor, though
other sensors could be used depending on the
situation. These sensor-equipped smart household
appliances can work and configure themselves
without human assistance. This research
minimises crypto decryption and concentrates on
smart home device identification and automation
using learning. The system avoids the local
gateway that is stated in the current system in
order to improve sensing data protection for smart
home devices and reduce processing overhead.
Real-time broker cloud controls all inbound and
outbound requests between users and devices and
is directly linked to smart homes. Real-time
broker cloud usage is primarily done to speed up
encryption processes.
6|P a ge
7. [8] 2019 The paper describes an artificial intelligence
system that uses vision to detect the on/off status
of popular household appliances. A novel house
automation system is produced as a consequence
of the suggested way of detecting the status of
appliances. The IP Addressing techniques used in
the IoT make it easier to reach the home's
collection of devices over a distance network.
Two devices, the Intel Galileo Gen 2 and
Raspberry Pi, are utilised in this undertaking. A
wireless network is used for contact between the
user devices, Intel Galileo Gen 2, and Raspberry
Pi. The UDP protocol is used to make it easier for
the components in the home control network to
communicate wirelessly. [8] Images are taken
using a Pi Cam and a USB Logitech camera
placed to the rotating shafts of two different servo
motors in order to use dlib-C++ to build machine
learning models that may be used to simulate the
status of various appliances' operations. The
recommended remedy automates the appliances
using visual modality because utilising photos
from specific places may raise privacy issues.
The Raspberry Pi now has an SPDT switch that,
ensures that, when turned off even then webcam
images are captured, they are only used as inputs
when visitors browse the website using the
Raspberry Pi's server IP, machine learning
models and other content are not shown. [8]
7|P a ge
2.2. About IoT
i. Intelligence:
IoT is intelligent because it combines computer, hardware, and software
with algorithms. IoT ambient intelligence improves its functionality,
enabling the objects to react in a intelligent way to a given circumstance &
assisting them in performing specified tasks. [6] Despite the widespread use
of smart technologies, IoT primarily considers intelligence as a way for
devices to communicate with one another; user and device interaction is
instead accomplished through graphical user interfaces and traditional input
methods.
8|P a ge
ii. Connectivity:
By connecting common things, connectivity strengthens the Internet of
Things. The crucial role of these items' connectivity is due to the IoT
network's collective intelligence being boosted by straightforward object-
level interactions. It makes things compatible with and accessible via
networks. With this connection, the networking of smart devices and apps
can open up new commercial prospects for the Internet of things. [5]
iv. Sensing:
IoT wouldn't be able to report on its state or even interact with the
environment without sensors that can measure or detect environmental
changes. Sensing provide us the tools we need to develop skills that really
represent our knowledge of the real world & the people who inhabit it. [2]
Even while the sensing data is only an analogue input from the physical
world, it nonetheless has the potential to provide us a profound
understanding of our complex environment.
v. Heterogeneity:
Heterogeneity is a key component of IoT. IoT have devices that are based
on networks and multiple hardware platforms and may connect with other
IoT devices across a variety of networks. [4] IoT architecture should enable
direct network connections between various networks. Main considerations
for designing heterogeneous items and for their environments in the Internet
of Things include scalabilities, modularity, extensibility, and
interoperability. [3]
9|P a ge
vi. Security:
IoT devices are prone to security risks by nature. It would be a mistake to
ignore the security issues raised by the IoT while we gain efficiency, fresh
experiences, and other advantages from it. IoT has significant transparency
and privacy problems. The creation of a security paradigm is necessary in
order to safeguard networks, the data transported, and endpoints across all
of them.
i. Communication:
IoT promotes device communication, sometimes referred to as M2M
communication. Due to the physical equipment' ability to remain linked,
absolute transparency is made possible with fewer inefficiencies and higher
quality. [1]
ii. Monitoring:
The 2nd most evident advantage of IoT is monitoring. The IoT enables you
to automate and regulate daily processes while preventing human
interference. Communication between machines aids in keeping processes
transparent. It also results in task homogeneity. Also, it can keep up the
level of service. In an emergency, we can also behave as is required. [2]
i. Compatibility:
There isn't currently a global standard for labeling and tracking device
compatibility. This drawback, in my opinion, is the most manageable. These
equipment's manufacturers simply have to accept a standard, like Bluetooth,
USB, etc. Nothing novel or creative is required here. [3]
ii. Complexity:
There are more chances for failure, just as there are with all complicated
11 | P a g e
processes. With the Internet of Things, errors could increase dramatically.
Let's assume, for example, that you and your partner both receive
notifications that your milk has run out and that you both decide to stop at a
store on the way home to buy milk. As a consequence, you and your partner
have spent twice as much as is necessary. [7]
iv. Agriculture:
By regulating environmental factors, a greenhouse farming method
increases food output. However, manual handling reduces the process's
effectiveness by causing output losses, energy waste, and wage costs. In
addition to making a greenhouse simpler to watch, embedded devices allow
us to regulate the greenhouse's temperature. [1] Different factors are
measured by sensors and send to cloud which is based on the needs of the
facility. The input is then processed, and a control step is applied.
i. Bluetooth:
The electronics and consumer products sectors make extensive use of the
Bluetooth short-range IoT communication protocol and technology.
According to predictions, it will be crucial for linking wearable items to the
IoT once more, although frequently via a smartphone. [3] A crucial
interface for IoT programs is the new BLE standard, sometimes referred to
as Bluetooth Smart. It's important to note that although having a range
similar to Bluetooth; it was designed to use far less power.
ii. Zigbee:
Like Bluetooth, ZigBee is mostly utilized in corporate settings. It is well
positioned to gain from wireless management and sensor networks in IoT
applications and allows low-power operation, high security, robustness, and
high performance in complex systems. The most recent ZigBee version is
3.0, which was just published and essentially unifies all of the individual
ZigBee wireless protocols.
iii. Z-Wave:
Z-Wave happens to be RF communications of low-power IoT technology
that includes, among other things, sensor and light processors and was
primarily developed for home automation. Z-Wave uses easy protocols than
compared to other wireless automation like ZigBee and others, which can
accelerate and simplify development. Sigma Designs is the only business
that makes Z-Wave circuits, though. [4]
14 | P a g e
iv. Wi-Fi:
For many developers, choosing Wi-Fi networking—one of the most widely
used IoT communication protocols—is normally straightforward, especially
given its availability inside LANs and in homes. A substantial infrastructure
is presently in place, offering quick data transport and the capacity to handle
massive amounts of data. [1] The Wi-Fi standard that is now most generally
used is 802.11n. Although it can transport files at speeds of hundreds of
megabits per second, many IoT applications may find it to be too power-
hungry. Currently, many businesses and houses are using 802.11n.
v. Cellular:
Any IoT application that has to run over long distances may leverage
GSM/3G/4G cellular connection capabilities. Even with cellular technology,
particularly 4G is capable of carrying enormous amounts of data, the cost
and energy usage will make it unworkable for many applications. However,
it could be perfect for sensor-based low-bandwidth data projects that send
relatively little data over the Internet. [6]
vi. NFC:
An IoT device is NFC (Near Field Communication). It makes it possible for
customers to conduct transactions where one does not need to be physically
present by enabling quick and secure interactions between electronic
devices, particularly smartphones. User can connect their electronic gadgets
and view digital material with its assistance. In essence, it expands the
functionality of RFID card technology and makes it possible for devices to
communicate with one another at a distance of less than 4 centimeters.
15 | P a g e
2.3.1. Why Wi-Fi is better than previous wireless technologies
As evidenced by the numerous ongoing actions of the IEEE IoT Initiative, IEEE
functions as the meeting spot for the international technical community working on the
Internet of Things (IoT). The sweeping convergence of technologies, markets,
applications, and the Internet offers a venue for pros to learn, exchange knowledge, and
cooperate through the IEEE IoT Initiative. Standardization, which offers
interoperability, compatibility, dependability, and efficient operations on a worldwide
scale, is crucial to the success of the Internet of Things. [1]
In recognition of the importance of the IoT to business and the advantages this
technological innovation brings to the general public, IEEE has a number of extant
standards (current and in creation), activities, and events that are directly related to
fostering the environment required for a thriving IoT. The following are some crucial
tasks related to standards:
i. Architectural framework:
The goal of IEEE P2413-2019 is to create a standard for the Internet of
Things' architectural structure, which includes explanations of various IoT
domains, specifications of IoT domain abstractions, and the discovery of
shared characteristics among various IoT domains. The design structure
outlined in this standard will support functional compatibility, cross-domain
contact, and system interoperability. [4]
16 | P a g e
ii. Harmonization of IoT:
The IEEE 1451-99 is concentrated on creating a standard for Internet of
Things (IoT) networks and device harmonization. Regardless of the
underlying communication technology, this standard specifies a way for
data exchange, compatibility, and security of communications over a
network, allowing sensors, actuators, and other devices to work together.
v. Connectivity:
The ability to link to the internet or other devices via cable or wireless
technologies like Wi-Fi, Bluetooth, NFC, or cellular networks is a
requirement for an IoT device.
vi. Power:
A battery, solar cell, or other energy source could be the dependable and
sustainable power source for an IoT gadget.
17 | P a g e
2.5. Components description
i. Digital Input/ Output Pins: It is utilised for both sending and receiving
digital signals.
ii. PWM Outputs: To regulate the signals, a PWM (Pulse Width Modulation)
pin is employed. Controlling the actuators' pace or the LEDs' brightness, for
instance.
iii. Analog Pins: It reads analogue signals as part of its job. Taking the info from
the sensors as an illustration.
iv. UART: Also known as Universal Asynchronous Receiver/Transmitter. It
is utilised in serial communication.
v. USB: It can link your Mega 2560 board to your PC so you can programme it,
and it could also be used to provide power into the Arduino board.
vi. Power Jack: It is used to externally power the Arduino board.
vii. ICSP Header: The Arduino Board may be programmed via in-circuit serial
programming (ICSP). Typically, it is employed to replace an Arduino boot
loader that has been lost or destroyed.
18 | P a g e
viii. Pin 3.3V & 5V: The Mega 2560 board receives a regulated power supply
through the usage of these pins.
ix. GND Pin: There are a total of 5 gnd pins available on the board.
x. Reset (RST) Pin: It is used to reorganise the Arduino board's functionality.
xi. Vin Pin: It’s function is to supply the board with input voltage. Remember!
The input voltage range through this pin should be between 7V and 12V. The
board will adjust the voltage to 5V automatically if you accept output from
this pin.
xii. Serial Communication: The serial pins on this board, TXD and RXD, are
used to send and receive serial data, respectively. The four serial pin
combinations are:
xv. External Interrupts: These six pins provide for a variety of interrupt
triggers, such as providing a rising or falling edge ,a altering the value of the
interrupt pin or LOW value. The following pin number are utilised for the
interrupt:
xvi. Digital Pins: It has 54 digital I/O pins, ranging in number from 0 to 53. 15 of
the 54 pins—D2 through D13 & D44 through D46—are PWM pins.
xvii. I2C: Using pin numbers 20 and 21, it is one method of communicating with
the board.
xviii. SPI (Serial Peripheral Interface) Communication: Microcontrollers
frequently utilise it to interact with a few different peripheral devices.
2.5.1.2. Advantages:
20 | P a g e
board.
v. It has 2 voltage regulators, a 5V & a 3.3V one, giving you the freedom
to control the voltage however you see fit.
2.5.1.3. Disadvantages:
NodeMCU may be charged via a Micro USB port and VIN pin. (Pin from External
Supply). Support is provided for the interfaces UART, SPI, and I2C.
SPI Pins SD1, CMD, It has four pins for SPI communication.
SD0, CLK
2.5.1.2. Applications:
22 | P a g e
2.5.3. 4 channel relay board
This LOW Level 5V 4-channel relay interface board needs a 15-20mA controller
current for each channel. It may be utilized to run several high-current machinery
and gadgets.
The four 5V relays of the four-channel relay module and the associated switching
and isolating elements may be readily interfaced with a microcontroller or sensor
with the minimum number of parts and connections. The two terminal parts, each
with six connections, are shared by two relays. The screw style connections make it
easy and versatile to connect to mains cabling.
23 | P a g e
which is a purely optional feature, using the VCC selection jumper. The input
jumper has the principal V-CC, GND, and input lines for straightforward
connection using female jumper wires.
2.5.1.3. Schematic
The input ground is shared by all four channels and the circuit for each switch
on the board is identical.
Due to the possible extra layer of isolation, the driver circuit for this relay
module differs slightly from conventional relay driving circuits. When the
jumper is open, a different power source must be used to power the JD-VCC
jumper in order to power the relay coil and optocoupler output. When the
jumper is shorted, the relay and the input share the same VCC.
The inputs for this module are active low, which means that when the signal
on the input port is low, the relay is turned on. This is due to the series
connection of the optocoupler's input and the indicator LED to the VCC port
on one end, necessitating the connection of the other end to ground to allow
current to flow. The PCF817 optocouplers, which are widely used and are also
available in through-hole packing, were used in this application.
24 | P a g e
2.5.4. IR sensor
This frequency range is illuminated by infrared LEDs. Since infrared light has a
wavelength between 700 nanometers and one millimetre, it is invisible to the
human eye. IR LED’s have an approximate 20 to 60 degree light-producing angle
and a range of up to a few centimeters to several feet, depending on the brand and
kind of IR emitter. Some emitters measure their range in km. In order to emit as
much light as possible, IR LED’s are made transparent or white.
Variable resistor
Here, a fixed changeable resistor is utilized. It is employed to adjust the distance
threshold for object detection.
2.5.4.1. Schematic
GND Ground
i. Range is up to 20cm
ii. 5V DC Operating voltage
iii. Sensing range adjustment
iv. Built-in Ambient Light Sensor
v. 20mA supply current
vi. I/O pins that are compatible with 5V and 3.3V
vii. Hole for mounting
2.5.5. LDR sensor
Light Dependent Resistor is known by the abbreviation LDR. LDRs, often referred
to as photo resistors, are minuscule light-sensing components. A resistor known as
an LDR changes in resistance in response to fluctuations in the amount of light it
receives. Light intensity increases are accompanied by a decrease in LDR
resistance, and vice versa. We may utilize them to create circuits for light detection
thanks to this characteristic.
We must always create a voltage divider circuit in order to use an LDR. The
voltage across an LDR grows when its value of resistance rises relative to its fixed
resistance.
27 | P a g e
increase in light intensity as it absorbs the energy and causes the electrons there to
become excited and shift from the valence band to the conduction band.
Additionally, for the valence band electrons to be activated and flow into the
conduction band, the incident light energy must be greater than the band gap
energy.
The LDR's resistance is 1012 Ohm at its greatest in the dark, and it drops as light
levels rise.
2.5.5.1. Applications:
i. The photo resistor is frequently used to gauge the presence and strength of
light.
ii. Used in automated lights that come on and go off dependent on light
iii. A straightforward smoke detector alarm with an automatic lighting clock
iv. Optical circuit design
v. A proximity switch for pictures
vi. Laser security measures
vii. Solar-powered street lights
viii. Camera light metres
ix. Radio timers
x. Can be used in dynamic compressors; certain compressors allow you to
change the gain of the signal by attaching an LED and an LDR to the signal
source.
2.5.5.2. Limitations:
28 | P a g e
iii. Photodiodes and phototransistors are more sensitive than light-
dependent resistors.
A digital sensor which is cheap used for detecting temperature and humidity is the
DHT11. To instantly detect humidity and temperature, it may be simply interfaced
with any micro-controller, including Raspberry Pi, Arduino, etc.
There is a sensor and a module available for the DHT11 humidity and temperature
sensor. A pull-up resistor and an LED that turns on might help you tell this sensor
apart from the module. A relative humidity sensor is the DHT11. This sensor
employs a capacitive humidity sensor and a thermistor to detect the ambient air.
The DHT11 sensor has four pins: Data, GND, VCC, and a Not Connected Pin.
A pull-up resistor between 5k and 10k ohms is provided to enable
communication between the sensor and microprocessor.
2.5.6.3. Specifications:
2.5.6.4. Applications:
31 | P a g e
CHAPTER III
PROBLEM FORMULATION
We'll talk about the prior model in this chapter, as well as how my model differs from
the others. The block diagram, flowchart, features, and circuit diagram will all be
covered. Finally, we'll talk about how we built the hardware and set up the system.
Home automation systems face four main challenges: high ownership costs, difficulty
achieving security, sub systems not integrating and bad sensitivity. [6]
The writing associated with the examination topic has been examined for the most
recent 25 years in an effort to uncover work produced by various experts. There are
many remote checking and controlling structures that are described as business products
or trial investigation phases.
i. It can be seen that the bulk of the finished research fits in with the related
classes.
ii. Internet-based checking using different methods and servers, GPRS modems,
etc.
iii. GSM-SMS protocols using a GSM modem alone or in conjunction with Web
advances.
iv. Using remote sensor systems for monitoring.
v. Wireless monitoring using RF, Zigbee, Bluetooth, and Wi-Fi.
While Bluetooth and Zigbee provide lesser information rates, Wi-Fi provides a better
one. Both the 2.4GHz and 5GHz recurrence bands are used by Wi-Fi and it enables
devices with a sizable power source.
32 | P a g e
3.3. Proposed model
As a result, the expense of the organization will go down and the capacity for
overhauling and framework change will increase. Additionally, we are using Google
Login Access to further enhance protection. Although the concept of home
computerization has been around for a while and products have been readily accessible
for a while, no system has yet reached the benchmark. For the aged and disabled, home
computerization can increase personal happiness for those who may otherwise need
parental figures or institutional care. [3]
Additionally, it can provide a remote interface for giving management and viewing via a
computer programe. This article will outline the method we are using to manage various
household appliances via an online interface using a cell phone, iPad, PC, or other Wi-
Fi capable device. It can also be controlled via sensors, giving us the option of
automated switching.
3.3.1. Comparison
33 | P a g e
3.4. Features of the prototype
i. The prototype builds wireless system for controlling home appliance from a
distance.
ii. The system's sensors have the ability to interact with one another and make
independent decisions on which gadget to turn on or off.
iii. One may use the radio buttons on the application on their smartphone to turn on
and off appliances.
iv. The prototype may be controlled by any device with Wi-Fi access. Using secure
connectivity, household appliances may be controlled.
v. Simple designs are simple to incorporate into a variety of appliances and
expand on.
vi. Displays each appliance's status via a smartphone application.
vii. It's economical.
The arduino mega is first provided a 7V DC power supply in the block diagram above.
This device also powers the nodemcu, which in turn powers the relay module.
34 | P a g e
Now that various sensors are linked to Arduino, which is connected to a relay, we can
operate the relay using a mobile application by connecting a nodemcu, which is then
connected to the loads.
Firstly the power is supplied to the arduino board then it will gather data from various
sensors then send it to the node mcu then the gathered data will check if there is a
person in the room or not. If yes then it will check for temperature & light intensity and
then both types of sensors will communicate in each other and then decide if the led
should turn on or off.
If there are no persons in the room then all lights will automatically be turned off. But
you can re operate on those by using manual control through your smart devices. And
that way also you can decide if it should turn on or off.
35 | P a g e
Figure 3.2 Flow chart of the proposed system
36 | P a g e
3.6. Circuit diagram
The prototype's microcontroller is called Node MCU. It features the ESP8266 Wi-Fi
module, which enables wireless remote switching of household appliances. The Node
MCU is physically connected to the household appliances using a four channel relay
37 | P a g e
module, which consists of 4 individual relays. When necessary, it connects or
disconnects domestic appliances from the supply after receiving signals from the GPIO
pins of the Node MCU. They serve as the switch [4]. In this prototype, LED and
resistors are utilized in place of actual appliances. They show when the electricity to the
appliances is turned on and off. In practical use, genuine household appliances would
take their place. [3]
i. Arduino IoT cloud can be downloaded and installed from the play store for
smartphone and for laptop we can also download it from the site or can
access it through Google also.
ii. Once the application is installed in phone, you can log in in to it by signing
in via your Google account.
iii. After log in a new project has to be created. It can be named home
automation or anything you want.
iv. Then switch to your laptop for the dashboard setup and to upload your code
to node mcu.
v. Once you sign in through same Google account from laptop you can see a
project named home automation.
vi. Then go to the things section and create the variables that are needed to
operate the relay.
vii. And it will automatically create the functions for those variables and you
have to just put in the conditions for your system.
viii. Then after creating the variables you will see network option, click on it
type your network id and password and a security key will be asked you
will get it via mail when you have created your account.
ix. In the things>setup there will be an associated device when you will
connect the node mcu to your laptop it will show online, if not then connect
it properly.
x. Then type the code in the sketch section and upload it to node mcu.
xi. Finally go to dashboards section and make your own dashboard as per
requirement and save it.
38 | P a g e
3.8.2. Downloading and installing Arduino IDE for arduino
i. Go to Google and type arduino download then you will see its official
website.
ii. You can download it for free from there and install it.
iii. Then when you will connect your arduino to your laptop then you have to
select the proper board and port number from which your board is
connected.
iv. After all this you can type your code and upload it to your board.
Hardware assembly largely entails connecting particular digital and analogue Arduino
pins to various sensors, such as ir, dht, and ldr sensors, as well as to leds for
identification and nodemcu for serial communication.
39 | P a g e
The four relays on the relay module are now linked to the nodemcu, along with the
supply and ground pins. This prototype's core functional assembly is straightforward.
Any device that needs to be regulated can be linked to the additional 4 relays.
The most important step in hardware construction is remembering which digital pin
belongs to which relay. The Arduino IoT cloud application is configured for this
connection. The application's radio buttons are programmed to toggle a specific digital
pin in the Node MCU. It was ensured that relay connection is actually formed in
accordance with this configuration.
The LM317 is a variable voltage regulator that accepts input voltages between 3
and 40 volts and outputs a fixed value between 1.25 and 37 volts. To change the
output voltage, two external resistors are necessary.
40 | P a g e
CHAPTER IV
RESULTS
The circuit schematic was followed when building the trial model, and the outcomes were as
anticipated. Over a Wi-Fi network, the house utilities could be remotely switched. The
switch mode and the automated control mode through sensing were both accomplished
effectively. The Arduino IoT cloud application was effective in showing each application's
state.
The comprehensive findings from this study are listed below:
42 | P a g e
4.4. Hardware prototype
Figure 4.5 (a) Hardwarre module, (b) when someone enters the room two led turns on
due to temperature, (c) all led turns on due to temperature & ldr sensor
As you can see in the above figure 4.5(a) the circuit is mounted on a plastic cardboard box
which all components intact. In figure 4.5 (b) whenever someone enters the room the fan will
automatically turned on due to temperature sensors and fig 4.5 (c) all lights will also turn on
when the intensity of the light exceeds the fixed value.
43 | P a g e
CHAPTER V
CONCLUSION AND FUTURE SCOPE
This project's work makes it clear that a home automation system for individual
control can be easily built from affordable cheap components & can be used to
control a variety of appliances, including lamps, televisions, air conditioners, & even
the whole home lighting.
Better yet, the few and small number of components needed allow them to be packed
into a discrete, small receptacle. The designed home automation system has
undergone numerous tests that allow it to manage a variety of household appliances
used in the home theatre, air conditioning, lighting and many more. As a result, this
method is adaptable & extensible
Given the scenario, we could create a system that can be used on different operating
systems, including iOS and Windows. By automating all other household appliances,
the restriction of being able to manage only a few devices can be lifted.
We can see that it can also assist us in power conservation because it can even be
used in conjunction with an energy monitoring device. The project's scope can be
broadened by including tiny workplaces in addition to just homes.
44 | P a g e
REFERENCES
[1] N. Stalin and N. Shobanadevi, “Wireless home automation system using Wi-Fi and GSM,”
2021.
[2] N. Vikram, K. S. Harish, M. S. Nihaal, R. Umesh, and S. A. Kumar, “A low cost home
automation system using Wi-Fi based wireless sensor network incorporating internet of
things (IOT),” 2017 IEEE 7th International Advance Computing Conference (IACC), 2017.
[3] P. J. Rani, J. Bakthakumar, B. P. Kumaar, U. P. Kumaar, and S. Kumar, “Voice controlled
home automation system using Natural Language Processing (NLP) and internet of things
(IOT),” 2017 Third International Conference on Science Technology Engineering &
Management (ICONSTEM), 2017.
[4] P. Kaur and K. Arora, “Internet of things-based Economical Smart Home Automation
System,” Industrial Internet of Things, pp. 129–142, 2022.
[5] S. H. Shehab, M. L. Rahman, M. H. Hasan, M. I. Uddin, S. A. Mahmood, and A. Z. M. E.
Chowdhury, “Home Automation System using gesture Pattern & voice recognition for
paralyzed people,” 2020 11th International Conference on Electrical and Computer
Engineering (ICECE), 2020.
[6] S. K. Vishwakarma, P. Upadhyaya, B. Kumari, and A. K. Mishra, “Smart Energy Efficient
Home Automation System using IOT,” 2019 4th International Conference on Internet of
Things: Smart Innovation and Usages (IoT-SIU), 2019.
[7] S. Somani, P. Solunke, S. Oke, P. Medhi, and P. P. Laturkar, “IOT based Smart Security and
Home Automation,” 2018 Fourth International Conference on Computing Communication
Control and Automation (ICCUBEA), 2018.
[8] Suraj, I. Kool, D. Kumar, and S. Barma, “Visual Machine Intelligence for Home
Automation,” 2018 3rd International Conference On Internet of Things: Smart Innovation
and Usages (IoT-SIU), 2018.
[9] T. Chaurasia and P. K. Jain, “Enhanced Smart Home Automation System based on internet of
things,” 2019 Third International conference on I-SMAC (IoT in Social, Mobile, Analytics
and Cloud) (I-SMAC), 2019.
[10] T.-Y. Yang, C.-S. Yang, and T.-W. Sung, “A Dynamic Distributed Energy
Management Algorithm of Home Sensor Network for Home Automation System,” 2016
Third International Conference on Computing Measurement Control and Sensor Network
(CMCSN), 2016.
[11] J. Han, C.-S. Choi, W.-K. Park, I. Lee, and S.-H. Kim, “Smart Home Energy
Management System including renewable energy based on Zigbee and PLC,” 2014 IEEE
International Conference on Consumer Electronics (ICCE), 2014.
[12] N. Mohd Yusof, A. Z. Jidin, and L. M. Sze, “Web Based Home Security and
automation system,” International Journal of Reconfigurable and Embedded Systems
(IJRES), vol. 5, no. 2, p. 92, 2016.
[13] A. Dasgupta, A. Qumer Gill, and F. Hussain, “Privacy of IOT-enabled Smart Home
Systems,” IoT and Smart Home Automation [Working Title], 2019.
[14] F. Al-Turjman and M. Sanwal, “Home automation in cloud-based IOT,” The Cloud in
IoT-enabled Spaces, pp. 169–207, 2019.
[15] K. Agarwal, A. Agarwal, and G. Misra, “Review and performance analysis on
wireless smart home and home automation using IOT,” 2019 Third International conference
on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), 2019.
45 | P a g e
APPENDIX A
DATASHEETS & CODE
I. Code of Arduino
#include <DHT.h> boolean state1 = true;
int threshold_val1 = 800; // Check your threshold and modify it. pinMode(irPin1, INPUT);
int threshold_val2 = 850; // Check your threshold and modify it. dht1.begin();
46 | P a g e
} break;
break; }
case 2:
if(toggleState_2 == 0){ }
toggleState_2 = 1;
delay(100);
case 3: outsideIr=true;
}else{ }
digitalWrite(relay_3, LOW); // turn off relay 3 else if (!digitalRead(irPin2) && i==2 && state2){
} outsideIr=true;
delay(100); delay(100);
break; i=1;
case 4: count++;
} }
toggleState_4 = 0; delay(100);
} i=2;
47 | P a g e
} Serial.println(h2);
outsideIr=true; {
Serial.println(count); digitalWrite(relay_1,LOW);
i = 1; digitalWrite(22,HIGH);
} }
} digitalWrite(13,HIGH);
if (digitalRead(irPin2)){ toggleState_2==0;
state2 = true; }
} }
float h1 = dht0.readHumidity(); {
toggleState_2==0;
Serial.println(t1); }
if(toggleState_1 == 1){
Serial.println(t2); digitalWrite(22,HIGH);
48 | P a g e
} if(toggleState_2==1){
digitalWrite(relay_2,LOW); digitalWrite(13,HIGH);
digitalWrite(13,HIGH); toggleState_2==0;
toggleState_2==0; }
} }
} else
{ digitalWrite(relay_1,HIGH);
if(toggleState_2==1){ toggleState_1=1;
digitalWrite(relay_2,LOW); digitalWrite(22,LOW);
digitalWrite(13,HIGH); digitalWrite(relay_2,HIGH);
toggleState_2==0; toggleState_2=1;
} digitalWrite(13,LOW);
} }
{ {
digitalWrite(relay_1,LOW); toggleState_3=0;
digitalWrite(22,HIGH); }
} digitalWrite(relay_4,LOW);
digitalWrite(relay_2,LOW); toggleState_4==0;
digitalWrite(13,HIGH); }
toggleState_2==0;
} }
} {
49 | P a g e
digitalWrite(relay_3,LOW); if(t2>30)
digitalWrite(26,HIGH); {
} digitalWrite(relay_3,LOW);
digitalWrite(26,HIGH);
toggleState_3=0;
} }
{ digitalWrite(relay_4,LOW);
if(t2>30) digitalWrite(12,HIGH);
{ toggleState_4==0;
if(toggleState_3 == 1){ }
digitalWrite(relay_3,LOW);
digitalWrite(26,HIGH); }
} {
digitalWrite(relay_4,LOW); digitalWrite(relay_3,LOW);
digitalWrite(12,HIGH); digitalWrite(26,HIGH);
toggleState_4==0; toggleState_3=0;
} }
} }
{ {
digitalWrite(relay_3,LOW); toggleState_3=1;
digitalWrite(26,HIGH); digitalWrite(26,LOW);
toggleState_3=0; digitalWrite(relay_4,HIGH);
} digitalWrite(12,LOW);
} toggleState_4=1;
} }
else if(t2==0)
{ }
50 | P a g e
digitalWrite(26,LOW);
else{ digitalWrite(12,LOW);
digitalWrite(relay_2,HIGH); }
digitalWrite(relay_3,HIGH);
toggleState_2=1;
toggleState_3=1;
toggleState_4=1;
}
digitalWrite(22, LOW);
The microcontroller known as the ESP8266 was created by Espressif Systems. The
ESP8266 is a self-contained WiFi networking system that can execute standalone
programmes and serves as a gateway between Wi-Fi and current micro controllers. This
gadget includes a built-in USB connection as well as a wide range of pin-outs. Similar to
Arduino, you can easily flash the NodeMCU devkit by connecting it to your PC with a
micro USB connection. Additionally, it is right away breadboard compatible.
The NodeMCU ESP8266 prototype board comes with the ESP-12E module, which
houses the ESP8266 chip and Tensilica Xtensa 32-bit LX106 RISC CPU. This
51 | P a g e
microprocessor supports RTOS and has a customizable base frequency range of 80 MHz -
160 MHz. NodeMCU features 128 KB RAM & 4 MB Flash memory to store files and
programs. Thanks to its powerful processing power, integrated Wi-Fi and Bluetooth, and
Deep Sleep Operating capabilities, it is ideal for IOT applications.
Technical specifications:
Voltage: 3.3V.
Soft-AP and Wi-Fi Direct (P2P).
Current use ranges from 10 uA to 170 mA.
16MB maximum flash memory attachable (512K normal).
TCP/IP protocol stacks integration.
Tensilica L106 32-bit processor.
Processor clocked at 80–160MHz.
RAM: 32K + 80K.
GPIOs: 17 (multiplexed with other functions).
One input from analogue to digital with a resolution of 1024 steps.
+19.5dBm is the 802.11b mode output power.
IEEE 802.11 b/g/n is the wireless standard.
Maximum concurrent TCP connections: 5.
Frequency range: 2.412-2.484 GHz
III. 4 channel relay
A microprocessor or sensor can be easily interfaced with using the four-channel relay
module's four 5V relays and the related switching and isolating components with the
fewest possible parts and contacts. Each relay's contacts are marked on the body with the
specifications for 250VAC, 30VDC, and 10A in each case.
52 | P a g e
Figure A.2 4 channel relay
Technical specifications
A microcontroller board based on the ATmega2560 is called the Arduino Mega 2560. It
contains 16 analogue inputs, 4 hardware serial ports (UARTs), a 16 MHz crystal
oscillator, 54 digital input/output pins (of which 15 may be used as PWM outputs), a USB
53 | P a g e
connector, a power jack, an ICSP header, and a reset button.
Technical specifications
Microcontroller ATmega2560
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limit) 6-20V
Digital I/O Pins 54 (of which 15 provide PWM output)
Analog Input Pins 16
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 256 KB of which 8 KB used by boot
loader
SRAM 8 KB
EEPROM 4 KB
Clock Speed 16 MHz
LED_BUILTIN 13
Length 101.52 mm
Width 53.3 mm
Weight 37 g
Table A.2 Technical specifications of Arduino mega
54 | P a g e
Block diagram
Power tree
Atmega2560 chip, the main processor of the Arduino Mega 2560 Rev3 board,
runs at a frequency of 16 MHz. It can interface with many external devices
because to the numerous input and output lines it can support. The operations and
processing are not slowed at the same time because of its much more RAM than
the other CPUs. The board also has an ATmega16U2 USB serial processor, which
serves as a conduit between the main CPU and the USB input signals. This
extends the Arduino Mega 2560 Rev 3 board's versatility when it comes to
interacting with and attaching peripherals.
55 | P a g e
PUBLICATION AND CERTIFICATION
Related attainment
1. Poster presentation - Secured 3rd position in Abhivyakti (IEEE event BIP Patna) poster
presentation competition
2. Conference paper – Communicated conference paper in ICCPCT 2023
56 | P a g e