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

Final_Project_Report

The document outlines the development of a smart home automation system using Arduino Uno, which integrates various sensors to optimize energy consumption and enhance user convenience. It includes features for real-time monitoring and control via a mobile app, with both automatic and manual operation modes. The system demonstrates feasibility and efficiency in automating tasks, with potential for future enhancements such as WiFi integration.

Uploaded by

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

Final_Project_Report

The document outlines the development of a smart home automation system using Arduino Uno, which integrates various sensors to optimize energy consumption and enhance user convenience. It includes features for real-time monitoring and control via a mobile app, with both automatic and manual operation modes. The system demonstrates feasibility and efficiency in automating tasks, with potential for future enhancements such as WiFi integration.

Uploaded by

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

Smart Home Automation System

IOT102 - IA1805 - Group 5

Tran Van Vinh, Vu Tuan Hong Ky, Nguyen Xuan Phong, Nguyen Thanh
Son and Le The Dung
FPT University, Ho Chi Minh Campus, Vietnam

{vinhtvse173406, kyvthse161472, phongnxse171597,


sonntse183379}@fpt.edu.vn, dunglt96@fe.edu.vn

Abstract
This project focuses on developing a smart home automation system using Ar-
duino Uno in combination with various sensors and control modules to optimize
energy consumption and enhance convenience in everyday life. The system aims to
automatically collect data from sensors—including motion, temperature, and light
sensors —and control devices such as LED lamps and fans based on the presence
and activity of users within the room.
Device status is displayed on a mobile app, which provides users with real-time
monitoring and remote control via Bluetooth connectivity. The project includes
both automatic and manual modes, allowing users to intervene and control the
system when needed.
Experimental results demonstrate the feasibility, reliability, and efficiency of the
system in automating daily tasks, with devices responding promptly to changes in
the environment. The solution holds potential for future expansion, including WiFi
integration and the use of additional sensors to improve functionality and range.

I. INTRODUCTION

With the growing adoption of Internet of Things (IoT) technologies, smart systems
have become increasingly popular, revolutionizing the way we manage and optimize vari-
ous aspects of our environment. These systems not only provide greater convenience but
also contribute to efficiency by automating everyday activities, such as waste manage-
ment and monitoring. Traditional methods of handling waste often lead to inefficiencies,
such as untimely collection and overfilled bins that can cause hygiene issues and impact
public spaces.
In this context, the motivation behind this project is to develop a system that leverages
IoT to create a smart waste management solution that is more efficient and responsive.
By incorporating sensors and automation, the system ensures that waste collection is
performed only when necessary, thereby minimizing resources and enhancing cleanliness.
Furthermore, with the increasing focus on sustainability, such solutions can help opti-
mize waste collection schedules, reduce fuel consumption, and support environmental
conservation efforts.

1
The main objective of this project is to design and develop a smart waste manage-
ment system that provides automated monitoring and reporting of waste levels using
IoT sensors. The system should ensure seamless data transmission from sensors to a
centralized control unit, enabling real-time monitoring and efficient decision-making.The
system aims to automate waste monitoring using sensors to detect full bins and trigger
collection alerts, support real-time data reporting to a central platform for better route
decisions, and optimize resource allocation to reduce costs. It is also designed for scalabil-
ity and integration with smart city infrastructure for future enhancements like predictive
analytics.

II. METHODS AND MATERIALS

A. System Model and Block Diagram


A..1 System Overview
This smart waste management system is designed to automate the monitoring and re-
porting of waste levels in trash bins using IoT technologies. The core of the system is the
Arduino Uno, which acts as the central controller, receiving input from various sensors
and communicating data to a remote platform for real-time monitoring.
The ultrasonic sensor is used to measure the distance to the top of the trash in the
bin, allowing the system to determine the fill level. An infrared (IR) sensor detects
the presence of individuals near the bin, which can trigger the lid to open automatically
using a servo motor.
The data collected by the sensors is processed by the Arduino Uno and transmitted
via the ESP8266 Wi-Fi module to a cloud platform for remote monitoring and analysis.
This system provides both real-time feedback and historical data for more efficient waste
collection scheduling.

A..2 Detailed System Behavior


