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

Research and development of household toxic gas warning device with sensor

51 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 đề Research and development of household toxic gas warning device with sensor
Tác giả Tạ Quốc Tuấn
Người hướng dẫn Dr. Hà Mạnh Hùng, Dr. Nguyễn Đăng Khoa
Trường học Vietnam National University, Hanoi International School
Chuyên ngành Informatic and Computer Engineering
Thể loại Graduation project
Năm xuất bản 2023
Thành phố Hanoi
Định dạng
Số trang 51
Dung lượng 2,26 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Cấu trúc

  • Chapter 1: INTRODUCTION TO THE TOPIC (8)
    • 1.1. Reasons for choosing the topic (8)
    • 1.2. The goal of the subject (8)
    • 1.3. Object and scope of the study (9)
  • Chapter 2: OVERVIEW (10)
    • 2.1. What is a smart home? (10)
    • 2.2. Basic components in smart home (11)
      • 2.2.1. Lighting management system (11)
      • 2.2.2. Access control system (11)
      • 2.2.3. Sensors and alarm systems (11)
      • 2.2.4. System of state control switches (11)
      • 2.2.5. Central processing system, remote control and monitoring (12)
    • 2.3. Development situation at home and abroad (12)
      • 2.3.1. For the situation abroad (12)
      • 2.3.2. As for the domestic situation (13)
    • 2.4. Analyze and select the project implementation plan (14)
      • 2.4.1. Implementation plan (14)
      • 2.4.2. Analysis of the selected option (15)
  • Chapter 3: LEARN ABOUT HARDWARE AND SOFTWARE (16)
    • 3.1. Accessory (16)
      • 3.1.1. Esp32 (16)
      • 3.1.2. Motion sensor (20)
      • 3.1.3. Led light (26)
      • 3.1.4. Flame sensor (28)
      • 3.1.5. Gas sensor (30)
      • 3.1.6. Module relay (32)
    • 3.2. Department of Principles (35)
  • Chapter 4. DESIGN AND CONSTRUCTION OF CONTROL SYSTEM (37)
    • 4.1. System overview (37)
    • 4.2. Features of smart home alarm system (37)
    • 4.3. Operation Diagram (37)
    • 4.5. Programming system (42)
    • 4.6. Hardware model (48)

Nội dung

Nghiên cứu phát triển thiết bị cảnh báo khí độc hộ gia đình bằng cảm biến Research and development of household toxic gas warning device with sensor

INTRODUCTION TO THE TOPIC

Reasons for choosing the topic

I chose "Research and development of household toxic gas devices with sensors" as my graduation topic for the following reasons:

Smart home technology is a growing trend worldwide, offering significant time and effort savings through modern innovations In Vietnam, this technology is gaining popularity among users and is becoming the preferred choice for many households.

I can leverage my knowledge of programming microcontrollers and working with temperature, humidity, and light sensors, while also enhancing my communication skills This experience presents an opportunity for me to acquire new knowledge and develop self-discipline and a strong sense of responsibility in the workplace.

• Third, under the popularity of smart home technology today, the need to learn and develop becomes more urgent and especially the safety in each house is indispensable

• Finally, with the aim of creating a controller with basic features, applicable to my own home, it has created more motivation for me to carry out this topic

The goal of the subject

Understand the characteristics, features and structure of the smart home Master the features of lighting system, gas leak alarm system, burglar alarm in smart home

Design and process a house controller model with the following basic features:

• Capable of turning on and off the electric lights in the house manually or automatically according to the scenarios

• Read and process signals from sensors

• Can be controlled and monitored remotely by a phone connected to the Internet Build a house model to be able to test the above controller

Object and scope of the study

The range of smart homes is very wide, from infrastructure to functions and modes of operation

This thesis centers on the research and design of a home automation system that enables the remote control and monitoring of household appliances based on specific scenarios, including burglar alarms, gas leak alerts, and fire alarms The system leverages internet connectivity to enhance safety and convenience in managing home environments.

