1. Trang chủ
  2. » Luận Văn - Báo Cáo

design and implementation of smart home system

85 0 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Design and Implementation of Smart Home System
Tác giả Lê Bá Minh Đạt, Nguyễn Văn Quang Huy
Người hướng dẫn Assoc. Prof. Ph.D Phan Văn Ca
Trường học Ho Chi Minh City University of Technology and Education
Chuyên ngành Computer Engineering Technology
Thể loại Graduation Project
Năm xuất bản 2024
Thành phố Ho Chi Minh City
Định dạng
Số trang 85
Dung lượng 6,35 MB

Cấu trúc

  • CHAPTER 1: INTRODUCTION (17)
    • 1.1. Introduction (17)
    • 1.2. Objective (17)
    • 1.3. Scope (18)
    • 1.4. Research Method (18)
    • 1.5. Object and Scope of the study (18)
      • 1.5.1. Object of the study (18)
      • 1.5.2. Scope of the study (19)
    • 1.6. Research contents (19)
    • 1.7. Outline (19)
  • CHAPTER 2: LITERATURE REVIEW (21)
    • 2.1. Internet of Thing (21)
      • 2.1.1. Introduction (21)
      • 2.1.2. IoT systems structure (22)
    • 2.2. SPI Interface (24)
      • 2.2.1. General introduction (24)
      • 2.2.2. SPI operating principle (25)
    • 2.3. UART Interface (26)
      • 2.3.1. General introduction (26)
      • 2.3.2. UART operating principle (26)
    • 2.4. I2C interface (28)
      • 2.4.1. General introduction (28)
      • 2.4.2. I2C operating principle (28)
    • 2.5. ESP32-WROOM-32 (30)
    • 2.6. Arduino Uno R3 (31)
    • 2.7. DHT11 temperature and humidity sensor (32)
    • 2.8. MQ3 alcohol gas sensor module (32)
    • 2.9. Module SIM 800L V2 5V (33)
      • 2.9.1. Global System for Mobile communication (33)
      • 2.9.2. Short messaging Service (35)
      • 2.9.3. Introduces the SIM800L V2 module (36)
    • 2.10. RC522 Module RFID Reader (36)
    • 2.11. Energy Meter Module PZEM-004T (37)
    • 2.14. Servo Motor SG90 (39)
    • 2.15. DC-DC XL4015 5A power module (40)
    • 2.16. LDR Sensor Module (40)
  • CHAPTER 3: SYSTEM DESIGN AND IMPLEMENTATION (42)
    • 3.1. System designing (42)
      • 3.1.1. Customer’s needs (42)
      • 3.1.2. Engineering requirements (42)
      • 3.1.3. System model of a smart home (45)
      • 3.1.4. Block diagram and functions of each block (45)
      • 3.1.5. Hardware design (53)
      • 3.1.6. Software design (58)
    • 3.2. System implementation (61)
      • 3.2.1. Model construction (61)
      • 3.2.2. Packaging and model construction (63)
      • 3.2.3. Algorithm flowchart (63)
      • 3.2.4. Smart Home control interface on Blynk App and Blynk Dashboard (69)
  • CHAPTER 4: RESULTS, OBSERVATIONS, AND EVALUATIONS (70)
    • 4.1. Results (70)
    • 4.2. Operational results (71)
  • CHAPTER 5: CONCLUSION AND FUTURE DEVELOPMENTS (76)
    • 5.1. Related Works (76)
    • 5.2. Conclusion (78)
    • 5.3. Future Developments (78)

Nội dung

• SDO/MOSI - master device data output, slave device data input.. • SDI/MISO - master device data input, slave device data output.. During data transmission by the Master, it injects 8 b

INTRODUCTION

Introduction

Applying information and communication technology to the house is becoming more and more of a trend in today's environment of ever-more-modern living, as well as a full answer to the demands of comfortable and secure living [1] However, a lot of problems need to be fixed in order to maximize this smart living area

Integrating security and performance in an Internet of Things (IoT)-based smart home system is one of the main problems When it comes to linking lighting, cameras, and house gates, security is always the first concern Effective solutions are required to solve the issues of safeguarding personal information and maintaining system security

Another difficulty is ensuring that gadgets are interoperable Variations in standards and protocols might lead to a decrease in user experience and performance Simultaneously, it was shown in [2] that the process of installation and management might become complex due to device integration from multiple manufacturers

To further enhance Smart house operations and reduce adverse environmental effects, attention must also be paid to energy-saving and connection stability concerns

The Internet of Things-based Smart Home project is not only a chance to address these issues, but it also serves as inspiration for building user-friendly, safe, and intelligent living spaces This graduation thesis subject will undoubtedly match the rising needs of contemporary living and significantly impact the industry's development.

Objective

Create a system that monitors and controls home devices using the Blynk app, a SIM card, and physical buttons

The system can send fire warning messages, gas leaks, electric leaks in water heaters, open and close doors with RFID, measure power consumption in an area, and turn lights on and off according to environmental light

Visually displayed on the LCD screen and on the Blynk App are display characteristics including door status, device status, temperature, humidity, gas and energy usage.

Scope

Control on and off low-power household appliances such as light bulbs, fans, etc

Connecting and interacting between devices can be difficult due to latency in communication standards

If the Internet connection is interrupted, remote monitoring and interaction capabilities will be affected

There may be thresholds of difficulty when it comes to changing user habits.

Research Method

Review research works related to Smart home and IoT to understand existing approaches and solutions

Build a test environment to deploy and test IoT devices in a Smart home environment Implement basic functions such as remote control, environmental measurement, and alarm

Evaluate the service quality of IoT systems, including response time, stability, and scalability

Research legal issues related to user data management and compliance with information security regulations.

Object and Scope of the study

The group conducted study on the research subjects to have a better understanding of how the issue was implemented, which made it simpler to solve the problems The following topics were investigated by the group:

ESP32, Arduino Uno R3 microcontroller: These are compact and popular microcontroller boards in electronic applications These microcontrollers will be used to control other modules and components in the system

Necessary modules and components: Includes PZEM004T used to measure power consumption, sim module 800L V2 used to transmit - receive signals to phone numbers via SMS, in addition, there are also sensors such as DHT11, MQ3 , LDR is used to measure parameters such as temperature, humidity, gas, light intensity

Programming software: The team will use the Blynk App to monitor and control home devices, and Arduino IDE to program the Arduino Uno R3 and ESP32 microcontrollers

The topic focuses on researching hardware (microcontrollers, modules and components) and software (Blynk App), to build an effective smart home system

Learn about the ESP32 and Arduino Uno r3 circuit boards, necessary modules and components: The group will research the features, how to use and connect these modules and components to the microcontroller

Programming microcontrollers and modules and components: The team will perform programming to control and interact between the Arduino Uno R3 and ESP32 microcontrollers with other modules and components in the system.

Research contents

During the implementation of graduation project with the topic "Design and implementation of smart home system ", we worked on overcoming and accomplishing the following contents: Content 1: Analyze the challenges of the project

Content 2: Learn about the technical specifications, guiding thought and theoretical basis of the components of the hardware

Content 3: Propose the model and summarize the overall system Design block diagram, principle diagram

Content 4: System configuration and design hardware

Content 5: Test run, check, evaluate and adjust

Outline

The research team worked hard to organize the material in the report so that readers could immediately grasp the subject's knowledge, technique, and operation The report is divided into five chapters, which are as follows:

Chapter 1: Introduction An overview of the report and presents the reasons for selecting the topic, as well as the research objectives, scope, and limitations

