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

One

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

One

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 43

Mini project

Chapter-1
INTRODUCTION

1.1 Introduction
The Internet of Things (NODE MCU) growing technology that is transforming various
industries the NODE MCU is part of IoT, including home automation and security. The
concept of home automation has been around for a while, but the integration of NODE MCU
has taken it to the next level. With the increasing need for safety and security, homeowners
are looking for smarter and more efficient ways to control their homes. Node MCU that is
ESP8266 home automation and security offers an innovative and practical solution that
provides homeowners with complete control over their homes from anywhere, at any time. In
the fast-paced world we live in today, technology continues to advance at an unprecedented
rate, transforming every aspect of our lives. One of the most significant technological
advancements of recent times is the Internet of Things. NODE MCU has revolutionized
various industries, and one of its most prominent applications is in home automation. ESP-
based home automation is a concept that merges the power of the internet with everyday
household devices, creating a smart and interconnected network within our homes. It enables
us to control and monitor various aspects of our homes remotely, providing convenience,
energy efficiency, and enhanced security. Imagine walking into your home on a scorching
summer day, and even before you step inside, your air conditioning system turns on
automatically, ensuring a comfortable environment awaits you. As you enter, the lights adjust
to your preferred settings, and soothing music starts playing softly in the background. This
seamless integration of technology and daily life is made possible by IoT-based home
automation. At its core, NODE MCU -based home automation involves connecting various
devices and appliances within our homes to a centralized network, allowing them to
communicate and interact with one another. These devices can range from simple household
appliances like lights, thermostats, and security systems to more sophisticated gadgets such as
smart TVs, refrigerators, and even robotic vacuum cleaners. NODE MCU based home
automation and security has gained popularity due to its potential to provide homeowners
with greater control, convenience, safety, and energy efficiency.

E&C Department, JCE Belagavi Page 1


Mini project

1.2 Internship Study


In today’s world, technology has become integral part of our lives. We use it to communicate,
learn, work, shop, and entertain ourselves. Technology has made our lives easier, more
efficient, and more connected. It has also given us new tools to solve problems and improve
our world. We provide a safe and integrated model integrating NODE MCU devices and
appliances.
Our technology makes use of NODE MCU systems’ seamless connectivity to automatically
identify devices across a secure network.
The primary goal of the system model that is being proposed is to provide voice-based remote
control for consumers while also solving issues with usability, trust, and the administrative
burdens associated with managing several NODE MCU devices in a normal home context.
Furthermore, we want to show how straightforward and adaptable our suggested approach is
for any smart home environment by putting it into practice as a prototype with a range of use
cases.

Prime focus of this technology is to control the household equipment’s like light, fan, door,
AC etc. using NODE MCU. A person can control his home appliances by using an android
application present in his mobile phone which will reduce the human hard work.
The planning process includes hardware interface and software interface. In hardware
connectivity, the integrated ESP32 camera Wi-Fi module is used to control home appliances
and provide applications to control multiple home users from smartphones, tablets and
laptops. Access to the entire system is allowed only to different users by the administrator.
The system can also be expanded to control many devices in the home as long as they are
available on the Wi-Fi network.

1.3 Aims and Objectives


The aim of the internship project on NODE MCU -based electric control systems is to
explore, implement, and innovate within the realm of NODE MCU technology applied to
electric control systems.
The objectives of the internship is to,

1.3.1Literature Review: Conduct an extensive review of literature and existing


research on IoT applications in electrical control systems to understand the state-
of-the-art technologies and methodologies.

E&C Department, JCE Belagavi Page 2


Mini project

1.3.2System Design: Design an NODE MCU based framework or system architecture


that facilitates the remote monitoring and control of electrical devices.

1.3.3Prototype Development: Develop a prototype system or model demonstrating the


integration of NODE MCU devices with electrical control systems, allowing for
remote access and control.

1.3.4Performance Evaluation: Test and evaluate the performance of the developed


system, considering factors like reliability, response time, energy efficiency, and
scalability.

1.3.5Knowledge Transfer: Share findings and insights through presentation and research
paper.

1.4 Report Outline


• Chapter 1 serves as the gateway to this internship report. It opens with an introduction
which contains the primary purpose, scope, and objectives of the internship experience.
This chapter aims to provide a foundational understanding by outlining the context
within which the subsequent chapters are framed.

• In Chapter 2 the report delves into an extensive exploration and critical examination of
existing literature pertaining to the specialized field. This section reviews scholarly
articles, research papers, and academic discussions, providing an insightful analysis of
the prevailing theories, discoveries, and discussions that directly relate to the project.

• Chapter 3 dives into exploring all the important parts, tools, and materials that were
essential for the project.

• Chapter 4 takes a close look at what makes the Blynk app important for the project. It
carefully explains the different things the app can do and why it matters within the scope
of this project.

• Chapter 5 offers an in-depth analysis of the project’s implementation, processes,


methodologies, and out-comes.

• Chapter 6 concludes the report and presents information about the future scope of this
internship.

E&C Department, JCE Belagavi Page 3


Mini project

Chapter-2
LITERATURE REVIEW

2.1 Introduction
NODE MCU -based home automation and security has gained popularity due to its potential
to provide homeowners with greater control, convenience, safety, and energy efficiency. In
this literature review section, we will explore the current state of research and development in
the field of NODE MCU -based Electric Control System.
The literature review aims to provide a comprehensive understanding of the current trends,
challenges, and opportunities in this field. The review will cover a range of relevant topics,
including the history of home automation and security, the evolution of NODE MCU
technology, the benefits and limitations of NODE MCU -based Electric Control System, and
the current state of research and development. NODE MCU based Smart Home design using
power and security management

2.2 Review of Previous Work


