0% found this document useful (0 votes)
6 views94 pages

Iot Projectreport

The project report details the development of a smart home automation system utilizing IoT technology and WIFI for remote control via an Android application. The system aims to enhance convenience, security, and energy management in homes by allowing users to control appliances wirelessly. Key components include the ESP8266 module, various sensors, and a user-friendly interface for real-time monitoring and control of home devices.

Uploaded by

atufajaved31
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)
6 views94 pages

Iot Projectreport

The project report details the development of a smart home automation system utilizing IoT technology and WIFI for remote control via an Android application. The system aims to enhance convenience, security, and energy management in homes by allowing users to control appliances wirelessly. Key components include the ESP8266 module, various sensors, and a user-friendly interface for real-time monitoring and control of home devices.

Uploaded by

atufajaved31
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

A Project Report on

An Integrated Actuator Based


Technique for Creating Smart
Home
Submitted in partial fulfillment of award
of
BACHELOR OF TECHNOLOGY
Degree
in
COMPUTER SCIENCE AND ENGINEERING

By
VIDIT AGARWAL- 1900820100164
VAISHALI MATHUR – 1900820100161
UNNATI GUPTA– 1900820100154
NISHANT GUPTA- 1900820100098

Session: 2019-2023

MS. RICHA SAXENA


ASSISTANT PROFESSOR

SUPERVISOR

Department of Computer Science & Engineering


Moradabad Institute of Technology
Moradabad (U.P.)
MAY 2023
CERTIFICATE

Certified that the Project Report entitled “An Integrated Actuator based

Technique for Creating Smart Home” submitted by Vidit Agarwal

(1900820100164), Vaishali Mathur (1900820100161), Unnati Gupta

(1900820100154), Nishant Gupta (1900820100098) is their own work and

has been carried out under my supervision. It is recommended that the

candidates may now be evaluated for their project work by the University.

DATE:

Richa Saxena
Assistant Professor
Project Guide
ABSTRACT

The Internet of Things (IoT) is an important technology affecting the

Internet and communication technologies. The Internet of Things

enables people and things to connect and work

anytime, anywhere and in any way/design. Home automation systems

have been around for decades, but remain a niche product for high-end

consumers due to project costs and budgets. When it comes to home

automation systems, security is one of the most important factors in not

implementing a home automation system. A clumsy attitude

combined with a routine can sometimes make us so rushed that we

forget to turn off the lights. This will increase electricity costs.

This project presents the development and implementation of a

new model home automation system that uses WIFI technology as

network infrastructure to connect multiple places. The main goal of this

project is to develop a home automation system that can be

controlled from an Android phone using an ESP8266 connected to

WIFI.

iii
Modern homes are increasingly moving from traditional switches to

centralized systems that include remote switches. Currently, traditional

wall switches are located in many places in the home, making it difficult

for users to operate near the switch. It was even more difficult to

manage elderly and disabled people. To do this, on the receiver side,

connect the WIFI module to NODEMCU ESP8266, and the Android app

on the phone on the transmitter side, send on/off commands to the

receiver connected to the load. The equipment used in this project is an

ESP8266, Arduino, Relay board, Servo motor, DHT11 Humidity, Soil

Moisture, Smoke Detector and Water level Sensor.

The control system's main unit, WIFI technology, allows remote access

from a phone. Switch status is synchronized across the control

system, and each user interface reports the status of existing switches in

real time. The system is designed to control home appliances and

devices with an accessible design, user-friendly interface and easy

installation. The developed system can be integrated as a single portable

unit and allows one to wirelessly control lights, fans, air conditioners,

television sets, electronic doors and turn ON or OFF any appliance.

iv
ACKNOWLEDGEMENT

We would like to express our sincere gratitude to the Almighty for his

solemn presence for providing strength and health. We are deeply

indebted to Dr. Manish Gupta, Professor and Head in, Computer

Science and Engineering Department for his patience, inspiration,

guidance, constant encouragement and valuable suggestions.

We would like to extend our gratitude to our project guide Ms. Richa

Saxena Assistant Professor in, Computer Science and Engineering

Department for his constructive support and cooperation at each and

every juncture. We owe a debt of gratitude to our parents for their

consistent support and meaningful suggestion given to us at different

stages of this work.

Vidit Agarwal-1900820100164

Vaishali Mathur-1900820100161

Unnati Gupta-1900820100154

Nishant Gupta-190082010009

v
TABLE OF CONTENTS

CHAPTER NO TITLE OF CHAPTER PAGE NO


Abstract iii-iv
Table of Contents vi-ix
List Of Figures x -xi
1 Introduction 12-20
1.1 Background Research 13-14
1.2 Motivation 14-15
1.3 Literature Review 15-16
1.4 Problem Statement 16
1.5 Objective 17
1.6 Scope of Research 17
1.7 Project management 18-19
1.8 Overview and Benefits 19-20
2 Software Requirement Specification 21-29
2.1 Introduction 21
2.1.1 Purpose 21-22
2.1.2 Overview 22-25
2.2 General Description 25
2.2.1 Product Functions 25-26
2.2.2 User Characteristics 26
2.2.3 Product Environment 26
2.3 Performance Requirements 26-27
2.4 Activity Diagram 27
2.5 Sequence Diagram 28
2.6 Data Flow Diagram 28-29
3 Technical Specifications 30-40
3.1 Requirement Specifications 30

vi
3.1.1 Hardware Requirements 331
3.1.2 Software Requirements 31
3.1.3 Internet Connectivity 31
3.2 Language Used 31
3.2.1 C++ 31-40
4 Technology Used 41-51
4.1 Internet of Things 41
4.1.1 Features of IOT 42-44
4.1.2 Advantages of IOT 44-45
4.1.3 Disadvantages of IOT 45-46
4.1.4 Application Grounds of IOT 47-51
5 Tools Used 52-75
5.1 Arduino IDE 52
5.1.1 Libraries 52-53
5.1.2 Applications 53
5.1.3 Tools 53-54
5.1.4 Simulation 54
5.1.5 Tabs, Multiple files and compilation 54
5.1.6 Operating systems/Threading 54
5.2 MIT App Inventor 55-57
5.3 WIFI 57-58
5.3.1 How Does WIFI Work? 58-60
5.3.2 Uses 60-61
5.3.3 Advantages of Wi-fi 61-62
5.3.4 Disadvantages of Wi-fi 62
5.4 Sensors Used 63
5.4.1 NODE MCU or ESP 8266 63-64
5.4.2 Relay Module 65
5.4.3 Arduino 66-67
5.4.4 12V Hi- Link Converter 67-68

vii
5.4.5 Smoke Detector 68 69
5.4.6 Servo Motor 69-70
5.4.7 Soil Moisture Sensor 70-72
5.4.8 DHT11 Temperature and Humidity 72-73
Sensor
5.4.9 Water Level Sensor 73-75
6 Modules 76-78
6.1 Design of an Independent Home 76
Automation
6.2 Wireless Control of devices (Switch Mode) 76

6.3 Monitoring Status of Appliances 77


6.4 Secure Connection Channels between 77
Application and Node MCU
6.5 Controlled by any Device Capable of WIFI 77
(Android, IOS, PC)
6.6 Extensible Platform for 78
FutureEnhancement
7 Research Methodology 79-86
7.1 Introduction 79
7.2 Project Design and Overview 79-80
7.2.1 Block Diagram of the Project 80-81
7.2.2 Flowchart of the Project 82
7.3 Project Hardware 82
7.3.1 Schematic Circuit 83
7.3.2 Circuit Operation 83
7.4 Project Software 83
7.5 Prototype Development 84
7.5.1 Mechanical Design/Product Layout 85
7.6 Sustainability Elements in the design concept 86
7.7 Chapter Summary 86
8 Implementation and Testing 87-89
8.1 Implementation of System Design 87
8.2 Testing of Implementation 87
8.3 Test Results 88

viii
9 Conclusion 90-92
9.1 Summary 90-91
9.2 Future Work 91-92
References 93-94

ix
LIST OF FIGURES

FIGURE NO. FIGURE NAME PAGE NO


1.1 IOT based Home Automation System 13
1.2 Model of Phases in Project Management 18
2.1 A Smart HUB 25
2.4 Activity Diagram 27
2.5 Sequence Diagram 28
2.6 Data Flow Diagram 29
4.2 Working of IOT enabled Core devices 47
4.3 IOT in Healthcare 48
4.4 IOT controlled greenhouse environment 48
4.5 Technology and Protocols of IOT 49
4.6 Zigbee 50
5.3 Pinout Diagram of ESP8266 64
5.4 Relay Module 65
5.5 Arduino 67
5.6 12V Hi-Link Converter 68
5.7 Smoke Detector 69
5.8 Servo Motor 70
5.9 Soil Moisture Sensor 71
5.10 DHT11 Temperature and Humidity Sensor 72
5.1 Water Level Sensor 74
7.1 IOT - based home monitoring and device 79
control Architecture
7.2 An Overview of Proposed System Model 80
7.3 Block Diagram of the Domotic System using ESP8266 81
7.4 Block Diagram of the Domotic System using Arduino 81
7.5 Flow chart of operation of the system 82
7.6 Circuit Diagram of the System 83
7.7 Prototype Development of the Project 84
7.8 Front View of the Project 85

x
7.9 Backend View of the Project 85
8.1 Project Testing 87
8.2 Output Result 88
8.3 Android Home Page 89
8.4 Test Result & Code Run result 89

xi
CHAPTER 1

INTRODUCTION

A smart home includes key interactive components of sensors, actuators, middleware


and networks, as well as smart grids and smart loads. Smart home is called "home
automation" which uses new technologies to make home activities more convenient,
comfortable, safe and economical. Home automation is the automation of household
devices. In today's world, home automation is popular because of the user's convenience
and the flexibility to monitor infections and other things according to their needs. Its
important features and ease of connectivity through Android phones and tablets have
increased the popularity of home automation.

Home automation applications include building automation and home activity


control, such as lighting and other used electrical equipment control systems, that can be
connected through a home network, overcome the limitations
of computers, and provide remote access from the Internet. The IOT can be defined
as providing many new means of communication between things, people, and things by
connecting various types of things such as smartphones, PCs, and tablets to the
Internet. Everybody wants to save time as much as they can. New technologies are
being introduced to save our time. To save people’s time we are introducing Home
Automation system using WIFI. With the help of this system, we can control home
appliances from mobile phone. we can turn on/off home appliances within the range of
WIFI. With the advent of the Internet of Things, Research and Development
in the field of home automation is becoming more and more popular in
recent years. Many devices are monitored and controlled to help humanity. By
integrating information technology with the home environment, methods
and equipment can be used. With the advancement of wireless technology,
different types of modems such as GSM, WIFI and Bluetooth are initialized. Each
12
compound has unique properties and uses. It is one of four popular connections that
are frequently implemented in Home Automation projects. WIFI choose a compatible
one. Wi-Fi performance is good enough to implement into our design.

Fig 1.1: IOT Based Home Automation System

1.1 BACKGROUND RESEARCH

Home automation began to increase in popularity in the late 1990s and early 2000s as
internet technology developed fast and smart homes suddenly became a more affordable
option. Domestic technology or 'domotics' was a highly discussed topic as domestic
appliances were being combined with computers. The Millennium House was a British
show-home opened in 1998 to demonstrate how running a home could be automated
with computer-controlled heating, security, lights, doors and gardens. The process of
improving and raising the family's standard of living was enhanced by
the advanced technologies used by society at the time. Home automation systems have
been around for decades, but remain a niche product for high-end consumers due to
project costs and budgets.

13
The concept of smart home automation has been around for a long time, but today's
smart home is relatively new. The invention of household appliances such as the
remote-control television was patented in 1893 as a simple home automation
system. The smart home can prevent intruders by notifying you with an alarm or
sending a signal through an app linked to your smartphone. Current trends in smart
home automation include automatic lighting, mobile remote control, remote
video surveillance, and receiving cellphone, email and SMS notifications.

For the future of smart home automation, the prediction or prophecy that the smart
home’s future will be similar to what we have seen in the animated series which is
everything in digital.

1.2 MOTIVATION

Motivation to start a smart home system comes from many other reasons, but the most
important are benefits, security, energy management, connectivity and luxury. Because
it took a lot of testing and engineering disciplines to create a fully functional smart
home. Despite the fact that most homes are recently built, the exponential growth of
technology brings additional installation costs. This means that most homes were built
before this technology was available, and this creates a defense for the development and
sales of smart home systems.