This article serves as a valuable resource for beginners exploring smart home systems, particularly for those interested in designing and creating a basic safety alarm system within a smart home framework.

OVERVIEW

What is a smart home?

A smart home system refers to a residence equipped with intelligent automation that adapts to the owner's lifestyle and preferences This interconnected system allows household electronic devices to communicate with a central control unit, enabling them to work together efficiently Smart devices can be pre-programmed to manage various situations or controlled remotely, enhancing comfort, safety, and resource efficiency in daily life.

A smart home system enhances energy efficiency by regulating lighting levels to suit different scenarios, such as using soft lights for nighttime events In addition to lighting control, it offers features like temperature regulation, camera monitoring, automated door locks, and anti-theft systems Advanced smart home applications also include home entertainment management with various speaker setups, phone systems, intercoms, and automated watering systems.

These functions can be performed by connected indoor devices so that the central computer system can monitor the status and make appropriate control decisions

Smart homes, once a concept of science fiction, became a reality in the 20th century due to advancements in electricity and information technology Today, smart home technology is evolving rapidly, utilizing encrypted signals transmitted through wired and wireless networks to control switches and pre-programmed electrical outlets, enabling seamless operation of various appliances and electronic devices within the home.

Home automation is especially beneficial for elderly and disabled people who want to live independently

The installation of smart products gives the home and its owners many benefits – similar to those that technology and personal computers have given us

11 over the years – including: Convenience, saving time, money and energy.

Basic components in smart home

Improper coordination of lighting devices like incandescent bulbs, neon lights, and decorative lights can result in light pollution and increased electricity consumption, ultimately reducing the lifespan of the equipment Additionally, homeowners may face inconveniences when managing a large number of lights, such as difficulties in turning them on and off or adjusting their brightness.

The lighting system can be seamlessly integrated with other systems or operated independently for enhanced control These solutions focus on optimizing functionality and simplifying management for homeowners Additionally, integrated solutions will be considered to achieve maximum automation.

When homeowners are away, managing entry and exit systems is crucial for preventing theft and ensuring security A smart home access control system enables owners to efficiently manage permissions and provide secure access for family members and trusted individuals.

The door system will feature advanced security measures, including fingerprint locks and magnetic cards, to accurately identify residents and guests for access permissions Additionally, it may incorporate facial and voice recognition technology for enhanced user authentication.

Every time there is a new event, this access control system will also trigger other systems to keep track of user-generated changes

The sensor system is an essential element in every household system, responsible for transmitting measured parameters to the central processor This allows for appropriate responses to each data packet and ensures that the system reacts effectively to various circumstances.

Basic sensors such as temperature sensor, humidity sensor, gas sensor, pressure sensor, infrared sensor …

2.2.4 System of state control switches:

The system of switches and display panels will provide information as well

12 as receive control commands from the owner Ensure two-way interaction between members and automated system System includes: remote controls, wall switches, HMI interactive control panels, smartphone…

2.2.5 Central processing system, remote control and monitoring:

Smart homes stand out from traditional houses due to their integrated control systems, which enable uniform management of automatic functions throughout the home These systems play a crucial role in connecting various household components, ensuring they operate harmoniously based on pre-programmed environmental conditions, known as scenarios With advancements in artificial intelligence (AI), home control has become increasingly sophisticated, enhancing the overall smart home experience.

• Lighting system with Central Processing System can learn and act according to user's habits Or will the lighting devices work on a preset time cycle

• Lighting system combined with Sensor system provides the ability to automatically control light such as: lights automatically turn off when no one is in the room

• Warning system combined with lighting system: when there is a problem such as fire, explosion, theft detection the lights will flash continuously, and there will be a siren to signal

The integrated sensor and central processing system continuously monitors the status of electricity storage in the UPS and tracks the water level in the tank, ensuring a reliable supply for daily living needs.