2.2.1NODE MCU based Smart Home design using power and security management
The paper presents the design and implementation of an Ethernet-based Smart Home
intelligent system for monitoring the electrical energy consumption based upon the
real time tracking of the devices at home an INTEL GALILEO 2ND generation
development board, which can be used in homes and societies. The proposed system
works on real time monitoring and voice control, so that the electrical devices and
switches can be remotely controlled and monitored with or without an android based
app. It uses various sensors to not only monitor the real time device tracking but also
maintaining the security of your house. It is monitored and controlled remotely from
an android app using the Internet or the Intranet connectivity. The proposed outcome
of the project aims as multiple benefits of saving on electricity bills of the home as
well as keep the users updated about their home security with an option of
controlling the switching of the devices by using their voice or simple toggle touch
on their smartphone, and last but most importantly, monitor the usage in order to
conserve the precious natural resources by reducing electrical energy consumption.

E&C Department, JCE Belagavi Page 4


Mini project

2.2.2Review of Node MCU in Electric Power and Energy Systems The paper reviews
the role, impact and challenges of NODE MCU in transforming electric power and
energy systems (EPESs) into intelligent, cyber-enabled networks that are more
efficient, reliable, secure, and sustainable.
The paper discusses how Node MCU can overcome the limitations of the current
EPESs by providing networked connectivity, real-time monitoring, situational
awareness, control, and cyber security. It also describes how Node MCU can digitize
the electric power generation, transmission and distribution, and consumption
phases, enabling bidirectional power and data flows, distributed energy resources,
and active customer participation.
The paper assesses the economic, environmental, and societal impact of Node MCU
on EPESs, highlighting the potential benefits such as increased revenue, reduced
energy waste and emissions, improved public safety and convenience, and enhanced
access to clean and affordable energy.

2.2.3 Smart Home Automation Use Cases of a Secure and Integrated Voice-Control
System
Smart home automation is expected to improve living standards with the evolution of
Node MCU that facilitate the remote control of residential appliances. There are,
however, several factors that require attention for broader successful consumer
adoption. This paper focuses on three key barriers:
(i) Different underlying technologies requiring an integrated voice-based control for
ease of use.

(ii) Lack of trust due to security and privacy concerns.

(iii) Unawareness of the use of machine intelligence by users for exploiting the full
potential of smart-ness.
Voice-controlled home environments are possible with cloud-based solutions that are
being deployed commercially. However, there are drawbacks due to non- standard
voice channels and commands with delays in meeting the required response time for
real-time services. Adoption is also required to meet with the expected goals of
simplicity, security, and integration. To address these barriers, the authors propose a
model integrating Node MCU services and wireless technologies for developing a
secure smart home automation with a voice-controlled artificial intelligence system.

E&C Department, JCE Belagavi Page 5


Mini project

The authors also demonstrated the model’s application in a variety of practical use
cases, by implementing a secure and smart voice-based system for an integrated
control of several home devices seamlessly.

2.2.4 Node MCU Based Smart Home Automation and Monitoring System
The concept of a smart home is becoming increasingly popular these days. It reduces
the amount of physical labor required. In a traditional home, we cannot monitor the
electrical appliances, environmental conditions, home security, and cannot control
them remotely. Typical residential systems cannot automatically change a systems
state in response to a specific scenario. However, this study proposes an IoT-based
smart home automation system that works in different modules to automate the
entire home. In one module, the system determines the human movement inside the
room by using an IR sensor and detects the light level using an LDR sensor. The light
level will be adjusted based on the output of the IR sensor. Also, the system operates
the fans and heater based on the home temperature and humidity by using an
AM2301 sensor. In another module, a flame sensor aids the detection of fire, MQ-
135 sensor measures the air quality. In case of fire is detected in the home, the
system will also alert the users instantly. To control everything remotely, a mobile
application (Blynk App) is used. Converting to a smart home, it can provide security,
energy efficiency, and the ability to manage every existing home appliance from a
centralized location or remotely. As a result, the system focuses on generating the
most excellent possible environmental conditions while requiring the least amount of
human effort possible. Beyond everything, it helps in saving time in every manner
conceivable.

2.2.5 Literature Review of Node MCU Based Home Automation System


Home automation system is gain if a significant research attention in recent years. It
helps us in leading a comfortable life and quality of lifestyle is gradually uplifted.
The different methodologies used in this system have been discussed. In modern
days, a smartphone having an android application is used to supervise and control
the appliances present in the home automation system. In this paper different types
of communication methodologies such as GSM, IoT, Wi-Fi, and Bluetooth are
reviewed. The pros and cons of these techniques along with their features have been
presented. Based on this paper the user can choose the best suitable methodology
depending upon
E&C Department, JCE Belagavi Page 6
Mini project

their personal needs and specifications for implementing an efficient automation


system.
2.2.6Design And Implementation of An Node MCU Based Home Security System
The authors of this project report have done a project based on implementation of a
home security system that uses the Internet of Things. The main goal of this project
is to be able to control entrance from anywhere in the world while at the same
time
making sure it is secure. It was possible to create an automated door control system
that works both through a keypad and a mobile app. Node MCU stand for the
infrastructure of physically linked devices, which is expanding quickly due to the
massive increase in the number of items and devices connecting to the Internet. The
authors are utilizing Node MCU to develop a low-cost home security system since it
is a highly beneficial application. To quote from the report, “METHODS AND
MATERIAL WORKING Touch sensor for door is activate buzzer if door is locked
and someone wants to open it LPG Gas sensor activate Exhaust FAN and Buzzer
(For kitchen) Online from website we can turn ON / OFF light Data of room Temp
and Humidity , gas and door touch will send on Node MCU database Temperature
and Humidity data we can plot graph online Code lock is use for door open Cloud is
the heart of any online system; it is like a central server focus mainly on
implementing services without the need of physical hardware. The centralized
controller connected with the device sends data generated from our homes and
evaluates it and send current data of temperature and humidity on the server. The
main benefit of this system is that it uses mobile or computers to control Light
functions while sitting anywhere in the world.”