However, technology is improving and is getting cheaper, which will help make smart
home systems a worthwhile investment when building your 's emerging homes. Most of
the technology we use today is based on benefits, such as cars allow us to get where we
need to go faster, phones allow us to get information from other people faster,
computers get the job done faster. The small equipment in the house will be fascinating

14
because it also helps the house to save user’s time. There are already very practical
technological appliances like dishwashers, washing machines and microwave ovens in
the home. These technologies are more mechanized in nature and there are often many
less computerized installations in homes. Security is also an important factor
in developing smart home systems.

The goal of smart home systems is to present the benefits of computer technology. For
example, with a smart home system, users don't have to walk to turn off the
lights, press a button on the phone, which saves a little extra
time, and can even be programmed to turn off the lights.

1.3 LITERATURE REVIEW

Smart home security has become a modern profession that is completely at forefront
of a family's daily life. Home security affects all of us in one way or another, including
personal protective equipment and practices. In recent years, the popularity of earth
devices has increased due to efficiency and influence due to the integration and cost of
smart phones. Text up and implement relevant IOT information by introducing IOT
concepts and foundations in a conscious state. It uses IOT to convert home appliances to
smart and intelligent devices, with the help of design control. It is meant to save the
electric power and human energy. The proposed system is a distributed home
automation system, consists of server i.e., Wi-Fi module, sensors. Server controls and
monitors the various sensors and can be easily configured to handle more hardware
interface module. Wi-Fi technology is selected to be the network infrastructure that
connects server and the sensors.

This System is designed for the purpose of monitoring and controlling environmental,
safety and electrical parameters of a smart interconnected home. The different sections
of the Automation System are; temperature and humidity sensor, gas leakage fire alarm

15
system, Soil Moisture sensor, Light on/off. It helps us in leading a comfortable life and
quality of lifestyle is gradually uplifted. An application is designed to control and
manage the system. An Automation system controlling simple devices like fan or light
is known as simple home automation while the system controlling heavy devices like
automatic intelligent doors is known as complex system. The primary requirement of
Automation System is to monitor and control of devices which is accomplished using a
Smartphone application and to develop a solution cost effective flexible in control of
devices and implementing a wide range of sensors to capture various parameters. In this
section, they solve the problem if there is a problem with the device connected to the
system and the concept of data.
• Data communication is a small field of computer science that is used to track systems in
big data, such as statistics, machine learning, and database systems. This includes
analyzing data and words and translating them into knowledge.
• Administrators can access and control all devices that are not connected to each user.
A system that has sensor types such as Smoke Detection sensors, temperature sensors,
and gas sensors until it recognizes them as positive. However, the current system easily
monitors it at home, monitors the device, and then automatically updates the
same values in the MIT APP Inventor. Another implementation of smart home is
proposed by using Arduino, Relay, WIFI module and mobile application.

1.4 PROBLEM STATEMENT

There is a huge energy exigency in the present situation of our country. Moreover,
people become negligent in proper utilization of available energy. People often forget to
turn of the light sources and home appliance while getting out from home. Even in those
situation, application of home automation makes it possible to control them from a
distant place in easy way with our smartphone. Because of the Home Automation
system. We never have to take tension about opening the door, switching off the
appliances and so on.

16
1.5 OBJECTIVE

The Objectives of home automation system are:


• To develop and gathering knowledge on home automation and smart living.
• To improve inhabitant experience, made easy and convenient.
• To achieve cost savings by energy savings.
• To enhance home security with all day interconnecting
• To remotely control home appliances and monitor them.
• To save the time and utilize the energy efficiently.
• Make it suitable for inexperienced users or even disabled people
• To provide improved convenience and security

1.6 SCOPE OF RESEARCH

The aim is to design a prototype that establishes wireless remote control over a network
of home appliances. The application is designed to run on android device providing
features like, switch mode control, voice command control and a provision to view the
status of the devices on the application itself.

The system can be implemented in homes, small offices and malls as well, being in-
charge of control of the electrical appliances. For remote access of appliances in internet
or intranet. The appliances in the above-mentioned environment can be controlled in
intra-network or can be accessed via internet. The development of technology friendly
environment. The system incorporates the use of technology and making Home
Automation System. Home automation offers a number of benefits that can improve
your quality of life. Perhaps the most obvious benefit is the ability to automate tasks
that you would otherwise have to do manually, such as turning off lights or setting the
thermostat.

17
1.7 PROJECT MANAGEMENT

Management of any project can be briefly disintegrated into several phases. Our project
has been decomposed into the following phases:

Fig 1.2. Model of phases in project management.

Experimentation- This phase involved discussions regarding necessary equipment


regarding the project. The study of related already existing projects, gathering required
theoretical learning. It also included figuring out the coding part, by developing simple
algorithms and flowcharts to design the whole process.
Design - This phase was, designing layout of the application, and the necessary features
to be included. This involved the complete hardware assembly and installing the code to
Node MCU. The power strip was designed to connect the home appliances that can be
controlled via GPIO pins.
Development and Testing - This phase had the development of the application. The
android device was connected to the Node MCU via wireless network (Wi-Fi) and the
whole prototype was tested for identification and removal of bugs.
18
Real World Testing - The prototype was ready to be tested into the real world and
integrated with various real time electrical appliances.

1.8 OVERVIEW AND BENEFITS

The benefits of an established wireless remote switching system of home appliances


include:
• No Legal Issues: Obtaining access to or traversing properties with hard lines is
extremely difficult.
• Reduced Wiring Issues: Considering the increase in price of copper, thus
increases the possibility of the wire to be stolen. The use of a wireless remote
system to control home appliances means no wire for thieves to steal
• Extended Range: As the system establishes control over Wi-Fi, it was a
generally considered descent range. That is 150 feet indoors. Outdoors it can be
extended to 300 feet, but since the application is of a Home Automation System,
an indoor range is considered.
• Security: As the connection of the control of the Home Automation System is
established over a secure network the system ensures security to the maximum
extent. It has the potential to provide continuous protection.
• Integrable and Extensive: Nature the prototype designed can be integrated to a
larger scale. Also, it has an extensive nature being able to add or remove the
appliances under control according to application.
• Convenient: Home automation devices are controlled by your smartphone,
which means you can adjust the system from anywhere—whether your hours
from home or just want to stay put on the couch.
• Comforting Routines: Some people use smart technology to record shows or to
play music throughout the home. Connected devices can also help create a
comfortable atmosphere. They provide intelligent and adaptive lighting, sound,
and temperature, which can all help create an inviting environment.
• Ability to improve more Competitive: Automated cells allow you to decrease
cycle times and cost-per-piece while improving quality. This allows you to

19
better compete on a global scale. Additionally, the flexibility of robots enables
you to retool a cell to exceed the capabilities of your competition.
• Easy Integration: Productivity will work with you to provide a complete
system – hardware, software and controls included. Your cell will be proven out
at Productivity and shipped production-ready – allowing you to start making
parts as soon as it’s installed in your shop.

20
CHAPTER 2

SOFTWARE REQUIREMENT SPECIFICATION

2.1 INTRODUCTION

A Home Automation system is a system which provides various services to remotely


operate on home appliances, such as light, Cooler, Soil moisture and door etc through
remote devices such as mobile phone. This document furnishes the Activity diagram,
Sequence diagram and Data flow Diagram for the Home Automation System.

2.1.1 Purpose

The purpose of the Domotic System is to make the life inside the house easy & comfortable.
This will be accomplished by automating some of the residents’ every-day activities
inside the home and to Streamline how your home functions.
Consider some of these benefits:
• Remote Access: Control your home from mobile devices, including your
laptop, tablet, or smartphone.
• Comfort: Use home automation to make your home a more comfortable,
liveable space. Pre-programme your thermostat with your preferred settings so
that your home is always at a comfortable temperature, set up smart speakers
to play music when you get home from work, or adjust your lights to soften or
brighten based on the time of day.
• Convenience: Program devices to turn on automatically at certain times, or
access their settings remotely from anywhere with an Internet connection.
When you don’t have to remember to lock the door behind you or switch off
the lights, you can turn your attention to more important things.
21
• Increased Safety: Smart fire detectors, carbon monoxide monitors, pressure
sensors, and other home automation security features can help protect your
home from disaster.
• Energy Efficiency: Home automation allows you to be more mindful of your
power usage. For example, you can save on energy bills by reducing the
length of time that lights stay on, or by lowering temperatures when you leave
a room.

Home Automation has been on the rise in the past few years. Now all things are
controlled by IoT ever-evolving technology, there have been smarter and more
advanced solutions in the domain of home automation. To enhance the standard of
living, the appliances need to be wholly automated without any user intervention in any
form whatsoever. This enables the end user hassle-free interaction with the appliances
as the appliances learn and react as per the user's requirements without him physically
pressing a button. Wired sensor systems are more difficult to handle and also require
much amount of wiring the sensors at different locations. Thus, the importance of
wireless sensor node has been on the rise and is a critical factor for efficient
implementation of home automation. Energy saving is one of the significant advantages
of automating home appliances. Thus, the user must be kept aware of the energy
consumption of the automated appliances. In a developing country like India, where
people have busy life schedules, providing efficient energy saving and comfort at low
prices and higher efficiency is of utmost importance. An easy to use, easy to deploy
system with an ability to learn and predict home owners’ and residents’ activities-based
knowledge will provide a more intelligent way of handling our homes.

2.1.2 Overview

Home automation is a network of hardware, communication, and electronic interfaces


that work to integrate everyday devices with one another via the Internet. Each
device has sensors and is connected through WIFI, so you can manage them from

22
your smartphone or tablet whether you’re at home, or miles away. This allows you to
turn on the lights, lock the front door, or even turn down the heat, no matter where
you are.

There are three main elements of a home automation system: sensors, controllers, and
actuators.
• Sensors can monitor changes in daylight, temperature, or motion detection.
Home automation systems can then adjust those settings (and more) to your
preferences.
• Controllers refer to the devices Such as personal computers, tablets or
smartphones which is used to send and receive messages about the status of
automated features in your home.
• Actuators may be light switches, motors, or motorized valves that control the
actual mechanism, or function, of a home automation system. They are
programmed to be activated by a remote command from a controller.
Home Automation is a system that allows users to control various appliances of
varying kinds and also makes controlling of home appliances easier and saves energy.
Nowadays, home automation is used more and more. On the other hand, it provides
increased comfort especially when everyone is busy with their work. Home
automation installed in houses does not only increase comfort but also allows
centralized control of heating, ventilation, air-condition, and lighting. Hence, they
contribute to an overall cost reduction and also useful in energy saving which is
certainly the main problem today. In present years, wireless systems like Wi-Fi,
Bluetooth have become more and more common in-home networking. Also in home
automation, the use of wireless technologies gives several advantages that could not
be achieved using a wired network only.
Home Automation Components: At the most initial level, home automation systems
are made up of three elements-
1. A smart device.
2. A hub.
3. A connected application.

23
While some other home automation systems work with just two elements which
include a single device that works with the help of an app on mobile or a tablet or a
system that includes a hands-free hub that controls home automation system while
most of the systems work using all the above three components.

1. Smart Devices: These are the real powerhouse of any home automation system.
These are the main parts that actually implement the whole system commands.
Examples of the smart devices which can be added to any home automation to
complete the whole system are as follows:
• Access Control
• Security Devices: This includes security cameras, smart locks.
• Home Appliances: Smart refrigerators, washing machines, dishwashers, and ovens
already exist.
• Smaller Appliances: As automatic coffee pots and electric kettle have been also
around for a while too.
• Climate Controls: Climate control system with energy management systems.
• Smart Thermostats
• Entertainment Prices: Entertainment includes smart TVs, wireless speakers, and film
projectors.
• Healthcare Devices: Smart humidifiers and smart scales are two common examples
of health care devices.
• Lightning Controls: They include dimmers, light bulbs, light strips, and switches,
etc.
2. Smart Hubs: The hub is the controlling centre of the home automation system. It is
the piece that connects your individual devices and helps them talk to one another. a
smart home hub acts as the heart of a smart home network, tying together various
devices and systems in a centralized platformThe hub would be the central controller
that manages all communication between remote monitoring smart devices and analyses
their data. It is the engine of your smart home system. A hub is made up of a rear end
and a buyer app, which would be a mobile home automation software that allows users
to manually control all devices or program automatic reactions to certain events.

