Final Report (Format)
Final Report (Format)
Submitted By
Supervised by
Md. Sadik Al Rayhan
Lecturer, Dept. of EEE
University of Scholars
We hereby declare that we carried out the work reported in this project in the Department of
Electrical and Electronic Engineering, University of Scholars, under the supervision of Md.
Sadik Al Rayhan. We solemnly declare that to the best of our knowledge no part of this report
has been submitted elsewhere for award of a degree. All sources of knowledge used have been
duly acknowledged. The Department of EEE reserves all rights to use, modify, publish,
reproduce or distribute any part of the project for academic, research, promotional or other
official purposes.
Signature:
------------------------------------- -------------------------------
Md. Emran Hosain Md. Mahamud Hasan
ID: 212020182 ID: 212020183
------------------------------------- -------------------------------
Abdul Mutakin Nijam Uddin
ID: 212020191 ID: 212020291
-------------------------------------
Supervisor
Md. Sadik Al Rayhan
Lecturer, Dept. of EEE
Faculty of Engineering
University of Scholars
Page | I
Certificate
This is to certify that the major project entitled “Smart and Secure Home Automation
System with Wireless Technology”, submitted by Md. Emran Hosain, Md. Mahamud
Hasan, Abdul Mutakin, and Nijam Uddin, students of the Department of Electrical and
Electronic Engineering, University of Scholars, Dhaka, is being submitted in partial fulfillment
of the requirements for the award of the degree of Bachelor of Science in Electrical and
Electronic Engineering.
This project report is a bonafide record of the work carried out by the aforementioned students
under my supervision and guidance. To the best of my knowledge, the work embodied in this
dissertation has attained the requisite academic standards and is suitable for submission in
accordance with the rules and regulations of the university.
Page | II
Acknowledgement
The successful completion of this project would not have been possible without the support and
guidance of many individuals. We take this opportunity to express our heartfelt gratitude to all
those who contributed to this endeavor.
Firstly, we thank Almighty God for His blessings, guidance, and support throughout our lives,
helping us overcome challenges and achieve our goals.
We would like to extend our sincere thanks to Md. Sadik Al Rayhan, Lecturer, Department of
Electrical and Electronic Engineering, University of Scholars, for granting us the opportunity to
undertake this project and providing invaluable guidance whenever needed.
Our deepest appreciation goes to Shaiyek Md. Buland Taslim, Assistant Professor and Head of
the Department of Electrical and Electronic Engineering, for his encouragement, inspiration, and
consistent support throughout the project. His leadership has been instrumental in our academic
journey.
We would also like to express our gratitude to all the faculty and staff members of the
Department of Electrical and Electronic Engineering for their assistance, cooperation, and the
necessary facilities provided, which greatly contributed to the completion of the project.
A special thank you to our parents for their unwavering support, constant encouragement, and
motivation throughout the course of this project. Their belief in us has been a constant source of
strength.
Lastly, we would like to thank our friends and well-wishers for their help, cooperation, and the
insightful solutions they provided during the various stages of the project.
Page | III
Abstract
This project presents the design and implementation of a smart home automation system that
emphasizes user convenience, safety, and energy efficiency through the integration of IoT and
wireless technologies. The system utilizes the ESP32 microcontroller as the central unit,
interfacing with various sensors and output devices to monitor and control household
environments in real-time. Key components include a DHT11 sensor for temperature and
humidity monitoring, a gas sensor for hazardous gas detection, and a flame sensor for fire safety.
The appliances and security mechanisms are controlled using a relay module that activates
devices like lights, fans, buzzers, and a solenoid lock based on sensor input or user commands.A
dual-mode control system has been implemented, enabling appliance management through voice
commands and a mobile application using the Blynk platform. Voice control provides hands-free
interaction, while the Blynk app offers a user-friendly interface for remote monitoring and
control via Bluetooth. The Arduino IDE was used for software development, facilitating rapid
prototyping and system programming.This project showcases a scalable and cost-effective
prototype tailored for smart home applications. Its modular architecture supports future
upgrades, such as mobile app integration, cloud connectivity, and data logging for remote
diagnostics and environmental analytics. The design emphasizes reliability, user safety, and
adaptability, making it a strong foundation for further development in the field of home
automation and the Internet of Things (IoT).
Page | IV
Table of Contents
Title Page
Declaration I
Certificate II
Acknowledgements III
Abstract IV
Table of Contents V
List of Figures VII
Chapter I Introduction 1
1.1 Introduction 2
1.2 Literature Review 2
1.3 Motivation 4
1.3 Objectives 4
1.4 Dissertation Organization 5
3.1 Hardware 12
3.1.1 ESP32 Wi-Fi Module 12
3.1.2 Relay Module 12
3.1.3 Gas Detector Sensor 13
3.1.4 DHT 11 Sensor 14
3.1.5 Flame Sensor 15
3.1.6 SG-90Servo Motor 15
3.1.7 LED Light 16
3.1.8 LCD Display (16×2) 17
3.1.9 Solenoid Lock 17
Page | V
3.1.10 Buzzer 18
Title Page
3.1.11 DC Motor 19
3.1.12 SPST Switch 20
3.2 Software 21
3.2.1 Arduino IDE 21
3.2.2 Blynk Application 31
3.2.3 IFTTT Integration for Voice Control 32
Chapter V Conclusion 37
5.1 Conclusion 38
5.2 Future Scope 39
References 40
Page | VI
List of Figures
Figure No Description Page
Page | VII
Chapter I
Introduction
Chapter Outlines
1.1 Introduction
1.2 Literature Review
1.3 Motivation
1.4 Objectives
1.5 Dissertation Organization
Page | 1
1.1 Introduction
The concept of home automation, once limited to science fiction and luxury living, has rapidly
transitioned into a practical and accessible solution for modern households. Smart home
automation refers to the integration of various electrical and electronic appliances within a home
environment into a centralized or remotely accessible system that enables intelligent control and
monitoring. This convergence of hardware and software technologies is driven by the growing
demand for convenience, energy efficiency, improved security, and better management of
household operations.
This project presents the design and development of a Smart Home Automation System that
unifies three distinct modes of control-manual operation, Bluetooth-based remote control, and
voice-activated command execution. The system is designed with the objective of enhancing
user interaction while promoting energy-efficient operation of household appliances. It
emphasizes simplicity in design, affordability in implementation, and scalability for future
enhancements. The proposed solution aims to bridge the gap between basic electrical control
systems and advanced smart home platforms, thereby contributing to the broader goal of
accessible and adaptive automation solutions for everyday life.
Smart home automation systems have gained significant attention over the past two decades due
to their potential to enhance convenience, energy efficiency, and security in residential
environments. Early efforts focused on wireless communication technologies, such as Bluetooth,
to enable device control within homes. Sriskanthan et al. (2002) demonstrated one of the
pioneering Bluetooth-based home automation systems, which provided remote control of
electrical appliances through mobile devices, setting a foundation for subsequent development
[1]. As wireless sensor networks became more accessible, Xu et al. (2010) proposed a smart
home system leveraging these networks to facilitate sensor integration and device coordination,
enhancing the system’s scalability and responsiveness [2].
Page | 2
With the rise of the Internet of Things (IoT), smart homes evolved into complex ecosystems
capable of real-time monitoring and control via internet-connected devices. Sepasgozar et al.
(2020) reviewed the integration of artificial intelligence and IoT in smart homes, highlighting
how AI-driven automation improves system adaptability to user behavior and environmental
changes [3]. However, increased connectivity introduces critical security and privacy challenges.
Hall et al. (2020) extensively discussed these vulnerabilities, emphasizing the need for robust
protocols to protect user data and prevent unauthorized access in smart home environments [4].
User acceptance and practical adoption remain key themes in recent research. Marikyan et al.
(2019) conducted a comprehensive review focusing on user perspectives, noting that usability,
reliability, and seamless integration with daily routines are crucial for wider acceptance of smart
home technologies [5]. Furthermore, advances in automation configuration have been explored
by Anik et al. (2024), who identified challenges in system interoperability and proposed novel
approaches to simplify device management and enhance user control [6].
Several studies emphasize the transformative role of IoT in health monitoring and assistive
technologies within smart home environments. Islam et al. (2015) conducted a comprehensive
survey highlighting how IoT facilitates healthcare applications such as remote patient
monitoring, chronic disease management, and emergency response systems, thereby expanding
the functionality of smart homes well beyond basic appliance automation [7]. Complementing
this, Gubbi et al. (2013) proposed scalable architectural models for IoT-enabled smart homes that
integrate a variety of sensors and actuators, enabling real-time data acquisition and device
control while maintaining cost-effectiveness and energy efficiency [8].
Building on these advances, our project focuses on developing a smart home automation system
that integrates manual control, Bluetooth-based remote access, and voice command functionality.
This multi-modal control approach enhances user convenience, adaptability, and accessibility,
particularly for users with mobility challenges or varying technological preferences. The system
is designed with affordability and scalability in mind, utilizing widely available microcontrollers,
sensors, and open-source platforms to ensure cost-effective implementation. Furthermore, by
combining real-time control with local wireless communication and intuitive voice interfaces, the
Page | 3
project aims to deliver a reliable, responsive, and user-friendly smart home experience suitable
for both urban and rural household environments.
1.3 Motivation
In the modern world, the demand for smart and secure living environments is growing rapidly.
As urbanization increases and lifestyles become busier, there is a strong need for systems that not
only simplify everyday tasks but also ensure safety and security. Traditional home systems lack
real-time response, remote accessibility, and intelligent decision-making, making them
insufficient for today’s needs.
The rapid advancement in Internet of Things (IoT), wireless communication, and low-cost
microcontrollers such as the ESP32 has created a tremendous opportunity to develop intelligent
systems that combine home automation and security features in a single platform. The ability to
control and monitor home appliances and environmental conditions remotely—along with
detecting hazards such as gas leaks or fire—can significantly reduce risks and improve quality of
life.
This project is motivated by the vision of creating a smart, safe, and efficient living space that
empowers users through real-time data, automated control, and instant alerts. The aim is to offer
a practical, affordable, and scalable solution that integrates everyday convenience with safety—
transforming a traditional house into a smart home.
1.4 Objectives
The primary objectives of the “Smart and Secure Home Automation System with Wireless
Technology” project are as follows:
To design and implement an affordable and user-friendly home automation system that
allows centralized control of various household appliances using commonly available
devices such as smartphones.
To integrate multiple modes of control—including manual switches, Bluetooth-based
remote control, and voice commands—to provide flexibility and accessibility for all types
of users.
To utilize Wi-Fi or Bluetooth technology for seamless and wireless communication
between the control unit and household devices, ensuring ease of installation and
scalability.
To enhance energy efficiency and security by enabling remote monitoring and control of
devices such as lighting systems, fans, and door locks.
Page | 4
To reduce the complexity and cost of installation, making the system suitable for both
urban and rural settings.
To demonstrate the potential of IoT and mobile technology in simplifying daily life,
improving convenience, and ensuring a smarter living environment.
The work presented in this dissertation is organized into five well-defined chapters, each
focusing on a specific aspect of the Smart and Secure Home Automation System with Wireless
Technology. This structured approach is designed to enhance comprehension and ensure a logical
flow of information throughout the document. Before delving into the detailed chapters, a
preliminary outline of the report is provided to guide the reader:
Chapter I-Introduction
This chapter provides a comprehensive overview of the project. It begins with a general
introduction to home automation systems, followed by a review of related literature highlighting
previous works in the domain. It also discusses the motivation behind undertaking the project
and outlines the key objectives.
Page | 5
Chapter II
Project Layout
Chapter Outlines
Page | 6
2.1 Hardware Components Required
The hardware required for the Smart Home Automation and Safety Monitoring System is
selected to ensure environmental monitoring, emergency alerting, and smart control of home
appliances. Below is a list of the components used:
Table 2.1:
Components Description
Figure 2.1: Block diagram of smart home automation and security system.
Depending on the sensor readings, the ESP32 controls various actuators and output modules. In
the case of high temperature or gas detection, the ESP32 triggers the fan to improve ventilation
and activates a buzzer to alert nearby occupants. The solenoid lock, connected through a relay
module, can be engaged or disengaged depending on the presence of a threat or upon user
command, providing an extra layer of safety. Similarly, the LED serves as a visual indicator of
system status, while the LCD display is used to present real-time sensor data and warning
messages, ensuring the user remains informed. The system is powered by a battery, with a
manual switch included for system reset or emergency control. All power and signal connections
are routed through proper isolation and interfacing circuits to ensure both electrical safety and
operational reliability.
Page | 8
The connection diagram of the proposed smart home automation system, as shown in Figure 2.2,
represents the complete wiring layout of the hardware components integrated into the project. At
the core of the circuit is the microcontroller, which coordinates all sensing and actuation
operations. The microcontroller is connected to several input devices including a gas sensor,
flame sensor, and humidity sensor. These sensors are interfaced through the GPIO pins to allow
real-time monitoring of environmental parameters. Additionally, three push buttons are wired to
function as manual inputs for controlling specific operations, such as activating or deactivating
appliances or triggering alerts.
The output section of the circuit consists of components such as a solenoid lock, LED light,
buzzer, and a fan. Since some of these devices operate at higher currents, they are interfaced
through relay modules, allowing the microcontroller to control them safely. The solenoid lock is
triggered based on specific input conditions, offering security control, while the fan and LED
respond to environmental readings. An LCD display is included and connected to the
microcontroller using multiple digital pins. It displays real-time sensor values and system status,
serving as a basic user interface. The buzzer, directly connected to an output pin, provides an
audible alert during emergency conditions like gas leaks or fire detection.
Power to the entire circuit is supplied through a battery pack connected via an on-off switch,
allowing manual control of the system’s power state. Proper grounding and power rail
distribution are maintained throughout the circuit to ensure stable performance and prevent noise
Page | 9
or signal loss. The design in Figure 2.2 clearly shows the logical and physical interconnection of
all components, ensuring that the system functions reliably under various conditions. This layout
provides a practical foundation for home automation, enabling both automatic responses and
manual overrides.
Chapter III
Page | 10
Hardware & Software
Chapter Outlines
3.2 Software
3.2.1 Arduino IDE
3.2.2 Blynk Application
3.2.3 IFTTT Integration for Voice Control
Page | 11
monitor environmental parameters, respond to user commands, and ensure safety and comfort
within the home. The components listed below form the physical foundation of the system and
are essential for achieving automated control and real-time feedback in a smart home
environment.
Page | 12
Figure 3.2: Relay module
Working Principle
The relay uses an electromagnetic coil that, when energized by a control signal (typically
3.3V or 5V), creates a magnetic field.
This magnetic field moves a mechanical armature, which closes or opens the circuit
connected to the high-voltage side.
Most modules feature opto-isolation to protect the microcontroller from voltage spikes.
A Gas Sensor is an electronic device that detects the presence and concentration of gases in the
environment. It converts chemical or physical changes in the air into electrical signals that can be
read by microcontrollers like Arduino or ESP32.
Page | 13
Working Principle
Gas sensors operate by sensing gas molecules through a sensitive material (often a metal-oxide
semiconductor) that changes its resistance when exposed to specific gases. The change in
resistance is translated into a voltage signal, which corresponds to gas concentration.
3.1.4DHT11 Sensor
The DHT11 is a low-cost digital temperature and humidity sensor widely used in embedded and
IoT applications. It provides calibrated digital output, making it easy to interface with
microcontrollers like Arduino, ESP32, and Raspberry Pi.
Working Principle
The sensor processes data internally and sends it to the microcontroller as a digital signal over a
single data wire, using a proprietary 1-wire protocol.
Page | 14
3.1.5 Flame Sensor
A Flame Sensor is a device designed to detect the presence of flame or fire by sensing infrared
(IR) light radiation emitted by a flame. It is commonly used in fire detection and safety systems.
Working Principle
The sensor uses an IR receiver diode or phototransistor that is sensitive to wavelengths typically
emitted by fire (760–1100 nm). When a flame is detected, the sensor outputs a digital signal
(LOW) to indicate its presence.
The SG90 is a compact, lightweight micro servo motor widely used in robotics, automation, and
embedded systems. It provides precise control over angular motion, making it ideal for tasks like
positioning, rotation, and actuation in small-scale projects.
Page | 15
Working Principle
The SG90 operates using Pulse Width Modulation (PWM). The motor shaft angle is controlled
by varying the width of the input pulse:
A Light Emitting Diode (LED) is a semiconductor device that emits light when current flows
through it. Unlike traditional incandescent bulbs, LEDs are energy-efficient, have a long
lifespan, and produce less heat. They are widely used in a variety of applications, including
indicator lights, displays, and lighting systems.
Working Principle
LEDs work based on the principle of electroluminescence. When a voltage is applied to the
LED, electrons recombine with holes in the semiconductor material, releasing energy in the form
of photons (light). The color of the light emitted depends on the material used and the energy gap
between the electron and hole.
Page | 16
3.1.8 LCD Display (16×2)
A Liquid Crystal Display (LCD) is a flat-panel display technology commonly used for
presenting alphanumeric data, images, and graphics in embedded systems, electronic devices,
and user interfaces. It uses liquid crystals that change their optical properties in response to
electrical signals.
Working Principle
LCDs work by passing light through liquid crystal layers that control the passage of light. When
voltage is applied, the liquid crystals align to either block or allow light, creating visible text or
images. Most small LCD displays, like 16x2 or 20x4, are alphanumeric, displaying text in rows
and columns.
3.1.9Solenoid Lock
Page | 17
Figure 3.9: Solenoid lock
Working Principle
When an electrical current is applied to the solenoid coil, it generates a magnetic field.
The magnetic field moves a plunger inside the solenoid, either locking or unlocking the
mechanism.
Power OFF: The solenoid returns to its default state (lock or unlock) depending on the
configuration.
Solenoid locks typically include a spring mechanism to return the plunger to its resting
position when the power is removed.
3.1.10 Buzzer
A Buzzer is an audio signaling device that produces sound when powered. It is commonly used
in electronic projects and embedded systems to alert users to specific events or conditions, such
as alarms or notifications.
Page | 18
Working Principle
Active Buzzer: Contains an internal oscillator, and it produces sound as soon as power is
applied.
Passive Buzzer: Requires an external signal (typically a PWM or square wave) to
generate sound. It can produce different tones depending on the frequency of the signal.
3.1.11 DC Motor
A DC (Direct Current) Motor is an electromechanical device that converts electrical energy into
mechanical motion. It operates on direct current (DC) electricity, where the direction and speed
of the motor can be controlled by varying the voltage or polarity of the supply.
Working Principle
A DC motor consists of a stator (stationary part) and a rotor (moving part). When DC voltage is
applied, current flows through the armature, generating a magnetic field that interacts with the
stationary magnetic field (created by permanent magnets or electromagnets). This interaction
causes the rotor to rotate. The commutator in the motor periodically reverses the direction of
current to ensure continuous rotation in the same direction.
Page | 19
3.1.12 SPST Switch (Single Pole Single Throw)
An SPST (Single Pole Single Throw) switch is the simplest type of electrical switch used to
control a circuit. It has two states: open (off) and closed (on). It allows or interrupts the flow of
current in a circuit by connecting or disconnecting a single path (pole) with a single action
(throw).
Working Principle
Open (Off): The switch is in the "open" position, and the circuit is broken, meaning no
current flows through it.
Closed (On): When pressed or flipped, the switch closes the circuit, allowing current to
flow from the power source to the connected load.
Page | 20
3.2 Software
The software implementation of this smart home automation system is integral to enabling
seamless communication between hardware components and end-user control interfaces. The
system’s intelligence and automation capabilities are realized through a well-structured software
framework, which involves microcontroller programming, mobile application configuration, and
integration with cloud-based services.
The Arduino Integrated Development Environment (IDE) plays a central role in developing the
logic and control structure of the smart home automation system. It is a powerful and open-
source software platform that supports various microcontrollers, including the ESP32, which is
used in this project. The Arduino IDE provides a code editor and compiler, enabling developers
to write, verify, and upload programs to the ESP32 via a USB interface. The programming is
done using a simplified version of C/C++, making it accessible even for beginners.
In this project, the control program is developed using the Arduino IDE and includes numerous
functional blocks that govern how the microcontroller interacts with each connected component.
Libraries such as WiFi.h,DHT.h, and BlynkSimpleEsp32.h are utilized to facilitate wireless
communication, environmental sensing, and remote monitoring through the Blynk platform. The
setup function initializes all the hardware components, while the loop function continuously
reads sensor data, processes inputs, and controls the actuators accordingly.
To ensure smooth operation and reliable performance, conditional logic is incorporated to define
how the system responds to various sensor readings. For example, when the gas sensor detects a
harmful level of gas, the buzzer is triggered to alert the occupants. Similarly, the DHT11 sensor
measures temperature and humidity values, which are updated to the Blynk app in real-time. The
modular structure of the code enables easy modification and testing, promoting scalability and
adaptability for future improvements.
The following section presents the complete source code developed for this smart home
automation system. Each segment of the code is accompanied by detailed explanations to clarify
its role in achieving the intended functionality.
Page | 21
Source Code and Explanation
This section includes all the necessary libraries for the project. The BluetoothSerial library
enables Bluetooth communication, Wire and LiquidCrystal_I2C are for controlling the LCD via
the I2C protocol, DHT handles the temperature and humidity sensor, and ESP32Servo is for
controlling the servo motor on the ESP32 board.
Here, objects are created to manage the Bluetooth serial communication and the LCD display.
The LCD is set up with the I2C address 0x27 and configured as a 16 by 2 characters display.
This section defines the GPIO pins on the ESP32 board for different components such as the
relay controlling the door, the light, the buzzer, the DHT11 sensor, gas and flame sensors, three
Page | 22
buttons, the servo motor, and the fan. Defining these pins makes the code easier to read and
modify.
The DHT sensor is initialized on the specified pin and with the defined sensor type (DHT11).
Similarly, a servo motor object is created to control the servo connected to the assigned pin.
Three boolean variables are declared to keep track of the current states of the door, light, and fan.
Initially, all are set to false, indicating that all devices are turned off.
In the setup function, the serial communication is started at 115200 baud rate for debugging
purposes, and the Bluetooth serial communication is initialized with the device name
"ESP32_BT" to allow Bluetooth pairing.
Page | 23
This block sets the pin modes for all the devices. The relay, light, buzzer, and fan pins are set as
outputs, while the flame sensor and gas sensor pins are inputs. The buttons are configured as
inputs with internal pull-up resistors enabled to ensure stable readings.
All the output devices are initialized to the OFF state by writing LOW to their pins at the
beginning of the program.
The DHT sensor is started, and the LCD is initialized with the backlight turned on. A welcome
message "System Ready!" is displayed on the LCD for two seconds to indicate that the system
has started successfully.
Page | 24
The servo motor is configured to operate at 50 Hz frequency, attached to the designated pin, and
initially set to 20 degrees which represents the closed door position.
In the main loop, when Button 1 is pressed, the buzzer beeps once to acknowledge the input. The
code then toggles the light state: if the light is currently on, it turns it off and updates the LCD
accordingly; if the light is off, it turns it on and updates the LCD. A delay of one second is added
to prevent multiple rapid triggers.
Page | 25
When Button 2 is pressed, the buzzer beeps once. This button toggles the door state: if the door
is open, it smoothly moves the servo motor to the closed position, turns off the relay, updates the
LCD, and sets the door state to false. If the door is closed, it turns on the relay, updates the LCD,
moves the servo to the open position, and sets the door state to true. Again, a one-second delay
prevents multiple triggers.
Page | 26
When Button 3 is pressed, the buzzer beeps once. This button toggles the fan state. If the fan is
currently on, it turns the fan off and updates the LCD; if it is off, it turns it on and updates the
LCD. A one-second delay is added to avoid multiple button presses being registered too quickly.
The code checks if any data is received over Bluetooth. If data is available, it reads one character
command and prints it on the serial monitor for debugging.
Page | 27
If the received Bluetooth command is 'E', the code opens the door by turning on the relay,
moving the servo to open the door, updating the LCD and serial monitor, setting the door state to
true, and giving buzzer feedback. The command 'e' would similarly close the door with
corresponding actions.
The program reads the temperature and humidity values from the DHT sensor, the gas level from
the analog gas sensor, and the flame presence as a digital input from the flame sensor.
Page | 28
This section updates the LCD to display the current temperature in degrees Celsius, humidity
percentage, gas sensor analog value, and the flame sensor status, showing either "No Fire" or
"Yes" depending on whether flame is detected.
If the gas sensor reading exceeds a defined threshold (800), the system detects a gas leak, prints
an alert message on the serial monitor, displays "Gas Detected!" on the LCD, and sounds the
buzzer repeatedly to warn the user.
Page | 29
If the flame sensor detects fire (active low signal), the system alerts by printing a message on the
serial monitor, displaying "Fire Detected!" on the LCD, and triggering the buzzer multiple times
for immediate attention. A delay of 500 milliseconds is added at the end of the loop to prevent
the loop from running too fast and to stabilize sensor readings and user interface updates.
This helper function makes the buzzer beep a specified number of times. Each beep consists of
turning the buzzer on for 200 milliseconds and then off for 200 milliseconds.
Page | 30
This function smoothly moves the servo motor from one angle to another by incrementally
changing the position with a short delay of 15 milliseconds between each step. This prevents
sudden jerks and allows the servo to move gently.
The Blynk application acts as the mobile user interface for remote control and real-time
monitoring of the home automation system. Available on both Android and iOS platforms,
Blynk provides a drag-and-drop environment where users can create a personalized dashboard
using widgets like buttons, sliders, LEDs, and display panels. These widgets communicate with
the ESP32 microcontroller through virtual pins assigned in both the mobile app and the Arduino
code. By using the Blynk Cloud, which acts as an intermediary server, data can flow bi-
directionally between the ESP32 and the smartphone over Wi-Fi. For instance, the DHT11
sensor data-representing temperature and humidity-can be displayed on the app interface, while
button widgets can toggle the state of home appliances like lights or fans through relay modules.
The Blynk app thus offers not only interactive controls but also a visual representation of sensor
conditions, enhancing usability and convenience. Notifications and alerts can also be configured
to inform users instantly of any abnormal environmental changes detected by the sensors.
Overall, Blynk simplifies the mobile connectivity aspect and significantly improves the user
experience by providing a professional-looking interface without requiring complex coding.
Page | 31
Figure 3.13: Mobile control application (Blynk APP) interface
To further improve accessibility and enhance the user interaction model, the project integrates
voice command functionality using IFTTT (If This Then That). IFTTT is a web-based
automation platform that enables the interlinking of services such as Google Assistant with other
applications or hardware through defined applets. In the context of this project, IFTTT bridges
the gap between voice-activated commands and hardware control by triggering HTTP webhooks
to the Blynk server. When a user gives a command like “OK Google, turn on the fan,” Google
Assistant sends a request to IFTTT, which in turn sends a specific web request to the ESP32 via
the Blynk cloud. Each command is linked to a virtual pin that activates or deactivates a device
such as a light, fan, or solenoid lock. This voice-controlled feature adds a layer of sophistication
and accessibility to the system, making it user-friendly for all, including elderly or physically
challenged individuals. The configuration involves defining custom applets on the IFTTT
platform, associating each with a unique phrase and corresponding webhook URL that interacts
with the Blynk cloud. This seamless integration with modern voice services positions the system
firmly within the domain of next-generation smart homes.
Page | 32
Chapter IV
Page | 33
4.1 Project Prototype
The developed prototype of the smart home automation system is illustrated in Figure 4.1, which
showcases the complete hardware setup assembled on a breadboard and interfaced with the
ESP32 microcontroller. The figure provides a clear visual representation of how various
components—including sensors, actuators, and communication modules—are interconnected to
simulate a real-world smart home environment.
The prototype includes essential sensors such as the DHT11 for measuring ambient temperature
and humidity, a gas sensor for detecting combustible gases, and a flame sensor for fire detection.
These sensors are strategically placed to continuously monitor environmental conditions. The
outputs of these sensors are fed to the ESP32, which serves as the brain of the system and
executes predefined logic to trigger appropriate responses.
Actuating components such as a fan, LED indicators, a buzzer, a solenoid lock, and an LCD
display are integrated through a relay module. When a specific condition is met-such as a
temperature rise, gas leakage, or flame detection-the ESP32 processes the sensor data and
activates the corresponding devices. For example, the buzzer is triggered when gas or flame is
detected, while the fan is automatically turned on at high temperatures. The LCD display updates
in real time to provide immediate feedback on the system's current status.
Page | 34
The system also includes dual-mode control: via voice commands and through the Blynk mobile
application. Users can issue voice instructions to control appliances, and the Blynk app displays
sensor readings and allows manual control of devices remotely using a smartphone. The wireless
connectivity is enabled through the ESP32's built-in Wi-Fi functionality, ensuring that the system
remains flexible and accessible from any location with internet access.
This prototype effectively demonstrates the integration of safety, comfort, and automation in a
compact, affordable, and scalable platform, making it an ideal solution for modern smart home
applications.
The smart home system is designed with the aim of balancing functionality, usability, and safety.
One of the most important features is its dual-mode control capability, where users can interact
with the system either via Bluetooth using a smartphone or manually through physical buttons
connected to the ESP32. This ensures accessibility even if Bluetooth is unavailable. The system
continuously monitors environmental conditions using a DHT11 sensor for temperature and
humidity and utilizes a gas sensor and a flame sensor to enhance safety within the home. An
LCD module provides live updates, displaying real-time data including temperature, humidity,
gas levels, and fire detection status. The servo-controlled door, which operates in conjunction
with a relay module, mimics a secure access mechanism, opening or closing based on user input.
Additionally, an integrated buzzer system provides audible feedback for alerts and user actions,
ensuring the user is informed of every important status change. These features work together to
offer a robust, real-time smart home management experience.
Bluetooth-Based Control: Enables wireless control of light, fan, and door via a
paired smartphone.
Manual Button Controls: Provides redundancy for local access without Bluetooth.
LCD Display Output: A 16x2 I2C LCD shows live sensor readings and device
status.
Gas and Fire Alert System: When dangerous levels are detected, the system
activates the buzzer and displays a warning.
Servo-Relay Door Mechanism: Smooth door control with a servo motor and relay
integration.
Page | 35
User Feedback: Audible buzzer responses for each command execution.
If a Bluetooth-enabled device sends a command (e.g., 'E' to open the door), the system processes
the input instantly, performs the task, and updates the LCD and buzzer for feedback. At the same
time, sensor readings are continuously taken. The temperature and humidity are updated
regularly and shown on the LCD. If the gas sensor detects a value above a defined threshold or if
the flame sensor identifies fire, the system activates the buzzer and displays a danger message.
This real-time operation ensures that the user remains constantly informed and in control of the
environment.
Bluetooth performance was stable during extended tests, with command reception delays of less
than one second. The servo motor provided smooth rotation when opening and closing the door,
and its movement could be precisely controlled. Button responses were instantaneous and
accurate, giving the user full manual control over the system. Overall, the prototype performed
well across all functional areas, confirming the robustness and responsiveness of the ESP32-
based automation system.
Page | 36
Chapter V
Chapter Outlines
5.1 Conclusion
5.2 Future Scope
Page | 37
5.1 Conclusion
This project presents a practical and efficient hardware-based implementation of a smart home
automation system that prioritizes user safety, comfort, and control. By integrating essential
environmental sensors—such as the DHT11 for temperature and humidity monitoring, a gas
sensor for detecting hazardous gases, and a flame sensor for fire detection—the system ensures
real-time situational awareness and responsiveness. These inputs are processed by the ESP32
microcontroller, which acts as the central control unit, managing various output devices like fans,
LEDs, buzzers, an LCD display, and a solenoid lock via relay modules.
A key innovation of this project lies in its dual-mode control functionality. Users can operate
appliances either through voice commands, allowing hands-free convenience, or through the
Blynk mobile application, which provides a user-friendly interface for remote monitoring and
control over Wi-Fi. This dual approach enhances system accessibility and adaptability, making it
suitable for a wide range of user needs, including elderly or mobility-impaired individuals.
The system is built using affordable and widely available components, demonstrating the
feasibility of creating a scalable and cost-effective smart home solution. The modular design
makes it easy to expand or reconfigure the system to accommodate additional devices or
advanced features in the future. Furthermore, the integration of wireless communication
capabilities through the ESP32 paves the way for future upgrades involving IoT platforms and
cloud-based services.
In addition to its automation features, the system includes vital safety measures through its real-
time alerts and automatic responses to environmental hazards, contributing to energy efficiency
and home security. Overall, this project serves not only as a functional prototype for smart home
automation but also as a valuable platform for learning and further innovation in embedded
systems and IoT-based home control.
Page | 38
5.2 Future Scope
While the current implementation offers a robust and efficient smart home solution, several
opportunities exist for enhancing the system in the future:
Cloud Integration for Real-Time Alerts and Data Logging: Integration with cloud
platforms can enable data storage, analysis, and notification services, allowing users to
track long-term trends and receive alerts through email or SMS.
Advanced Voice Assistant Integration: The voice control mechanism can be further
expanded by integrating advanced assistants such as Google Assistant or Amazon Alexa
for more natural and complex command handling.
Improved Mobile App Features: While the Blynk app serves the current system
effectively, a custom-designed mobile application can be developed for more
personalized interfaces, user authentication, and multi-user access.
By implementing these enhancements, the smart home automation system can evolve into a fully
intelligent, energy-efficient, and secure environment tailored to modern-day residential needs.
Page | 39
References
[1] N. Sriskanthan, F. Tan, and A. Karande, “Bluetooth based home automation system,” in
Proc. Int. Conf. Ind. Electron. Control Instrumentation, 2002, pp. 302–305.
[2] M. Xu, L. Ma, F. Xia, T. Yuan, J. Qian, and M. Shao, “Design and implementation of a
wireless sensor network for smart homes,” arXiv preprint arXiv:1011.3088, 2010.
[3] S. M. E. Sepasgozar et al., “A systematic content review of artificial intelligence and the
Internet of Things applications in smart home,” Applied Sciences, vol. 10, no. 9, p. 3074, 2020.
[4] F. Hall, L. Maglaras, T. Aivaliotis, L. Xagoraris, and I. Kantzavelou, “Smart homes: Security
challenges and privacy concerns,” arXiv preprint arXiv:2010.15394, 2020.
[5] D. Marikyan, S. Papagiannidis, and E. Alamanos, “A systematic review of the smart home
literature: A user perspective,” Technological Forecasting and Social Change, vol. 138, pp. 139–
154, 2019.
[7] S. M. R. Islam, D. Kwak, M. H. Kabir, M. Hossain, and K. S. Kwak, “The Internet of Things
for health care: A comprehensive survey,” IEEE Access, vol. 3, pp. 678–708, 2015.
[8] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, “Internet of Things (IoT): A vision,
architectural elements, and future directions,” Future Generation Computer Systems, vol. 29, no.
7, pp. 1645–1660, 2013.
[9] M. Chen, S. Gonzalez, A. Vasilakos, H. Cao, and V. C. M. Leung, “Body area networks: A
survey,” Mobile Networks and Applications, vol. 16, no. 2, pp. 171–193, 2011.
Page | 40