Smart Home Automation System Report
Smart Home Automation System Report
1
ABSTRACT
The increasing need for safety, convenience, and energy efficiency in modern households
has led to the rapid adoption of smart automation technologies. Traditional home systems
require manual operation, which can result in higher power consumption, reduced safety,
and limited user accessibility. This project presents a multi-module Smart Home
Automation System designed to integrate several independent sensing and control
circuits; each managed through dedicated web interfaces for enhanced flexibility and
user control.
By integrating IoT principles with sensor-based automation, this project offers a reliable,
energy-efficient, and user-friendly solution for modern home environments. The Smart
Home Automation System aims to enhance safety, reduce manual effort, and
demonstrate how electronic technologies can transform ordinary homes into intelligent
and responsive smart living spaces.
2
ACKNOWLEDGEMENT
The successful completion of this project has been made possible through the guidance,
support, and encouragement of several individuals. We consider ourselves fortunate to
have received continuous assistance throughout the development and execution of this
work. Every milestone achieved in this project is a direct result of the supervision,
motivation, and cooperation extended to us.
We express our sincere gratitude to our project guide, Dr. Vikram Kehri, from the
Electronics Department, for providing invaluable direction, timely feedback, and
constant encouragement. Their expertise and insights significantly contributed to the
successful implementation of our Smart Home Automation System.
We would also like to thank the respected faculty members of the Electronics and
Electrical Department for their consistent support, encouragement, and constructive
suggestions, all of which played a vital role in shaping the outcome of this project.
Lastly, we extend our appreciation to our classmates and peers for their cooperation,
teamwork, and motivation throughout the course of this work.
3
DECLARATION
We certify that,
- The work contained in this report is original and has been done by us under the
guidance of our mentor.
- The work has not been submitted to any other Institute for the award of any certificate.
- I have followed the guidelines of the Institute in preparing the report.
- Whenever we have used materials (data, theoretical analyses, figures, text, etc.) from
other sources, we have given due credit to them by citing them in the text of the thesis
and giving their details in the references necessary.
1 Harsh Sakhardande
2 Harsh Sawant
4 Kunal Singh
5 Yogesh Vemula
4
CONTENTS
Sr. No. Topics Page No.
1. Cover page
2. Certificate of Approval of Guide & External Examiner 1
3. Abstract 2
4. Acknowledgement 3
5. Declaration by the students 4
6. Index 5
7. List of Figures 6
8. Cost of Components Used in the Project 38
Page
Chapter No Topic
No
Introduction to The Project
1. Introduction
2. Background
I 3. Objective of the Project 7-9
4. Purpose
5. Motivation
6. Future Scope
Description About the Components used on the Project
1. ESP 32
2. Arduino Nano
3. Arduino UNO R3
II 4. Relay Module 10 - 23
5. Flame Sensor
6. Gas Sensor
7. PIR Motion Sensor (HC – SR501)
8. Ultrasonic Sensor (HC – SR04)
9. RC522 RFID Module
10. SG90 Servo Motor
11. Laser Diode Module
12. 5V Solar Panel
13. 3.7V Lithium Battery
14. Buzzer
15. LED
Software for Coding and Wi-Fi Application
III 1. Arduino IDE 24 - 25
2. Cirkit Designer
Implementation & Working of the Proposed System
1. Proposed System
IV 2. Working of Individual Modules 26 - 37
3. Codes for ESP32, Arduino UNO and Arduino Nano
Conclusion 39
References/Bibliography 40
5
LIST OF FIGURES
6
CHAPTER I
Introduction to the Project
Introduction:
A Smart Home Automation System integrates modern electronic technologies to enhance the
safety, efficiency, and convenience of residential environments. With the rising demand for
intelligent living spaces, automation systems have become essential for managing household
functions such as lighting, security, door access, and environmental monitoring. This project
presents a modular smart home system comprising multiple sensor-based circuits, each designed
to automate specific tasks while offering seamless user control through independent web
interfaces hosted on ESP32 microcontrollers.
The system includes eight major modules: an ultrasonic-based smart garage controller, a solar-
powered LDR terrace light, a gas leakage detection unit, a fire detection alarm, an ESP32-based
RFID door locking system, PIR-activated motion lighting, web-controlled light automation using
relays, and a laser-based intrusion security circuit. Each module operates autonomously yet
contributes to a unified goal of enhancing home security and automation. With real-time
detection, wireless control, and localized web interfaces, users can monitor and operate critical
home functions without depending on cloud services or external networks.
Overall, this Smart Home Automation System demonstrates how IoT concepts and sensor
technologies can be applied to create intelligent, user-friendly, and energy-efficient home
environments. The project highlights the potential of embedded systems in transforming ordinary
households into modern smart homes while ensuring cost-effectiveness and reliability.
Background:
The demand for smart home solutions has grown significantly due to the increasing focus on
energy conservation, home security, and user convenience. Traditional home systems often
require manual operation, resulting in greater energy consumption, delayed hazard detection, and
limited control. With the advancement of microcontrollers such as the ESP32 and Arduino Nano,
along with affordable sensors and wireless connectivity, home automation has become more
accessible and efficient. IoT technologies have enabled real-time monitoring, automated
decision-making, and remote device control within residential spaces. Users now seek modular,
low-cost systems that can perform tasks such as detecting gas leaks, controlling lights
automatically, monitoring motion, and securing entry points with RFID authentication.
7
4. Promote energy efficiency by using sensors like LDRs and PIR modules to activate systems only
when necessary.
5. Demonstrate the practical implementation of IoT and embedded technologies in a multi-module
home automation setup.
6. Provide real-time monitoring and immediate hazard detection for gas leakage and fire incidents.
7. Create cost-effective and modular circuits that can be easily expanded or upgraded for future
smart home applications.
Purpose:
The purpose of this project is to design and implement a comprehensive smart home
solution that automates essential household systems, improves safety, and enhances
user accessibility. By integrating different sensors, microcontrollers, and wireless interfaces,
the project aims to:
1. Provide real-time monitoring and control of home appliances and security systems.
2. Minimize energy wastage through intelligent sensor-based automation.
3. Reduce manual operation of repetitive household tasks.
4. Enhance the safety and security of residential premises through early hazard detection
and intrusion monitoring.
Motivation:
The primary motivation for developing this Smart Home Automation System arises from the
need for secure, efficient, and user-friendly living spaces. As modern lifestyles demand greater
convenience and safety, automation technologies play a crucial role in meeting these
expectations.
1. Security Enhancement: Increasing home security concerns motivate the use of RFID-based
access systems, motion detection, and laser intrusion modules.
2. Energy Savings: Automated lighting and sensor-controlled systems help reduce electricity
wastage, addressing rising energy costs. Reducing Manual Labor: Traditional farming practices
require considerable manual labor for irrigation and monitoring. Automating these tasks reduces
the labor burden on farmers, allowing them to focus on more strategic activities.
3. Ease of Access: Web-based control interfaces enable users to operate home systems remotely
within their local Wi-Fi network, enhancing convenience.
4. Hazard Prevention: Early detection of gas leaks and fire hazards ensures quicker response
and reduces potential damage.
5. Technological Advancement: The motivation extends to exploring IoT, embedded systems,
and automation in core areas of modern electronics engineering.
8
6. User Comfort: Automation minimizes manual tasks, making daily living smoother and more
efficient.
7. Innovation and Practical Learning: Implementing multiple circuits in one integrated
project brings valuable hands-on learning and real-world application experience.
8. Customization and Flexibility: Separate modules and independent web interfaces allow
users to adopt only the features they require, making the system scalable.
Future Scope:
1. Advanced IoT Integration: The system can be enhanced with cloud connectivity for global
access, data logging, and analytics.
2. AI-based Automation: Machine learning models can analyze user patterns to automate
lighting, security, and appliance control more intuitively.
3. Unified Dashboard: Future versions may integrate all modules into a single responsive
dashboard without compromising modularity.
4. Smart Energy Management: Integration with smart meters and energy usage analytics can
help optimize consumption further.
5. Voice Assistant Integration: Compatibility with platforms like Amazon Alexa or Google
Assistant can allow voice-controlled automation.
6. Mobile Application Development: A dedicated mobile app can provide improved user
experience beyond web interfaces.
9. Emergency Response System: Automatic alerts on mobile devices during gas leaks, fire
detection, or intrusions can enhance safety further.
10. Wireless Mesh Networking: Adopting protocols like ZigBee or LoRa can allow the system
to cover larger homes and outdoor area.
9
CHAPTER II
Description About the Components used in the Project
1. ESP32 DEV KIT V1
Features:
10
Pinout of ESP:
The pinout may vary slightly depending on the board manufacturer, but the most common ESP32
DEVKIT V1 has the following key pins:
These pins make the ESP32 DEVKIT V1 highly versatile for interfacing with sensors,
motors, relays, displays, and IoT modules in smart home systems.
2. Arduino Nano
11
Features:
1. Microcontroller: ATmega328P
2. Operating Voltage: 5V
3. Input Voltage (recommended): 7–12V
4. Clock Speed: 16 MHz
5. Flash Memory: 32 KB (2 KB used by bootloader)
6. SRAM: 2 KB
7. EEPROM: 1 KB
8. Digital I/O Pins: 22 (14 Digital + 8 Analog)
9. PWM Output Pins: 6
10. Analog Input Pins: 8
11. UART, SPI, and I2C communication support
12. Mini USB Interface
13. On-board voltage regulator
14. Small size for compact circuits
1. GND – Ground
2. 5V / 3.3V – Power output
3. VIN – External input voltage
4. D0 (RX) – Serial data receive
5. D1 (TX) – Serial data transmit
6. D2–D13 – Digital I/O pins (some with PWM capability)
7. A0–A7 – Analog inputs
8. RESET – Reset pin
9. AREF – Analog reference voltage
10. ICSP Pins – For low-level programming
3. Arduino UNO R3
12
It includes a USB-B interface for uploading programs, a robust 5V regulator, and a standard pin
layout widely supported by sensors, shields, and electronic modules. The Uno R3 is often used
for prototyping automation systems, sensor interfaces, robotics, and IoT-related applications. Its
reliability and simplicity make it ideal for academic projects, especially when multiple sensors
and modules must be integrated in a stable development environment.
Features:
1. Microcontroller: ATmega328P
2. Operating Voltage: 5V
3. Input Voltage (recommended): 7–12V
4. Clock Speed: 16 MHz
5. Flash Memory: 32 KB (0.5 KB used by bootloader)
6. SRAM: 2 KB
7. EEPROM: 1 KB
8. Digital I/O Pins: 14
9. PWM Pins: 6
10. Analog Input Pins: 6
11. USB-B Interface for programming
12. Resettable polyfused for USB protection
13. Excellent community and library support
14. Compatible with various shields
1. GND – Ground
2. 5V / 3.3V – Power output pins
3. VIN – External input voltage
4. D0 (RX) – UART serial receive
5. D1 (TX) – UART serial transmit
6. D2–D13 – Digital I/O pins
7. PWM Pins: D3, D5, D6, D9, D10, D11
8. Analog Pins: A0–A5
9. AREF – Analog reference input
10. RESET – Manual reset pin
11. ICSP Header – SPI and low-level programming pins
12. Power Jack – For external adapters
4. Relay Module
13
General Description:
A relay module is an electrically operated switch used to control high-voltage or high-current
devices using a low-power microcontroller signal. Relay modules are widely used in home
automation, security systems, industrial controls, and IoT-based switching applications.
In this project, relay modules are used to control AC appliances such as lights, fans, and other
electrical loads through the microcontroller (ESP32 / Arduino). These modules provide electrical
isolation using optocouplers, ensuring safe operation while switching high-voltage loads.
Relay modules are available in multiple configurations such as 1-channel, 2-channel, and 4-
channel, depending on the number of external devices to be controlled.
Features:
1. Operating Voltage: 5V
2. Relay Output Rating: 250V AC at 10A or 30V DC at 10A
3. Trigger Voltage: 3.3V or 5V depending on module
4. Optocoupler isolation for electrical safety
5. LED indicators for status display
6. NO (Normally Open), NC (Normally Closed), and COM terminals
7. Compatible with microcontrollers: ESP32, Arduino, NodeMCU, Raspberry Pi
8. High/Low trigger versions available
9. Screw terminals for easy AC load connection
10. Onboard transistor driver circuit for reliable switching.
Description:
The 1-channel relay module includes a single relay, suitable for controlling one high-voltage
device such as a bulb or fan. It is compact and commonly used when only one appliance needs to
be automated
Pinout:
Input Pins:
1. VCC – 5V power input
2. GND – Ground
3. IN – Control signal from microcontroller
14
Output Terminals:
1. NO – Normally Open
2. COM – Common
3. NC – Normally Closed
Description:
The 2-channel relay module contains two independent relays, allowing control of two different
appliances. Each relay works separately and has its own input pin.
Pinout:
Input Pins:
1. VCC – 5V
2. GND – Ground
3. IN1 – Control signal for Relay 1
4. IN2 – Control signal for Relay 2
5. Flame Sensor
The Flame Sensor is a fire-detection module designed to sense infrared (IR) light emitted by
flames. It uses an IR receiver (photo-diode or phototransistor) that is highly sensitive to
wavelengths emitted during combustion. This sensor is widely used in fire detection, alarm
systems, heat sources monitoring, and safety automation projects. In this project, the flame
sensor is used for fire alarm detection, triggering alerts or activating safety mechanisms through
the microcontroller.
Features:
1. Wavelength Detection Range: 760 nm – 1100 nm
2. Operating Voltage: 3.3V – 5V
3. Digital Output (DO) for fire alert
4. Analog Output (AO) for flame intensity measurement
5. Onboard comparator (LM393) for threshold adjustment
6. High sensitivity and fast response time
7. Potentiometer to adjust detection range
8. Indicator LEDs: Power LED, Output/status LED
9. Wide detection angle (typically 60–120°)
Pinout of Flame Sensor Module:
11. VCC – Power (3.3V–5V)
12. GND – Ground
13. DO – Digital output (HIGH/LOW fire alert)
14. AO – Analog output (flame intensity)
6. Gas Sensor
The MQ135 Gas Sensor is a widely used air-quality sensing device designed to detect various
harmful gases in the environment. It is particularly sensitive to gases such as ammonia (NH₃),
nitrogen oxides (NOₓ), benzene, smoke, CO₂, and other volatile organic compounds (VOCs). The
sensor uses tin dioxide (SnO₂) as the sensing material, whose conductivity changes in the presence
of different gas concentrations. This change in resistance is converted into an electrical signal and
processed by a microcontroller (such as ESP32, Arduino Nano, or Uno).
16
Features:
1. Wide Gas Detection Range: Detects NH₃, CO₂, alcohol, smoke, NOₓ, benzene, and other
harmful gases.
2. High Sensitivity & Fast Response: Responds quickly to changes in air quality and recovers
rapidly once the air is clean.
3. Analog Output: Provides an analog voltage proportional to gas concentration; can be read using
any ADC-equipped board.
4. Digital Output (via onboard comparator): Many MQ135 breakout modules include a
potentiometer & comparator for threshold-based digital alerts.
5. Long Lifespan & Low Cost: Stable operation with minimal maintenance requirements.
6. Heater Element: Included Internal heating coil stabilizes sensor performance but increases
power consumption.
7. Operating Voltage: 5V typical, Heater consumption approx. 800mW
General Description:
The PIR (Passive Infrared) Motion Sensor detects motion by sensing infrared radiation
(heat) emitted by humans or animals. It works using a pyroelectric sensor and Fresnel lens
to measure changes in infrared levels within its detection area. It is widely used in security
systems, motion-activated lighting, alarms, and automation.
In smart home automation, PIR sensors are ideal for motion-based lighting systems,
intruder alerts, and energy-efficient systems.
17
Features:
Pinout:
General Description:
The HC-SR04 Ultrasonic Sensor measures distance using ultrasonic waves. It transmits a high-
frequency sound pulse and measures the time taken for the echo to return. It is commonly used in
distance measurement, smart parking, obstacle detection, garage automation, and robots. In your
project, it is used for the smart garage system to automatically open or close based on vehicle
distance.
Features:
1. Operating Voltage: 5V
2. Measuring Range: 2 cm to 400 cm
3. Trigger Pulse Input: 10 µs
4. Echo Output: Pulse-width proportional to distance
5. Low Power Consumption
6. Easy interfacing with Arduino/ESP32
18
Pinout:
1. VCC – 5V
2. Trig – Trigger input
3. Echo – Echo output
4. GND – Ground
General Description:
The RC522 RFID Module is a 13.56 MHz RFID reader used for contactless card/tag
authentication. It uses the MFRC522 chipset, widely used in security systems, door automation,
access control, and attendance systems. In our project, it is used for the RFID-based smart door
lock that also works through the web interface using ESP32.
Features:
Pinout (RC522):
19
10. SG90 Servo Motor
General Description:
The SG90 Servo is a lightweight, low-power motor widely used for rotational and angular control.
It operates using PWM signals and is ideal for robotics, miniature control, automated flaps, garage
doors, and locks. In our project, it is used for the smart garage mechanism to lift or rotate a
gate/barrier.
Features:
Pinout:
20
General Description:
The Laser Diode Module is a compact light source that emits a narrow red laser beam (typically
650 nm). It is commonly used in security systems, laser alarms, alignment tools, and distance
indicators. In our project, it forms part of the laser security system where the beam breaks when an
intruder crosses it.
Features:
Pinout:
General Description:
A 5V solar panel is a photovoltaic device that converts sunlight into electrical energy. It is widely
used in solar-powered lighting systems, IoT projects, and energy-harvesting applications. In this
project, it powers the terrace light system and helps charge the 3.7V lithium battery for sustainable
operation.
Features:
21
13. 3.7V Lithium Battery
General Description:
A 3.7V Lithium-Ion (Li-ion) battery is a rechargeable energy storage device widely used in
portable electronics, solar-powered devices, and IoT systems. It provides stable voltage and high
energy density. In this project, it stores energy from the 5V solar panel to power the terrace lights
and other low-power components.
Features:
14. Buzzer
General Description:
An Active Buzzer is a sound-producing device that includes a built-in oscillator. When powered,
it generates a fixed-frequency sound. It is widely used in alarms, notifications, warnings, and
safety systems.
22
Features:
Pinout:
1. VCC – +5V
2. GND – Ground
General Description:
A Light Emitting Diode (LED) is a semiconductor device that emits light when it is forward biased.
It is widely used in electronic circuits as an indicator and low-power lighting element due to its
high efficiency, long life, fast switching response, and low power consumption. In embedded
systems, LEDs are commonly used to indicate system status such as power ON, device activity,
fault conditions, or sensor detection events.
Pinout:
1. Anode – (+)
2. Cathode – Negative (-)
23
CHAPTER III
SOFTWARE FOR CODING AND Wi-Fi APPLICATION
1. Arduino IDE:
It supports multiple Arduino boards such as Arduino Uno, Nano, Mega, and also supports ESP32
boards through additional board manager installation.
24
3. Connecting Arduino Uno R3:
o Select board: Arduino Uno
o Connect via USB Type-B cable
o Select correct Port
o Upload the program directly
The Arduino IDE environment simplifies code uploading for all three microcontrollers used
in the project—ESP32 DevKit V1, Arduino Nano,
2. Cirkit Designer
Circuit Designer provides a drag-and-drop interface with symbols for microcontrollers, sensors,
LEDs, power modules, and other components, allowing students to build clean and accurate
circuit representations.
Features:
1. Schematic diagram creation
25
CHAPTER IV
Implementation And Working of the Proposed System
1. Proposed System
The proposed smart home system is a modular, sensor-based automation platform that integrates
local microcontroller control with Wi-Fi connectivity for enhanced safety, convenience, and
energy efficiency. Individual modules such as lighting, security, garage automation, and access
control operate independently using Arduino (UNO/Nano) or ESP32 controllers. Various sensors
continuously monitor environmental conditions and provide inputs to the microcontrollers, which
process the data using preset logic and control actuators like relays, LEDs, and motors. The
ESP32 hosts a web server that allows users to remotely monitor and control appliances over a
local Wi-Fi network. Efficient power management is achieved using regulated supplies and a
solar-powered battery system for terrace lighting. Built-in safety features and autonomous
operation ensure reliable and secure system performance.
i. The solar panel converts sunlight into electrical energy and charges the
rechargeable battery through the charging circuit.
ii. The LDR continuously senses ambient light intensity and produces a
corresponding voltage signal.
iii. The microcontroller reads the LDR analog value and compares it with a preset
threshold level.
iv. When light intensity falls below the threshold (night condition), the controller
activates the relay
v. The terrace LED is powered by the battery and turns ON automatically.
vi. When daylight returns, the controller switches OFF the relay and the LED
remains OFF to conserve power.
27
Working Flow of the Circuit
28
Fig.4.2.4: Flame Detection System
30
4. Web Controlled LEDs and Laser Security System
i. The ESP32 connects to the local Wi-Fi network and starts an embedded web server.
ii. The user accesses the web dashboard using a browser and sends LED ON/OFF
commands.
iii. Based on the received command, the ESP32 toggles the respective GPIO pins to control
LEDs via relays.
iv. The laser continuously projects a beam onto the LDR or photodiode sensor.
v. If the laser beam is interrupted, the sensor output changes immediately.
vi. The ESP32 detects the interruption and triggers an intrusion alert indication.
31
Working Flow of the Circuit:
Fig 4.2.10: Flowchart for Web Controlled LEDs and Laser Security System
32
Fig 4.2.12: Motion Detector Lights
i. The RFID reader scans the RFID card/tag when it is brought near the reader.
ii. The RFID UID is transmitted to the microcontroller.
iii. The controller compares the UID with stored authorized IDs.
iv. If authorized, the controller activates the relay/solenoid and unlocks the door.
v. The door remains unlocked for a predefined time and then locks automatically.
vi. The PIR sensor detects human motion in the area.
vii. Upon motion detection, the controller turns ON the light automatically.
After no motion is detected for a set time, the light is switched OFF.
33
3. Codes for ESP32, Arduino UNO and Arduino Nano
34
Fig 4.3.4: Code 4 for RFID Lock & PIR Light
35
iii. Code for Gas and Flame Sensor
Fig 4.3.9: Code 1 for Web controlled LED and Laser Security System
36
Fig 4.3.10: Code 2 for Web controlled LED and Laser Security System
Fig 4.3.11: Code 3 for Web controlled LED and Laser Security System
Fig 4.3.12: Code 4 for Web controlled LED and Laser Security System
37
COST OF THE COMPONENTS
4 Flame Sensor 40
6 Relay Module 90
7 LDR Module 40
8 5V Solar Panel 90
9 Laser Module 35
11 PIR Sensor 75
12 RFID 169
15 Buzzer 10
16 LED 40
17 LDR 10
38
CONCLUSION
The Smart Home Automation Project successfully demonstrates how modern technology can
transform everyday living into a safer, more convenient, and energy-efficient experience. By
integrating sensors, actuators, and microcontrollers, the system provides automated control over
essential home functions such as lighting, door access, and security. Modules like the RFID-
based door lock, PIR-controlled lighting, and laser/LDR security system operate seamlessly to
ensure safety, comfort, and real-time responsiveness. The modular design allows each subsystem
to function independently while maintaining smooth communication, making the overall system
scalable and easy to maintain. This flexibility ensures that additional features such as fire alarms,
gas detection, smart garage control, or voice-controlled appliances can be incorporated in the
future with minimal effort.
The project’s web-based dashboard enhances usability by offering a centralized interface for
monitoring and controlling multiple devices over a local Wi-Fi network. Users can remotely
manage appliances, check sensor statuses, and receive alerts during security breaches, thereby
increasing convenience and situational awareness. Security features, including motion detection
and laser-based intrusion alerts, combined with the RFID door lock, provide multiple layers of
protection. Meanwhile, energy management is addressed through automated lighting that
operates based on occupancy and ambient light, reducing unnecessary electricity consumption
and promoting sustainability. This integration of automation, security, and energy efficiency
highlights the practical benefits of IoT-enabled smart home systems.
Overall, this project illustrates the potential of combining electronics, microcontrollers, and IoT
technology to create intelligent and connected living environments. It not only improves safety,
convenience, and energy efficiency but also provides a foundation for future advancements in
smart home technology. By demonstrating real-time control, modular expansion, and web-based
monitoring, the system serves as a practical example of how automation can simplify daily life
and enhance quality of living. The Smart Home Automation Project emphasizes the growing role
of technology in modern homes and provides insights into the future of intelligent, responsive,
and sustainable living spaces.
39
References/Bibliography
40