24
Fig 2.1: A Smart HUB
3. Mobile Apps: The mobile application provides an interface between the user and the
system. It gives you the ability to control or monitor your smart devices remotely.
They can be easily downloaded with the help of a provided application on mobile and
provide access control of the system, power controls, timer access, and many more
things. Mobile apps enhance predictive maintenance, streamline asset tracking, and
improve inventory management and supply chain monitoring.

2.2 GENERAL DESCRIPTION

This Software Requirements Specification (SRS) provides a description of all the


functions, specifications, external behaviors, design constraints, requirements and other
factors necessary to provide a complete and comprehensive description of the proposed
Home Automation System.

2.2.1 Product Functions

“An Integrated Actuator based technique for creating smart home” project designs a
system which helps in the automation of home Appliances. This system consists of
several smart devices for different applications of lighting, security, home entertainment
etc. If a user wants to make an automated home and to control home appliances. So, this
system is very useful for user. Home automation has high potential for sharing data
between family members or trusted individuals for personal security and could lead to

25
energy saving measures with a positive environmental impact in the future. It provides
security and saves energy. As we are accessing devices by application, we can access it
where the Wi-Fi is available. It can be done by using Internet of Things i.e.- IOT.

2.2.2 User Characteristics

Using this system, the user can control their home appliances remotely. These insights
are generated by sensors, WIFI connectivity and application. With the help of these the
user can make their homes smarter, managing all of our home devices one place. Being
able to keep all of the technology in users home connected through one interface is a
massive step forward for technology and home management, increased energy
efficiency. Depending on user smart home technology, it’s possible to make users space
more energy efficient.

2.2.3 Product Environment

The project is based on Internet of Things.


• Any device like Smartphone, tablet etc.
• Laptop, PC
• Application
• Sensors
• Integrated Development Environments
• WIFI

2.3 Performance Requirements

The performance requirements involve the proper working of WIFI Connectivity,


Application and Sensors. A proper backup of the data needs to be kept in case of
failure. Proper amount of power supply and network connectivity are needed in this project
26
for best performance. Good Quality Board is needed for best performance of model and
stability of sensors. As part of this process, you will need to consider these kinds of
hardware requirements:
• Security and cost requirements
• Ease of development
• Connectivity and power requirements

2.4 ACTIVITY DIAGARAM

The Activity diagram in Fig.2.4 shows how the proposed system works and. So, the
user does the login through WIFI, the system does credentials check if the input data is
correct than WIFI connected successfully otherwise it repeats to enter login credentials
again. When the Hardware receives input, commands are sent to the application and then
it performs on/off functionality through application.

Start

Login

Wi-Fi Username & Password

Incorrect
Credentials
Check

Correct
Connected Successful

Hardware

Press On/OFF

Fig 2.4 Activity Diagram


27
2.5 SEQUENCE DIAGRAM

The Sequence Diagram as shown in fig.2.5, the Diagram shows the scenario of
Proposed System model that how user interacts with system.

Application Database Hardware


User

Request Login Request Login

Login Successful Login Successful


HW ON
HW ON HW ON

HW OFF HW OFF HW OFF

Fig 2.5: Sequence Diagram

2.6 DATA FLOW DIAGRAM

The data flow in Fig.2.6 shows how the planning process works and how users log in
and work. When the user enters data, the system can find or understand the specified
command. If the system doesn't understand this, it checks the WIFI connection, if there
28
is a WIFI connection, it sends the data to the device, otherwise it tries to open the same
connection. When NODEMCU receives input, commands are sent to the
relay module. The relay module input block supplies power to the target
device using a command. Finally, make sure your device is working properly. If it
works, you need to kill the process, otherwise restart the process.

Fig 2.6: DATA FLOW DIAGRAM

29
CHAPTER-3

TECHNICAL SPECIFICATIONS

3.1 REQUIREMENT SPECIFICATIONS

Technology requirement in IoT Products involves a combination of different tech stacks


required in the development of Hardware and Firmware, IoT application development,
and IoT cloud integration, which in themselves requires knowledge of different
elements.

3.1.1 Hardware Requirements

• System: i5/ i3/ i7 (8th Gen Processor)


• Hard Disk: 1 TB
• Mouse : Optical Mouse
• Sensors: ESP8266, Arduino, Relay Module, Soil Moisture, Servo Motor,
DHT11 Temperature and Humidity Sensor, Water Level Sensor, Smoke
Detection Sensor, IR Sensor.

3.1.2 Software Requirements

• Operating system : Windows 10/Linux


• Coding Language : C++
• IDE USED : Arduino IDE

30
3.1.3 Internet Connectivity

• WIFI

3.2 LANGUAGE USED

IoT devices are built with software that contains instructions for them and is coded using
programming languages. They might seem like devices, but they’re essentially computers,
and every computer needs to be instructed, and programming language is the way to do it.
A programming language allows devices to perform front-end, back-end, and networking
functions.

3.2.1 C++

C++ is a high-level general-purpose programming language created by Danish


computer scientist Bjarne Stroustrup and first released in 1985 as an extension of the C
programming language, or "C with Classes". The language has expanded significantly
over time, and modern C++ now has object-oriented, generic, and functional features in
addition to facilities for low-level memory manipulation. It is almost always
implemented as a compiled language, and many vendors provide C++ compilers,
LLVM, Microsoft, Intel, Embarcadero, Oracle, and IBM, so it is available on many
platforms.

C++ is an object-oriented programming language which gives a clear structure to


programs and allows code to be reused, lowering development costs. C++ is portable
and can be used to develop applications that can be adapted to multiple platforms. As
C++ is close to C, C# and Java, it makes it easy for programmers to switch to C++.

31
C++ was designed with systems programming and embedded, resource-constrained
software and large systems in mind, with performance, efficiency, and flexibility of use
as its design highlights. C++ has also been found useful in many other contexts, with
key strengths being software infrastructure and resource-constrained
applications, including desktop apps, video games, servers (e.g., e-commerce, web
search, or databases), and performance-critical applications (e.g. telephone
switches or space probes).

C++ is standardized by the International Organization for Standardization (ISO), with


the latest standard version ratified and published by ISO in December 2020 as ISO/IEC
14882:2020 (informally known as C++20). The C++ programming language was
initially standardized in 1998 as ISO/IEC 14882:1998, which was then amended by
the C++03, C++11, C++14, and C++17 standards. The current C++20 standard
supersedes these with new features and an enlarged standard library.

In 1979, Bjarne Stroustrup, a Danish computer scientist, began work on "C


with Classes", the predecessor to C++. The motivation for creating a new language
originated from Stroustrup's experience in programming for his PhD thesis. Stroustrup
found that Simula had features that were very helpful for large software development,
but the language was too slow for practical use, while BCPL was fast but too low-level
to be suitable for large software development.

In 1982, Stroustrup started to develop a successor to C with Classes, which he named


"C++" after going through several other names. New features were added,
including virtual functions, function name and operator overloading, references,
constants, type-safe free-store memory allocation (new/delete), improved type checking,
and BCPL style single-line comments with two forward slashes. Furthermore,
Stroustrup developed a new, standalone compiler for C++, C front. In 1984, Stroustrup
32
implemented the first stream input/output library. The idea of providing an output
operator rather than a named output function was suggested by Doug McIlroy (who had
previously suggested Unix pipes).

In 1985, the first edition of The C++ Programming Language was released, which
became the definitive reference for the language, as there was not yet an official
standard. The first commercial implementation of C++ was released in October of the
same year.

In 1989, C++ 2.0 was released, followed by the updated second edition of The C++
Programming Language in 1991. New features in 2.0 included multiple inheritance,
abstract classes, static member functions, constant member functions, and protected
members.

In 1990, The Annotated C++ Reference Manual was published. In 1998, After a
minor C++14 update released in December 2014, After becoming finalized in February
2020, a draft of the C++20 standard was approved on 4 September 2020 and officially
published on 15 December 2020.

On January 3, 2018, Stroustrup was announced as the 2018 winner of the Charles Stark
Draper Prize for Engineering, "for conceptualizing and developing the C++
programming language”.

The C++ language has two main components: a direct mapping of hardware features
provided primarily by the C subset, and zero-overhead abstractions based on those
mappings. Stroustrup describes C++ as "a light-weight abstraction programming
language [designed] for building and using efficient and elegant abstractions"; and
"offering both hardware access and abstraction is the basis of C++.
33
Standard C++ programming is divided into three important parts:
• The core library includes the data types, variables and literals, etc.
• The standard library includes the set of functions manipulating strings, files, etc
• The Standard Template Library (STL) includes the set of methods manipulating
a data structure.

➢ Virtual Member Function

Ordinarily, when a function in a derived class overrides a function in a base class, the
function to call is determined by the type of the object. A given function is overridden
when there exists no difference in the number or type of parameters between two or
more definitions of that function. A member function can also be made "pure virtual" by
appending it after the closing parenthesis and before the semicolon. A class containing a
pure virtual function is called an abstract class. Objects cannot be created from an
abstract class; they can only be derived from.

➢ Lambda Expressions

C++ Lambda Expressions are a convenient way to define an anonymous function


object. It can Improve readability when writing call back functions. C++ provides
support for anonymous functions, also known as lambda expressions, with the following
form. If the lambda takes no parameters, and no return type or other specifiers are used,
the () can be omitted, that is, the list supports the definition of closures. Such lambda
expressions are defined in the standard as syntactic sugar for an unnamed function
object. lambda expressions to allow inline functions which can be used for short
snippets of code that are not going to be reused and therefore do not require a name.
Generally, the return-type in lambda expressions is evaluated by the compiler itself
and we don’t need to specify it explicitly

34
➢ Exceptional handling

Exception handling is used to communicate the existence of a runtime problem or error


from where it was detected to where the issue can be handled. It permits this to be done
in a uniform manner and separately from the main code, while detecting all
errors. Should an error occur, an exception is thrown, which is then caught by the
nearest suitable exception handler. It is also possible to raise exceptions purposefully,
using the throw [Link] such example is a critical component of an embedded
system, where every operation must be guaranteed to complete within a specified
amount of time.

➢ Enumerated Types

C++ has enumeration types that are directly inherited from C's and work mostly like
these, except that an enumeration is a real type in C++, giving added compile-time
checking. The C++11 also provides a second kind of enumeration, called a scoped
enumeration. These are type-safe: the enumerators are not implicitly converted to an
integer type.

➢ Features of C++
• Simple - We expect to understand a new programming language thoroughly when
we start using it. However, C++ is one of the most-simple programming languages.
Unlike other programming languages, C++ provides a structured approach and
allows you to design a modular solution by dividing the problem into parts.
• Object Oriented - C++ is an Object-Oriented Programming Language (OOP).
OOPs are the most important feature of C++ since they enable easier development
and maintenance. C++ follows the following concept of OOPs to make
development and maintenance of the software system easier:
✓ Polymorphism: Poly means “many” and morphism means “form”. Thus,

35
polymorphism enhances flexible programming by allowing data to be displayed
in more than one form. It is a process of using a function for more than one
purpose.
Static Polymorphism-Function overloading allows programs to declare
multiple functions having the same name but with different arguments
Dynamic polymorphism-Variable pointers and references to a base class type
in C++ can also refer to objects of any derived classes of that type.
✓ Inheritance: Inheritance is the process of allowing a class to inherit the
features or properties (fields and methods) of another class. the program is less
redundant, and it is easy to move properties from one class to another.
✓ Encapsulation: Essentially, encapsulation means packaging together relevant
data and its associated methods and functions into a single unit/block.
Encapsulation refers to the wrapping up of data and Operation/ Functions into a
Single Unit.
• Abstraction: It refers to the process of displaying only the key
details/information of data to users without including the underlying/background
details or the method used to gather it.
• Data Hiding: It is the process of protecting data from unauthorized access.
Essentially, it secures the data. information hiding is the principle of segregation of
the design decisions in a computer program that are most likely to change, thus
protecting other parts of the program from extensive modification if the design
decision is changed.

➢ Machine Independent and Platform Independent

C++ is machine-independent, which means programs can be executed on many


machines with little or no changes. C++, however, is not platform-independent, so
programs can only be executed on the platform on which they were developed &
compiled. Suppose you wrote a program or piece of code that runs on Linux, Windows,
and Mac OSX, making it Machine Independent, but the executable file of the C++
program cannot run on different Operating systems/platforms.

36
➢ Popular

With its support for object-oriented programming, C++ can be a good basis for a
number of other programming languages. C++ is a favorite today for games
development and complex business applications because of its incredibly fast speed and
precise memory management. The language is applied to a variety of different fields
requiring high-performance applications.