Chapter 2: Liturature review Give a clear explanation of the theoretical underpinnings of this issue and list all the information that will be needed

Chapter 3: Design and implementation Presenting system requirements, block diagrams and block functions, hardware design for the system, building algorithmic flowcharts

Chapter 4: Results, Observations, and Evaluation Presenting and analyzing the outcomes of hardware and software development

Chapter 5: Conclusion and Future Developments Presenting conclusions for final project, emphasizing the benefits and drawbacks of the topic, identifying faults made by the team during implementation, and providing recommendations for future improvement

LITERATURE REVIEW

Internet of Thing

As in [3], the internet of things, or IoT, is a network of interrelated devices that connect and exchange data with other IoT devices and the cloud IOT devices are typically embedded with technology such as sensors and software and can include mechanical and digital machines and consumer objects

Increasingly, organizations in a variety of industries are using IoT to operate more efficiently, deliver enhanced customer service, improve decision-making and increase the value of the business

With IoT, data is transferable over a network without requiring human-to-human or human- to-computer interactions

A thing in the internet of things can be a person with a heart monitor implant, a farm animal with a biochip transponder, an automobile that has built-in sensors to alert the driver when tire pressure is low, or any other natural or man-made object that can be assigned an Internet Protocol address and is able to transfer data over a network

The potential applications of IoT are vast and diverse In agriculture, IoT systems can monitor soil conditions, optimize irrigation, and automate crop management Healthcare benefits from wearable devices that track vital signs, monitor patients remotely, and offer personalized treatment plans Smart homes leverage IoT technology to control lighting, heating, and security systems, enhancing comfort and energy efficiency In the industrial sector, Industrial IoT enables predictive maintenance, real-time asset tracking, and intelligent supply chain management, optimizing productivity and reducing costs The widespread adoption of IoT is reshaping various industries, offering innovative solutions and improving efficiency in numerous aspects of our lives

It was shown in [4] that the IoT technology has risen in popularity in recent years, and it has a wide range of uses IoT apps function in accordance with how they were designed/developed depending on the many application domains However, there is no standard specified work architecture that is rigidly followed across the board The complexity and quantity of architectural

7 layers differ depending on the business goal at hand The typical and most frequently acknowledged format is a four-layer design

As depicted in the preceding diagram, there are four levels in existence: the Perception Layer, Network Layer, Processing Layer, and Application Layer

Perception/Sensing Layer: This is the initial tier of any IoT system, comprising "things" or endpoint devices acting as a bridge between the physical and digital realms This physical layer, housing sensors and actuators capable of receiving, accepting, and processing data across the network, is referred to as perception Sensors and actuators can be connected wirelessly or

8 through wired connections, and the design imposes no limitations on the scope or placement of its components

Network Layers: These layers detail how data is transmitted within an application, incorporating Data Acquiring Systems (DAS) and Internet/Network gateways

Processing Layer: Serving as the brain of the IoT ecosystem, the processing layer is where data is typically assessed, pre-processed, and stored before being transmitted to the data center There, it becomes accessible to software programs that monitor and manage the data while preparing subsequent actions This is where edge IT or edge analytics comes into play

Application Layer: User interaction takes place at the application layer, offering the user application-specific services The Internet of Things can be deployed in various ways, such as in smart cities, smart homes, and smart health.

SPI Interface

The Serial Peripheral Interface (SPI) is a widely utilized synchronous serial communication protocol employed for linking microcontrollers, sensors, memory devices, and various peripheral devices Its purpose is to facilitate data exchange among multiple devices through a master-slave architecture SPI is recognized for its simplicity, high speed, and versatility, contributing to its popularity in embedded systems and electronic applications

The fundamental communication principle of SPI revolves around the master-slave mode, wherein there is typically one master device and one or more slave devices The SPI interface is commonly denoted as a 4-wire serial bus, comprising SDI (data input), SDO (data output), SCLK (clock), and CS (chip select)

• SDO/MOSI - master device data output, slave device data input

• SDI/MISO - master device data input, slave device data output

• SCLK - clock signal generated by the master device

• CS/SS - Slave device enable signal controlled by the master device

On the SPI bus, multiple slave devices can appear at a time, but there can only be one master device The master device determines the slave devices to be communicated through the chip select lines This requires the slave device's MISO port to have three-state characteristics so that the port line will exhibit a high impedance when the device is not gated [5]

Figure 2.3 The SPI communication model [5]

Each Master and Slave device incorporates an 8-bit shift register along with a clock generator During data transmission by the Master, it injects 8 bits of data into its shift register, subsequently dispatching these 8 bits through the MOSI signal line to the Slave device Conversely, when the Slave transmits data, the bits residing in its shift register traverse to the Master via the MISO signal line

Consequently, a data exchange occurs between the two shift registers Simultaneous reading and writing of data into the Slave transpire, enabling rapid data interchange Hence, the SPI protocol stands out as a remarkably efficient communication protocol

The SPI protocol entails a configuration that dictates the timing of data reception between the master and the slave by utilizing two bits: CPOL (Clock Polarity) and CPHA (Clock Phase):

• CPOL = 0: The SCK signal is low when no data is being transmitted CPOL = 1: The SCK signal is high when idle

• CPHA = 0: Data is sampled on the first edge transition of the SCK signal and is changed on the second edge when CPHA = 1

Figure 2.4 The clock diagrams for SPI with CPHA=0 and CPHA=1 [5]

UART Interface

The Universal Asynchronous Receiver/Transmitter, abbreviated as UART, represents an integrated circuit within a computer or microcontroller designed for serial communication A microcontroller may include one or two UART peripherals The operation of a standard UART module depends on the logic level of the control signal, requiring a matching baud rate configuration at both the transmitter and receiver ends Data transmission is initiated by converting individual data bits into logic high, low, and stop bits [6] The fundamental characteristics of UART include:

• Universal Accepted: The speed, data size, and velocity can be configured easily to ascertain the requirements of the clients and follows the same protocol around the world

• Short Distance Transmission: UART is frequently used in short-range transmission In wired communication, the distance can be configured in terms of baud rate The relationship between the transmission distance and speed in UART is proportional to each other Shorter distance results in a faster data transfer rate The transmission distance can vary from few inches to meters on the basis of desired speed, noise generated due to external source, and quality of the external device

• Low-Cost Protocol: The non-requirement of a clock signal and single wire utilization to transmit data keeps the hardware simple, which in turn makes it cost-efficient compared to other data transfer modules

In UART, data is transmitted in the form of packets The segment that links the transmitter and receiver involves generating serial packets and managing those physical hardware lines A packet comprises a start bit, data frame, a parity bit, and stop bits

The UART data transmission line typically maintains a high voltage level when not actively transmitting data To initiate the data transfer, the transmitting UART lowers the transmission line from high to low for a single clock cycle Upon detecting this high-to-low voltage transition, the receiving UART starts reading the bits within the data frame at the baud rate frequency

The data frame contains the actual data being transferred It can be five (5) bits up to eight (8) bits long if a parity bit is used If no parity bit is used, the data frame can be nine (9) bits long

In most cases, the data is sent with the least significant bit first

Parity describes the evenness or oddness of a number The parity bit is a way for the receiving UART to tell if any data has changed during transmission Bits can be changed by electromagnetic radiation, mismatched baud rates, or long-distance data transfers

After the receiving UART reads the data frame, it counts the number of bits with a value of

1 and checks if the total is an even or odd number If the parity bit is a 0 (even parity), the 1 or logic-high bit in the data frame should total to an even number If the parity bit is a 1 (odd parity), the 1 bit or logic highs in the data frame should total to an odd number

