Mini PROJECT Report
Mini PROJECT Report
Bachelor of Engineering
in
Electrical & Electronics Engineering
by
B T SHASHANK KEERTHANA D V
(4MC20EE007) (4MC20EE032)
MANJUNATH S S NANDINI K S
(4MC20EE038) (4MC20EE046)
2023
Malnad College of Engineering
(An Autonomous Institution under Visvesvaraya Technological University, Belgavi)
Hassan – 573202
Department of Electrical & Electronics Engineering
CERTIFICATE
Certified that the Mini-Project Work titled
GUI-BASED HOME AUTOMATION SYSTEM
is a bonafide work carried out by
B T SHASHANK KEERTHANA D V
(4MC20EE007) (4MC20EE032)
MANJUNATH S S NANDINI K S
(4MC20EE038) (4MC20EE046)
during the year 2023. It is certified that all corrections/suggestions indicated for Internal Assessment have
been incorporated in the Project report deposited in the Department Library. The Project Report has been
approved, as it satisfies the academic requirements regarding Mini-Project Work prescribed for the
Bachelor of Engineering Degree.
External Viva
Name of the Examiners Signature with Date
1.
2.
1
ACKNOWLEDGEMENT
We would like to express our gratitude to all those who contributed to the successful completion of
this GUI-Based Home Automation System project using Blynk.
First and foremost, we extend our appreciation to the developers of the Blynk platform, whose
innovative tools and resources enabled us to create a seamless and user-friendly interface for
controlling and monitoring home devices.
We extend our sincere gratitude and deep respect to Mr. G T ARJUN, Assistant Professor in the
Department of Electrical and Electronics Engineering, for her invaluable guidance and insightful
interactions.
Special thanks are due to Dr. M Ramesh, Assistant Professor and Project Coordinator in the
same department, for his unwavering encouragement, which played a pivotal role in the
successful completion of our project within the designated timeframe.
We would also like to express our appreciation to Dr. N S Jyothi, Professor and Head of the
Department of Electrical and Electronics Engineering at MCE, Hassan, for consistently offering
support and motivation throughout this project.
Our heartfelt thanks go to Dr. N S Pradeep, the Principal of MCE, Hassan, for fostering an
exceptional academic environment that greatly contributed to our project's success.
Lastly, we extend our gratitude to all the teaching and technical staff members of the Department
of Electrical and Electronics Engineering, as well as to our friends, for their cooperation and
assistance in the execution of this project.
B T SHASHANK
KEERTHANA D V
MANJUNATH S S
NANDINI K S
2
ABSTRACT
This project presents the development of a graphical user interface (GUI)-based home automation system
leveraging the Blynk platform. The system integrates various components, including a NODEMCU
ESP8266, DHT11 temperature sensor, 4-channel relay module, 1293D motor driver, 6V DC motor fan,
light bulbs, and their holders. The primary objective is to enable users to remotely control and monitor their
home devices through a smartphone application.
The Blynk app serves as the user interface, allowing users to control four light bulbs individually, monitor
real-time temperature using the DHT11 sensor, and regulate the speed of a 6V DC motor fan. Equipped
with appropriate libraries and connected to the NodeMCU, serves as the microcontroller managing the
hardware components. The system is powered by a 9V battery, providing a wireless and convenient solution
for home automation.
The step-by-step guide covers the installation of the Blynk app, creation of a BLYNK PROJECT, design of
the GUI interface, setup of the ARDUINO IDE, coding of the Arduino script, and the physical connection of
hardware components. The project aims to offer a versatile and user-friendly home automation solution,
demonstrating the potential of IoT technologies and mobile applications in enhancing household
convenience and energy efficiency.
3
List Of Figures
Nomenclature
4
CONTENTS
Page No.
Acknowledgment ⅰ
Abstract ⅰⅰ
List of Figures ⅲ
Nomenclature ⅳ
1. Introduction
1.1 Objectives
1.2 Scope of the Project
2. System Overview
2.1 Architecture
2.2 Components Used
5. Hardware Connections
5.1 Circuit
5.2 Block Diagram
6. Code Explanation
5
7. Powering Up the System
7.1 Connecting the 9V Battery
7.2 NodeMCU Power Source Setup
7.3 Uploading Code to NodeMCU
10. Conclusion
11. References
6
1. INTRODUCTION
Home automation has become an integral part of modern living, offering convenience,
energy efficiency, and enhanced control over household devices. This project introduces a
GUI-Based Home Automation System that utilizes the Blynk platform, NodeMCU
ESP8266, and various sensors and actuators to create a versatile and user-friendly smart
home solution.
1.1 Objectives
Remote Control: Enable users to remotely control and monitor home devices through a
graphical user interface (GUI) provided by the Blynk mobile application.
Integration of Components: Integrate components such as a 4-channel relay for light control,
a DHT11 temperature sensor, a 1293D motor driver for a DC fan, and NodeMCU ESP8266
for seamless communication.
Fig 1.1
7
1.2 Scope of the Project
Lighting Control: Implement the control of multiple light bulbs using a 4-channel relay
module, allowing users to independently manage lighting in different rooms or zones.
DC Motor Fan Control: Utilize a 6V DC motor fan controlled by a 1293D motor driver,
enabling users to adjust the fan speed for personalized comfort.
Blynk Platform: Leverage the Blynk platform for its simplicity and versatility in creating a
customized mobile application interface for efficient home device management.
This introduction sets the stage for a comprehensive exploration of the design,
implementation, and functionality of the GUI-based home Automation System using Blynk
and the specified hardware components.
Fig 1.2
8
2. SYSTEM OVERVIEW
2.1 Architecture
The home automation system is designed with a modular and scalable architecture to provide
efficient control and monitoring of household devices. At its core is the NodeMCU
ESP8266, a versatile and WiFi-enabled microcontroller that serves as the central processing
unit. The architecture leverages the Blynk platform for seamless communication between the
NodeMCU and the user's mobile device.
Fig 2.1
The system incorporates a set of essential components, including a 4-channel relay for
controlling light bulbs, a DHT11 temperature sensor for environmental monitoring, an
L293D motor driver to regulate the speed of a 6V DC motor fan, and the Blynk app for
intuitive user interface and remote access.
Fig 2.2
9
3. BLYNK PLATFORM SETUP
1. Download Blynk App:
Install the Blynk app on your smartphone. It is available for both iOS and
Android.
Fig 3.1
Fig 3.2
10
Blynk will email you an Auth Token. Note this token, as it will be used in
the Arduino code.
5. Project Dashboard:
Once your project is created, you'll be directed to the project dashboard.
Drag and drop widgets onto the dashboard to control and monitor your
devices.
Fig 3.3
11
Fig 3.4
Fig 3.5
10.WiFi Configuration:
In the Arduino code, provide your WiFi credentials by replacing
"YourWiFiSSID" and "YourWiFiPassword" with your actual WiFi
credentials.
Fig 3.6
13
Fig 3.7
Arduino IDE configuration is a crucial step in setting up the software side of your home
automation system. Follow these steps to ensure the correct setup for your NodeMCU
ESP8266:
14
4.3 Define DHT Sensor Pin and Type:
Declare the pin to which the DHT sensor is connected and its type (DHT11, DHT21,
or DHT22):
15
4.7 Temperature Reading:
In the loop() function, read the temperature from the DHT sensor:
With these configurations, your Arduino code is ready to interface with the Blynk
platform and control the home automation system. Make sure to customize the code
according to your specific hardware connections and requirements.
16
Fig 4.1
5. HARDWARE CONNECTIONS
Setting up the hardware connections is a critical step in ensuring the proper functionality of
your home automation system. Below is a guide on how to connect the components:
5.1 Circuit:
- NodeMCU Connections:
Connect the NodeMCU ESP8266 to your computer via USB for programming.
Connect the DHT11 temperature sensor to a digital pin (i.e., D2).
Connect the L293D motor driver control pins to the appropriate digital pins
(i.e., D1).
Connect the relay control pins to specific digital pins (i.e., D3, D4, D5, D6).
- Power Supply:
- Relay Connections:
Connect each relay's common (COM) terminal to the power source (e.g., 220V
for light bulbs).
Connect the normally open (NO) terminal of each relay to the corresponding
light bulb.
17
- DHT11 Temperature Sensor:
Connect the DHT11's VCC pin to the 3.3V output on the NodeMCU.
Connect the DHT11's GND pin to the NodeMCU's ground (GND) pin.
Connect the DHT11's data pin to the digital pin defined in the code (i.e., D2).
Fig 5.1
18
5.2 Block Diagram:
Fig 5.2
19
5.3 Flow Chart:
20
Fig 5.3
6 CODE EXPLANATION
21
This Arduino code is designed for an ESP8266 microcontroller to work with the Blynk
IoT platform. The ESP8266 is a popular Wi-Fi module, and Blynk is a platform that allows
you to control and monitor IoT devices over the internet.
22
6.2 Blynk Configuration:
#define BLYNK_PRINT Serial: Define the printing method for
Blynk to use Serial communication for debugging.
6.3 Libraries:
The code includes necessary libraries: ESP8266WiFi for Wi-Fi
connectivity, BlynkSimpleEsp8266 for Blynk integration, and
DHT for interfacing with the DHT11 sensor.
23
Pins V1 to V4 control four relays, and V5 controls motor speed
using PWM.
The mapSpeed function maps motor speed levels to PWM values.
Overall, the code allows you to control four relays and a motor speed using the Blynk
app. Additionally, it reads temperature and humidity data from a DHT11 sensor and sends
that data to the Blynk app as well.
24
7 POWERING UP THE SYSTEM
25
Monitor Serial Output:Open the Serial Monitor in the Arduino IDE
to monitor any debug or status messages from the NodeMCU.
Ensure that the NodeMCU successfully connects to the WiFi
network.
26
9.3 Troubleshooting Common Issues:
- WiFi Connection Issues:
Check the WiFi credentials in the Arduino code. Ensure they are
correct.
Confirm that the NodeMCU is within range of the WiFi network.
- Blynk Token Issues:
Double-check the Auth Token in the Arduino code. It must match
the one generated in the Blynk app.
Verify that the Auth Token is placed correctly in the code.
- Relay and Motor Driver Wiring:
Review the wiring of relays and the motor driver. Incorrect
connections may lead to malfunction.
Ensure that all ground connections are properly established.
- Serial Monitor Debugging:
Utilize the Serial Monitor in the Arduino IDE to monitor debug
messages from the NodeMCU.
Inspect error messages or warnings that may provide insights into
issues.
- Power Supply Issues:
Check the 9V battery voltage. If it drops significantly, it might
affect the stability of the system.
Ensure all power connections are secure and free from
interruptions.
- Sensor Readings:
If the temperature readings are inconsistent, inspect the DHT11
sensor connections.
Check for loose wires and verify the sensor is correctly powered.
27
- Blynk Widget Configuration:
Review the widget settings in the Blynk app. Ensure the pins
configured in the app match those defined in the Arduino code.
- Update Libraries:
Ensure that you are using the latest versions of the Blynk and DHT
libraries.
Update the libraries in the Arduino IDE if necessary.
- Physical Inspection:
Visually inspect all components and connections.
Look for loose wires, shorts, or any visible signs of damage.
- Reset and Reupload:
In some cases, resetting the NodeMCU and reuploading the code
may resolve certain issues.
Fig 9.1
28
10. CONCLUSION
The implementation of the home automation system utilizing the Blynk platform and the
NodeMCU ESP8266 has provided an efficient and user-friendly solution for remote control
and monitoring of household devices. The successful integration of components, including
the 4-channel relay, DHT11 temperature sensor, and L293D motor driver, has resulted in a
versatile system that caters to lighting control, environmental monitoring, and fan speed
regulation.
Through the Blynk app, users can seamlessly interact with the system, toggling light bulbs,
adjusting fan speed, and monitoring real-time temperature data. The modular architecture
allows for easy expansion and customization, making the system adaptable to evolving
needs.
The project has not only demonstrated the capabilities of IoT technologies in the realm of
home automation but has also served as a practical guide for enthusiasts looking to build
similar systems. The use of the Blynk platform simplifies the development process,
providing an intuitive interface for users to interact with their smart home environment.
In conclusion, the home automation system showcases the potential for creating accessible
and effective smart home solutions. The successful combination of hardware components,
Arduino programming, and Blynk platform integration establishes a foundation for further
exploration and enhancement in the realm of home automation. As technology continues to
advance, such projects contribute to the evolution of smart living, offering both convenience
and energy efficiency.
29
11. REFERENCES
1. Blynk. (n.d.). Blynk - IoT for Arduino, ESP8266, Raspberry Pi. https://blynk.io/
2. Adafruit Industries. (n.d.). DHT11 Basic temperature & humidity sensor + extras.
https://www.adafruit.com/product/386
https://www.ti.com/product/L293D
https://nodemcu.readthedocs.io/en/release/
https://github.com/blynkkk/blynk-library
https://learn.adafruit.com/adafruit-motor-selection-guide
30