Automatic Operation: When the IR sensor detects a person approaching the bin,
the Arduino activates the servo motor to open the lid. Simultaneously, the ultrasonic
sensor continuously monitors the trash level. Once the bin is full, the system sends
a notification via the ESP8266 to the connected platform, alerting waste management
personnel for collection. If no movement is detected after a predefined time, the lid closes
automatically to prevent unnecessary exposure.
Data Transmission and Monitoring: Collected data is transmitted to a cloud-
based platform through the ESP8266 module, allowing users to monitor bin status re-
motely. This connectivity supports real-time data analytics, enabling optimized waste
collection routes and scheduling.

A..3 Block Diagram


The block diagram below illustrates the connections and interactions between the com-
ponents in the smart waste management system.

2
Figure 1: System Block Diagram of the Smart Waste Management System

B. Components and Peripheral Devices


The Arduino Uno microcontroller serves as the brain of the system, responsible
for processing data from sensors and executing control commands for connected devices.
It reads inputs from the temperature, light, and motion sensors, processes the data ac-
cording to the programmed logic, and sends output signals to the relay modules and
Bluetooth module. The Arduino is powered via USB or an external 9V power supply,
offering enough I/O pins to connect with all the required sensors and devices.

Figure 2: Arduino Uno Microcontroller

The HC-05 Bluetooth module is used to establish a wireless connection between


the Arduino Uno and a smartphone app. This module enables bidirectional communi-
cation, allowing the mobile app to display real-time status updates from the system and
send user commands back to the Arduino. The Bluetooth module uses UART protocol
for communication and is connected to the Arduino’s Tx and Rx pins.

3
Figure 3: HC-05 Bluetooth Module

The DHT11 or LM35 temperature sensor measures the temperature in the environ-
ment. The sensor provides an analog signal representing the ambient temperature, which
is read by the Arduino. If the temperature exceeds a predefined threshold, the Arduino
triggers the fan (DC motor) via the relay module to help maintain a comfortable room
environment.

Figure 4: DHT11 Temperature Sensor

The LDR (Light Dependent Resistor) detects the level of light in the room.
When the room is sufficiently bright, the Arduino ensures that the LED lamp remains
off even if motion is detected. This prevents unnecessary energy consumption and allows
the system to adapt to natural lighting conditions efficiently.

4
Figure 5: LDR Light Sensor

A PIR (Passive Infrared) sensor is used to detect motion in the room. When a
person enters the room, the PIR sensor sends a high signal to the Arduino, which triggers
the relay to turn on the LED lamp and fan. The system can also incorporate a delay to
turn off devices after a certain period if no further motion is detected.

Figure 6: PIR Motion Sensor

The relay module acts as an electronic switch, allowing low-voltage signals from
the Arduino to control higher-voltage devices such as the LED lamp and fan. The relay
isolates the Arduino from the main power line, ensuring safety. Each device (e.g., LED
lamp and fan) is connected to the relay, which switches them on or off based on signals
from the Arduino.

5
Figure 7: Relay Module

A DC motor is used to simulate the operation of a fan in the system. When the
temperature sensor detects that the room temperature exceeds the threshold, the Arduino
sends a signal to activate the relay controlling the motor, turning the fan on. The fan
helps regulate room temperature, enhancing user comfort.

Figure 8: DC Motor as Fan

The circuit diagram for a smart home automation system using Arduino includes:
an Arduino Uno as the central controller, sensors (temperature, light, motion) connected
to input pins, relay modules for controlling lights/fans, a Bluetooth module (HC-05) for
remote control, and a DC motor. All components are powered appropriately and share a
common ground (GND) for safety.

6
Figure 9: The circuit diagram

Table 1: Interfacing between Arduino Uno and Its Components

Arduino Uno Motion Sensor (PIR) Temperature Sensor (DHT11) Light Sensor (LDR) Relay Module
GND GND GND GND GND
VCC (5V) VCC VCC VCC VCC
Digital Pin 3 OUT - - IN1
Analog Pin A0 - - A0 -
Digital Pin 2 - DATA - -
Tx/Rx - - - Bluetooth Tx/Rx