When the parity bit matches the data, the UART knows that the transmission was free of errors But if the parity bit is a 0, and the total is odd, or the parity bit is a 1, and the total is even, the UART knows that bits in the data frame have changed

To signal the end of the data packet, the sending UART drives the data transmission line from a low voltage to a high voltage for one (1) to two (2) bit(s) duration

Data packets are used for data transmission

Starting with a Start bit, the high-voltage line is pulled to the ground

After the Start bit, 5 to 9 data bits of the packet's data frame are transferred, followed by an optional parity bit to verify proper data transmission

Finally, one or more stop bits are transmitted where the line is set high.

I2C interface

I2C amalgamates the favorable attributes of both SPI and UARTs According to sources [7], I2C permits the connection of multiple slaves to a single master (akin to SPI) and enables multiple masters to control a single or multiple slaves This proves advantageous in scenarios where more than one microcontroller is either recording data to a shared memory card or displaying text on a single LCD

Similar to UART communication, I2C utilizes only two wires to facilitate data transmission between devices:

SDA (Serial Data) – The line for the master and slave to send and receive data

SCL (Serial Clock) – The line that carries the clock signal

Because I2C is a serial protocol, data is sent bit by bit via a single wire (the SDA line)

Like SPI, I2C is synchronous, so the output of bits is synchronized to the sampling of bits by a clock signal shared between the master and the slave The clock signal is always controlled by the master

In the I2C communication protocol, The data is transmitted in the form of packets which consists of 9 bits

Figure 2.8 Transmitted in the form of packets of I2C [7]

To generate START, SDA is changed from high to low while keeping SCL high To generate STOP, SDA goes from low to high while keeping SCL high

The first frame following the start bit is the address frame The master sends the address of the slave with which the master wants to communicate to every slave connected to it Each slave then compares the address sent from the master with its own address

● If the address matches, it sends a low-voltage ACK bit back to the master

● If the addresses do not match, the slave does nothing and the SDA current between those 2 devices will remain high

This bit indicates whether the process is sending or receiving data from the Master device A high Read/Write bit means the master is sending data to the slave, whereas a low Read/Write bit means the master is receiving data from the slave

Abbreviation for Acknowledged / Not Acknowledged Used to compare the physical address bit of the device with the address to which it was transmitted After each data frame, an ACK/NACK bit is followed If it does, the Slave will be set to '0' and otherwise, the default will be '1'

The data frame is always 8 bits long and is sent with the most significant bit first (MSB) Each data frame is immediately followed by an ACK/NACK bit to verify that the frame was received successfully (bit 0 in the SDA line) The ACK bit must be received by the master or slave before the next data frame can be sent

After all data frames have been sent, the master can send a Stop condition to the slave to pause the transmission

To STOP, the voltage changes from low to high on the SCL line before switching the voltage from low to high on the SDA line

Master device will send a Start pulse by switching SDA and SCL from high voltage to low voltage, respectively

Next, Master sends the 7 or 10 address bits to Slave that wants to communicate with the Read/Write bit

Slave will compare the physical address with the address it was sent to If there is a match, Slave will acknowledge it by turning SDA low voltage and setting ACK/NACK bit to '0' If there is no match, SDA and ACK/NACK bits both default to '1'

Master device sends or receives a data bit frame If Master sends to Slave, Read/Write bit is set to '0' Otherwise, this bit is set to '1'

If Data frame has been successfully transmitted, ACK/NACK bit is set to '0' to signal Master to continue

After all data has been successfully sent to Slave, Master will send a Stop signal to notify Slave that the transmission has ended by switching SCL and SDA from low voltage to high voltage, respectively.

ESP32-WROOM-32

The ESP32-WROOM-32 stands out as a versatile and robust MCU module extensively applied in the development of WiFi-Bluetooth PCB circuits Bluetooth Low Energy (BLE) is notably employed in a myriad of IoT applications today Its usage ranges from low-power sensor networks to more intricate tasks like audio encoding, online music streaming, and MP3 decoding

At the core of the module lies the ESP32-D0WDQ6 chip, an embedded semiconductor designed for optimal scalability and customization Featuring two distinct CPU cores and an adjustable CPU clock frequency from 80MHz to 240MHz, this chip provides flexibility to programmers

They can disable one CPU to utilize the low-power coprocessor for tasks such as monitoring changes or surpassing peripheral thresholds Additionally, the ESP32 boasts a wide array of peripherals, including capacitive touch sensors, Hall sensors, SD cards, Ethernet, high-speed SPI, UART, I2S, and I2C [8]

Arduino Uno R3

The Arduino Uno R3 is an ATmega328P-based microcontroller board It includes everything needed to support the microcontroller; simply connect it to a PC via a USB connection and provide power via an AC-DC converter or a battery to get started The title "Uno" means "one" in "Italian" and was chosen to commemorate the debut of Arduino's IDE 1.0 software The R3 Arduino Uno is the third and most recent version of the Arduino Uno The Arduino board and IDE software are the reference versions of Arduino that are currently being updated The Uno- board is the first of a series of USB-Arduino boards, and it is the standard model for the Arduino platform [9]

DHT11 temperature and humidity sensor

The DHT11 Temperature Humidity Sensor is a common sensor nowadays since it is inexpensive and simple to obtain data via 1-wire transmission (single 1-wire digital communication) The sensor's built-in signal preprocessing allows you to obtain precise data without performing any calculations The DHT11 has a substantially lower measurement range and precision than the newer sensor DHT22

Figure 2.11 DHT11 temperature and humidity sensor module [9]

MQ3 alcohol gas sensor module

MQ3 Alcohol Gas Sensor detects the concentrations of alcohol gas in the air and ouputs its reading as an analog voltage The sensor can detect concentrations ranging from 0.04mg/L to 4mg/L Breathalyzers can use the concentration sensing range The sensor operates at temperatures ranging from -10 to 50°C and draws less than 150 mA at 5 V

By connecting five volts across the heating (H) pins, the sensor is kept hot enough to work properly When five volts are applied to either the A or B pins, the sensor emits an analog voltage on the other pins The detector's sensitivity is determined by a resistive load connected between the output pins and ground The resistive load should be calibrated for your specific application using the datasheet formulae, although 200 k is an acceptable starting point.Technical specifications:

Figure 2.12 MQ3 alcohol gas sensor module [9]

Module SIM 800L V2 5V

2.9.1 Global System for Mobile communication

GSM (Global System for Mobile Communication) is a digital mobile network widely utilized by mobile phone users in Europe and various global regions It employs a variant of time division multiple access (TDMA) and stands out as the most prevalent among the trio of digital wireless telephony technologies: TDMA, GSM, and code-division multiple access (CDMA) The process involves digitizing and compressing data, transmitting it down a channel alongside two additional streams of user data, each occupying its designated time slot GSM operates within the frequency bands of either 900 megahertz (MHz) or 1,800 MHz

Teaming up with other technologies, GSM plays a crucial role in advancing wireless mobile telecommunications This encompasses features such as High-Speed Circuit-Switched Data

(HSCSD), General Packet Radio Service (GPRS), Enhanced Data GSM Environment (EDGE), and Universal Mobile Telecommunications Service (UMTS)

It was shown in [10] that the GSM network is comprised of four distinct components that operate in tandem to function as a whole: the mobile device itself, the base station subsystem (BSS), the network switching subsystem (NSS), and the operation and support subsystem (OSS)

