Home environment monitoring and early warning system and method based on Internet of Things
By integrating multiple sensors and IoT technologies, multi-dimensional monitoring and real-time warning of the home environment are achieved, solving the problems of single function, insufficient communication reliability and poor interaction convenience of existing equipment, and providing an efficient home environment monitoring and control solution.
Patent Information
- Application Number
- CN202510842327.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing home environment monitoring equipment has single functions, insufficient communication reliability, delayed warning, poor intelligence, and poor interactive convenience.
It combines a variety of sensors (temperature and humidity, dust, formaldehyde, and carbon monoxide sensors) with an STM32F103C8T6 microprocessor, communicates with the IoT cloud platform through an ESP8266-12F WiFi module, and is equipped with a mobile terminal application and an audible and visual alarm device to achieve real-time data collection, processing, and remote control.
It realizes multi-dimensional environmental monitoring, reliable communication, timely warning, convenient interaction, and provides comprehensive home environment information and real-time control.
Smart Images

Figure CN120686697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a home environment monitoring and early warning system and method based on the Internet of Things. Background Art
[0002] As people's quality of life improves, they are increasingly concerned about the safety and comfort of their home environments. Factors such as temperature, humidity, and air quality in the home environment have a direct impact on people's health and lives. Therefore, various devices that can monitor these environmental indicators have appeared on the market. However, traditional home environment monitoring devices have the following drawbacks:
[0003] Single function: Existing equipment (such as CN201820123456.0) mostly uses a single sensor and cannot simultaneously monitor multi-dimensional parameters such as temperature and humidity, PM2.5, formaldehyde, and carbon monoxide;
[0004] Insufficient communication reliability: Existing devices (such as CN201420565978.8) mostly use Bluetooth transmission, which has data packet loss problems caused by distance limitations and network fluctuations;
[0005] Early warning is delayed and has poor intelligence: Existing equipment lacks real-time capabilities and cannot promptly detect problems in the home environment and automatically control the early warning module to issue warnings to users;
[0006] Poor interactive convenience: Most products rely on web-based management interfaces and lack lightweight applications adapted to mobile terminals, making it difficult to achieve remote real-time control. Summary of the Invention
[0007] (1) Technical problems solved
[0008] To solve the above problems, the present invention provides a home environment monitoring and early warning system and method based on the Internet of Things, which has more diverse monitoring parameters, more reliable communication, more timely and intelligent early warning, and better interactive portability.
[0009] (2) Technical solution
[0010] To achieve the above object, the present invention provides the following technical solutions:
[0011] A home environment monitoring and early warning system based on the Internet of Things, comprising:
[0012] The main control module contains an STM32F103C8T6 microprocessor, which is used to receive and process data and compare it with preset thresholds;
[0013] The data acquisition module includes a temperature and humidity sensor, a dust sensor, a formaldehyde sensor, and a carbon monoxide sensor, which is connected to the main control module through a digital interface to collect home environment parameters;
[0014] IoT cloud platform, used to store data, provide a visual interface, and forward control commands to the main control module;
[0015] The communication module, including the ESP8266-12F WiFi module, is connected to the main control module via the serial port for two-way data transmission with the IoT cloud platform;
[0016] User terminals, equipped with mobile terminal applications, are used for remote data viewing, threshold setting, early warning information reception, and control command sending;
[0017] The early warning module includes an audible and visual alarm device, which is connected to the output end of the main control module. When the processed environmental data is greater than the preset threshold, an early warning signal can be issued.
[0018] Preferably, the temperature and humidity sensor adopts DHT11, the dust sensor adopts GP2Y1010AU0F, the formaldehyde sensor adopts CJSH22-CH2O, and the carbon monoxide sensor adopts TPM-200A-CO.
[0019] Preferably, the Internet of Things cloud platform is a OneNET platform that supports the MQTT protocol, and the communication module establishes a long connection with the Internet of Things cloud platform through AT commands.
[0020] Preferably, the mobile terminal application is developed using the uni-app framework and interacts with the cloud platform via the HTTPS protocol.
[0021] Preferably, the early warning module includes a buzzer and an LED indicator light. The buzzer driving circuit adopts a ULN2003 chip, and the LED indicator light is connected to the GPIO port of the main control module through a current-limiting resistor.
[0022] Preferably, it also includes a local display module, which is a TJC3224T128_011R_A01 serial port screen and is connected to the main control module through a UART interface.
[0023] A home environment monitoring and early warning method based on the Internet of Things, applied to the above-mentioned home environment monitoring and early warning system, includes:
[0024] Data collection step: real-time collection of home environment parameters through the temperature and humidity sensor, dust sensor, formaldehyde sensor and carbon monoxide sensor;
[0025] Data transmission step: upload the collected data to the IoT cloud platform through the communication module, and receive the control instructions issued by the cloud platform;
[0026] Data processing and judgment steps: The main control module verifies and converts the collected data into a format to obtain environmental data, compares and analyzes the environmental data with the preset threshold value, and determines whether the home environment is abnormal;
[0027] Early warning and control steps: When the environmental data exceeds the preset threshold, the early warning module triggers an audible and visual alarm, and controls the ventilation equipment according to the preset rules of the main control module;
[0028] Remote interaction step: Through the mobile terminal application, data interaction with the Internet of Things cloud platform is realized to realize remote data viewing, threshold setting, early warning information reception and control instruction sending.
[0029] Preferably, the data collection step further includes a system initialization step:
[0030] Main control module initialization: Initialize the STM32F103C8T6 microprocessor;
[0031] Data acquisition module initialization: Initialize the temperature and humidity sensor, dust sensor, formaldehyde sensor, and carbon monoxide sensor;
[0032] Communication module initialization: Initialize the ESP8266-12F WiFi module.
[0033] Preferably, the data processing and judgment steps include:
[0034] Formaldehyde data processing: read the data of the formaldehyde sensor through the digital serial port, use CRC check and calculate the formaldehyde concentration according to the formaldehyde concentration calculation formula;
[0035] Carbon monoxide data processing, through I 2 C protocol to read the data of the carbon monoxide sensor and process it using a sliding average filter algorithm.
[0036] Preferably, the remote interaction step includes:
[0037] Data acquisition: The mobile terminal application obtains and displays collected data from the IoT cloud platform by setting the URL, product ID, device name, request header, and request content;
[0038] Instruction issuance: By setting threshold parameters and instruction parameters, the threshold setting and control instructions of the user terminal are uploaded to the IoT cloud platform to achieve remote control of the hardware server;
[0039] Message push: The mobile terminal application can receive warning information pushed by the IoT cloud platform and display it on the user terminal, including APP pop-up notifications and SMS alarms.
[0040] (3) Beneficial effects
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] Since the present invention integrates temperature and humidity sensors, dust sensors, formaldehyde sensors and carbon monoxide sensors, multiple sensors can work together, so that the home environment monitoring and early warning system covers multiple core environmental indicators, can collect rich and accurate home environment data in real time, and provide users with comprehensive environmental information.
[0043] Since the communication module uses the ESP8266-12F WiFi module that supports the 802.11b / g / n protocol, and the communication module can perform two-way data transmission with the Internet of Things cloud platform, compared with the Bluetooth communication connection method used in traditional monitoring equipment, the communication connection method in the present invention has faster transmission speed, longer communication distance, lower data packet loss rate, and higher communication reliability.
[0044] Since there are many types of environmental data, and when the environmental data is greater than the preset threshold, the early warning module can issue an early warning signal in real time, the home environment monitoring and early warning system can detect environmental anomalies in time and automatically take measures to ensure the safety of the home environment. The early warning is more timely and more intelligent.
[0045] Since the present invention is equipped with a mobile terminal application that matches the home environment monitoring and early warning system, and interacts with the Internet of Things cloud platform through a communication module, compared with the Web-side management interface used in traditional monitoring equipment, the corresponding technical solution of the present invention has a shorter response time, supports more early warning methods (such as pop-ups, text messages), and is simpler and more convenient to operate. It can realize remote real-time monitoring and control, and users can grasp the home environment status and perform operations anytime and anywhere, which greatly improves convenience.
[0046] In general, by using this IoT-based home environment monitoring and early warning system and method, monitoring parameters are more diverse, communication is more reliable, early warnings are more timely and intelligent, and interaction and portability are better. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0048] Figure 1 The overall system framework diagram of the present invention is shown: showing the overall framework of the system, including the connection relationship and data flow between the data acquisition module, main control module, communication module, Internet of Things cloud platform, user terminal and early warning module;
[0049] Figure 2The overall hardware circuit design principle diagram of the present invention is shown: the composition of the hardware part is described in detail, including the main control chip, various sensors, communication module, display module, and early warning module;
[0050] Figure 3 The overall software design flow chart of the present invention is shown: the software workflow is presented in the form of a flow chart, starting from system initialization to data acquisition, transmission, processing, judgment, early warning and interaction with user terminals;
[0051] Figure 4 The system design of the present invention is shown in a physical diagram: including a display module in an alarm state and a ventilation device after activation;
[0052] Figure 5 The interface design diagram of the mobile terminal application of the present invention is shown: the interface design of the Android APP is displayed, including functional interfaces such as data display, threshold setting, warning information reception and device control. DETAILED DESCRIPTION
[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0054] See attached Figure 1 (showing how the parts of the system work together) and Figure 2 (The position and function of each hardware module in the system are clarified), an embodiment of the present invention discloses a home environment monitoring and early warning system based on the Internet of Things, including: a main control module, including an STM32F103C8T6 microprocessor, for receiving and processing data and comparing it with a preset threshold; a data acquisition module, including a temperature and humidity sensor, a dust sensor, a formaldehyde sensor and a carbon monoxide sensor, connected to the main control module through a digital interface, for collecting home environment parameters; an Internet of Things cloud platform, for storing data, providing a visual interface and forwarding control instructions to the main control module; a communication module, including an ESP8266-12F WiFi module, connected to the main control module through a serial port, for two-way data transmission with the Internet of Things cloud platform; a user terminal, installed with a mobile terminal application, for remote viewing of data, threshold setting, early warning information reception and control instruction sending; an early warning module, including an audible and visual alarm device, connected to the output end of the main control module, which can issue an early warning signal when the processed environmental data is greater than the preset threshold.
[0055] Based on the above scheme, during the actual implementation of the home environment monitoring and early warning system, the sensors in the data acquisition module will continuously collect home environment data. Specifically, the temperature and humidity sensor will collect temperature and humidity data, the dust sensor will collect dust concentration, the formaldehyde sensor will collect formaldehyde concentration, and the carbon monoxide sensor will collect carbon monoxide concentration. These collected data will be transmitted through a single-wire serial interface or I 2 C or digital serial port signals to the main control module, and the STM32F103C8T6 microprocessor in the main control module will process and analyze the collected data and compare it with the preset threshold value; if the data is abnormal, that is, the processed environmental data is greater than the preset threshold value, the main control module will control the early warning module to send out an early warning signal, that is, the sound and light alarm device will emit a buzzer and flashing lights. The main control module will also upload the data to the Internet of Things cloud platform through the communication module. The Internet of Things cloud platform stores data and provides a visual interface, allowing users to interact with the Internet of Things cloud platform through mobile terminal applications to realize operations such as remote data viewing, threshold setting, early warning information reception, and sending control instructions to remote devices.
[0056] Furthermore, mobile terminal applications can be openly designed according to actual conditions. For example, Android apps can be set for Android phone users, iOS apps can be set for Apple phone users, and Harmony apps can be set for Harmony phone users.
[0057] See attached Figure 2 In order to facilitate the monitoring of environmental parameters, the specific models of various sensors are given in this embodiment. Specifically, the temperature and humidity sensor uses DHT11, the dust sensor uses GP2Y1010AU0F, the formaldehyde sensor uses CJSH22-CH2O, and the carbon monoxide sensor uses TPM-200A-CO.
[0058] Through the design of the above technical solution, since the temperature and humidity sensor is model DHT11, its temperature measurement range is 0℃-50℃, and the humidity measurement range is 20%RH-90%RH. When in use, it can output data through a single-wire serial interface. Since the dust sensor is model GP2Y1010AU0F, it can detect particles of 0.7 microns and smaller, and the applicable power supply voltage range is 5-7V. Since the formaldehyde sensor is model CJSH22-CH2O, its test range is 0-1000ppm, and it can use I 2 C or digital serial port signal output data; Since the carbon monoxide sensor selected is model TPM-200A-CO, its detection range is 0-1000ppm, and it has a zero point calibration function, it can be output using I 2 C or digital serial port signal output data.
[0059] See attached Figure 3 (Presenting the operating logic of the software), in order to clarify the technical implementation path, the following design is carried out in this embodiment. Specifically, the Internet of Things cloud platform is the OneNET platform that supports the MQTT protocol, and the communication module establishes a long connection with the Internet of Things cloud platform through AT commands.
[0060] Through the design of the above technical solution, the communication protocol type is limited, and the connection between the IoT cloud platform and the hardware system is realized through operations such as creating products and setting device function points. It also supports the MQTT protocol for data transmission. In general, this technical solution has achieved the effect of low-latency two-way communication and low packet loss rate.
[0061] See attached Figure 5 (Presenting the interaction method between users and the system), in order to protect innovations at the software level, the following design is made in this embodiment. Specifically, the mobile terminal application is developed using the uni-app framework and interacts with the cloud platform for data through the HTTPS protocol.
[0062] Through the design of the above technical solutions, the development framework of mobile terminal applications is limited, and cross-platform development (Android / iOS) is realized by adopting the uni-app framework. Compared with native development, the size of the app installation package is reduced.
[0063] See attached Figure 2 and attached Figure 4 (The actual object in the application is presented). In order to further illustrate how the early warning module performs an early warning, the following design is carried out in this embodiment. Specifically, the early warning module includes a buzzer and an LED indicator light. The buzzer drive circuit adopts the ULN2003 chip, and the LED indicator light is connected to the GPIO port of the main control module through a current-limiting resistor.
[0064] The above technical solution defines the hardware implementation details of the early warning module. The ULN2003 chip drives the buzzer, while the LED indicator is controlled via the PB12-PB15 ports. When environmental parameters are abnormal, the buzzer sounds an alarm and the LED indicator flashes continuously. Furthermore, the parameters of the buzzer and LED indicator can be set, such as achieving a buzzer sound pressure level of 85dB and an LED response time of <10ms.
[0065] See attached Figure 4 In order to display environmental data, system status and warning information in real time, the following design is carried out in this embodiment. Specifically, it also includes a local display module. The local display module is a TJC3224T128_011R_A01 serial port screen, which is connected to the main control module through a UART interface.
[0066] Through the design of the above technical solution, not only can various parameters be directly displayed, but also the model and interface protocol of the local display module can be limited, which is convenient for implementation and use. Furthermore, the parameters of the TJC3224T128_011R_A01 serial port screen can be set, such as the screen refresh rate of 60Hz and the viewing angle of 178°.
[0067] See attached Figure 3 This embodiment also discloses a home environment monitoring and early warning method based on the Internet of Things, which is applied to the above-mentioned home environment monitoring and early warning system, including: data collection step, data transmission step, data processing and judgment step, early warning and control step, and remote interaction step.
[0068] Based on the above scheme, full-process automated monitoring and control is achieved. Specifically, when the home environment monitoring and early warning method is actually implemented, in the data collection step, the temperature and humidity sensors, dust sensors, formaldehyde sensors and carbon monoxide sensors are used to collect home environment parameters in real time at a set frequency; in the data transmission step, the communication module uploads the collected data to the Internet of Things cloud platform and receives control instructions issued by the cloud platform; in the data processing and judgment step, the collected data is verified and formatted by the main control module to obtain environmental data, and the environmental data is compared and analyzed with the preset threshold to determine whether the home environment is abnormal; in the early warning and control step, when the environmental data is greater than the preset threshold, the early warning module is triggered to sound and light alarm, and the ventilation equipment is controlled to start according to the preset rules of the main control module, thereby improving the air quality; in the remote interaction step, the mobile terminal application interacts with the Internet of Things cloud platform data to realize remote data viewing, threshold setting, early warning information reception and sending control instructions to remote devices. The message push function of the mobile terminal application can ensure that users receive early warning information in a timely manner.
[0069] See attached Figure 3 To ensure the reliability of system startup, the following design is implemented in this embodiment. Specifically, the data acquisition step also includes a system initialization step: main control module initialization: initializing the STM32F103C8T6 microprocessor; data acquisition module initialization: initializing the temperature and humidity sensor, dust sensor, formaldehyde sensor, and carbon monoxide sensor; communication module initialization: initializing the ESP8266-12F WiFi module.
[0070] Through the design of the above technical solution, in the system initialization step, the various sensors in the data acquisition module can be calibrated and parameter configuration can be performed, and the relevant settings of the communication module and the main control module can be initialized, the connection with the Internet of Things cloud platform can be established, and the communication parameters between the mobile terminal application and the Internet of Things cloud platform can be configured.
[0071] See attached Figure 3In this embodiment, a data processing method for a specific sensor is also defined. Specifically, the data processing and judgment steps include: formaldehyde data processing, reading the data of the formaldehyde sensor through the digital serial port, and calculating the formaldehyde concentration according to the formaldehyde concentration calculation formula after CRC check; carbon monoxide data processing, through I 2 C protocol to read the data of the carbon monoxide sensor and process it using a sliding average filter algorithm.
[0072] Furthermore, CRC-8 or CRC-16 may be selected as the CRC check.
[0073] See attached Figure 5 This embodiment also defines the interaction protocol between the mobile terminal application and the IoT cloud platform. Specifically, the remote interaction steps include: data acquisition: the mobile terminal application obtains and displays collected data from the IoT cloud platform by setting the URL, product ID, device name, request header and request content; instruction issuance: by setting threshold parameters and instruction parameters, the threshold setting and control instructions of the user terminal are uploaded to the IoT cloud platform to realize remote control of the hardware server; message push: the mobile terminal application can receive early warning information pushed by the IoT cloud platform and display it on the user terminal, including APP pop-up notifications and SMS alarms.
[0074] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0075] In addition, it should be noted that the use of terms such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. Unless otherwise stated, the above terms have no special meaning and therefore cannot be understood as limiting the scope of protection of this application.
[0076] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A home environment monitoring and early warning system based on the Internet of Things, characterized in that: include: The main control module contains an STM32F103C8T6 microprocessor, which is used to receive and process data and compare it with preset thresholds; The data acquisition module includes a temperature and humidity sensor, a dust sensor, a formaldehyde sensor, and a carbon monoxide sensor, which is connected to the main control module through a digital interface to collect home environment parameters; IoT cloud platform, used to store data, provide a visual interface, and forward control commands to the main control module; The communication module, including the ESP8266-12F WiFi module, is connected to the main control module via the serial port for two-way data transmission with the IoT cloud platform; User terminals, equipped with mobile terminal applications, are used for remote data viewing, threshold setting, early warning information reception, and control command sending; The early warning module includes an audible and visual alarm device, which is connected to the output end of the main control module. When the processed environmental data is greater than the preset threshold, an early warning signal can be issued.
2. The home environment monitoring and early warning system based on the Internet of Things according to claim 1 is characterized in that: The temperature and humidity sensor adopts DHT11, the dust sensor adopts GP2Y1010AU0F, the formaldehyde sensor adopts CJSH22-CH2O, and the carbon monoxide sensor adopts TPM-200A-CO.
3. The home environment monitoring and early warning system based on the Internet of Things according to claim 1 is characterized in that: The IoT cloud platform is the OneNET platform that supports the MQTT protocol, and the communication module establishes a long connection with the IoT cloud platform through AT commands.
4. The home environment monitoring and early warning system based on the Internet of Things according to claim 1 is characterized in that: The mobile terminal application is developed using the uni-app framework and interacts with the cloud platform via the HTTPS protocol.
5. The home environment monitoring and early warning system based on the Internet of Things according to claim 1 is characterized in that: The early warning module includes a buzzer and an LED indicator light. The buzzer driving circuit adopts a ULN2003 chip, and the LED indicator light is connected to the GPIO port of the main control module through a current limiting resistor.
6. The home environment monitoring and early warning system based on the Internet of Things according to claim 1 is characterized in that: It also includes a local display module, which is a TJC3224T128_011R_A01 serial port screen and is connected to the main control module through a UART interface.
7. A home environment monitoring and early warning method based on the Internet of Things, applied to the home environment monitoring and early warning system according to any one of claims 1 to 6, characterized in that: include: Data collection step: real-time collection of home environment parameters through the temperature and humidity sensor, dust sensor, formaldehyde sensor and carbon monoxide sensor; Data transmission step: upload the collected data to the IoT cloud platform through the communication module, and receive the control instructions issued by the cloud platform; Data processing and judgment steps: The main control module verifies and converts the collected data into a format to obtain environmental data, compares and analyzes the environmental data with the preset threshold value, and determines whether the home environment is abnormal; Early warning and control steps: When the environmental data exceeds the preset threshold, the early warning module triggers an audible and visual alarm, and controls the ventilation equipment according to the preset rules of the main control module; Remote interaction step: Through the mobile terminal application, data interaction with the Internet of Things cloud platform is realized to realize remote data viewing, threshold setting, early warning information reception and control instruction sending.
8. The method for monitoring and early warning of home environment based on the Internet of Things according to claim 7, characterized in that: The data collection step also includes a system initialization step: Main control module initialization: Initialize the STM32F103C8T6 microprocessor; Data acquisition module initialization: Initialize the temperature and humidity sensor, dust sensor, formaldehyde sensor, and carbon monoxide sensor; Communication module initialization: Initialize the ESP8266-12F WiFi module.
9. The method for monitoring and early warning of home environment based on the Internet of Things according to claim 7, characterized in that: The data processing and judgment steps include: Formaldehyde data processing: read the data of the formaldehyde sensor through the digital serial port, use CRC check and calculate the formaldehyde concentration according to the formaldehyde concentration calculation formula; Carbon monoxide data processing, through I 2 C protocol to read the data of the carbon monoxide sensor and process it using a sliding average filter algorithm.
10. The method for monitoring and early warning of home environment based on Internet of Things according to claim 7, characterized in that: The remote interaction step includes: Data acquisition: The mobile terminal application obtains and displays collected data from the IoT cloud platform by setting the URL, product ID, device name, request header, and request content; Instruction issuance: By setting threshold parameters and instruction parameters, the threshold setting and control instructions of the user terminal are uploaded to the IoT cloud platform to achieve remote control of the hardware server; Message push: The mobile terminal application can receive warning information pushed by the IoT cloud platform and display it on the user terminal, including APP pop-up notifications and SMS alarms.
Citation Information
Patent Citations
Indoor positioning apparatus with environmental monitoring function
CN204129214U
Smoke alarm based on wireless communication
CN207704602U