2.2.7 Phone Based Home Automation


Phone Based Home Automation Some systems are described as an enabling system
that can be used to provide a common framework for home Automation. It provides
a system for a smart home that includes facilities such as a system controller, house-
wide wiring and a common interface. This will enable using the existing system for
home automation. A hardware based remote controller for power point control has
been described. The function of this remote controller is to control the power
supplied to devices at a remote location. The system uses the telephone line for
transmitting the commands. The controller is a logic system built entirely of

E&C Department, JCE Belagavi Page 7


Mini project

hardware. It eliminates the cost incurred with microcontrollers. It uses a DTMF


transceiver which is interfaced

E&C Department, JCE Belagavi Page 8


Mini project

with a solid-state relay to control the power supply. It could also be implemented
experimentally with infra-red signals and AC power line carrier technology. A home
automation system makes use of the dual tone multi frequency (DTMF) used in
telephone lines.

The system uses the standard public-switched telephone lines. There are three
components in the system. The first is the DTMF receiver and ring detector. The
second part is the IO interface unit. The third part is the PC which does the online
operations. The PC detects the ringing of the line and then authenticates the user.
After this the user will be allowed to use the keypad tones to control the devices as
required. An example of stepper motor control is taken up. This system has the
advantage of being secure and allowing international standardization. This is because
the DTMF tones are the same all over the world. But it suffers from the drawback
that the number of appliances is limited by the number of keys in the keypad. An
ordinary keypad phone usually has 12 keys only.

2.2.8Applications, Systems and Methods in Smart Home Technology: A Review


Smart Home technology started for more than a decade to introduce the concept of
networking devices and equipment in the house. According to the Smart Homes
Association the best definition of smart home technology is: the integration of
technology and services through home networking for a better quality of living.
Many tools that are used in computer systems can also be integrated in Smart Home
Systems. Smart Home is the term commonly used to define a residence that uses a
Home Controller to integrate the residence’s various home automation systems. The
most popular Home Controllers are those that are connected to a Windows based PC
during programming only, and are then left to perform the home control duties on a
standalone basis. Integrating the home systems allows them to communicate with
one another through the home controller, thereby enabling single button and voice
control of the various home systems simultaneously, in pre-programmed scenarios or
operating modes. In this paper, the author presents the Technologies and tools that
can be integrated or applied in Smart Home systems.

E&C Department, JCE Belagavi Page 9


Mini project

Chapter-3
HARDWARE COMPONENTS

3.1 Introduction
This chapter dives into exploring all the important parts, tools, and materials that were
essential for our project. It’s like a detailed tour of these elements, explaining why they
mattered and how they worked to make our project successful. Each part has its own
importance, showing exactly how it helped us achieve our project goals. By explaining what
each part did and how they all fit together, this chapter highlights how they made our project
better and more effective.

3.2 List of Components


The components that are used in this project are given below:

1. ESP 8266 module

2. Single channel relay

3. Led bulbs

4. Jumper Wires

5. Bulb Holder

6. Bread Board

3.3 ESP 8266 Wi-Fi module


The ESP8266 has a very competitive small-size module that can operate independently as a
minimum system with a footprint of only 27*40.5*4.5mm and a deep sleep current of up to
6mA.

ESP8266 can be widely used in various IoT applications. It is suitable for home smart
devices, industrial wireless control, wireless monitoring, QR wireless identification, wireless
positioning system signals and other IoT applications. It is an ideal solution for IoT
applications.

E&C Department, JCE Belagavi Page 10


Mini project

Figure 3.1: ESP8266

The ESP8266 comes with four GND pins (colored in black color) and three power pins
(colored with red color): 3.3V .
We can power the ESP8266 through the 3.3V pins. However, many people reported errors
when powering the ESP8266 with 3.3V, so we always advise to power the ESP8266 through
the 5V pin. There’s also the pin labeled on the silkscreen as VCC. That is an output power
pin. It can either output 3.3V.
GPIO 1 and GPIO 3 are the serial pins (TX and RX, respectively). Because the ESP8266
doesn’t have a built- in programmer, we need to use these pins to communicate with the
board and upload code. We can use GPIO 1 and GPIO 3 to connect other peripherals like
outputs or sensors after uploading the code. The ESP8266 has a very bright built-in LED that
can work as a flash when taking photos. That LED is internally connected to GPIO
4. The GPIO is also connected to the microSD card slot, so the flashlight will light up when
using the microSD card.

E&C Department, JCE Belagavi Page 11


Mini project

3.4 Single channel Relay

Figure 3.2: Single Channel Relay

A Relay is a simple electromechanical switch. While we use normal switches to close or open
a circuit manually, a Relay is also a switch that connects or disconnects two circuits. But
instead of a manual operation, a relay uses an electrical signal to control an electromagnet,
which in turn connects or disconnects another circuit.

Figure 3.3: Relay Pin Diagram

Pin details
Relay module consists of six pins such as normally open pin, normally closed, common,
signal, Vcc and ground pins.

• Signal Pin: It is used to control the relay. This pin can be active low or active high. In
case of active low, the relay will activate when we apply an active low signal to the
signal pin. On the contrary, in the case of an active high, the relay will activate when
E&C Department, JCE Belagavi Page 12
Mini project

we apply

E&C Department, JCE Belagavi Page 13


Mini project