➢ Case Sensitive

C++ is case-sensitive, which means that it treats uppercase and lowercase characters
differently. For instance, when we write cout (used to display the output) as ‘Cout’ or
“COUT”, the meaning of the term changes. Some programming languages, such as
HTML and MySQL, do not care about case.

➢ Mid-level Programming Language

Having the features of both a low-level (machine-level) language and a high-level


language (user-oriented language that is easily understandable and close to human
language), C++ is termed a mil-level or intermediate programming language. C++ is
used to develop low-level system applications, such as kernels, drivers, etc., and high-
level applications, such as GUIs, desktop applications, etc.

➢ Structured Programming Language

C++ is a structured programming language. Programming in C++ is modular i.e., we are


able to break the complex code into smaller pieces (subdividing a computer program
into separate sub-programs) and combine them using functions, classes, and objects.
37
The programming purpose is broken into smaller pieces and organized together using
function.

➢ Rich Library

C++ provides developers with many built-in functions or libraries that save developers
time and make development faster. Some of the header files include:
➢ <iostream>: Include C++ standard input and output functions
➢ <cmath>: Include math library functions
➢ <cstdlib>: Includes functions that convert numbers to text and vice versa,
allocate memory, create random numbers, and perform various other functions.
➢ <fstream>: Include functions to create files, write information to files, and read
information from files.
➢ <iterator>: Include classes for accessing data in the C++ Standard Library
containers

➢ Memory Management

The C++ language allows dynamic memory allocation, which means that we can
allocate memory for a variable, object, or array at run time. In C++, memory is divided
into stack and heap storage. Stacks refer to the memory allocated for variables inside
functions. The heap, on the other hand, refers to unused memory that can be
dynamically allocated. If you don’t know the amount of memory required to store
information in a defined variable, the size can be determined manually during runtime.

➢ Powerful and Fast

C++ execution time and compiling time are faster than any other programming
language. In addition, it supports a wide range of data types, functions, and operators.
38
As a result, operating systems, browsers, games, and so forth, can be developed. C++ is
an advanced language that supports a wide range of programming techniques, like
procedural, object-oriented, functional, etc. Due to this, C++ is very powerful and
flexible.

➢ Pointer

A pointer is a variable in C++ that stores the address of another variable. They point to a
variable’s location in memory. Pointers are supported by C++ and can solve a large
number of problems requiring memory access. The pointer in C++ language is a
variable, it is also known as locator or indicator that points to an address of a value. The
symbol of an address is represented by a pointer. they allow programs to emulate call-
by-reference. One of the principal applications of pointers is iterating through the
components of arrays or other data structures.

➢ Recursion

When a function calls itself, it is called a recursive function, and this technique is
known as recursion. In this way, the function can be repeated multiple times since it
calls itself during its execution. We can call the functions, which conserves memory by
not having to repeatedly write the same code. Recursion is a method in C++ which calls
itself directly or indirectly until a suitable condition is met. In this method, we
repeatedly call the function within the same function, and it has a base case and a
recursive condition.

➢ Integration and Extensibility

Object-oriented support enables C++ programs to be maintainable and extensible. This


means that large scale applications can be created. C++ has the potential to integrate and
39
apply newer features easily. It has been used effectively for many diverse applications,
including mobile app and game development, software development (e.g., Image
Ready, Adobe Premiere, etc), and web browser development (e.g., Google Chrome,
Mozilla Firefox, etc.), as well as bank applications.

➢ Compiler Based

It is not possible to run C++ code without compilation, since it is a compiler-based


programming language. To execute our program, we must first compile it using a
compiler that translate the program into machine language which can be understood
directly by the system.

➢ Multithreading

Multithreading is a feature that allows concurrent execution of two or more parts of a


program for maximum utilization of the CPU. Each part of such a program is called a
thread. So, threads are lightweight processes within a process. As a specialized form of
multitasking, multithreading allows your system to run several parts/threads of
programs simultaneously. The multithreaded program consists of two or more threads
(define a separate path of execution) that run simultaneously.

40
CHAPTER-4

TECHNOLOGY USED

4.1 IOT (INTERNET OF THINGS)

IOT as a term has evolved long way as a result of convergence of multiple technologies,
machine learning, embedded systems and commodity sensors. IOT is a system of
interconnected devices assigned a UIDS, enabling data transfer and control of devices over
a network. It reduced the necessity of actual interaction in order to control a device. IOT is
an advanced automation and analytics system which exploits networking, sensing, big data,
and artificial intelligence technology to deliver complete systems for a product or service.
These systems allow greater transparency, control, and performance when applied to any
industry or system. IoT has become one of the most important technologies of the 21st
century.

Now that we can connect everyday objects—kitchen appliances, cars, thermostats, baby
monitors—to the internet via embedded devices, seamless communication is possible
between people, processes, and things. By means of low-cost computing, the cloud, big
data, analytics, and mobile technologies, physical things can share and collect data with
minimal human intervention. In this hyperconnected world, digital systems can record,
monitor, and adjust each interaction between connected things. The physical world meets
the digital world and they cooperate.

41
The field has evolved due to the convergence of multiple technologies,
including increasingly powerful embedded systems, as well as machine
learning Traditional fields of embedded systems, wireless sensor networks, automation
independently and collectively enable the Internet of things. In the consumer market,
IoT technology is most synonymous with products pertaining to the concept of the
"smart home", including devices and appliances (such as lighting fixtures, thermostats,
home security systems, cameras, and other home appliances) that support one or more
common ecosystems, and can be controlled via devices associated with that ecosystem,
such as smartphones and smart speakers. IoT is also used in healthcare systems.

There are a number of concerns about the risks in the growth of IoT technologies and
products, especially in the areas of privacy and security, and consequently, industry and
governmental moves to address these concerns have begun, including the development
of international and local standards, guidelines, and regulatory frameworks. Thanks to
the arrival of super-cheap computer chips and the ubiquity of wireless networks
Connecting up all these different objects and adding sensors to them adds a level of
digital intelligence to devices that would be otherwise dumb, enabling them to
communicate real-time data without involving a human being.

4.1.1 Features of IOT

• Intelligence - IOT comes with the combination of algorithms and computation,


software & hardware that makes it smart. Ambient intelligence in IOT enhances
its capabilities which facilitate the things to respond in an intelligent way to a
particular situation and supports them in carrying out specific tasks. In spite of
all the popularity of smart technologies, intelligence in IOT is only concerned as
a means of interaction between devices, while user and device interaction are
achieved by standard input methods and graphical user interface.
42
• Connectivity - Connectivity empowers the Internet of Things by bringing
together everyday objects. Connectivity of these objects is pivotal because
simple object level interactions contribute towards collective intelligence in the
IOT network. It enables network accessibility and compatibility in the things.
With this connectivity, new market opportunities for the Internet of things can
be created by the networking of smart things and applications
• Dynamic Nature- The primary activity of Internet of Things is to collect data
from its environment, this is achieved with the dynamic changes that take place
around the devices. The state of these devices changes dynamically, example
sleeping and waking up, connected and/or disconnected as well as the context of
devices including temperature, location and speed. In addition to the state of the
device, the number of devices also changes dynamically with a person, place and
time
• Enormous Scale - The number of devices that need to be managed and that
communicate with each other will be much larger than the devices connected to
the current Internet. The management of data generated from these devices and
their interpretation for application purposes becomes more critical. Gartner
(2015) confirms the enormous scale of IOT in the estimated report where it
stated that 5.5 million new things will get connected every day and 6.4 billion
connected things will be in use worldwide in 2016, which is up by 30 percent
from 2015.
• Sensing- IOT wouldn’t be possible without sensors that will detect or measure
any changes in the environment to generate data that can report on their status or
even interact with the environment. Sensing technologies provide the means to
create capabilities that reflect a true awareness of the physical world and the
people in it. The sensing information is simply the analog input from the
physical world, but it can provide a rich understanding of our complex world.
• Heterogeneity - Heterogeneity in Internet of Things as one of the key
characteristics. Devices in IOT are based on different hardware platforms and
networks and can interact with other devices or service platforms through
different networks. IOT architecture should support direct network connectivity
between heterogeneous networks. The key design requirements for
43
heterogeneous things and their environments in IOT are scalabilities,
modularity, extensibility and interoperability.
• Security - IOT devices are naturally vulnerable to security threats. As we gain
efficiencies, novel experiences, and other benefits from the IOT, it would be a
mistake to forget about security concerns associated with it. There is a high level
of transparency and privacy issues with IOT. It is important to secure the
endpoints, the networks, and the data that is transferred across all of it means
creating a security paradigm.

4.1.2 Advantages of IOT

• Communication- IOT encourages the communication between devices, also


famously known as Machine-to-Machine (M2M) communication. Because of
this, the physical devices are able to stay connected and hence the total
transparency is available with lesser inefficiencies and greater quality.
• Automation and Control - Due to physical objects getting connected and
controlled digitally and centrally with wireless infrastructure, there is a large
amount of automation and control in the workings. Without human intervention,
the machines are able to communicate with each other leading to faster and
timely output.
• Information - It is obvious that having more information helps making better
decisions. Whether it is mundane decisions as needing to know what to buy at
the grocery store or if your company has enough widgets and supplies,
knowledge is power and more knowledge is better.
• Monitor- Knowing the exact quantity of supplies or the air quality in your
home, can further provide more information that could not have previously been
collected easily. For instance, knowing that you are low on milk or printer ink
could save you another trip to the store in the near future. Monitoring the
expiration of products can and will improve safety.
• Time- As hinted in the previous examples, the amount of time saved because of

44
IOT could be quite large. And in today’s modern life, we all could use more
time.
• Money- The biggest advantage of IOT is saving money. If the price of the
tagging and monitoring equipment is less than the amount of money saved, then
the Internet of Things will be very widely adopted. IOT fundamentally proves to
be very helpful to people in their daily routines by making the appliances
communicate to each other in an effective manner thereby saving and
conserving energy and cost. Allowing the data to be communicated and shared
between devices and then translating it into our required way, it makes our
systems efficient.
• Efficient and Saves Time - The machine-to-machine interaction provides better
efficiency, hence; accurate results can be obtained fast. This results in saving
valuable time. Instead of repeating the same tasks every day, it enables people to
do other creative jobs. Optimum utilization of energy and resources can be
achieved by adopting this technology and keeping the devices under
surveillance. We can be alerted in case of possible bottlenecks, breakdowns, and
damages to the system. Hence, we can save money by using this technology.
• Better Quality of Life - All the applications of this technology culminate in
increased comfort, convenience, and better management, thereby improving the
quality of life.

4.1.3 Disadvantages of IOT

• Compatibility – Currently, there is no international standard of compatibility


for the tagging and monitoring equipment. I believe this disadvantage is the
easiest to overcome. The manufacturing companies of these equipment just need
to agree to a standard, such as Bluetooth, USB, etc. This is nothing new or
innovative needed.
• Complexity - As with all complex systems, there are more opportunities of
failure. With the Internet of Things, failures could sky rocket. For instance, let’s

45
say that both you and your spouse each get a message saying that your milk has
expired, and both of you stop at a store on your way home, and you both
purchase milk. As a result, you and your spouse have purchased twice the
amount that you both need. Or maybe a bug in the software ends up
automatically ordering a new ink cartridge for your printer each and every hour
for a few days, or at least after each power failure, when you only need a single
replacement.
• Privacy/Security - With all of this IOT data being transmitted, the risk of losing
privacy increases. This vulnerability is simply because the interconnectivity of
networks in the Internet of Things brings along accessibility from anonymous and
untrusted Internet requiring novel security solutions For instance, how well encrypted will
the data be kept and transmitted with? Do you want your neighbor’s or
employers to know what medications that you are taking or your financial
situation?
• Safety- Imagine if a notorious hacker changes your prescription. Or if a store
automatically ships you an equivalent product that you are allergic to, or a flavor
that you do not like, or a product that is already expired. As a result, safety is
ultimately in the hands of the consumer to verify any and all automation. As all
the household appliances, industrial machinery, public sector services like water
supply and transport, and many other devices all are connected to the Internet, a
lot of information is available on it.
• Lesser Employment of Manual Staff - The unskilled workers and helpers may
end up losing their jobs in the effect of automation of dailyactivities. This can
lead to unemployment issues in the society. With daily activities getting
automated, naturally, there will be fewer requirements of human resources,
primarily, workers and less educated staff. This may create Unemployment issue in
the society.

• Technology takes Control of Life - Our lives will be increasingly controlled by


technology, and will be dependent on it. The younger generation is already
addicted to technology for every little thing. We have to decide how much of our
daily lives are we willing to mechanize and be controlled by technology.

46
4.1.4 Application Grounds of IOT

• Wearables - Wearable technologies is a hallmark of IOT applications and is one


of the earliest industries to have deployed IOT at its services. Fit Bits, heart rate
monitors, smartwatches, glucose monitoring devices reflect the successful
applications of IOT. Nowadays, people are becoming aware of a wide range of
wearable IoT devices, such as fitness bands, smart watches and smart glasses
etc. Wearable technology has now become highly advanced and has penetrated
new markets as well which can help humans to upgrade their daily
lifestyle. Wearable devices are the most popular IoT systems that have been
adopted for personal use because these devices are not only easy to use but
affordable as well.

Fig 4.2: Working of IOT enabled care devices.

• Smart Homes- This area of application concerned to this particular project, so a


detailed application is discussed further. Jarvis, an AI home automation
employed by Mark Zuckerberg, is a remarkable example in this field of
application. A smart home usually is going to be a base of a smart city. The
smart city is an evolution of a smart home. Here, it is not just the sensors of a
single home that is connected, here its correlation or a network or a connection
between various organizations, various domains as well as multiple segments of
that city as a whole.
47
• Health Care - IOT applications have turned reactive medical based system into
proactive wellness-based system. IOT focuses on creating systems rather than
equipment. The integration of all elements provides more accuracy, more
attention to detail, faster reactions to events, and constant improvement while
reducing the typical overhead of medical research and organization.

Fig 4.4: IOT in Healthcare


• Agriculture- A greenhouse farming technique enhances the yield of crops by
controlling environmental parameters. However, manual handling results in production
loss, energy loss, and labor cost, making the process less effective. A greenhouse with
embedded devices not only makes it easier to be monitored but also, enables us to
control the climate inside it. Sensors measure different parameters according to the plant
requirement and send it to the cloud. It, then, processes the data and applies a control
action.

Fig 4.4: IOT controlled greenhouse environment


48
• Industrial Automation - For a higher return of investment this field requires both fast
developments and quality of products. This vitality thus coined the term I IOT. This
whole schematic is re-engineered by IOT applications. Following are the domains of
IOT applications in industrial automation.
❖ Factory Digitalization
❖ Product flow Monitoring
❖ Inventory Management
❖ Safety and Security
❖ Quality Control
❖ Packaging optimization
❖ Logistics and Supply Chain Optimization
• Government and Safety- IOT applied to government and safety allows improved law
enforcement, defense, city planning, and economic management. The technology fills in
the current gaps, corrects many current flaws, and expands the reach of these efforts.
For example, IOT can help city planners have a clearer view of the impact of their
design, and governments have a better idea of the local economy.
• IOT Technologies and Protocols - Several communication protocols and
technologies cater to and meet the specific functional requirements of IOT system.

Fig 4.5: Technology and Protocols of IOT


• Bluetooth - Bluetooth is a short range IOT communication protocol/technology that is
profound in many consumer product markets and computing. It is expected to be key for
wearable products in particular, again connecting to the IOT albeit probably via a
smartphone in many cases. The new Bluetooth Low-Energy (BLE) – or Bluetooth
Smart, as it is now branded – is a significant protocol for IOT applications. Importantly,

49
while it offers a similar range to Bluetooth it has been designed to offer significantly
reduced power consumption.
• ZigBee- ZigBee is similar to Bluetooth and is majorly used in industrial settings. It has
some significant advantages in complex systems offering low-power operation, high
security, robustness and high and is well positioned to take advantage of wireless
control and sensor networks in IOT applications. The latest version of ZigBee is the
recently launched 3.0, which is essentially the unification of the various ZigBee wireless
standards into a single standard.

Fig 4.6: Zigbee


• Z-Wave - Z-Wave is a low-power RF communications IOT technology that primarily
design for home automation for products such as lamp controllers and sensors among
many other devices. A Z-Wave uses a simpler protocol than some others, which can
enable faster and simpler development, but the only maker of chips is Sigma Designs
compared to multiple sources for other wireless technologies such as ZigBee and others.
• Wi-Fi- Wi-Fi connectivity is one of the most popular IOT communication protocol,
often an obvious choice for many developers, especially given the availability of Wi-Fi
within the home environment within LANs. There is a wide existing infrastructure as
well as offering fast data transfer and the ability to handle high quantities of data.
Currently, the most common Wi-Fi standard used in homes and many businesses is
802.11n, which offers range of hundreds of megabits per second, which is fine for file
transfers but may be too power-consuming for many IOT applications.

50
• Cellular - Any IOT application that requires operation over longer distances can take
advantage of GSM/3G/4G cellular communication capabilities. While cellular is clearly
capable of sending high quantities of data, especially for 4G, the cost and also power
consumption will be too high for many applications. But it can be ideal for sensor-based
low-bandwidth-data projects that will send very low amounts of data over the Internet.
• NFC- NFC (Near Field Communication) is an IOT technology. It enables simple and
safe communications between electronic devices, and specifically for smartphones,
allowing consumers to perform transactions in which one does not have to be physically
present. It helps the user to access digital content and connect electronic devices.
Essentially it extends the capability of contactless card technology and enables devices
to share information at a distance that is less than 4cm.
• Lora WAN - Lora WAN is one of popular IOT Technology, targets wide-area
network (WAN) applications. The Lora WAN design to provide low-power WANs with
features specifically needed to support low-cost mobile secure communication in IOT,
smart city, and industrial applications. Specifically meets requirements for low-power
consumption and supports large networks with millions and millions of devices, data
rates range from 0.3 kbps to 50 kbps.
• IOT Software - IOT software addresses its key areas of networking and action
through platforms, embedded systems, partner systems, and middleware. These
individual and master applications are responsible for data collection, device
integration, real-time analytics, and application and process extension within the IOT
network.
• Data Collection - This software manages sensing, measurements, light data filtering,
light data security, and aggregation of data. It uses certain protocols to aid sensors in
connecting with real-time, machine to machine networks. Then it collects data from
multiple devices and distributes it in accordance with settings. It also works in reverse
by distributing data over devices
• Device Integration- Software supporting integration binds (dependent relationships)
all system devices to create the body of the IOT system. It ensures the necessary
cooperation and stable networking between [Link] manage the various
applications, protocols, and limitations of each device to allow communication.

51
CHAPTER – 5

TOOLS USED

5.1 ARDUINO IDE

The Arduino IDE is an open-source software, which is used to write and upload code to
the Arduino boards. The IDE application is suitable for different operating systems such
as Windows, Mac OS X, and Linux. It supports the programming languages C and C++.
Here, IDE stands for Integrated Development Environment. The Arduino Integrated
Development Environment contains a text editor for writing code, a message area, a
text console, a toolbar with buttons for common functions and a series of menus.

Programs written using Arduino Software (IDE) are called sketches. These sketches
are written in the text editor and are saved with the file extension. ino. The editor has
features for cutting/pasting and for searching/replacing text. The message area gives
feedback while saving and exporting and also displays errors. The console displays
text output by the Arduino Software (IDE), including complete error messages and
other information. Arduino boards are equipped with sets of digital and
analog input/output (I/O) pins that may be interfaced to various expansion boards
('shields') or breadboards (for prototyping) and other circuits.

5.1.1 Libraries

Libraries provide extra functionality for use in sketches, e.g., working with hardware
or manipulating data. To use a library in a sketch, select it from the Sketch > Import

52
Library menu. This will insert one or more #include statements at the top of the sketch
and compile the library with your sketch. Because libraries are uploaded to the board
with your sketch, they increase the amount of space it takes up. If a sketch no longer
needs a library, simply delete its #include statements from the top of your code. There
is a list of libraries in the reference. Some libraries are included with the Arduino
software.

5.1.2 Applications

• Arduboy, a handheld game console based on Arduino


• Arduinome, a MIDI controller device that mimics the Monome
• C-STEM Studio, a platform for hands-on integrated learning of computing, science,
technology, engineering, and mathematics (C-STEM) with robotics
• Data loggers for scientific research
• OBDuino, a trip computer that uses the on-board diagnostics interface found in most
modern cars
• OpenEVSE an open-source electric vehicle charger
• XOD, a visual programming language for Arduino

5.1.3 Tools

• Auto Format - This formats our code nicely: i.e., closing curly braces line up, and
that the statements inside curly braces are indented more.
• Archive Sketch - Archives a copy of the current sketch in .zip format. The archive
is placed in the same directory as the sketch.
• Fix Encoding and Reload - Fixes possible discrepancies between the editor char
map encoding and other operating systems char maps.

53
• Serial Monitor - Opens the serial monitor window and initiates the exchange of
data with any connected board on the currently selected Port. This usually resets
the board, if the board supports Reset over serial port opening.
• Board- Select the board that you're using.
• Port - This menu contains all the serial devices (real or virtual) on your machine. It
should automatically refresh every time you open the top-level tools menu.
• Programmer - For selecting a hardware programmer when programming a board
or chip and not using the onboard USB-serial connection.

5.1.4 Simulation

• Tinker cad, an analog and digital simulator supporting Arduino Simulation


• Wok Wi, a digital and free to use simulator for Arduino boards

5.1.5 Tabs, Multiple Files and Compilation

Allows you to manage sketches with more than one file (each of which appears in its
own tab). These can be normal Arduino code files (no visible extension), C files (.c
extension), C++ files (.cpp), or header files (.h). Before compiling the sketch, all the
normal Arduino code files of the sketch (.ino, .pde) are concatenated into a single file.

5.1.6 Operating Systems and Threading

There is a Xinu OS port for the atmega328p (Arduino Uno and others with the same chip),
which includes most of the basic features. The source code of this version is freely
available. There is also a threading tool, named Protothreads. Protothreads are described as
"extremely lightweight stack less threads designed for severely memory constrained
systems, such as small embedded systems or wireless sensor network nodes.

54
5.2 MIT APP INVENTOR

Android Application developed from MIT App Inventor. MIT App Inventor is a web
application integrated development environment originally provided by Google, and
now maintained by the Massachusetts Institute of Technology (MIT). MIT App
Inventor is written in Java, Swift, Objective -C, Kawa, Scheme, JavaScript. It allows
newcomers to computer programming to create application software (apps) for two
operating systems (OS): Android and iOS, which, as of 20 January 2023, is in final beta
testing. It is free and open-source software released under dual licensing: a Creative
Commons Attribution Share Alike 3.0 Unparted license and an Apache License 2.0 for
the source code.

It uses a graphical user interface (GUI) very similar to the programming


languages Scratch (programming language) and Star Logo, which allows users to drag
and drop visual objects to create an application that can be tested on Android and iOS
devices and built to run as an Android app. It uses a companion mobile app that allows
for instant live testing and debugging. In creating App Inventor, Google drew upon
significant prior research in educational computing, and work done within Google on
online development environments. App Inventor and the other projects are based on and
informed by constructionist learning theories, which emphasize that programming can
be a vehicle for engaging powerful ideas through active learning. As such, it is part of
an ongoing movement in computers and education that began with the work of Seymour
Paper and the MIT Logo Group in the 1960s, and has also manifested itself
with Mitchel Resnick's work on Lego Mindstorms and Star Logo. App Inventor also
supports the use of cloud data via its Cloud DB component.

MIT App Inventor is an intuitive, visual programming environment that allows


everyone – even children – to build fully functional apps for Android phones, iPhones,
55
and Android/iOS tablets. Those new to MIT App Inventor can have a simple first app
up and running in less than 30 minutes. And what's more, our blocks-based tool
facilitates the creation of complex, high-impact apps in significantly less time than
traditional programming environments. The MIT App Inventor project seeks to
democratize software development by empowering all people, especially young people,
to move from technology consumption to technology creation.

A small team of MIT CSAIL staff and students, led by Professor Hal Abelson, forms
the nucleus of an international movement of inventors. In addition to leading
educational outreach around MIT App Inventor and conducting research on its impacts,
this core team maintains the free online app development environment that serves more
than 6 million registered users. MIT App Inventor is an educational tool to learn
computational thinking and computational action principles through building mobile
apps. Used by over one million people worldwide every year, it is one of the premier
platforms for computer science education. Use this companion app to test drive projects,
debug blocks code, and show your friends and family your creations.

With over 400,000 unique monthly active users who come from 195 countries who have
created almost 22 million apps, MIT App Inventor is changing the way the world
creates apps and the way that kids learn about computing.