• Multimedia entertainment system combined with lighting system to bring relaxing moments for family members.

Development situation at home and abroad

The smart home industry is experiencing significant global growth, attracting major technology companies such as Microsoft, Apple, Google, and Samsung, which are actively developing innovative solutions to capitalize on this trend.

Samsung introduced a comprehensive smart home system integrated into its products, while Apple launched a framework to facilitate the development of smart home applications Additionally, Google expanded its smart home portfolio by acquiring Nest, a company known for its innovative temperature controllers and smoke detectors.

When discussing international smart home brands, notable names include Schneider from France, Smartg4 from the USA, and Gamma from Germany These brands offer smart home appliances that stand out for their innovative designs and advanced features, showcasing modern solutions for today's homes.

2.3.2 As for the domestic situation:

Vietnamese businesses are constantly pursuing technology in the world, constantly researching smart homes In fact, many of our businesses have launched

"Made in Vietnam" smart home products

- BKAV is currently providing 2 smart home products, the 2nd generation BKAV SmartHome and BKAV Smarthome Luxury

BKAV SmartHome seamlessly connects all of your home's electrical appliances, including lighting systems, curtains, air conditioners, televisions, sound systems, door locks, water heaters, exhaust fans, security cameras, video doorbells, landscape watering pump systems, and fish tanks, into a cohesive network for enhanced control and convenience.

BKAV SmartHome offers high-quality smart devices that are carefully crafted with premium materials and designs, positioning them alongside international brands like Siemens and Schneider While the pricing for BKAV's smart home systems is on the higher end, reflecting their focus on the luxury market, the 2nd generation BKAV SmartHome is priced between 30-50 million VND, and the BKAV SmartHome Luxury model is available for around 200 million VND.

BKAV's smart home system offers versatile control options, allowing users to manage their environment through wall-mounted devices, smartphones, and tablets It features voice control capabilities and integrates smart contextual scenarios, all powered by BKAV's proprietary SmartHome OS.

BKAV has recently introduced its advanced BKAV SmartHome Security system, designed to provide multi-layered protection for homes, covering everything from fences and gardens to doors and individual rooms Unlike traditional security devices, this innovative system leverages artificial intelligence (AI) technology to intelligently detect threats, minimize false alarms, and prevent unauthorized access to your home.

- Lumi focuses on providing solutions for smart lighting, air conditioning, curtains, automatic control water heaters, multi-zone audio, security systems, and environmental control for homes …

Lumi SmartHome offers seamless connectivity and control through smart electrical devices, including touch switches, touch potentiometers, sensors, and infrared controllers Users can easily monitor and manage their smart home environment using smartphones, tablets, or voice commands, ensuring convenience and efficiency in home automation.

While these systems have largely satisfied user needs, their high cost remains a barrier for low and medium-income individuals To enhance accessibility and promote the popularity of smart homes, it is essential to focus on reducing product costs.

Analyze and select the project implementation plan

Based on the understanding of the smart home system learned and presented above, the thesis will build a smart home with the following components:

• Lighting block: including led lights, and a window system that can be opened and closed by the motor

• Block access control, alarm: Used to control people in and out, combined with a semi-automatic door system

• Sensor block: Using temperature, humidity, rain, light, body temperature, and gas sensors to provide information to the controller

• Air conditioning block: including ventilation fan, window

The ESP8266 serves as the central processing unit, utilizing the ESP8266 NodeMCU WiFi module for seamless Internet connectivity, enabling real-time data updates to CloudMQTT To manage household electrical appliances effectively, it is essential to incorporate a relay system, along with buttons and an LCD display for user interaction.

15 are also equipped for easy direct control

2.4.2 Analysis of the selected option:

Selecting the right microcontroller for the central controller is crucial for meeting user needs and ensuring system stability and performance The chosen microcontroller must meet specific mandatory requirements to effectively support the project's objectives.