an active high signal to the signal pin. But usually, these modules work on an active
high signal. This signal will energize the relay coil to make contact with the common
terminal with the normally open terminal.

• Vcc Pin: As its name suggests, it is a 5V relay. That means it requires 5V DC to operate.
Hence, connect the 5v DC power supply to this pin.

• Ground Pin: Connect it with the ground terminal of 5V power supply. Furthermore, if
you are driving a relay module with a microcontroller, also connect this pin with the
ground terminal of the microcontroller.

• Common Pin: This terminal is connected with the load that we want to switch with the
relay module.

• NC Pin: As the name of the normally close terminal suggests, it is normally connected
with the COM pin and forms a closed circuit. But this normally closed connection
breaks when the relay is activated by applying an active high or active low signal to the
signal pin of the relay module from a microcontroller.

• NO Pin: This pin is normally open unless we apply an activation signal to the signal pin
of the 5V single channel relay module. In this case, the COM pin breaks its connection
with the NC pin and makes a connection with the NO pin.

3.5 LED bulbs

Figure 3.4: LED Bulbs

LED stands for light emitting diode. LED lighting products produce light up to 90% more

E&C Department, JCE Belagavi Page 14


Mini project

efficiently than incandescent light bulbs. How do they work? An electrical current pass through
a microchip, which illuminates the tiny light sources we call LEDs and the result is visible
light. To prevent performance issues, the heat LEDs produce is absorbed into a heat sink.
The useful life of LED lighting products is defined differently than that of other light sources,
such as incandescent or compact fluorescent lighting (CFL). LEDs typically do not “burn
out” or fail. Instead, they experience ‘lumen depreciation’, wherein the brightness of the LED
dims slowly over time. Unlike incandescent bulbs, LED “lifetime” is established on a
prediction of when the light output decreases by 30 percent.
LEDs are incorporated into bulbs and fixtures for general lighting applications. Small in size,
LEDs provide unique design opportunities. Some LED bulb solutions may physically
resemble familiar light bulbs and better match the appearance of traditional light bulbs. Some
LED light fixtures may have LEDs built in as a permanent light source. There are also hybrid
approaches where a non-traditional “bulb” or replaceable light source format is used and
specially designed for a unique fixture. LEDs offer a tremendous opportunity for innovation
in lighting form factors and fit a wider breadth of applications than traditional lighting
technologies.

3.6 Jumper Wires

Figure 3.5: Jumper Wires

Jumper wires are simply wires that have connector pins at each end, allowing them to be

E&C Department, JCE Belagavi Page 15


Mini project

used to connect two points to each other without soldering. Jumper wires are typically used
with

E&C Department, JCE Belagavi Page 16


Mini project

breadboards and other prototyping tools in order to make it easy to change a circuit as needed.
Fairly simple. In fact, it doesn’t get much more basic than jumper wires. Jumper wires
typically come in three versions: male-to-male, male-to-female and female-to- female. The
difference between each is in the end point of the wire. Male ends have a pin protruding and
can plug into things, while female ends do not and are used to plug things into. Male-to- male
jumper wires are the most common and what you likely will use most often. When connecting
two ports on a breadboard, a male-to-male wire is what you’ll need.

3.7 Light bulb Holders

Figure 3.6: Light bulb Holders

A light bulb socket, light bulb holder, light socket, lamp socket or lamp holder is a device
which mechanically supports and provides electrical connections for a compatible electric
lamp base. The construction of a lamp holder socket defines and limits its intended primary
use. Ceramic insulation can withstand considerably higher operating temperatures than
Bakelite or other plastics. The electrical components and wires must be designed to carry the
intended current plus a safety factor.

E&C Department, JCE Belagavi Page 17


Mini project

3.8 Breadboard

Figure 3.7: Breadboard

A breadboard is a type of prototyping board that allows electronic components to be easily


inserted and connected without soldering. It is a useful tool for testing. A breadboard is
reusable, easy to use and modify, and does not require soldering skills. However, it is not
suitable for high-frequency, high-voltage, or permanent projects, and it can be messy and
unreliable with many wires and loose connections and experimenting with circuits. A
breadboard is reusable, easy to use and modify, and does not require soldering skills.
However, it is not suitable for high- frequency, high-voltage, or permanent projects, and it
can be messy and unreliable with many wires and loose connections. Breadboard has a grid
of holes, each connected to metal strips underneath. Components can be inserted into the
holes and the metal strips provide a way to make connections between them. The long holes
on the top and bottom rows are often used for power supply, and the central gap is used for
placing integrated circuits (ICs). Jumper wires can be used to connect different nodes or
sections of the board.

E&C Department, JCE Belagavi Page 18


Mini project

Chapter-4
SOFTWARE - BLYNK APP

4.1 Introduction
In this chapter we will look in on a really important tool for our project: the Blynk app. This
part takes a close look at what the Blynk app can do and why it’s so crucial for our project. It
explains exactly how using this app helps us reach the big goals we set for the project. By
explaining in detail, this chapter sets the stage for understanding how we used the Blynk app
in the later parts of the project.

4.2 Blynk App - A Brief Review

Figure 4.1: Blynk logo

Blynk is an IoT platform for iOS or Android smartphones that is used to control Arduino,
Raspberry Pi and Node MCU via the Internet. This application is used to create a graphical
interface or human machine interface (HMI) by compiling and providing the appropriate
address on the available widgets. Blynk was designed for the Internet of Things. It can
control hardware remotely, it can display sensor data, it can store data, visualize it and do
many other cool things.
Whether it’s personal IoT projects or commercial connected products in the millions, Blynk
empowers users to connect their hardware to the cloud and create iOS, Android, and web

E&C Department, JCE Belagavi Page 19


Mini project