The hardware links the mobile device to the network The subscriber identity module (SIM) card sends identifying information about the mobile user to the network

Figure 2.13 Global System for mobile (GSM) network [10]

The base station controller (BSC) and the base transceiver station (BTS) are the fundamental devices responsible for facilitating communication between the mobile phone and the NSS The BTS comprises equipment that interacts with mobile phones, notably radio transmitter receivers and antennae, while the BSC acts as the intelligent component overseeing these operations The BSC effectively interacts with and manages a network of base transceiver stations

The NSS segment, often referred to as the core network in GSM network design, monitors caller locations to support the provision of cellular services Owned by mobile carriers, the NSS

19 includes components such as the mobile switching center (MSC) and home location registry (HLR) These elements serve various functions, including call routing, SMS, and the authentication and storage of caller account information via SIM cards

Due to roaming agreements between GSM network providers and their overseas counterparts, consumers can frequently use their phones when traveling to other countries Users can significantly reduce roaming fees without experiencing service loss by transitioning from SIM cards that store home network access configurations to those enabling metered local access

SMS (Short Messaging Service) is a synonymous term for text messaging, commonly involving the transmission of messages from one mobile device to another through the cellular network SMS operates as a text-only communication format, with its origins dating back to its establishment in the Global System for Mobile Communications (GSM) guidelines in 1985

While a single SMS message is confined to 160 GSM-7 characters, contemporary mobile phones can often break down and reassemble messages of up to 1,600 characters To accommodate emojis and characters beyond the GSM-7 alphabet, text communications utilize UCS-2 character encoding It's noteworthy that a single Unicode character converts the entire text message to UCS-2, imposing a limit of 70 characters on communications

The initial limitation of SMS to 160 characters was designed to integrate seamlessly with existing phone protocols This constraint was later incorporated into the SMPP Protocol when it gained prominence, facilitating the transfer of text messages between carriers

SMS message standards establish the details of information conveyed in a message, the way binary bits form letters, and how data is organized, transmitted, and received among devices The data format of a message encompasses not just the message text but also additional details like the timestamp and the sender's phone number

Protocol Description Units (PDUs) delineate message information in the form of a hexadecimal and semi-decimal string Hexadecimal, a base-16 counting system, represents numbers from 10 to 15 using the characters 0 to 9 and A to F

The PDU format consists of various information fields, with the initial bits containing details about the destination, including the message center and the sender's number Subsequent bits constitute the message string

Subsequently, details about the sender and recipient are transformed into a protocol format, accompanied by a tag identifying the encoding program utilized The tag specifies the encoding method, aiding the message center in determining the decoding software applied to decode the message Timestamp labels and information regarding the message length are also included

The SIM800L V2 5V Wireless GSM GPRS Module operates on a 5V power supply and features a PC debug USB to TTL serial interface It has an output current of 800mA, and its TTL serial interface is compatible with both 3.3V and 5V microcontrollers The module can be connected to a single-chip computer immediately after purchase

It comes with an IPX antenna, an antenna interface, and suction cups that can be freely interchanged with PCB glue stick antennas The SIM800L supports 4 frequency communications, ensuring global data availability It is suitable for overseas trade and supports foreign trade initiatives

RC522 Module RFID Reader

RFID technology, also recognized as Radio-Frequency Identification, is a system designed to automatically identify information from a distance using radio waves This process involves the interaction between the RFID tag and a dedicated reader Each RFID tag comprises a chip and an antenna, enabling it to store and retrieve specific information [11]

The RC522 RFID module, utilizing the NXP MFRC522 IC, stands out as one of the most cost-effective RFID solutions available online, with a price tag of less than four dollars It is bundled with an RFID card tag and a key fob tag featuring 1KB of memory Notably, it possesses the unique capability to generate tags, empowering users to store various messages within it

Figure 2.15 RC522 RFID Reader with Cards Kit [11]

Energy Meter Module PZEM-004T

The PZEM004T device gauges energy consumption by monitoring a live AC mains cable, employing an inductor as the measurement sensor It's important to note that there are currently at least two versions (3/2020): V2.0, which utilizes the standard serial protocol, and V3.0, which employs Modbus This project utilizes V2.0

One of the wires, typically the AC power phase, passes through the inductor, enabling the measurement of the current flowing through it and subsequently monitoring other measurements [12], including power consumption

The PZEM004T outputs the collected data through an opto-coupled isolated serial port This feature facilitates the retrieval of values for voltage, current/intensity, current power consumption, and accumulated energy consumption

Figure 2.16 Energy Meter Module PZEM-004T [12]

A 5V relay module is a relay module with a single or multiple channels that functions on a 5V DC low-level trigger voltage Any microcontroller or logic device capable of outputting a digital signal can supply the required input voltage

Similar to many other relays, the 5V relay module is an electromagnetically controlled, electric switch utilized for circuit activation or deactivation It consists of two components: the relay and the control module

This module is an Arduino compatible LCD display module with high speed I²C interface It can display 20×4 characters (white characters on a blue background)

• Sharp visibility: The clear presentation achieved by featuring white characters on a blue background ensures a sharp and easily legible display, which is essential for projects necessitating distinct visualizations

• Customizable contrast: The incorporation of a trimmer for contrast adjustment provides users with the flexibility to tailor the display according to their preferences, enhancing functionality for diverse lighting conditions and project requirements

• Rapid I2C interface: The swift I2C interface, recognized for its simplicity and speed, minimizes the setup time for connections, allowing users to focus more on their projects.

Servo Motor SG90

The Servo Motor SG-90 (SG90) is a compact and cost-effective servo motor commonly used in various applications that demand precise control of angular motion Despite its diminutive size, it delivers outstanding performance and versatility It can be easily powered by standard power sources, given its operational voltage range of 4.8V to 6V The SG90 servo motor is designed to rotate within a 180-degree span, providing a broad range of motion for control systems Its built-in gear system ensures smooth and accurate movement, facilitating precise positioning of objects or components This makes it well-suited for precision-control applications such as robots, RC vehicles, and pan-tilt camera systems

Figure 2.19 Servo Motor Pinout (Wires) [15]

DC-DC XL4015 5A power module

To lower DC voltage, utilize the XL4015 (5A) DC voltage reduction circuit with current adjustment In order to assist assure safety when utilized in applications, the circuit additionally includes a voltage limit variable resistor and an inbuilt comparator opamp IC at the output When contact or overcurrent occurs, the circuit will immediately shut off and flash an LED to alert users

Figure 2.20 XL4015 DC-DC Voltage Regulator [16]

LDR Sensor Module

The LDR sensor module is used to measure light intensity It is connected to the board's AO and DO labels, which stand for analog and digital output pins, respectively When there is light,

25 the LDR's resistance will decrease in proportion to the light's intensity The LDR's resistance decreases as light intensity increases The potentiometer knob on the sensor allows you to modify the LDR's sensitivity to light

Figure 2.21 LDR Sensor Module (Light Dependent Resistor) [17]

SYSTEM DESIGN AND IMPLEMENTATION

System designing

• Control the device on/off using the application on the phone or website and control directly with buttons

• The outside lights have 2 modes: auto based on environmental light and manual

• Monitor the operational status of devices and receive emergency alerts (track power consumption, detect anomalies like electrical or gas leaks, observe improper operation)

• Implement a backup alert plan when the phone or computer is in a location without Wifi or 4G connectivity

• Unlock the door with a magnetic card

Function: a) Manual Device Control or App/Website:

• Function to receive on/off information

• Transmit information to the database

• Update and store information in the database

• Transmit information to the central processing unit to perform on/off functions b) Environmental Parameter Measurement:

• Function to collect information from the environment

• Transmit information to the database

• Update and store information in the database

• Transmit information to the central processing unit to perform functions when there are changes in environmental parameters directly affecting the system or system users c) Monitoring Device Activity and Emergency Alerts:

• Function to collect information from monitored devices

• Transmit information to the database

• Update and store information in the database

• Transmit information to the central processing unit to perform functions in response to changes in pre-set device parameters, directly impacting the system or system users

Non – Function: a) Manual Device Control or App/Website:

• Users initiate on/off requests (1/0) for a device (e.g., a light) by pressing the virtual on/off button designed on the App or Web

• The database (linked to App/Web) sends information to the central processing unit with on/off signals (1/0) via the Internet (Wifi)

• The central processing unit transmits the received 1/0 signal to the intended device Through Physical Button:

• Users make requests by pressing a physical button to turn a device on/off

• The central processing unit receives the 0/1 signal to transmit to the intended device and simultaneously updates synchronized information to the Database

• The Database updates the status of the virtual button on the App/Web according to the actual status of the device being on or off

Using RFID Card (Door Unlock):

• Users utilize an RFID card to identify pre-confirmed card information

• The central processing unit matches the pre-set information; if matched, it sends a signal to unlock the door, simultaneously synchronizing information to the Database

• The Database updates the status of the device to reflect the actual status

Table 3.1 Environmental Parameters Measured: Humidity, Temperature, Gas Levels

Temperature Humidity Gas Levels Light

Processing Information Based on Parameters:

• Normal Level: Devices operate normally when the temperature is between 20°C - 28°C and humidity is between 40% - 70%

• High Level (Warning): Immediate alerts are sent to the App if the temperature reaches 100°C, triggering the home's fire prevention system

• Normal Level: Ventilation fan remains off when gas levels are between 20% - 40%

• High Level: Immediate notification is sent to the App if gas levels rapidly exceed 65%, indicating a severe gas leak

• Low level: bright sky, light level between 100% and 50%, no lights on

• High level: It's dark, the light level is between 19% and 0%; switch on the balcony or garden lights c) Monitoring Device Activity and Emergency Alerts:

Monitoring Power Consumption (Air Conditioner):

• Track the operating power of the air conditioner when turned on

• Update information every 10 seconds from the Database to the App/Web for calculating power consumption using the formula: A = P.t, where A is the power consumption, P is power (in KW), and t is the usage time (in hours)

3.1.3 System model of a smart home

Figure 3.1 The overall scheme of the Smart Home system

3.1.4 Block diagram and functions of each block

Figure 3.2 Block diagram of Smart Home system

• Primary Microcontroller: Generates control commands and oversees system operations Receives signals from sensors, processes them, and sends control signals to other blocks

• Secondary Microcontroller: Controls system operations such as opening/closing doors and turning on/off LEDs Receives signals from the SIM module and security block, then sends signals to the main controller

• Power Supply Block: An essential block that supplies power to the entire system

Requires careful calculation to ensure the power supply block delivers sufficient current and voltage for the circuit to operate well and stably In this project, two power sources are used: 5VDC for ESP32 and 9VDC for Arduino Uno R3

• Security Block: Opens/closes doors when users scan cards and issues warnings for gas leaks, theft, or electrical leaks from hot water machines

• Output Block: Controls devices such as lights, servo motor

• Module SIM: Sends messages or calls to control devices Sends messages and calls the homeowner in case of emergencies

• Backup Power: Provides temporary power to the secondary microcontroller so that the security system can operate for a while when a power outage occurs

• Relay Block: Controls the opening and closing of relays based on ESP32 output to manage high-voltage devices (220V) Provides isolation between the power and control circuits

• Sensor Block: Measures sensor values and sends them to ESP32 for processing

• Button: Manually controls the on/off of devices

• Device Activity Monitoring Block: Calculates the power consumption of the air conditioner Monitors the current of the hot-cold water tank; if it exceeds the allowed level, the central processing block signals an electrical leakage to the security block Checks the window status when the air conditioner is on

• Display Block: Displays time, sensor values, and device status on the LCD screen Selecting devices

Table 3.2 Evaluating and choosing devices for primary microcontroller

Number of GPIO 17 29 Multiple I/O ports

Channel Width 20MHz 40MHz Fast data transmission speed

Conclusion: Using ESP32, although the price is high, is suitable for the speed and connection port criteria

Table 3.3 Evaluating and choosing devices for display unit

LCD Text 2004 LCD Text 1602 Require

Large size, displays many parameters

Conclusion: Choose the Text 2004 LCD screen because of its reasonable size and economical cost

Table 3.4 Evaluating and choosing devices for relay

Input 5/12/24 VDC 7~24 VDC 5 VDC voltage suitable for microprocessor

Can use 220V household electrical equipment

Conclusion: Use Relay Opto High/Low because it meets the stated requirements and is cheap

Table 3.5 Evaluating and choosing devices for power supply

Output 5 VDC 3.6 ~ 3.7 VDC 5 VDC voltage suitable for microprocessor

Unlimited Limited Provides continuous power for operating equipment

Conclusion: Use honeycomb sources to provide power for processors and equipment

Table 3.6 Evaluating and choosing devices for module sim

Size 27mm x 32 mm 25mm x 22mm Prioritize compact size

Conclusion: Using the sim800L module because of its compact size helps save space and reduce the cost of the entire system

Table 3.7 Evaluating and choosing devices for temperature & humidity sensor

Conclusion: Use the DHT11 sensor because it meets the two criteria

Table 3.8 Evaluating and choosing devices for gas sensor

MQ2 MQ3 Require input 5 VDC 5 VDC The input power is equal to the total power

Conclusion: Use the MQ3 sensor because it meets all 3 criteria mentioned

Table 3.9 Evaluating and choosing devices for secondary microcontroller

Number of GPIO 20 16 Multiple I/O ports

Convenient to locate and purchase

Yes No Save time to find

Conclusion: Use Arduino Uno R3 for convenience but have to accept the higher price

Table 3.10 Evaluating and choosing devices for security

Multi-purpose use Yes No Use for many different purposes

Convenient to locate and purchase

Yes No Save time to find

Conclusion: Use RC522 because of the low price and diversity of functions of this module

Table 3.11 Evaluating and choosing devices for servo motor

Servo SG90 Servo MG996 Require

Conclusion: Because it is used for simple purposes, there is no need for a very expensive servo So the SG90 servo is a reasonable choice

Table 3.12 Evaluating and choosing devices for device activity monitoring

Stable Less Stable High stability avoids component damage

Plug the wire directly into the module

No Yes Limit contact with power lines

Conclusion: Because this is an electric current that can be life-threatening, the ACS712 module cannot be used arbitrarily Use PZEM-004T to avoid circuit contact causing leakage

Figure 3.3 Principle diagram of the system model a) Secondary Microcontroller Block

Use Arduino Uno R3 as the processing center

Pins A0-A4 are connected to the LED Arduino receives the signal to turn on and off the push button from the ESP32 to change the led value

Digital pins 2,3: Connect to sim module to transmit and receive SMS

Digital pins 4,5: Connect with servo motor to open door or window

Digital pins 6,7: Connect to Buzzer

Digital pins 9-13: Connect to RFID card reader module RC522 b) Security Block

The RFID card reader RC522 works at 3.3V with a current of 100mA SPI communication technology is supported, with a speed of 10Mbit/s

The two buzzers are linked by connecting the buzzer's positive pin to pins 6 and 7 of the Arduino Mega, and the buzzer's negative pin to GND When a problem arises, the Arduino sends a PWM pulse to the horn's positive wire, prompting it to sound an alert c) Module SIM Block

The SIM module block has a SIM module that is attached to Arduino Uno R3 pins 6 and 7 These two pins are utilized to connect with Arduino via UART d) Output Block

Two 5V SG90 servo motors are utilized to regulate the opening and shutting of major doors or windows

5 single LEDs: Turn on and off using physical signals or the ESP32's internet connection e) Primary Microcontroller Block

Use the ESP32 WROOM 32D Wifi transceiver kit as the processing center

Pin G13: Read and process information from temperature and humidity sensors DHT11 Pin G34: Read signal from gas sensor MQ3

Pins G0, G4, G19, G23, G25, G26, G32, G33: Connect to 6 buttons to turn the device on and off manually

Pins G2, G18: Connect to relay to control devices using 220v AC power

Pins G16, G17: Connect to the PZEM-004T electrical measurement module via UART communication standard

Pins G21, G22: I2C communication with LCD f) Sensors Block

The sensor block measures values such as: gas, temperature and air humidity

Operating voltage of the sensors: 5V g) Device Activity Monitoring Block

Control the operation of the air conditioner (replaced by light bulb) If the air conditioner is turned on, the windows must be closed to save electricity In addition, if the PZEM-004T power measurement module detects that the voltage exceeds the threshold, it will sound the siren and send a warning message h) Display unit Block

The security block includes a 4x20 LCD used to display temperature, humidity and gas parameters After 5 seconds, the screen switches to displaying values measured from the PZEM- 004T module such as voltage, amps, watts i) Relay Block

Select a 5 Vdc relay; to activate the contacts on this kind, just provide 5 Vdc to both ends of the coil and make sure the coil's current is more than 70 mA Conversely, it is ensured that the current flowing through the contacts of the lights and fans will be safe because this relay has a maximum contact current of 10A j) Button Block

Connect to 8 physical buttons to turn functions on and off manually k) Backup Power Block

Backup power is taken from a 18650 rechargeable battery with a voltage of 3.7V and a capacity of 3800mAh If only one battery is used, the circuit will not have enough voltage to operate, so we will connect 2 batteries in series to get a backup power source with a voltage of 7.4V

Principle of switching secondary sources:

• When there is power, the signal to the relay IN = 1, the relay closes at COM - NO and uses a 9V power source with a voltage drop from the 220V honeycomb source

• When there is a power outage, the relay closes at COM - NC, the system uses power from the 7.4V battery for the Arduino l) Power Supply Block

To design the power supply block, the team listed tables to calculate the current and voltage levels used in the circuit

Table 3.13 Total current used in the circuit (ESP32)

Table 3.14 Total current used in the circuit (Arduino Uno R3)

According to the tables above, the team supplies the entire system with a power block, which has a single honeycomb source that converts 220 VAC to 12 VDC with a maximum output current of 10 A For the control circuit, use the XL4015 module to reduce the voltage from 12V to 5V, and for the Arduino Uno R3, use another XL4015 module to reduce the voltage from 12V to 9V

Figure 3.4 Printed circuit board of hardware

The Arduino IDE (Integrated Development Environment) is a programming software tool for Arduino boards It includes a user-friendly interface and a suite of libraries that make writing and uploading code to microcontrollers easier The Arduino IDE may also be used to program the popular Wi-Fi-enabled modules ESP8266 and ESP32 microcontrollers, which are often utilized in IoT applications [18]

As mentioned earlier this is an open source IDE which makes the coding very easy that even a common person with no high technical knowledge can make codes for it This IDE is available

43 for Windows, MAC, Linux operating systems and it runs on the JAVA platform It is based on

“Processing” programming environment and comes with many inbuilt functions and command which makes the software very easy to use

The code that we write in this IDE is known as sketch After compiling an sketch it gives a Hex file which we can upload to the Arduino The code is written in the C or C++ language Its user interface has a navigation menu bar on the top, text editor in which we write the code and a output pane where compilation logs are shown At the top name of the sketch and version of Arduino is displayed Then we have the Menu bar just below that In the menu bar we have five options Let’s see them one by one

Figure 3.6 Arduino IDE Interface [18] b) Blynk IOT

Blynk is a software package that allows for the prototype, deployment, and remote administration of linked electrical devices at any size

Blynk enables users to connect their hardware to the cloud and create iOS, Android, and web applications, analyze real-time and historical data from devices, remotely control them from anywhere, receive important notifications, and much more, whether it's personal IoT projects or commercial connected products in the millions [19]

Figure 3.7 Operating model of Blynk IOT [19]

The platform is made up of three primary components:

• Blynk App allows you to develop stunning interfaces for your projects by utilizing the many widgets we offer

System implementation

The model is made of formex material Formex, often referred to as Fomat, is a high- temperature compressed foam sheet Formex panels have the following qualities: they are lightweight, easy to transport, resistant to high impact pressures, and offer superior heat and sound insulation Formex panels come in a variety of sizes and thicknesses; the typical dimension is 1220 x 2440 mm, and the thickness indications are 2 mm, 3 mm, 5 mm, 8 mm, 10 mm, and 20 mm

A paper knife is required to cut formex When cutting components that demand high accuracy and beauty, you must measure and manipulate properly and skillfully to fulfill aesthetic criteria

We used candle glue to attach the formex pieces together after cutting a) Prepare material

• 1 formex plate: 3mm thick, size 100x100 cm

• Paper knife, glue gun, ruler, pencil + eraser, scissors b) Implementation

In order to design a model that fully meets the requirements for functionality and aesthetics, the implementation team has formed the following idea and sketched out the model:

Form thoughts regarding dimensions, layout, and model design on paper first The Formex is then measured and cut

Table 3.15 List the components used

No Component name Quantity Note

4 RFID RC522 1 Card Reader Module

The model has dimensions of 45x30x25cm Modules are installed as follows:

• 4 single LED lights installed in each room

• LDR sensor installed on the roof to easily get optical resistance value

• DHT 11 is installed on the rooftop

3.2.3 Algorithm flowchart a) Secondary microcontroller algorithm flow chart

Figure 3.8 Secondary microcontroller algorithm flow chart

• Upon system initiation, the program initializes input/output ports, and initializes the UART communication standard

• Subroutine for reading RFID cards

• Subroutine for SIM card communication

• The system will check the gas and voltage indicators If these indicators are greater than the threshold, a warning message will be sent to the registered phone b) Algorithm flow chart of subroutine "read RFID tag"

Figure 3.9 Algorithm flow chart of subroutine "read RFID tag"

• First, the system initiates the SPI connection to communicate with the RC522 RFID card reader module, initiating the connection with the servo to control the door

• If the ID matches, the servo motor is turned on to open the door Otherwise, if the

ID is wrong, the door will not open and the buzzer will turn on c) Algorithm flow chart of transmit and receive SIM:

Figure 3.10 Algorithm flow chart of transmit and receive SIM

• Create an authentication phone number

• The signal from the sim module is checked by the system If there is a signal, read and save the string into the array before checking it

• The signal from the sim module is checked by the system If there is a signal, check if there is a message or not and determine if it is coming from the registered cellphone number or not

• If it is the registered mobile number, check the stored array to see if the message was sent in the right format If the message is correct, send notification back to phone number and control devices as required, otherwise notify incorrect message syntax to phone number d) Algorithm flow chart of Primary microcontroller

Figure 3.11 Algorithm flow chart of Primary microcontroller

• Upon system initiation, the program initializes input/output ports, connect to WiFi network and initializes the UART communication standard

• Check wifi connection, if there is connection then send auth to blynk server

• Subroutine for “read input sensors”

• Subroutine for “monitor air conditioner operation”

• Send data to blynk server and display it on blynk app e) Algorithm flow chart of subroutine “read input sensors”

Figure 3.12 Algorithm flow chart of subroutine “read input sensors”

• The system reads the DHT11 sensor's temperature and humidity data, as well as the MQ3 sensor's gas value

• If the value of the gas sensor exceeds the threshold, the buzzer will sound and a warning message will be sent

• The system will transform the sensor readings into a string and show it on the LCD and blynk app f) Algorithm flow chart of subroutine “monitor air conditioner operation”

Figure 3.13 Algorithm flow chart of subroutine “monitor air conditioner operation”

• Initialize the values and declare the library When the air conditioner is turned on, it will check the opening and closing status of the window

• If the window is open, the servo motor will be activated to close it The system then computes the amount of power utilized while also monitoring the air conditioner's leakage current

• If the voltage reading exceeds the threshold (indicating an electric leak in the air conditioner), the buzzer will sound and an alert message will be delivered

• Voltage, current, and capacity measurements will be kept and shown on the LCD and the Blynk app

3.2.4 Smart Home control interface on Blynk App and Blynk Dashboard

After configuring both Blynk App and Blynk Dashboard, we have the user interface for the Smart Home system as follows:

Figure 3.14 Blynk App & Blynk Dashboard

RESULTS, OBSERVATIONS, AND EVALUATIONS

Results

The sensors utilized in this research (DHT11, MQ3) are important in everyday life The study process increased the team's comprehension and use of sensor technology, as well as their knowledge of numerous sensor kinds The practical application of theoretical knowledge was stressed, allowing for the selection of sensors that are appropriate for real-world requirements

The PZEM-004t device receives system voltage and current values, transforms them to UART data using TTL logic, and sends them to the ESP32 processor unit The data is then displayed on a Liquid Crystal Display (LCD) and transmitted to the Blynk server for use with smartphone apps

Expertise in Arduino Uno R3 Programming:

The Arduino Uno R3, a popular intelligent circuit board, requires knowledge to fully utilize its functions The team's capacity to read values from multiple sensors was improved as a result of the study effort The team successfully showed information on an LCD 16x2 and accomplished data transmission and receiving via UART for control via a SIM card in this project

Utilization of the ESP32 WiFi Module:

Because of its low cost, small size, and user-friendly capabilities, the ESP32 is extensively utilized for WiFi connection between devices and smartphones or webservers Because of the study, the team was able to employ this module for data transmission with the Blynk app

Use of the Blynk Application:

The team successfully installed and paired the Blynk app with the ESP32 after much study The user interface was adaptable, allowing for customized management of IoT devices as well as the execution of sophisticated operations and interactions via code Blynk supports a variety of hardware platforms, making it simple for users without substantial programming skills to integrate IoT devices into their applications

RFID Programming for Door Control:

RFID systems have a wide range of applications, including vehicle control, toll collecting, passenger luggage control, personnel management, and employee attendance Using RFID technology, the researchers successfully programmed the system to open and close doors

This project taught the team about data transfer between controllers by utilizing Arduino to control door access and LED status UART connectivity was used to transmit data between the Arduino Uno R3 and the ESP32."

Operational results

56 a) The device control box includes push buttons, LCD screen and 220V light bulb (replaces air conditioner)

Figure 4.2 The device control box b) Outside lights operate according to light sensors

Figure 4.3 Outside lights operate in auto mode

57 c) Scan the RFID card to open and close the door

Figure 4.4 Scan RFID card d) Displays the value measured by the PZEM-004T module and temperature, humidity and gas values on LCD

Figure 4.5 Displays parameters on LCD

58 e) Control the device via SIM

Figure 4.6 Control the device via SIM module f) Graph showing power consumption on Blynk App

Figure 4.7 Graph of electricity consumption over time

After testing the system, the team received the following data:

Blynk App Blynk Web Evaluate

The team determined that the system matched the requirements and met the specified goals based on the data in the table above The model is visually appealing, safe, secure, and simple to use After some testing, the circuit has shown to be stable However, certain constraints must be solved if it is to be implemented in real life, such as poor control and reaction speed, no homeowner identification function, and no fire extinguishing system when a fire is detected

CONCLUSION AND FUTURE DEVELOPMENTS

Related Works

In the literature, several designs and implementations of IoT smart home architectures have been presented [20], [21], [22], [23], [24]

Chaudhuri et al [20] designed and implemented an IoT framework for home automation and monitoring They controlled the home appliances with the human being Their paper prototyped several smart home projects: Turning ON/OFF lights, motion sensing, smoke sensing, and temperature detection However, their work is a limited number of source nodes (sensors/actuators), and thus the IoT smart home system couldn’t be extended to provide scalability Their proposed system depended upon human interaction and didn’t reflect the smart or automation concept in their system

Jabbar, et al [21] designed and fabricated a smart home prototype based on an automation system using an Arduino controller and an Android smartphone Several sensors, Arduino, ESP8266 Wi-Fi, actuators, and home appliances were installed to develop the proposed smart home system However, their work adopted the centralized approach In this work, an Arduino was a controller for all system components The centralized manner caused a single-point failure and doesn’t meet the IoT concept In addition, a single Arduino had limited Input/output terminals, which made the system can’t achieve scalability Finally, it didn’t develop parallel distributed “heterogeneous” networks

In [22], Hoque et al proposed a framework to build a low-cost smart home security system The design included a Camera, a magnetic reed switch, an Arduino, a Raspberry Pi, and an Android application via the Internet However, their work didn’t tackle other scenarios or applications in the smart city Although Wi-Fi technology is cheap and exists in most smart home systems, it can’t be used for communication in the smart security system The authors exploited two main controller units “Arduino and Raspberry Pi” for the communication between the magnetic reed switch and the internet-based RF signals, which encounters interference Thus, this smart security system was expensive compared to other smart home systems

Tayan et al [23] proposed a home automation system based on IoT technology and focused on safety monitoring, home-security monitoring and energy monitoring and control Each domain had its associated controller and isolated components Scalability, heterogeneity, and modularity are considered in their design However, in the security monitoring module, an ultrasonic sensor detects objects at a very narrow distance and didn’t cover a long-range distance The communication technology used in their module was Bluetooth which only covere a short- distance region The wireless connectivity was not supported in both the energy monitoring and

61 the safety monitoring modules The sensors were communicated with the internet using an Ethernet shield In case of any failure or faults in the wired connections, all components in the smart home automation system are disconnected Finally, the system may be subject to a single- point failure due to Master Arduino that was centralized around the smart home automation system

In [24], Davies et al formulated, architected, and installed the Rapid Application Development (RAD) in the smart home system based on IoT technology to increase the robustness and to solve the problem of time development However, the smart home system was simulated and did not practically prototype and the number of sources (appliances, sensors) was not considered in the execution time result to judge the robustness of their system

All previous works did not completely break free from the shackles of traditional automation concepts, which monitor physical parameters in the sensory field "physical layer" side using source nodes (sensors, appliances, cameras, etc.) and then control or actuate home appliances in the same environment through a web server or mobile application in the front end "application layer" The earlier solutions used a single communication route from the sensory field to the cloud via the centralized controller unit "Arduino/Rasberry Pi" This issue might arise from a single-point failure As a result, this failure will cause traffic congestion and a high traffic load on the central unit Specifically, when it accepts or receives data from a massive number of source nodes