MIT App Inventor works on the visual block-based programming language. Consequently,
it provides a rapid entry point to programming Android applications. So, it is an excellent
2starting point if you want to design an app without the need for complicated coding. MIT
app inventors block-based programming language is built on Google Blockly as well as
taking inspiration from languages like Star Logo TNG and Scratch. Besides, its interface
comes in more than a dozen languages. Its interface is user friendly and a beginner coding
language that is easy for young students to grasp. MIT App Inventor is a free, open-source

56
web app that anyone can use to build mobile apps. It has been used by over 8 million
people worldwide who have built more than 30 million apps.

5.2 WIFI

Wi-Fi is a family of wireless network protocols based on the IEEE 802.11 family of
standards, which are commonly used for local area networking of devices
and Internet access, allowing nearby digital devices to exchange data by radio waves.
These are the most widely used computer networks in the world, used in home and
office to link desktop and laptop, computers, tablets, smartphones, smart TVs, printers,
and smart speakers together and to a wireless router to connect them to the Internet, and
in wireless access points in public places like coffee shops, hotels, libraries, and airports
to provide visitors with Internet connectivity for their mobile devices.

Wi-Fi is a trademark of the Wi-Fi Alliance, which restricts the use of the term "Wi-Fi
Certified" to products that successfully complete interoperability certification testing.
As of 2017, the Wi-Fi Alliance consisted of more than 800 companies from around the
world. As of 2019, over 3.05 billion Wi-Fi-enabled devices are shipped globally each
year. The term Wi-Fi was created more than two decades ago as a way to make local
wireless networking easy to understand for the general public. Today, Wi-Fi technology
is ubiquitous, making home and office connectivity without wires available for all, and
contributing to an explosion of smart devices.

Wi-Fi uses multiple parts of the IEEE 802 protocol family and is designed to work
seamlessly with its wired sibling, Ethernet. Compatible devices can network
through wireless access points with each other as well as with wired devices and the
Internet. Different versions of Wi-Fi are specified by various IEEE 802.11 protocol
standards, with different radio technologies determining radio bands, maximum ranges,
and speeds that may be achieved. Wi-Fi most commonly uses the 2.4 gigahertz
57
(120 mm) UHF and 5 gigahertz (60 mm) SHF radio bands; these bands are subdivided
into multiple channels. Channels can be shared between networks, but, within range,
only one transmitter can transmit on a channel at a time.

A newly installed home Wi-Fi network in April [Link]-Fi's radio bands have
relatively high absorption and work best for line-of-sight use. Many common
obstructions such as walls, pillars, home appliances, etc. may greatly reduce range, but
this also helps minimize interference between different networks in crowded
environments. An access point range of about 20 m (66 ft) indoors, while some access
points claim up to a 150 m (490 ft) range outdoors. Hotspot coverage can be as small as
a single room with walls that block radio waves or as large as many square kilometres
using many overlapping access points with roaming permitted between them. Over
time, the speed and spectral efficiency of Wi-Fi have increased.

Wi-Fi is not the only wireless LAN technology out there, but it's by far the most
popular. As the name implies, a LAN network is relatively small, encompassing a
home, store, or (at the larger end) an office building or campus. Wi-Fi thus stands
between personal area network technologies like Bluetooth, which connect devices to
nearby peripherals, and wireless wide area networks like the city-blanketing 5G
networks deployed by the major cellular carriers.

5.3.1How Does Wi-Fi Work?

Wi-Fi, at a basic level, works on the same principles that make your radio or over-the-air
TV possible. Wi-Fi devices send radio waves to one another—but instead of broadcasting
analog audio or video, these waves digitally encode network packets that comply with the
Internet Protocol, just like the ones sent over wired Ethernet connections. Exactly how this
information is encoded and decoded by your various devices is extremely complex, and
has been refined over the past two decades with techniques like beamforming to allow
58
networks to transmit data farther and more quickly, with less power. The basic components
of a Wi-Fi network include:
• A router, which does the work of managing the traffic among the devices on the
network.
• A wireless access point that provides the radio connection between the router and
the local wireless devices.
• A modem that connects the local network to the wider internet. While not strictly
necessary for making the Wi-Fi network work, without it the devices on the
network can only talk to each other and not the wider world.

Typically, home users will have all three of these components combined in a single box
that you get from your Internet Service Provider (ISP). If you want to cover a larger
physical space than the signal from one access point can reach, you might also want to
deploy wireless extenders, which "echo" the network signal to help reach more distant
parts of your home or office. More advanced deployments, particularly in professional
settings, might roll out a mesh network, in which multiple extenders are coordinated to
provide better coverage.

It is important to keep in mind that just connecting to a Wi-Fi network doesn't get you to
the internet without a modem that in turn is connected to an ISP. In other words, Wi-Fi
alone isn't enough to get you online. Those modems can connect to the internet in a variety
of ways; the most common today is cable or fiber. Some modems are themselves wireless,
although they use technologies other than Wi-Fi to make that internet connection. Some
cellular providers will sell gadgets called wireless hotspots that serve as both a wireless
modem and a Wi-Fi router and access point, and most modern cell phones can also serve
this purpose, although cellular carriers often limit the amount of data you can use in this
way.

59
No matter how you connect, the router serves the key role in mediating between all the
devices on your local network and internet. While you may have many gadgets, from the
perspective of the outside world, they all share a single public-facing IP address.

5.3.2 Uses

• Internet - Wi-Fi technology may be used to provide local network and Internet
access to devices that are within Wi-Fi range of one or more routers that are
connected to the Internet. The coverage of one or more interconnected access
points (hotspots) can extend from an area as small as a few rooms to as large as
many square kilometres (miles). Coverage in the larger area may require a group
of access points with overlapping coverage. For example, public outdoor Wi-Fi
technology has been used successfully in wireless mesh networks in London.
Wi-Fi provides services in private homes, businesses, as well as in public
spaces. Wi-Fi hotspots may be set up either free-of-charge or commercially,
often using a captive portal webpage for access.

Organizations, enthusiasts, authorities and businesses, such as airports, hotels,


and restaurants, often provide free or paid-use hotspots to attract customers, to
provide services to promote business in selected areas. Many traditional
university campuses in the developed world provide at least partial Wi-Fi
coverage. Carnegie

Mellon University built the first campus-wide wireless Internet network,


called Wireless Andrew, at its Pittsburgh campus in 1993 before Wi-Fi branding
originated. By February 1997, the CMU Wi-Fi zone was fully operational.
• City Wide - An outdoor Wi-Fi access point. In the early 2000s, many cities
around the world announced plans to construct citywide Wi-Fi networks. There
are many successful examples; in 2004, Mysore (Mysuru) became India's first
60
Wi-Fi-enabled city. A company called WIFI Ynet has set up hotspots in Mysore,
covering the whole city and a few nearby villages. In 2005, St. Cloud,
Florida and Sunnyvale, California, became the first cities in the United States to
offer citywide free Wi-Fi (from MetroFi).

The project, titled Link NYC, has created a network of kiosks which serve as
public Wi-Fi hotspots, high-definition screens and landlines. Installation of the
screens began in late 2015. The UK has planned a similar project across major
cities of the country, with the project's first implementation in
the Camden borough of London. Officials in South Korea's capital Seoul is
moving to provide free Internet access at more than 10,000 locations around the
city, including outdoor public spaces, major streets, and densely populated
residential areas. Seoul will grant leases to KT, LG Telecom, and SK Telecom.
The companies will invest $44 million in the project, which was to be completed
in 2015.
• Geolocation - Wi-Fi positioning systems use the positions of Wi-Fi hotspots to
identify a device's location.
• Motion Detection - Wi-Fi sensing is used in applications such as motion
detection and gesture recognition.

5.3.3 Advantages of Wi-Fi

• You can add or move WIFI clients or WIFI stations to the WIFI network created
by AP (Access Point).
• Installation is very easy
• It does not require technical knowledge of WIFI or WLAN system and its
protocols
• Access to the WIFI network can be availed from anywhere within the WIFI AP
(Access point) coverage range

61
• WIFI enabled USB dongles are available at very affordable rates from TP-Link,
D-Link, Tenda etc.
• Latest WIFI standard versions such as 11n and 11ac deliver fast data connection
rates e.g., 300 Mbps and higher.
• As it is easy to integrate wifi functionality in the mobile computing devices; it is
now being used by millions of people using various devices such as PCs,
laptops, PDAs, Printers, Cameras, Games, MP3 players, smartphones etc.
• Provide network access across your organization, even in areas that have been
challenging to reach with the wired network, so your entire team can stay in
touch.

5.3.4 Disadvantages of Wi-Fi

• It requires proper security authentication protocols and configurations.


• public WIFI networks are most vulnerable to hacking.
• Data transfer rate decreases (to individual computer) when number of clients or
computers connected with WIFI network increases.
• The more devices are connected to a single WIFI network, the weaker the
bandwidth gets.
• Full security is difficult to achieve due to WIFI connection being wireless in
nature. It requires proper security authentication protocols and configurations.
• WIFI devices operate in full functionality and without any interruptions when they
are within the range of AP and receiving good signal strength. WIFI access is
limited to about 30 to 100 meters (i.e. 100 to 300 feet).
• In case WIFI connection does not work, minimal troubleshooting is needed. This
requires one to understand basics of WIFI device from user manual provided by
the manufacturer.

62
5.4 SENSORS USED

5.4.1 Node MCU or ESP8266

The ESP8266 is a low-cost Wi-Fi microchip, with built-in TCP/IP networking software,
and microcontroller capability, produced by Espressif Systems in Shanghai, China. The
chip was popularized in the English-speaking maker community in August 2014 via
the ESP-01 module, made by a third-party manufacturer Ai-Thinker. This small module
allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP
connections using Hayes-style commands.

However, at first, there was almost no English-language documentation on the chip and the
commands it accepted. The ESP8285 is a similar chip with a built-in 1 MiB flash memory,
allowing the design of single-chip devices capable of connecting via Wi-Fi. These
microcontroller chips have been succeeded by the ESP32 family of devices. This module
has a powerful enough on-board processing and storage capability that allows it to be
integrated with the sensors and other application specific devices through its GPIOs with
minimal development up-front and minimal loading during runtime.

➢ FEATURES

• Processor: L106 32-bit RISC microprocessor core based on the Tensilica Diamond
Standard 106Micro running at 80 or 160 MHz
• Memory:
▪ 32 KiB instruction RAM
▪ 32 KiB instruction cache RAM
▪ 80 KiB user-data RAM
▪ 16 KiB ETS system-data RAM
• IEEE 802.11 b/g/n Wi-Fi

63
▪ Integrated TR switch, balun, LNA, power amplifier and matching network
▪ WEP or WPA/WPA2 authentication, or open networks
• 17 GPIO pins
• Serial Peripheral Interface Bus (SPI)
• I²C (software implementation)
• I²S interfaces with DMA (sharing pins with GPIO)

➢ PINOUT

The pinout is as follows for the common ESP-01 module:


❖ GND, Ground (0 V)
❖ GPIO 2, General-purpose input/output No. 2
❖ GPIO 0, General-purpose input/output No. 0
❖ RX, Receive data in, also GPIO3
❖ VCC, Voltage (+3.3 V; can handle up to 3.6 V)
❖ RST, Reset
❖ CH_PD, Chip power-down
❖ TX, Transmit data out, also GPIO1

Fig 5.3: Pinout Diagram of ESP8266

64
5.4.2 RELAY MODULE

A power relay module is an electrical switch that is operated by an electromagnet. The


electromagnet is activated by a separate low-power signal from a micro controller.
When activated, the electromagnet pulls to either open or close an electrical circuit. A
simple relay consists of wire coil wrapped around a soft iron core, or solenoid, an iron
yoke that delivers a low reluctance path for magnetic flux, a movable iron armature and
one or more sets of contacts. The movable armature is hinged to the yoke and linked to
one or more set of the moving contacts. Held in place by a spring, the armature leaves a
gap in the magnetic circuit when the relay is de-energized. While in this position, one of
the two sets of contacts is closed while the other set remains open.

The traditional form of a relay uses an electromagnet to close or open the contacts, but
relays using other operating principles have also been invented, such as in solid-state
relays which use semiconductor properties for control without relying on moving parts.
Relays with calibrated operating characteristics and sometimes multiple operating coils
are used to protect electrical circuits from overload or faults; in modern electric power
systems these functions are performed by digital instruments still called protective
relays.