applications, analyze real-time and historical data from devices, remotely control them from
anywhere, receive important notifications, and much more.

4.3 Major Components of Blynk app


There are three major components in the platform.

4.3.1 Blynk App

Figure 4.2: Blynk App Interface

It allows you to create amazing interfaces for your projects using various widgets
which are provided. It is a versatile native iOS and Android mobile application that
serves these major functions:

• Remote monitoring and control of connected devices that work with Blynk
platform.

• Configuration of mobile UI during prototyping and production stages.

• Automation of connected device operations.

Applications made with Blynk are ready for the end-users. Whether they are family
members, employees, or product purchasers, they can easily download the app,
connect their devices, and start using them. Blynk also offers a white-label solution
as part of the Business Plan, allowing you to customize the app with your company
logo, app icon, theme, colors, and publish it on App Store and Google Play under
your company’s name. These customized apps will work seamlessly with your
devices.

E&C Department, JCE Belagavi Page 20


Mini project

4.3.2 Blynk Cloud

Figure 4.3: Blynk Cloud

Blynk.Cloud is a server infrastructure acting as the heart of Blynk IoT platform


binding all the components together. Blynk also offers private servers.

Blynk Cloud serves as the backbone of the Blynk platform, offering a reliable and
scalable infrastructure for IoT applications. It operates as a server that facilitates
communication between connected devices and the Blynk app. This cloud-based
service stores and manages data, handles user authentication, and enables real-time
interaction between devices and the Blynk mobile app.

Through Blynk Cloud, users can effortlessly connect their IoT devices to the
internet, allowing remote control and monitoring via the Blynk app from anywhere
worldwide. It acts as a centralized hub, ensuring secure and seamless communication
between devices and the app while providing features like data logging, notifications,
and over- the-air updates.

The Blynk Cloud infrastructure is designed to be robust, ensuring high availability


and reliability for users developing IoT projects. It simplifies the process of creating
connected devices by handling the backend aspects, allowing developers to focus on
building innovative functionalities and enhancing user experiences within their IoT
applications.

E&C Department, JCE Belagavi Page 21


Mini project

4.3.3 Blynk Libraries

Figure 4.4: Blynk Libraries

Blynk libraries are software components designed to facilitate seamless integration


and interaction with the Blynk platform. These libraries serve as a bridge between
hardware and the Blynk app, enabling devices to communicate and be controlled
remotely via the internet.

With Blynk libraries, developers can swiftly create IoT (Internet of Things) projects
by simplifying the process of connecting hardware such as microcontrollers
(Arduino, ESP8266, etc.) to the Blynk app. These libraries typically contain pre-
written code and functions that abstract the complexities of network communication,
allowing users to focus on building functionalities and features for their IoT projects.

They provide a range of customizable widgets and communication protocols that


enable devices to send and receive data, trigger actions, display information, and
respond to user inputs through the Blynk app’s user-friendly interface.

In essence, Blynk libraries streamline the development of IoT applications, offering


a standardized and efficient way to link hardware devices with the Blynk platform,
empowering creators to build innovative and interactive IoT solutions.

E&C Department, JCE Belagavi Page 22


Mini project

Chapter-5
DESIGN METHODOLOGY

5.1 Introduction
This chapter unveils the methodology behind the project’s design through visually
represented block diagrams, flowcharts, and circuit diagrams, each supplemented by brief
explanatory text. The block diagram offers a holistic view of the project’s structure and
interconnections between its components. This section aims to offer a com- prehensive
overview of the project’s design methodology, providing both visual and textual cues for a
thorough comprehension of its conceptualization and implementation.

5.2 Circuit Diagram

Figure 5.1: Circuit Diagram

• Arduino Power Supply: The Arduino serves as the power supply for the ESP8266
module, ensuring it receives the required electrical power to function properly.

E&C Department, JCE Belagavi Page 23


Mini project

• ESP8266 Control Hub: The ESP8266odule houses the necessary code to manage relay
control, acting as the brain of the system. It communicates with the Blynk app, receiving
user signals and subsequently sending signals to the relays for operation.

• Relay Control: The ESP8266sends signals to the relays based on the instructions
received from the Blynk app. These relays act as switches, controlling the AC power
supply to the bulbs based on the ESP8266’s commands.

• Blynk App Integration: Through the ESP8266, the Blynk app communicates user
commands to the relays, enabling remote control of the bulbs. Users can toggle the
lights on or off via the Blynk app, and the ESP8266 processes these commands to
control the relays accordingly.

• AC Power Supply for Bulbs: The bulbs require an AC power supply for operation. The
relays, controlled by the ESP8266, manage the AC supply to the bulbs based on user
commands received via the Blynk app.

• Pushbuttons for Light Control: Additionally, pushbuttons are incorporated into the circuit
to offer manual control over the lights. These buttons allow local control, giving users
the option to directly operate the lights without relying solely on the Blynk app.

5.3 Software-Hardware Interfacing


5.3.1 Set-up the Blynk app
Creating an Account: Creating an account and setting up a server in the Blynk app
involves straight- forward steps. Begin by downloading and installing the Blynk app
from your app store. Upon opening the app, proceed to create a new account by
providing your email address, creating a password, and verifying your email through
the link sent by Blynk. Once your account is set up, log in to the Blynk app. To
initiate a new project, click the “+” icon, select your hardware model (e.g., ESP32),
and choose the connection type (e.g., Wi-Fi). The app generates an authentication
token, crucial for linking your hardware to the Blynk app. Customize your project
dashboard by adding widgets like buttons or sliders to control or monitor your
hardware. Start the project by clicking the “Play” button within the app.

E&C Department, JCE Belagavi Page 24


Mini project

Setting Up a Server: Regarding the server configuration, Blynk typically employs its
cloud server by default. However, for specific needs or advanced setups, you can opt
for a custom server. Access the app settings to input details such as the server
URL and port if you’re using a custom server. These configurations, though, may
not be necessary for most users, as the default Blynk cloud server suffices for
standard operations. By following these steps, you’ll successfully create a Blynk
account, set up a project, link hardware, and potentially configure server settings as
needed for your IoT project.

5.3.2 Dumping the code in ESP8266


To upload code to an ESP8266 using an Arduino Uno as a programmer, one needs to
establish physical connections between the two boards. The Arduino Uno connects to
the ESP8266 by linking their power and ground pins, and establishing a
communication link through their RX (receive) and TX (transmit) pins.
It’s important to connect GPIO 0 of the ESP8266 to ground while uploading the code
to enable flashing mode.

In terms of software, setting up the Arduino IDE to work with the ESP8266 involves
installing the ESP8266 board in the Arduino IDE via the Board Manager. Once the
board is selected and the code intended for upload is opened in the Arduino IDE,
ensure that the code specifies the correct GPIO pins for the ESP8266 functionalities.

To upload the code, hold down GPIO 0 connected to ground to activate flashing
mode on the ESP8266 while clicking the “Upload” button in the Arduino IDE.
Release the GPIO 0 pin when the upload process begins. This allows the code to be
transferred from the Arduino Uno to the ESP8266.

5.3.3 Integrating ESP8266 With Blynk app


To integrate the ESP8266 with the Blynk app, one should add the Blynk
authentication token to the ESP8266 code. Start by including the Blynk library in the
Arduino sketch, which can be found and installed through the Arduino IDE’s Library
Manager. Within the code, locate the section where the Blynk connection is
established and replace “YourAuthToken” with the specific authentication token
obtained from the Blynk app. This token uniquely identifies the project and allows
the ESP8266 to connect to the particular project within the Blynk cloud.
E&C Department, JCE Belagavi Page 25
Mini project

Make sure to connect the ESP8266 to the Wi-Fi network by providing the network’s
SSID and pass- word within the code. Replace “YourNetworkName” and
“YourPassword” with the actual credentialsaccordingly.

In the setup() function, initialize the Blynk connection using the provided
authentication token and Wi- Fi credentials. Also, include Blynk.run() in the loop()
function to ensure continuous Blynk functionality and maintain the connection with
the Blynk server.

After adjusting the code with the appropriate token, SSID, and password, upload it to
the ESP8266 using the Arduino IDE. This integration enables the ESP8266 to
establish
a connection with the Blynk app, enabling communication and control between the
hardware and the app interface.

5.4 Working
5.4.1 LED OFF

Figure 5.2: LED OFF

The user, through the Blynk app, issues a command to the ESP8266 , signaling an
interruption in the electrical circuitry to both LEDs. This directive prompts the
ESP8266’s programmed logic to cease the current flow, effectively preventing
electricity from reaching the terminals of both LEDs.
E&C Department, JCE Belagavi Page 26
Mini project

5.4.2 LED ON

Figure 5.3: LED ON

Utilizing the Blynk app, the user transmits a command instructing the ESP8266 to
allow current to the first LED while simultaneously interrupting the electrical flow to
the second LED. This user- initiated command triggers the ESP8266’s programmed
logic, enabling the illumination of the first LED by permitting electricity to its
terminals while concurrently blocking the current flow to the second LED.
Consequently, the first LED illuminates while the second LED remains unlit,
precisely following the user’s input through the Blynk app.

E&C Department, JCE Belagavi Page 27


Mini project

Chapter-6
CONCLUSION AND FUTURE SCOPE

6.1 Conclusion
The project’s results encompass a functioning prototype that integrates the ESP8266 relays,
and Blynk app to remotely control LED bulbs. It signifies a successful demonstration of IoT
principles, showcasing how hardware components and software interfaces interact to enable
remote access and automation. However, a significant outcome highlighted the system’s
dependence on consistent internet connectivity for seamless operation. This reliance
underscores the need for a stable online connection to leverage the Blynk app effectively.
Additionally, the project offered valuable hands-on experience, enriching understanding in
IoT concepts, relay control, and remote connectivity. It also emphasized the limitations faced
in scenarios with limited or no internet access, prompting consideration for alternative control
methods in such situations. Furthermore, the project presents possibilities for future
development, inspiring potential enhancements, backup control mechanisms, or adaptations
for varied applications. Overall, it serves as an educational tool, showcasing practical IoT
implementation while revealing critical dependencies and avenues for advancement in this
technological domain.

6.2 Future Scope


This project has some promising scope in future.

6.2.1Enhanced Functionality: Explore additional functionalities within the Blynk app


interface, such as scheduling, timers, or sensor integrations, to expand the
capabilities of remote control and automation.

6.2.2Offline Functionality: Develop a contingency plan for scenarios with limited or no


internet connectivity. Implement local control mechanisms or secondary interfaces
that can operate the system without relying solely on the internet.

6.2.3Energy Efficiency: Investigate power-saving modes or energy-efficient protocols to


optimize the system’s power consumption, extending the operation duration and
reducing overall energy usage.

E&C Department, JCE Belagavi Page 28


Mini project

6.2.4Security Measures: Strengthen the system’s security protocols to safeguard against


potential cyber threats or unauthorized access, ensuring the integrity of the remote-
control functionalities.

6.2.5Device Expansion: Explore the integration of additional IoT devices or sensors to


create a more com- prehensive smart home or automation system, diversifying the
project’s applications.

6.2.6User Interface Refinement: Refine the Blynk app’s user interface for improved user
experience, ensuring intuitive controls and informative feedback for users interacting
with the system.

6.2.7Community Engagement: Share project findings, code modifications, or


improvements with the IoT community, fostering collaboration, knowledge
exchange, and potential contributions from other developers.

E&C Department, JCE Belagavi Page 29


Mini project

APPENDIX

Code of ESP-Based Electric Control System:

//#define BLYNK_PRINT Serial


#define BLYNK_TEMPLATE_ID "TMPL3CudbknpB"
#define BLYNK_TEMPLATE_NAME "Home Automation"
#define BLYNK_AUTH_TOKEN "MEiy_Ai7Hgt01XaiwTGY2pJ4k_t3-DIA"

#include <BlynkSimpleEsp8266.h>

// define the GPIO connected with Relays and


switches #define RelayPin1 5 //D1
#define RelayPin2 4 //D2
#define RelayPin3 14 //D5
#define RelayPin4 12 //D6

#define SwitchPin1 10 //SD3


#define SwitchPin2 0 //D3
#define SwitchPin3 13 //D7
#define SwitchPin4 3 //RX

#define wifiLed 16 //D0

#define VPIN_BUTTON_1 V1
#define VPIN_BUTTON_2 V2
#define VPIN_BUTTON_3 V3
#define VPIN_BUTTON_4 V4

int toggleState_1 = 1; //Define integer to remember the toggle state for relay
1 int toggleState_2 = 1; //Define integer to remember the toggle state for
relay 2 int toggleState_3 = 1; //Define integer to remember the toggle state
for relay 3 int toggleState_4 = 1; //Define integer to remember the toggle
E&C Department, JCE Belagavi Page 30
Mini project

state for relay 4

E&C Department, JCE Belagavi Page 31


Mini project

int wifiFlag = 0;

// You should get Auth Token in the Blynk App.


#define WIFI_SSID "Realmi C25s" //Enter Wifi
Name #define WIFI_PASS "omchavan" //Enter wifi
Password

BlynkTimer timer;