• Support large amount of IO

• Interfaces UART, I2C, and SPI are supported

• High processing speed and stable

I chose the ESP32 kit as the primary processor for data transmission between the system and the Cloud due to its ease of programming directly from the Arduino IDE, which simplifies application development Its modern and stable UART interface, along with the CP2102 feeder chip, enhances performance, and its affordability makes it an attractive option for projects.

There are numerous Cloud support options available for IoT systems, both free and paid This article focuses on Blynk as the primary server for data processing and reception Notably, Blynk offers email alert features that enable users to effortlessly monitor various activities within their homes.

LEARN ABOUT HARDWARE AND SOFTWARE

Accessory

What is the basic structure of ESP32?

CPU: Named “PRO_CPU” and “APP_CPU” Xtensa Dual-Core LX6 When we use

FreeRTOS, it will correspond to Core 0 and Core 1 (protocol cpu and application cpu).

 There are 18 channels – ADC – Analog-to-Digital converter

 2 digital-to-analog converters (DACs)

 The ADC and DAC features will be assigned directly to the fixed pins

The ESP32 chip allows users to select various pins such as SPI, PWM, UART, and I2C through simple code declarations, thanks to its multiplexing feature However, it's important to note that pins 34 to 39 are input-only, meaning they cannot be configured as output pins.

 For electrical equipment, the issue of power is very important For ESP32 power is also quite limited when it is relatively power-hungry

 Sleep mode : This is the power saving state of the ESP32 At this time ESP only provides enough power for RAM to store data

Modem Sleep is the active mode for all features of the chip, requiring 240mA of power When both Bluetooth and Wi-Fi are in use, the current demand can peak at 790mA.

 Light Sleep : This is the mode of operation when the CPU, Wifi, BLE and RAM are all off and they are clocked Current consumption is about 0.8mA

Deep sleep mode significantly reduces power consumption by turning off the CPU, RAM, and peripheral sensors, while keeping essential components like the RTC peripheral, RTC controller, and RTC memories active This mode achieves a current consumption of just 0.15mA, making it ideal for energy-efficient applications.

 Hibernate: Everything else is disabled Except for an active GPIO RTC and an RTC timer They are responsible for waking the chip up from Hibernate mode

 Station mode (Wi-Fi client or STA) ESP32 has the ability to connect to access points

 Become an access point (Access Point mode or Soft-AP) When it becomes ESP, it becomes the center of information connection connection The

Stations connected to the Access-Point are the ESP32 that make up

 AP-STA mode ESP32 can be both an access point and can access another address

 Bluetooth: BLE và v4.2 BR/EDR

The ESP32's dual Bluetooth support enhances interactivity by allowing connections to various devices, including mice, keyboards, and smartphones, even without Wi-Fi Users can customize their connection choice between BLE and Bluetooth Classic based on their project's speed and energy needs.

A motion sensor is an electrical device designed to detect physical movements, either on a device or within an environment It effectively captures and monitors real-time physical activity, enhancing various applications in security, automation, and user interaction.

Figure 3.4: Motion sensor Types of motion sensors

Depending on the supporting technology and purpose of use, motion sensors are

21 classified into the following 4 main types:

This is the most commonly used type of sensor and is used to detect body temperature, thereby alerting the presence of people or animals

Infrared sensor is also known as PIR because most warm-blooded animals produce

IR radiation - this is the basis for this type of sensor to be able to detect abnormal changes in the environment to give timely warnings

Figure 3.5: Example infrared motion sensor

A microwave sensor is a type of sensor that works by sending microwave pulses into the environment within a certain range to monitor the movement of objects within that range

The sensitivity and cost of a sensor are influenced by its coverage width; a wider coverage area results in increased sensitivity and higher costs.

This is a type of sensor that uses ultrasonic waves emitted in a certain range of space to monitor and track the movement of any object within that range