Fig 5.4: Relay Module

65
5.4.3 ARDUINO

Arduino is an open-source hardware and software company, project and user


community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices. It’s hardware
products are licensed under a CC BY-SA license, while the software is licensed under
the GNU Lesser General Public License (LGPL) or the GNU General Public
License (GPL),[1] permitting the manufacture of Arduino boards and software
distribution by anyone. Arduino boards are available commercially from the
official website or through authorized distributors.

Arduino board designs use a variety of microprocessors and controllers. The boards are
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to
various expansion boards ('shields') or breadboards (for prototyping) and other circuits.
The boards feature serial communications interfaces, including Universal Serial
Bus (USB) on some models, which are also used for loading programs. The
microcontrollers can be programmed using the C and C++ programming languages,
using a standard API which is also known as the Arduino Programming Language,
inspired by the Processing language and used with a modified version of the Processing
IDE. In addition to using traditional compiler toolchains, the Arduino project provides
an integrated development environment (IDE) and a command line tool developed
in Go.

The Arduino project began in 2005 as a tool for students at the Interaction Design Institute
Ivrea, Italy, aiming to provide a low-cost and easy way for novices and professionals to
create devices that interact with their environment using sensors and actuators. Common
examples of such devices intended for beginner hobbyists include
simple robots, thermostats, and motion detectors. The name Arduino comes from a bar
in Ivrea, Italy, where some of the project's founders used to meet.

66
Arduino is open-source hardware. The hardware reference designs are distributed under
a Creative Commons Attribution Share-Alike 2.5 license and are available on the
Arduino website. Layout and production files for some versions of the hardware are also
available. The official policy document on the use of the Arduino name emphasizes that
the project is open to incorporating work by others into the official product. Several
Arduino-compatible products commercially released have avoided the project name by
using various names ending in -duino.

The original Arduino hardware was manufactured by the Italian company Smart
Projects. Some Arduino-branded boards have been designed by the American
companies Spark Fun Electronics and Adafruit Industries. As of 2016, 17 versions of
the Arduino hardware have been commercially produced.

Fig 5.5: Arduino

5.4.4 12 V HI-LINK CONVERTER

It is plastic enclosed PCB mounted isolated switching step-down power supply module.
It can supply 12V DC from 120V AC – 230V AC and has a power rating of 3 Watt.
This makes it perfect for small projects that needs a 12-volt supply from mains. There
are many advantages for these modules, such as low-temperature rise, low power, high
efficiency, high reliability, high-security isolation etc. This Power Supply Module
67
voltage source is a switching source, so you do not have to worry about fluctuations in
voltage grid.

➢ FEATURES

• Meet UL, CE requirements,


• Ultra-thin, ultra-small
• All voltage input (AC: 90 ~ 264V)
• Low ripple and low noise
• Output overload and short circuit protection
• High efficiency, high power density
• The product is designed to meet the requirements of EMC and Safety
Test
• Low power consumption, environmental protection, no-load loss
<0.1W

Fig 5.6: 12 V Hi-Link Converter

5.4.5 SMOKE DETECTOR

A smoke detector is a device that senses smoke, typically as an indicator of fire. Smoke
detectors are usually housed in plastic enclosures, typically shaped like a disk about 150
millimeters (6 in) in diameter and 25 millimeters (1 in) thick, but shape and size vary.
Smoke can be detected either optically (photoelectric) or by physical process
68
(ionization). Detectors may use one or both sensing methods. Sensitive alarms can be
used to detect and deter smoking in banned areas. Smoke detectors in large commercial
and industrial buildings are usually connected to a central fire alarm system. Household
smoke detectors, also known as smoke alarms, generally issue an audible or
visual alarm from the detector itself or several detectors if there are multiple devices
interlinked.

Fig 5.7: Smoke Detector

5.4.6 SERVO MOTOR

A servo motor is a type of motor that can rotate with great precision. Normally this type
of motor consists of a control circuit that provides feedback on the current position of
the motor shaft, this feedback allows the servo motors to rotate with great precision. If
you want to rotate an object at some specific angles or distance, then you use a servo
motor. It is just made up of a simple motor which runs through a servo mechanism. If
motor is powered by a DC power supply, then it is called DC servo motor, and if it is
AC-powered motor then it is called AC servo motor.

A servo motor usually comes with a gear arrangement that allows us to get a very high
torque servo motor in small and lightweight packages. Due to these features, they are
being used in many applications like toy car, RC helicopters and planes, Robotics, etc.
It consists of three parts:
1. Controlled device
2. Output sensor
3. Feedback system
69
It is a closed-loop system where it uses a positive feedback system to control motion
and the final position of the shaft. Here the device is controlled by a feedback signal
generated by comparing output signal and reference input signal.

Fig 5.8: Servo Motor

5.4.7 SOIL MOISTURE SENSOR

The soil moisture sensor is one kind of sensor used to gauge the volumetric content of
water within the soil. As the straight gravimetric dimension of soil moisture needs
eliminating, drying, as well as sample weighting. These sensors measure the volumetric
water content not directly with the help of some other rules of soil like dielectric
constant, electrical resistance, otherwise interaction with neutrons, and replacement of
the moisture content. Another class of sensors measure another property of moisture in
soils called water potential; these sensors are usually referred to as soil water potential
sensors and include tensiometers and gypsum blocks.

The moisture of the soil plays an essential role in the irrigation field as well as in
gardens for plants. As nutrients in the soil provide the food to the plants for their
growth. Supplying water to the plants is also essential to change the temperature of the
plants. Soil moisture sensors measure or estimate the amount of water in the soil.
Stationary sensors are placed at the predetermined locations and depths in the
field, whereas portable soil moisture probes can measure soil moisture at several
locations.

70
➢ Soil Moisture Sensor Pin Configuration

The FC-28 soil moisture sensor includes 4-pins


• VCC pin is used for power
• A0 pin is an analog output
• D0 pin is a digital output
• GND pin is a Ground
This module also includes a potentiometer that will fix the threshold value, & the value
can be evaluated by the comparator-LM393. The LED will turn on/off based on the
threshold value. Soil moisture sensors typically refer to sensors that estimate volumetric
water content. The temperature of the plant can be changed with water using the
method like transpiration. And plant root systems are also developed better when rising
within moist soil. Efficient irrigation management can improve yields, grain quality,
conserve water and energy, and reduce nutrient leaching. One of the easiest and
most effective ways to improve irrigation efficiency is to implement soil sensor
technology in irrigation scheduling. Soil moisture sensors are divided into two
categories depending on the technology they use:
1) Sensors that measure volumetric water content
2) Sensors that measure soil tension when placed in the soil profile.

Fig 5.9: Soil Moisture Sensor

71
❖ APPLICATIONS

▪ AGRICULTURE - Measuring soil moisture is important


for agricultural applications to help farmers manage their irrigation systems more
efficiently.
▪ LANDSCAPE IRRIGATION - In urban and suburban areas, landscapes and
residential lawns are using soil moisture sensors to interface with an irrigation
controller.
▪ RESEARCH - Soil moisture sensors are used in numerous research
applications, e.g., in agricultural science and horticulture including irrigation
planning
▪ SIMPLE SENSORS FOR GARDNERS - Relatively cheap and simple devices
that do not require a power source are available for checking whether plants have
sufficient moisture to thrive.

5.4.8 DHT11 TEMPERATURE AND HUMIDITY SENSOR

The DHT11 is a commonly used Temperature and humidity sensor that comes with a
dedicated NTC to measure temperature and an 8-bit microcontroller to output the values
of temperature and humidity as serial data. This is a calibrated digital temperature and
humidity module with onboard sensor DHT11. It can be used for detecting ambient
temperature and humidity, through the standard single-wire interface. It uses a
capacitive humidity sensor and a thermistor to measure the surrounding air, and spits
out a digital signal on the data pin (no analog input pins needed).

Fig 5.10: DHT11 Temperature and Humidity Sensor

72
➢ DHT11 SPECIFIACTIONS

• SENSOR: DHT11
• WORKING VOLTAGE: 3.3V-5.5V
• TEMPERATURE
o RESOLUTION: 1°C
o ACCURACY: ±2℃
o MEASURING RANGE: 0°C ~ 50°C
• HUMIDITY
o MEASURING RANGE: 20%RH ~ 90%RH (25°C)
o CONDITION
• OPERATING VOLTAGE: 3.3V ~ 5.5 V
• FIXED HOLE SIZE: 2.0mm

➢ APPLICATIONS

This sensor is used in various applications such as measuring humidity and temperature
values in heating, ventilation and air conditioning systems. Weather stations also use
these sensors to predict weather conditions. The humidity sensor is used as a preventive
measure in homes where people are affected by humidity. Offices, cars, museums,
greenhouses and industries use this sensor for measuring humidity values and as a
safety measure.

5.4.9 WATER LEVEL SENSOR

The water level sensor is a device that measures the liquid level in a fixed container that
is too high or too low. According to the method of measuring the liquid level, it can be
divided into two types: contact type and non-contact type. The input type water level

73
transmitter we call is a contact measurement, which converts the height of the liquid
level into an electrical signal for output. It is currently a widely used water level
transmitter. The sensor has ten exposed copper traces, five of which are power traces
and the remaining five are sense traces. These traces are interlaced so that there is one
sense trace between every two power traces. Normally, power and sense traces are not
connected, but when immersed in water, they are bridged. There is a Power LED on the
board, which will light up when the board is powered. The power and sense traces form
a variable resistor (much like a potentiometer) whose resistance varies based on how
much they are exposed to water.
This resistance varies inversely with the depth of immersion of the sensor in water:
• The more water the sensor is immersed in, the better the conductivity and the
lower the resistance.
• The less water the sensor is immersed in, the poorer the conductivity and the
higher the resistance.
The sensor generates an output voltage proportional to the resistance; by measuring this
voltage, the water level can be determined. The water level sensor is extremely simple
to use and only requires three pins to connect.

Fig 5.11: Water level Sensor

S(Signal)is an analog output pin that will be connected to one of your Arduino’s analog
inputs.
+(VCC) pin provides power to the sensor. It is recommended that the sensor be powered
from 3.3V to 5V. Please keep in mind that the analog output will vary depending on the
voltage supplied to the sensor.
-(GND) is the ground pin.

74
➢ BENEFITS

• SIMPLE STRUCTURE: There are no movable or elastic elements, so the reliability is


extremely high, and there is no need for regular maintenance during use. The operation
is simple and convenient.
• CONVENIENT INSTALLLATION: When using, first connect one end of the wire
correctly, and then put the other end of the water level probe into the solution to be
measured.
• RANGES ARE OPTIONAL: you can measure the water level in the range of 1-200
meters, and other measurement ranges can also be customized.
• WIDE RANGE OF APPLICATIONS: suitable for liquid level measurement of high
temperature and high pressure, strong corrosion, high pollution, and other
media. Building an electronic water level gauge on the river bank can be used for tide
monitoring.
• WIDE RANGE OF MEASURING MEDIUM: High-precision measurement can be
carried out from the water, oil to paste with high viscosity, and wide-range temperature
compensation is not affected by the foaming, deposition, and electrical characteristics of
the measured medium.
• LONG SERVICE LIFE: Generally, the liquid level sensor can be used for 4-5 years in
a normal environment, and it can also be used for 2-3 years in a harsh environment.
• STRONG FUNCTION: It can be directly connected to the digital display meter to
display the value in real-time, or it can be connected to a variety of controllers and set
the upper and lower limits to control the water volume in the container.
• ACCURATE MEASURNMENT: The built-in high-quality sensor has high sensitivity,
fast response, and accurately reflects the subtle changes of the flowing or static liquid
level, and the measurement accuracy is high.

75
CHAPTER -6

MODULES

6.1 DESIGN OF AN INDEPENDENT HOME AUTOMATION


SYSTEM

To formulate the design of an interconnected network of home appliance to be


integrated into the Home Automation System. The objective to account for every
appliance and its control to be automated and integrated into the network further
formulated into the Home Automation System.

6.2 WIRELESS CONTROL OF HOME APPLIANCES (SWITCH


MODE)

To develop the application that would include features of switch and/or voice modes to
control the applications. Home Automation under Wi-Fi through apps from any
smartphone. Wireless control of home appliances using IOT is an innovative application
of internet of things developed to control home appliances remotely over the cloud.

Wi-Fi (Wireless Fidelity) is a wireless networking technology used for exchanging the
information between two or more devices without using cables or wires. There are
various Wi-Fi technologies like Wi-Fi 802.11a, 802.11b, 802.11g and 802.11n. Here, in
this project Wi-Fi module is used to receive commands from the internet.