void relayOnOff(int relay){

switch(relay){
case 1:
if(toggleState_1 == 1){
digitalWrite(RelayPin1, LOW); // turn on relay 1
toggleState_1 = 1;
Serial.println("Device1 ON");
}
else{
digitalWrite(RelayPin1, HIGH); // turn off relay 1
toggleState_1 = 0;
Serial.println("Device1 OFF");
}
delay(100);
break;
case 2:
if(toggleState_2 == 1){
digitalWrite(RelayPin2, LOW); // turn on relay 2
toggleState_2 = 1;
Serial.println("Device2 ON");
}
else{
E&C Department, JCE Belagavi Page 32
Mini project

digitalWrite(RelayPin2, HIGH); // turn off relay 2

E&C Department, JCE Belagavi Page 33


Mini project

toggleState_2 = 0;
Serial.println("Device2 OFF");
}
delay(100);
break;
case 3:
if(toggleState_3 == 1){
digitalWrite(RelayPin3, LOW); // turn on relay 3
toggleState_3 = 0;
Serial.println("Device3 ON");
}
else{
digitalWrite(RelayPin3, HIGH); // turn off relay 3
toggleState_3 = 1;
Serial.println("Device3 OFF");
}
delay(100);
break;
case 4:
if(toggleState_4 == 1){
digitalWrite(RelayPin4, LOW); // turn on relay 4
toggleState_4 = 0;
Serial.println("Device4 ON");
}
else{
digitalWrite(RelayPin4, HIGH); // turn off relay 4
toggleState_4 = 1;
Serial.println("Device4 OFF");
}
delay(100);
break;
default : break;
}
E&C Department, JCE Belagavi Page 34
Mini project

void with_internet(){
//Manual Switch Control
if (digitalRead(SwitchPin1) == LOW)
{ delay(200);
relayOnOff(1);
Blynk.virtualWrite(VPIN_BUTTON_1, toggleState_1); // Update Button Widget
}
else if (digitalRead(SwitchPin2) == LOW)
{ delay(200);
relayOnOff(2);
Blynk.virtualWrite(VPIN_BUTTON_2, toggleState_2); // Update Button Widget
}
else if (digitalRead(SwitchPin3) == LOW)
{ delay(200);
relayOnOff(3);
Blynk.virtualWrite(VPIN_BUTTON_3, toggleState_3); // Update Button Widget
}
else if (digitalRead(SwitchPin4) == LOW)
{ delay(200);
relayOnOff(4);
Blynk.virtualWrite(VPIN_BUTTON_4, toggleState_4); // Update Button Widget
}
}
void without_internet(){
//Manual Switch Control
if (digitalRead(SwitchPin1) == LOW)
{ delay(200);
relayOnOff(1);
}
else if (digitalRead(SwitchPin2) == LOW){
E&C Department, JCE Belagavi Page 35
Mini project

delay(200);
relayOnOff(2);
}
else if (digitalRead(SwitchPin3) == LOW)
{ delay(200);
relayOnOff(3);
}
else if (digitalRead(SwitchPin4) == LOW)
{ delay(200);
relayOnOff(4);
}
}

BLYNK_CONNECTED() {
// Request the latest state from the
server
Blynk.syncVirtual(VPIN_BUTTON_1);
Blynk.syncVirtual(VPIN_BUTTON_2);
Blynk.syncVirtual(VPIN_BUTTON_3);
Blynk.syncVirtual(VPIN_BUTTON_4);
}

// When App button is pushed - switch the state

BLYNK_WRITE(VPIN_BUTTON_1) {
toggleState_1 = param.asInt();
digitalWrite(RelayPin1, toggleState_1);
}

BLYNK_WRITE(VPIN_BUTTON_2) {
toggleState_2 = param.asInt();
digitalWrite(RelayPin2, toggleState_2);
}
E&C Department, JCE Belagavi Page 36
Mini project

BLYNK_WRITE(VPIN_BUTTON_3) {
toggleState_3 = param.asInt();
digitalWrite(RelayPin3, toggleState_3);
}

BLYNK_WRITE(VPIN_BUTTON_4) {
toggleState_4 = param.asInt();
digitalWrite(RelayPin4, toggleState_4);
}

void checkBlynkStatus() { // called every 3 seconds by SimpleTimer

bool isconnected = Blynk.connected();


if (isconnected == false) {
wifiFlag = 1;
digitalWrite(wifiLed, HIGH); //Turn off WiFi LED
}
if (isconnected == true) {
wifiFlag = 0;
digitalWrite(wifiLed, LOW); //Turn on WiFi LED
}
}
void setup()
{
Serial.begin(9600);

pinMode(RelayPin1,
OUTPUT);
pinMode(RelayPin2,
OUTPUT);
pinMode(RelayPin3,
OUTPUT);
pinMode(RelayPin4,
E&C Department, JCE Belagavi Page 37
Mini project

OUTPUT);

pinMode(wifiLed, OUTPUT);

E&C Department, JCE Belagavi Page 38


Mini project

pinMode(SwitchPin1,
INPUT_PULLUP);
pinMode(SwitchPin2,
INPUT_PULLUP);
pinMode(SwitchPin3,
INPUT_PULLUP);
pinMode(SwitchPin4,
INPUT_PULLUP);

//During Starting all Relays should TURN OFF


digitalWrite(RelayPin1, toggleState_1);
digitalWrite(RelayPin2, toggleState_2);
digitalWrite(RelayPin3, toggleState_3);
digitalWrite(RelayPin4, toggleState_4);
WiFi.begin(WIFI_SSID, WIFI_PASS);
timer.setInterval(3000L, checkBlynkStatus); // check if Blynk server is connected every 3
seconds
Blynk.config(AUTH);
}

void loop()
{
if (WiFi.status() != WL_CONNECTED)
{
Serial.println("WiFi Not Connected");
}
else
{
Serial.println("WiFi Connected");
Blynk.run();
}
timer.run(); // Initiates
SimpleTimer if (wifiFlag == 0)
E&C Department, JCE Belagavi Page 39
Mini project

with_internet();
else
without_internet();
}

E&C Department, JCE Belagavi Page 40


Mini project

REFERENCES
[1] I. Ganchev, Z. Ji, and M. O’Droma, “An IoT-based smart electric heating control
system: Design and implementation,” 2017 Ninth International Conference on
Ubiquitous and Future Networks (ICUFN), Jul. 2017, doi:
10.1109/icufn.2017.7993895.

[2] A. P.L., R. M, and M. T.S., “Zigbee Enabled Iot Based Intelligent Lane Control System
for Autonomous Agricultural Electric Vehicle Application,” SSRN Electronic Journal,
2022, doi: 10.2139/ssrn.4167072.

[3] F. Liu and S. Lai, “Simulation and Control System Optimization of Pure Electric
Vehicle Air Conditioning System Based on Multi-Objective Genetic Algorithm,” 2023
International Conference on Mechatronics, IoT and Industrial Informatics (ICMIII), Jun.
2023, doi: 10.1109/icmiii58949.2023.00059.

[4] F. Liu and S. Lai, “Simulation and Control System Optimization of Pure Electric
Vehicle Air Conditioning System Based on Multi-Objective Genetic Algorithm,” 2023
International Conference on Mechatronics, IoT and Industrial Informatics (ICMIII), Jun.
2023, doi: 10.1109/icmiii58949.2023.00059.

[5] A. Palaniappan, R. Muthiah, and M. Tiruchi Sundaram, “ZigBee enabled IoT based
intelligent lane control system for autonomous agricultural electric vehicle
application,” SoftwareX, vol. 23, p. 101512, Jul. 2023,doi:
10.1016/j.softx.2023.101512.

[6] X. Wang, D. Gao, T. Wang, and X. Xu, “Research on Thrust Distribution Control
Strategy of Ship Electric Propulsion System Based on Model Predictive Control,” 2018
International Symposium in Sensing and Instrumentation in IoT Era (ISSI), Sep. 2018,
doi: 10.1109/issi.2018.8538119.

[7] Md. R. Haque and Md. A. Razzak, “A Buck Converter-based Battery Charging
Controller for Electric Vehicles using Modified PI Control System,” 2021 IEEE
International IOT, Electronics and Mechatronics Conference (IEMTRONICS), Apr.
2021, doi: 10.1109/iemtronics52119.2021.9422646.

[8] D. Herdika and E. Fitriani, “Prototype of Electric Power Monitoring System and Load
Control in Residential Houses Using IoT-Based ESP8266,” Jurnal Ampere, vol. 7, no. 2,
E&C Department, JCE Belagavi Page 41
Mini project

p. 84, Dec. 2022, doi: 10.31851/am- pere.v7i2.9214.

E&C Department, JCE Belagavi Page 42


Mini project

[9] P. Sivaraman and C. Sharmeela, “IoT-Based Battery Management System for Hybrid
Electric Vehicle,” Artificial Intelligent Techniques for Electric and Hybrid Electric
Vehicles, pp. 1–16, Jul. 2020, doi: 10.1002/9781119682035.ch1.

[10] M. H. Rehman, A. Alam, and A. Q. Ansari, “Design of a cost-effective IoT based Battery
Management Sys- tem for Electric Vehicles,” 2023 International Conference on Power,
Instrumentation, Energy and Control (PIECON), Feb. 2023, doi:
10.1109/piecon56912.2023.10085853.

E&C Department, JCE Belagavi Page 43

You might also like