Through the reflection of sound waves, this sensor will detect and calculate the movement of objects in that environment most accurately

Figure 3.6: Example ultrasonic motion sensor

Dual technology sensors are recognized as the most advanced type of sensor, offering superior accuracy in results By integrating multiple sensor technologies, these sensors enhance sensitivity and operational efficiency, making them a reliable choice for various applications.

Working principle of motion sensor

The principle of operation of the motion sensor device is simply understood as follows:

When an object (human, animal, object, ) appears within the operating space of sensors such as: Infrared rays, microwaves, sound waves, then the rays / this

23 wave will immediately be scattered causing the sensor to be disconnected and the signal will be sent directly to pre-installed control centers such as: Smartphone, laptop,

For example, a motion sensor can detect and send an alarm to a homeowner's phone device when a stranger breaks in

Figure 3.7: Motion sensor detect theft Benefits of motion sensors

Motion sensors are being employed more frequently in our daily lives as a result of their many advantages We can list the following as some of this device's advantages:

Enhance your home security with this innovative device designed to safeguard you and your family from threats like theft and unauthorized entry Utilizing advanced abnormal motion detection technology, it promptly alerts users, enabling swift action to protect both life and property.

In addition, the motion sensor can also recognize and distinguish which presence is of a person or a pet in the house to avoid misleading alarms to users

Help save energy for indoor lighting system

The human body's temperature sensor enables the electric lighting system to automatically and conveniently illuminate itself hence promoting energy conservation and minimizing waste while not in use

Motion sensors are increasingly favored in homes with young children due to their ability to provide timely alerts when kids approach hazardous areas like balconies and stairs These devices enhance safety by detecting movement and notifying parents of potential dangers, ensuring a more secure environment for little ones.

The type of sensor used in the project is HC-SR501

Figure 3.8: Motion sensor HC-SR501

 There are 2 operating modes: o (L) no repeat trigger o (H) repeat trigger

 The mechanism of operation of the infrared sensor PIR: is a sensor that receives infrared rays emitted by infrared-emitting objects such as the human body (or any heat source)

Figure 3.9: Motion sensor scanning angle

PIR sensors feature a dual-unit sensor eye, consisting of two electrodes: a positive (+) and a negative (-) A plastic fresnel prism is positioned in front of the sensor, effectively blocking and dividing infrared photons into multiple zones, allowing them to reach the sensor When the two electrodes activate sequentially, they generate an electrical pulse that triggers the sensor, ensuring effective motion detection.

 Light control (optional): You can add a photoresistor, when there is a photoresistor, you can set the module to work during the day or at night

Figure 3.11: Texture of led lights

In this project, led is used in a replacement model for conventional bulbs

A flame sensor is commonly utilized in fire detection applications, including firefighting robots and fire sensors It has an effective detection range of approximately 80 cm and a scanning angle of 60 degrees, allowing it to identify flames optimally This sensor operates within a wavelength range of 760 nm to 1100 nm.

The flame sensor has two signal outputs, Digital and Analog, which is very easy to use

 Ability to detect fire or light source of similar wavelength

 Using YG1006 infrared sensor with fast response speed and high sensitivity

 Built-in IC LM393 to convert ADC, create 2 outputs both digital and analog, very flexible in use

 Variable resistor to customize sensor sensitivity

 Can be applied in fire alarm systems, fire robots,…

 Output signal: Digital 3.3 – 5VDC depending on power supply or Analog

Figure 3.14: Schematic diagram of the temperature sensor

The MQ-2 gas sensor detects flammable gases by measuring changes in the conductivity of its SnO2 element; as the concentration of combustible gases increases, the conductivity rises, generating a corresponding electrical signal.

The MQ-2 gas sensor is a low-cost, very sensitive gas sensor for flammable vapors like methane (CH4), hydrogen, and LPG It is also useful for a wide range of applications

Both analog and digital signals are produced by the sensor, and the rheostat may control the digital signal

 High sensitivity and quick response time

 Stable for long time use

The automation system plays a crucial role in both industrial production and everyday life, relying on a well-designed operating system composed of technical specifications and semiconductor components Efficient electrical switching within the system necessitates precise connection and control information.

A relay is an essential component in automated electrical systems, ensuring a continuous connection within an electrical circuit Understanding the structure and operation of a relay is crucial for grasping its function This article will provide insights into the key components of a relay, enhancing your comprehension of this vital electrical element.

What is relay? What is the function of the relay?

A relay is an electronic switch that controls a larger current using a smaller one, functioning like an electric lever with a switching effect It activates with minimal current, enabling it to power devices that require significantly higher current levels.

Department of Principles

The ESP8266 connects to WiFi and the Blynk server to monitor input signals from fire sensors like the HC-SR501 and MQ-2 It transmits high and low signal levels to the Blynk app, ensuring real-time tracking In the event of fire or gas detection, an alarm will sound, and an alert will be sent directly to your phone.

The LED features two control modes: automatic and manual In automatic mode, the light activates when the HC-SR501 sensor detects motion, while in manual mode, users can manually turn the light on and off as needed.

- All sensor data is sent to the Blynk app app

DESIGN AND CONSTRUCTION OF CONTROL SYSTEM

System overview

Figure 4.1: System overview Central Processing Unit: ESP32 NodeMCU

Sensor block: sensor MQ-2 (GPIO34), sensor SR-501(GPIO19), fire sensor

Light block: Relay (GPIO21), Led Downlight

Features of smart home alarm system

After researching and designing, the project will integrate the following functions:

 Read and display the value of gas sensor, fire sensor and motion sensor

 Remote control over internet by web server or mobile app

 Send an alert when there is a gas leak, there is a fire

 There are 2 operating modes AUTO and MANUAL.

Operation Diagram

ESP32 and smartphone now both act as clients connecting to Blynk's server

The ESP32 reads data from the sensor and transmits it to the server, which updates the mobile app Conversely, the mobile app can send commands to the ESP32 to control the light, allowing the ESP32 to receive and execute these commands effectively.

Figure 4.2: Programming algorithm diagram ESP32

 Blynk has three main ingredients: o Blynk App - allows you to drag and drop various widgets that the supplier has created to create the interface of your product

The Blynk Server is responsible for central data processing across all hardware, tablets, and mobile devices, allowing users to either build their own server or utilize Blynk's Cloud service Its open-source nature facilitates easy device integration, including the option to use a Raspberry Pi as a server Additionally, the Blynk Library supports nearly all popular hardware platforms, enabling seamless communication with the server and efficient processing of incoming and outgoing commands.

 The principle of operation of Blynk:

Figure 4.3: The principle of operation of Blynk

To effectively operate circuits such as Arduino and ESP8266, which can connect to various sensors and devices, the Blynk Library must be uploaded This library utilizes WiFi, Ethernet, 3G, or LTE to establish a connection with the Blynk Server.

The Blynk App, which is downloaded on a phone connected to the Blynk Server via WiFi or LTE, facilitates the reception of control circuit parameters from the server while also allowing the transmission of commands and control signals back to the server and the control circuits.

Step 1: Get the Blynk IoT app from the Google Play Store or Apple App

Step 2: You create your own account on Blynk App using your personal

Step 3: Login to blynk cloud and create project for power metering system:

Figure 4.4: Create a project in Blynk

Select the device type as ESP32, Connection Type as WI-FI and press the

To authenticate each device, a unique 32-character code known as the Device Auth Token will be generated This token will be integrated into the Arduino programming code to ensure secure communication with Blocky Node.

Wifi can connect to the server

Step 4: Add sensor value parameters

Figure 4.5: Add widgets to the project

Step 5: Configuration for each datastream