The central controller's limited power, CPU, and memory capacities prevented the conventional subsystem from handling the enormous traffic load, therefore it was sent to the cloud As a result, present solutions cannot be deployed over wide regions and lack scalability This difficulty prevents these systems from interacting with other heterogeneous networks The coexistence of classic IoT-based home automation systems and other networks with different technologies increases traffic load and creates a new wave of complex traffic that is difficult to handle and analyze on the cloud entity

The majority of previous works depended on a central controller unit with restricted input/output terminals to interface and manage genuine smart home systems, incorporating huge IoT devices (sensors, actuators, and home appliances) This constraint constrains the scalability idea

Finally, prior works covered registering with an IP address on a mobile application to gain access to the smart home automation system However, they did not address the security system They did not provide a framework for preventing unauthorized individuals from accessing the IoT smart home system

Conclusion

Following the research and building processes, as well as synthesizing the outcomes gained in comparison to the goals stated Some of the following conditions have been met by the group:

• The product satisfies the criteria for remotely controlling and monitoring the status of devices and sensors over the internet

• Display system information on LCD screen

• When gas or electric leaks are detected, a buzzer alarm will sound and a warning message will be sent to the phone

• Use RFID to unlock doors

• Monitor the amount of electricity consumption used in a specific place via Blynk App

• The windows automatically close when the air conditioner is turned on

• The model has few equipment and features

• Controlling the model using the mobile network is not stable

• The amount of electricity consumed measured from the electricity meter module will not be as accurate as the electricity meter of the electricity company.

Future Developments

The system needs to be edited to be more complete Below are some issues raised to perfect the product and be closer to reality

• Expand the number of devices that need to be controlled with large capacity

• Expand more automatic doors that open and close by recognizing fingerprints or faces

• Add surveillance cameras at the door to ensure security

• Automatically turns off the device when the homeowner forgets to turn it off

• Use automatic gas shut-off valves

• Use smart devices to control products

• Optimize solutions when fires and gas leaks occur

• Improved detection time for gas leaks and leak currents

[1] T Malche and P Maheshwary, “Internet of Things (IoT) for building smart home system”, 2017

[2] J Li and Y Lin, “IOT home automation – Smart homes and Internet of Things”, 2021 [3] A Shaw “What is IoT (Internet of Things)? Definition, Meaning, Devices &

[4] K Eswari, DeviK Shravani, M Kalyani, Mr Abbas Hussain, Mrs N Gayathri,

[5] F Leens, “An introduction to I2C and SPI protocols”, 2009

[6] Dawoud Shenouda Dawoud; Peter Dawoud, “Serial Communication Protocols and Standards RS232/485, UART/USART, SPI, USB, INSTEON, Wi-Fi and WiMAX”, 2020 [7] D S Patel, P Talati, and S Gandhi, “Design of I2C Protocol”, 2021

[8] P Chaudhary, S Goel, P Jain, M Singh, “ESP32-WROOM-32D and ESP32-WROOM- 32U”, 2017

[9] G M Debele and X Qian, “Automatic Room Temperature Control System Using

Arduino UNO R3 and DHT11 Sensor”, 2020

[10] S Ndungu, “GSM (Global System for Mobile communication)”, 2020

[11] A R Laxmi and A Mishra, “RFID based Logistic Management System using Internet of Things (IoT)”, 2018

[12] Sudha Kousalya, G Reddi, Priya Vasanthi, B Venkatesh, IOT Based, “Smart Security and Smart Home Automation”, 2018

[13] Satyaranjan Sahoo, Pritam Parida, “IOT BASED HOME AUTOMATION”, 2019

[14] El-Hajj M., Fadlallah A., Chamoun M., Serhrouchni A, “A Survey of Internet of Things (IoT) Authentication Schemes Sensors”, 2020

[15] Shaik Fareed Ahmed, Mohammed Abdul Sami Rahman, Syed Mudaseer Ahmed Razvi, Adeel Ahmed, “Smart Energy Efficient Home Automation System Using IOT”, 2021

[16] K Eswari, DeviK Shravani, M Kalyani, Mr Abbas Hussain, Mrs N Gayathri,

“Real-Time Implementation of Light and Fan Automation using Arduino”, 2020

[17] Arpita Yeaned, Prof Kapil Misael, “Home Automation System Using Raspberry Pi”,

[18] P Chaudhary, S Goel, P Jain, M Singh, P K Aggarwal and Anupam, “The Astounding Relationship: Middleware, Frameworks, and API”, 2021

[19] Z Lee, “The Internet of Things: Getting Started with Blynk”, 2019

[20] T Chaudhuri, V Nyamati and K Jayavel, “Design and implementation of IoT framework for home automation and monitoring”, 2018

[21] W A Jabbar, M H Alsibai, N S S Amran and S K Mahayadin, “Design and implementation of IoT-based automation system for smart home”, 2018

[22] M A Hoque and C Davidson, “Design and implementation of an IoT-based smart home security system”, 2019

[23] O Tayan, M Alalawi, A Alahmadi and A Albinsari, “Design and implementation of a multi-function home automation system based on Internet of Things (IoT)”, 2019

[24] E I Davies and V I E Anireh, “Design and implementation of smart home system using Internet of Things”, 2019

Instructions for using and operating the Smart Home system

• Power up the system using a 12V-10A beehive power source

• Supply additional power to the door lock system using 2 7.4V batteries

2 Manual Device Control via Device Control Box:

• The first four buttons will be labeled LIVING ROOM, BEDROOM, KITCHEN, ROOFTOP

• The functions of these buttons are to turn on/off the lights corresponding to their names

• OUTSIDE button: Turn on/off the lights outside the porch

• WINDOW button: Open/close the window

• MAINDOOR button: Open/close the main door

• AIR CONDITIONER button: Turn on/off the 220V light bulb

3 Device Control via Blynk Dashboard or Blynk App:

Access the link: https://blynk.cloud/dashboard/login and log in with the provided account

Figure 2 Blynk Dashboard login screen Upon successful login, you will have a control and monitoring interface as shown below:

Figure 3 User interface for device control and monitoring

• LDR SW: Used to toggle the light sensor mode for the porch lights

• SW1 to SW4: Toggle the lights for the corresponding rooms - LIVING ROOM, BEDROOM, KITCHEN, ROOFTOP

• SW5: Turn on/off the lights outside the porch

• SW6: Open/close the window

• SW7: Open/close the main door

• SW8: Turn on/off the air conditioner (replace with a 220V light bulb)

Download the Blynk App and log in with the provided account Upon successful login, you will have a control and monitoring interface as follows:

Figure 4 System control and monitoring interface on Blynk App

4 Control the device via SMS

Scripts to control devices in the system

Table 1 Messaging syntax to control devices in the system

1 unlock Open the main door

2 lock Close the main door

3 Living Room ON or Living Room OFF Turn on/off living room lights

4 Kitchen ON or Kitchen OFF Turn on/off kitchen lights

5 Bedroom ON or Bedroom OFF Turn on/off bedroom lights

6 Rooftop ON or Rooftop OFF Turn on/off rooftop lights

7 Outside ON or Outside OFF Turn on/off outside lights

8 All ON or All OFF Turn on/off all lights

9 Air Conditioner ON or Air Conditioner OFF Turn on/off the air conditioner

10 Window Open or Window Close Close/open window

Ngày đăng: 07/06/2024, 16:19

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w