C. Software Programming
C..1 Setting Up the Arduino IDE and Coding the Microcontroller
To program the Arduino Uno, the Arduino IDE (Integrated Development Envi-
ronment) is used. The following steps are taken to set up and code the microcontroller:

Install the Arduino IDE:

• Download and install the latest version of the Arduino IDE from the official website.

7
• Connect the Arduino Uno to the computer via a USB cable and select the appro-
priate board and port from the IDE.

Include Required Libraries: Include relevant libraries such as:

• SoftwareSerial.h for Bluetooth communication.

• DHT.h for the temperature sensor (DHT11).

• Wire.h if any additional sensors require I2C communication.

Example:

#include <SoftwareSerial.h> // For Bluetooth


#include <DHT.h> // For Temperature sensor

#define DHTPIN 2 // Pin connected to DHT sensor


#define DHTTYPE DHT11 // DHT11 type sensor
DHT dht(DHTPIN, DHTTYPE);

SoftwareSerial Bluetooth(10, 11); // RX, TX pins for Bluetooth

Read Data from Sensors: The Arduino reads analog or digital data from the con-
nected sensors. For example:

// Temperature Sensor:
float temperature = dht.readTemperature();

// Light Sensor (LDR):


int lightLevel = analogRead(A0); // Read from LDR pin

// Motion Sensor (PIR):


int motionDetected = digitalRead(3); // Read from PIR sensor pin

Control Devices via Relays: Based on sensor readings, the Arduino sends signals to
the relay modules to switch the connected devices on or off.
Example:

if (motionDetected == HIGH && lightLevel < 500) {


digitalWrite(LED_RELAY_PIN, HIGH); // Turn on the LED lamp
} else {
digitalWrite(LED_RELAY_PIN, LOW); // Turn off the LED lamp
}

C..2 Establishing Bluetooth Connectivity with the Mobile App


To allow communication between the Arduino and the smartphone, the Bluetooth mod-
ule (HC-05) must be configured and paired with the mobile device.

8
Configure the Bluetooth Module: The HC-05 module is set to AT command
mode to configure parameters like the device name and baud rate. Default configuration
example:
AT+NAME=SmartHome
AT+BAUD=9600

Connect the Bluetooth Module to Arduino: The module’s Rx and Tx pins are
connected to the Arduino’s pins via SoftwareSerial (10 and 11 in the example).
Example:
Bluetooth.begin(9600); // Initialize Bluetooth communication
Bluetooth.println("System ready");

Mobile App Communication: The Arduino sends device status to the mobile app
via Bluetooth, and users can send commands to control the devices.
Example:
if (Bluetooth.available()) {
char command = Bluetooth.read();
if (command == ’1’) {
digitalWrite(FAN_RELAY_PIN, HIGH); // Turn on fan
} else if (command == ’0’) {
digitalWrite(FAN_RELAY_PIN, LOW); // Turn off fan
}
}

C..3 Implementing Control Logic for Automation


The automation logic combines inputs from the sensors to determine when to turn devices
on or off. The control logic follows these principles:

LED Lamp Automation:


• The LED lamp turns on only if motion is detected and the light level is low.

• If no motion is detected for a specific duration, the lamp is turned off.

Fan Automation:
• The fan (DC motor) operates only if the temperature exceeds a threshold.

• Users can also manually control the fan via the mobile app.

Example of Control Logic Implementation:


void loop() {
float temperature = dht.readTemperature();
int lightLevel = analogRead(A0);
int motionDetected = digitalRead(3);

9
// LED Lamp Control
if (motionDetected == HIGH && lightLevel < 500) {
digitalWrite(LED_RELAY_PIN, HIGH); // Turn on LED
} else {
digitalWrite(LED_RELAY_PIN, LOW); // Turn off LED
}

// Fan Control Based on Temperature


if (temperature > 30) {
digitalWrite(FAN_RELAY_PIN, HIGH); // Turn on Fan
} else {
digitalWrite(FAN_RELAY_PIN, LOW); // Turn off Fan
}

// Bluetooth Communication for Manual Control


if (Bluetooth.available()) {
char command = Bluetooth.read();
if (command == ’1’) {
digitalWrite(FAN_RELAY_PIN, HIGH); // Turn on Fan manually
} else if (command == ’0’) {
digitalWrite(FAN_RELAY_PIN, LOW); // Turn off Fan manually
}
}
delay(1000); // Small delay to prevent overloading the loop
}