Each datastream features a dedicated Settings screen that can be accessed by clicking on any widget within the canvas The most crucial parameter in this screen is the PIN, which must match the PIN used in the Blynk app This ensures that the programming for Blocky Node Wifi in the IDE is correctly aligned with the Blynk app settings.

We will configure the device's functions using the appropriate widgets and values, allowing for two modes: AUTO mode, which automatically turns the light on and off in response to movement, and Manual mode, which enables manual control of the light The interface will reflect these settings for user convenience.

Figure 4.7: Mode of the device

With the mobile app, we create widgets similar to the web one by one

Programming system

Introducing the programming tool Adruino IDE

The Arduino IDE (Arduino Integrated Development Environment) is a

43 legitimate text editor that makes it simple, quick, and cost-free to develop code for Arduino devices

The Arduino IDE is an open-source software that allows users to freely download, modify, and enhance the program according to specific guidelines This open-source nature grants the publisher the ability to provide general authorization without needing consent from others Despite being open source, the Arduino IDE maintains high levels of information security, ensuring that any identified issues are promptly addressed with patches and updates to prevent data loss or public leakage.

The Arduino IDE, favored by programmers, utilizes the C/C++ programming language, enabling seamless code recognition for Arduino boards This functionality simplifies the coding process for developers, allowing for efficient creation and implementation of projects.

Figure 4.10: Arduino IDE main interface

Verify Kiểm tra lỗi và biên dịch code

Upload Dịch và upload code vào bo mạch đã được cài đặt sẵn

Open Mở một sketch có sẵn

Serial Monitor Mở serial monitor

Currently I am using the ESP8266 MCU Node to perform the functions, so before building the code and loading the code for the device, we need to install the library and the function to load the code for the IDE

Step 1: Go to File→Preferences, go to the Additional Board Manager URLs textbox add the following link and click OK to accept.: https://dl.espressif.com/dl/package_esp32_index.json

Figure 4.1: Install libraries for NodeMCU

Step 2: Install ESP32 Firmware for Arduino IDE

Go to Tools -> Boards Manager -> find “esp32” -> Install

 Select Board to program for ESP32:

Connect the USB-to-UART module to the computer Go to Tool→Board→ ESP32Boards→NodeMCU 1.0 (ESP-12E Module)

Figure 4.14: Select hardware for programming Next Go to Tool→Board→Port and select the COM port corresponding to the corresponding USB-to-UART module

 Install additional libraries for the Arduino IDE

To simplify programming, you can easily install additional libraries by navigating to Sketch -> Include Library -> Add ZIP Library and selecting the desired zip file Alternatively, you can install libraries indirectly by accessing Manage Libraries, searching for the library name, and clicking Install to download it.

Figure 4.3: Install the library for the Arduino IDE

For the requirements and hardware used in this project we need to use some of the following libraries: o LiquidCrystal_I2C.h o BlynkSimpleEsp32.h o Blynk.h o WiFi.h o Wire.h

Hardware model

5.1 Results and limitations of the study:

 Design and manufacture a Safety Alert System in a smart home model with the following basic features:

 Having the ability to remotely turn on and off gadgets at home using a web connection to the Internet

 Read and process signals from sensors

 Send alerts when gas leaks and fires occur

 There is a siren in case of gas leak and fire

Due to the limited knowledge, the topic cannot avoid shortcomings and problems that have not been overcome Some points can be mentioned as follows:

 Just stop at controlling on/off devices

 The feature is still very basic, need to add many new features to make the house smarter

To effectively utilize the sensor's signal received via wire, it is essential to recalibrate the wire resistance and implement anti-interference measures for optimal performance.

- The safety warning system in a smart home model with the above basic features is the foundation to develop into a model with higher requirements and features

- Not only stopping at controlling the device on/off, the model can be developed for analog control

- More sensors to monitor indoor living environment

- Add relay to control more devices.

Ngày đăng: 26/02/2025, 22:29

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

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm

w