76
6.3 MONITORING STATUS OF APPLIANCES

Being able to view the status of home appliances on the application, in order have a
better Home Automation System. The system enables users to save energy by
monitoring and controlling home appliances through mobile devices. This system
applies our monitoring method using their control panels to monitor home appliances.
We developed a monitor rack for mounting the monitoring devices.

6.4 SECURE CONNECTION CHANNELS BETWEEEN


APPLICATION AND NODE MCU

We use WIFI to connect android application and NODE MCU and to create a secure
connections channel between them. Use of secure protocols over Wi-Fi so that other
devices are prevented to achieve control over the Home Automation System. Secure
connections are obtained by SSL over TCP, SSH.

6.5 CONTROLLED BY ANY DEVICE CAPABLE OF WI-FI


(ANDROID, IOS, PC)

To achieve flexibility in control of the home appliances, and device capable of Wi-Fi
connectivity will be able to obtain a secure control on the HOME Automation System.
The light bulbs and fans that we use in our daily life are switched on and off via a
switch [Link] speed of the fan is controlled by the user manually using the
regulators nob. Thus, in their busy life, users tend to forget switching off the light bulbs
and fans while leaving home for their workplace. The users would not know this until
He/she returns home or would not have enough time to return home and switch them
off.

77
6.6 EXTENSBLE PLATFORM FOR FUTURE ENHANCEMENT

With a strong existing possibility of adding and integrating more features and
appliances to the system, the designed system needs to be highly extensible in nature.

78
CHAPTER -7

RESEARCH METHODOLOGY

7.1 INTRODUCTION

This project is more focusing about home appliances. A step-by-step procedure is done
so that the project can be completed in time. This includes circuit design and design
mechanical part. As Architecture of IOT based home Monitoring and device control is
shown in fig 7.1

Fig 7.1: An Architecture of IOT based Home Monitoring and Device Control

7.2 PROJECT DESIGN AND OVERVIEW

As mention in previous chapter, the design home controller with NODEMCU as the
main controller. The design of the controller circuit using NODEMCU is realize using
Proteus Software to try run the circuit. Application is being used in this project as a
platform to give a command to the project. To get the expected functionality of the
project, the application has been programmed by dividing it into two platforms. Arduino
board code is the one that collects all the information and controls actuators. The other
79
is the code of the mobile application, that defines the operation mode all time and, in
case of being in remote mode, which orders the operation of the actuators, acting
through the microcontroller of the board.

Android Smart Microcontroller Light on/off,


Relay intensity
Phone with ESP8266

Fan
Use
Application

Soil moisture

Door Lock
Door Lock

Fig 7.2: An Overview of Proposed System Model


The fig 7.2 is just a proposed model as we have automated all the appliances of the
home which is controlled by Node MCU as Micro Controller, power supply forgiving to
the relays and the overall controlling is done by internet and we have also used Arduino
for functioning of other modules as controlled by other sensors.

7.2.1 BLOCK DIAGRAM OF THE PROJECT

➢ ESP8266 DEVELOPMENT BOARD.

Fig.7.3 shows a working scenario of Domotic System using ESP8266. The Sensor
collects data from the appliance and sends it to the ESP8266, which passes the data to
the Application.

80
MIT App
Inventor
Door Lock

Light on/off
intensity
4-
DHT11 Humidity
ESP8266 Channel
Sensor
Relay
Soil Moisture
Sensor

Fig 7.3 Block Diagram of the Domotic System using ESP8266

➢ ARDUINO DEVELOPMENT BOARD

Fig.7.4 shows a working scenario of Domotic System using Arduino. The Sensor
collects data from the appliance and sends it to the Arduino, which passes the data to the
Application.

Gas Sensor

Light of Entrance
ARDUINO Door

Water level sensor

Fig 7.4 Block Diagram of the Domotic System using Arduino

81
7.2.2 FLOWCHART OF THE PROJECT

Fig 7.5: Flow chart of operation of the system.

7.3 PROJECT HARDWARE

As mention in previous chapter, the main controller is NODEMCU. In NODEMCU it


contains ESP8266 module. ESP8266 is a WIFI module, it is one of the leading
platforms for Internet of Things. It can transfer a data to IOT cloud. We have also used
Arduino to control Temperature of water.

82
7.3.1 SCHEMATIC CIRCUIT

Fig 7.6 Circuit Diagram of the System

7.3.2 CIRCUIT OPERATION

When the power supply is feed to the NODEMCU, first it will go through 12-Hi link
Converter. This is because operating voltage of NODEMCU is 3.3v which means when
the voltage is more than 3.3v it will cause the Node MCU burnt.

7.4 PROJECT SOFTWARE

Software that is used during this project is application for Smartphone and Arduino
IDE. Application is a Platform to control Arduino, ESP8266 and the likes over the
Internet. From here we can give command either to control the light, fan (ON/OFF and
intensity), Door Lock, Soil Moisture, Temperature monitoring, etc. by giving a
command through Application.

83
7.5 PROTOTYPE DEVELOPMENT

For prototype development, we have completed some of these projects by doing a mini-
project. The mini-project includes Light, fans on/off and Door Lock. The prototype
development of the project is shown below

Fig: Circuit of Prototype Development

Fig 7.7: Prototype Development of the Project

84
7.5.1 MECHANICAL DESIGN/PRODUCT LAYOUT

Fig 7.8: Front view of the Project

Fig 7.9 Back view of the Project

85
7.6 SUSTAINABILITY ELEMENTS IN THE DESIGN CONCEPT

The design show that the wiring component is in the small box, so it is neater. Plus, the
design is not too big and it can be carried by using a bag so it very convenient.

7.7 CHAPTER SUMMARY

So, this chapter is discussed about the project design and overview such as flowchart of
the project and also the block diagram of the project. Besides, this chapter also discuss
about the component that is being used in this project.

86
CHAPTER-8

IMPLEMENTATION AND TESTING

8.1 IMPLEMENTATION OF SYSTEM DESIGN

Most of the hardware components are modules by the virtue of the integrated design and
development adopted for the work. Therefore, standards data bus and jumper wires are
used in routing all the network paths for the embedded hardware. Also, at each stage of
construction, the modules were tested and each was confirmed to work as required
independently as well as conjointly. There are two major pieces of software in this
project. First one is the android application, which is front end and next is the server-
side software running on the software.

8.2 TESTING OF IMPLEMENTATION

Fig 8.1 Project Testing

87
8.3 TEST RESULTS

The final outcome of this project is a prototype for a simple home automation system
which can control home AC appliances with a touch of a finger and is equally capable
of monitoring with live stream video feed of the site.

On the front end, there is an android app to control the home appliances and PCB board
to which a number of home appliances are connected. Figure 8.2 shown the output
result & figure 8.3, 8.4 shown the Android app home page.

Fig 8.2 Output Result

88
Fig 8.3 Android Home Page

Fig 8.4 Test Result & Code run result.

89
CHAPTER-9

CONCLUSION

9.1 SUMMARY

Keeping in mind the technology is rapidly changing, it is important to recognize how


technology is changing how we function within our household. It is estimated that in the
next 10 years, 90% of new homes will come equipped with some form of networking,
programming and automation. The future home is a “smart secure and automated home”.
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 system is more user friendly and increase the
automation. It’s cheaper, flexible and programmable. It provides security and saves energy.
It supports wide variety of peripherals and accessories. This will help the user to analyze
the condition of various parameters in the home anytime anywhere.

The main objective of home automation is to provide a wireless communication link of


home appliances to the rem0ote user and to make such a system which controls the home
appliances remotely. The communication link between the appliances and remote user
plays an important role in automation. In this, a system that control electric appliance via
application when the user is in remote area, and also it controls the appliances through
home mobile. The system is designed for elderly and disabled people so that they can
monitor and control the home appliances with their limited ability. The system is highly
efficient and it consumes low power. This system is used to remotely control the home
appliances through smart devices like so that one can remotely check the status of the
home appliances and turn ON or OFF the same.

90
This Recommendation will lead to a green world which is it can help to save and reduce on
electricity bills. It will help and lead the disabilities person can work independently and
help them to manage their house safety in more organized way. It will help to prevent any
loss to a user or unwanted circumstances to a user. Moreover, the authors got the chance to
closely experiment and learn about what goes into designing and developing home
automation systems. We are very much delighted that we explored this topic as our major
project title and in a way, created a version of home automation system of our own, and to
be closely related with the technology that is of a great interest of study and research today
and is sure to revolutionize the way of living of people in the days to come.

Developing this type of smart home, we have been able to demonstrate that it is possible to
build such a device, using cheap sensors and developing boards such as Arduino Mega
2560 and ESP 32 and that they can be combined to provide the best solution for every
home. All applications presented are functional and operate as planned, with the power
provided to the sensors and the development boards coming from the power bank. We
were also able to show how we can build a system that covers many areas in a smart home
such as constant monitoring, security, and control. We hope that more and more people
will be able to take advantage of the new technologies available and to use them to
improve their standard of living.

9.2 FUTURE WORK

The Hardware can be modified in order to add more appliances to it. The system can be
extended to Industrial Automation i.e., the system can be made capable of controlling large
machines. The system can be extended to add burglar alarm to add security features to it.
The system can be modified to allow two-way communications i.e., a duplex system. Thus,
we have a more dynamic system which will be used to quickly adapt to changing
scenarios. Looking at the current situation we can build cross platform system that can be
deployed on various platforms like IOS, Windows. Limitation to control only several
devices can be removed by extending automation of all other home appliances.

91
The prototype can include sensors to implement automatic control of the home appliances
like; an LDR that can sense daylight and switch lamp accordingly, a PIR to detect motion
and be used for security purposes making an alarm buzz and switch fan/air conditioner
accordingly. To receive a fire alarm notification on the smartphone, adding a security
notification on the smartphone using application and a magnetic switch, changing the
screen with an ePaper display in order to reduce power consumption and to charge our
power bank during off-peak hours using a timer delay. Scope of this project can be
expanded to many areas by not restricting to only home, but to small offices.

92
REFERENCES

[1] IOT: [Link]

[2] Robert Susany, Raul Rotar, Remote Control Android-based Ap- plications for a Home
Automation implemented with Arduino Mega 2560 and ESP 32”Technium Vol.
[3] Aqeel-ur-Rehman, Royda Arif and Hira Khursheed, Voice Controlled Home
Automation System for the Elderly or Dis- abled [Link]: 2090-4274 Journal of
Applied Environ- mental and Biological Sciences [Link]
[4] C++: [Link]
)[5] Yoyo Steven in Circuits Microcontrollers. NodeMCU 1.0 (ESP8266) controlled
relay using blynk (over the web).
[6] L. Salman et ,“all Energy efficient IoT-based smart home”, 2016 IEEE 3rd World
Forum Internet Things, WF-IoT 2016, pp. 526–529, 2017.
[7] [Link]
[8] [Link]
[9] V. Thirupathi, K. Sagar, “Implementation of Home Automation System using
MQTT Protocol and ESP32”, International Journal of Engineering and Advanced
Technology (IJEAT)ISSN: 2249 – 8958,
Volume-8, Issue-2C2, December 2018
[10] [Link]
[11] [Link], Ahsan, Sheikh, Zarif Ahmad, Mohammad Shamsul Arefin, [Link]
Bari, “Implementation of IOT based Smart Security and Home Automation System”,
International Journal of Engineering Research and Technology (IJERT)ISSN: 2278-
0181IJERTV8IS060732(This work is licensed under a Creative Commons Attribution
4.0 International License.)Published by
:[Link]. 8 Issue 06, June-2019
[12] [Link]
automationhub#:~:text=A%20smart%20home%20hub%20is,%2C%20rather%20than%20
Wi%2DFi.

93
[13] [Link]
[14][Link]
0of%20a%20home,a%20more%20comfortable%2C%20livable%20space.
[15] [Link]
[16] [Link]
[17] Muskan Agarwal, Richa Saxena, Aishwarya Katyal, Jafri-Al-Ayaan, Jyotsana
Bharti, “Intelligent home: Automating amenities and assuring security features using
raspberry Pi”
[18] Ahmed h.h imam, “A simple smart home based on IOT Using NodeMCU AND
Blynk”, Electrical engineering study program faculty of engineering universitas
Muhammadiyah sukarta 2019
[19] [Link]
board
[20] [Link]
board

94

You might also like