D. Programming Flowchart
D..1 Flowchart Overview
The flowchart demonstrates the step-by-step logic used to automate the smart waste
management system. The system continuously collects data from ultrasonic and in-
frared sensors to monitor the waste level in bins. It also communicates data to a cloud
platform via the ESP8266 module, enabling remote monitoring and decision-making.

D..2 Detailed Explanation of the Flowchart


1. Start and Bluetooth/Wi-Fi Connection Check: The system begins by checking
if the ESP8266 module is connected to the cloud platform.
• If the connection is not established, the system waits and retries until the con-
nection is made.
• Once the connection is established, the system proceeds to read data from the
sensors.

2. Reading Data from Sensors: The system reads data from the connected sensors:
• Ultrasonic sensor: Measures the distance to the top of the trash to assess the
bin’s fill level.
• IR sensor: Detects when a person approaches the bin.

10
Figure 10: Programming Flowchart of the Smart Waste Management System

11
3. Motion Detection Logic:

• If no motion is detected near the bin, the lid remains closed.

• If motion is detected, the system activates the servo motor to open the bin lid.

4. Fill Level Check:

• The ultrasonic sensor reading is compared against a threshold to determine if the


bin is full.

• If the bin is full, a notification is sent to the cloud platform to alert the waste
management team.

5. Automatic Lid Closure: After a predefined time with no further motion detected:

• The servo motor closes the lid to maintain hygiene and reduce exposure.

6. Data Transmission: The system transmits real-time data to the cloud platform
via the ESP8266 module.

• This data includes the current fill level and status of the bin (open/close).

7. Remote Monitoring and Control: The cloud platform receives data and displays
it to users for decision-making.

• If needed, the system can receive remote commands for manual control, such as
forcing the lid to open or close.

8. Loop and Continuous Monitoring: The system continuously reads sensor data
and communicates with the cloud platform, ensuring real-time monitoring and au-
tomation. The process loops to keep the system active and responsive to changes.

III. Results and Discussion

..1 Prototype Implementation


The prototype system was successfully constructed using components such as the Arduino
Uno, sensors (temperature, light, motion), relay modules, a Bluetooth module, and a DC
motor, all carefully integrated for smooth operation. The sensors were connected to the
Arduino’s input pins, and relay modules controlled the LED lamp and DC motor. The
HC-05 Bluetooth module was configured for remote control via a mobile app. The code
enabled the system to read sensor inputs, process data, and manage device operations.
Once powered on, the system continuously monitored inputs, applied control logic, and
updated device statuses, with users able to override automation through the app for
added flexibility.

12
Figure 11: Enter Caption

..2 Experimental Results


The following scenarios were tested to validate the functionality of the system:

Scenario 1: Automatic Activation of Devices When a person enters the room,


the motion sensor detects movement and triggers the automation logic:

• If the light level in the room is low, the LED lamp is turned on.

• If the temperature exceeds the predefined threshold, the fan (DC motor) is switched
on.

• The status of these devices is updated on the mobile app in real-time, allowing the
user to monitor the system.

13
Figure 12: MOTION ON

Scenario 2: Automatic Deactivation of Devices If no motion is detected for a


specific delay period, the system assumes that the room is unoccupied:

• The LED lamp and fan are switched off automatically to conserve energy.

• The mobile app reflects the updated status of the devices, ensuring the user is
informed of the system’s current state.

14
Figure 13: MOTION OFF

Responsiveness and Performance:

• The system responded accurately to all sensor inputs, demonstrating reliable real-
time automation.

• During testing, the mobile app displayed device statuses without noticeable delay,
and manual control commands via Bluetooth were executed promptly.

..3 Discussion
The smart home automation system provided promising results, showcasing the effec-
tiveness of combining sensors, automation logic, and remote control to enhance energy
efficiency and user comfort.

Advantages:

15
• Energy Efficiency: By only activating devices when necessary (based on motion
and light levels), the system helps reduce electricity consumption, contributing to
environmental conservation.

• User Convenience: The integration of a mobile app offers remote access, enabling
users to manually control the devices even when the automation logic is not ideal for
certain situations. Real-time status updates on the app provide users with greater
visibility and control over their environment.

Limitations:

• Bluetooth Range Dependency: The system relies on Bluetooth communication,


which has a limited range (typically 10-30 meters). This restricts the user’s ability
to control the devices from locations beyond the Bluetooth range.

• Sensor Calibration Needs: Sensors like the light sensor and motion sensor re-
quire proper calibration to function accurately in different environments. For ex-
ample:

– Light levels may vary depending on room conditions (e.g., during the day or
night).
– The motion sensor may detect false positives or fail to detect movement if not
positioned optimally.

• No Remote Control Beyond Bluetooth: The absence of Wi-Fi limits remote


control to only within the Bluetooth range. A future improvement could involve
integrating a Wi-Fi module to allow users to control devices from anywhere with
internet access.

• Battery and Power Management: If the system is deployed for extended peri-
ods, power management may need to be optimized to ensure continuous operation,
especially when multiple sensors and devices are connected.

IV. Conclusion

The smart home automation system was successfully developed, fulfilling the pri-
mary objectives of automatic device control based on real-time environmental data and
providing remote access through a mobile app via Bluetooth connectivity. The system
demonstrated reliable performance, accurately responding to inputs from the motion,
light, and temperature sensors to control devices such as LED lamps and fans. The
ability to monitor device status and issue manual commands through the mobile app
added flexibility and convenience for users.
This project highlights the potential of IoT-based automation solutions to reduce
energy consumption and improve the comfort of daily life by ensuring that devices are
used only when necessary. The prototype showcased a seamless integration of hardware
components and software logic, successfully automating essential household activities.

16
Table 2: Author’s contribution

# Student ID Student Name Tasks Contribution


1 SE173406 Tran Van Vinh Contribute ideas,write report,support 30%
2 SE161472 Vu Tuan Hong Contribute ideas,making products 30%
3 SE171597 Nguyen Xuan Phong Contribute ideas,support 20%
4 SE183379 Nguyen Thanh Son Contribute ideas,support 20%
Total 100%

V. *

References

[1] M. Tellez, S. El-Tawab, and H. M. Heydari, “Improving the security of wireless sensor
networks in an IoT environmental monitoring system,” in 2016 IEEE Systems and
Information Engineering Design Symposium (SIEDS), IEEE, 2016, pp. 72–77.

[2] K. Ashton, “That ‘Internet of Things’ Thing,” RFID Journal, vol. 22, no. 7, pp.
97–114, 2009. This paper introduced the concept of IoT and its applications, providing
a foundation for developing automation systems like smart homes.

[3] J. Buckley, “Smart homes: Current features and future developments,” International
Journal of Smart Home, vol. 5, no. 2, pp. 25–38, 2011. This paper explores smart home
systems, their evolution, and the trends towards integrating advanced technologies
such as sensors and automation.

[4] R. Want, B. Schilit, and S. Jenson, “Enabling the Internet of Things,” Computer, vol.
48, no. 1, pp. 28–35, 2015. This work discusses how IoT technologies enable smart
devices, including those used in home automation systems.

[5] M. Weiser, “The Computer for the 21st Century,” Scientific American, vol. 265, no.
3, pp. 66–75, 1991. This paper discusses ubiquitous computing and its applications,
serving as a theoretical basis for IoT-based automation in smart homes.

[6] L. Atzori, A. Iera, and G. Morabito, “The Internet of Things: A survey,” Computer
Networks, vol. 54, no. 15, pp. 2787–2805, 2010. This survey provides an overview of
the main enabling technologies, applications, and research challenges associated with
IoT.

[7] A. Zanella, N. Bui, A. Castellani, L. Vangelista, and M. Zorzi, “Internet of Things for
smart cities,” IEEE Internet of Things Journal, vol. 1, no. 1, pp. 22–32, 2014. The
paper discusses the applications of IoT in creating smarter urban infrastructures and
enhancing quality of life.

17

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy