Calibration method and device of electrochemical sensor, air purifier

CN117405756BActive Publication Date: 2026-08-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311404812.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2026-08-18
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

[0005]有鉴于此,本发明提供了一种电化学传感器的校准方法及装置、空气净化器,以解决电化学传感器在预热阶段的检测值波动大、准确度低的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117405756B_ABST
    Figure CN117405756B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of sensor calibration, and discloses a calibration method and device of an electrochemical sensor and an air purifier. The application acquires detection data of the electrochemical sensor; when the electrochemical sensor is in a preheating stage, first detection data sequence in a first preset time period and second detection data sequence in a second preset time period are obtained based on the detection data; a first detection mean value and a threshold interval are obtained according to the first detection data sequence; the first detection mean value and the threshold interval are compared, a detection calibration value is obtained based on the obtained comparison result and the second detection data sequence; and the electrochemical sensor is calibrated according to the detection calibration value. The application can quickly and relatively accurately display gas detection data when the electrochemical sensor is in the preheating stage with relatively large data fluctuation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sensor calibration technology, specifically to calibration methods and apparatus for electrochemical sensors and air purifiers. Background Technology

[0002] Electrochemical sensors, as a commonly used type of sensor, can detect various gases such as formaldehyde, ammonia, hydrogen sulfide, sulfur dioxide, and TVOC (Total Volatile Organic Compounds). They are often used in fields such as atmospheric environmental monitoring, indoor air quality, and medical health.

[0003] After being powered on, electrochemical sensors enter a lengthy warm-up phase. During this phase, the sensor's detection values ​​are inaccurate and fluctuate significantly. In typical applications, the data from this warm-up phase is discarded, and the gas detection data from the actual measurement phase is displayed after the warm-up period ends. However, for applications requiring rapid gas concentration detection, waiting for the electrochemical sensor to finish its warm-up phase not only degrades the user experience but may also lead to excessive ingestion of harmful gases, endangering the user's health.

[0004] Therefore, how to perform detection during the preheating stage of electrochemical sensors is a critical issue that urgently needs to be addressed. Summary of the Invention

[0005] In view of this, the present invention provides a calibration method and apparatus for an electrochemical sensor and an air purifier to solve the problems of large fluctuations and low accuracy of the detection values ​​of the electrochemical sensor during the preheating stage.

[0006] In a first aspect, the present invention provides a calibration method for an electrochemical sensor, the method comprising:

[0007] Acquire detection data from electrochemical sensors;

[0008] When the electrochemical sensor is in the preheating stage, a first detection data sequence within a first preset time period and a second detection data sequence within a second preset time period are obtained based on the detection data.

[0009] Based on the first detection data sequence, the first detection mean and threshold range are obtained;

[0010] The first detection mean is compared with the threshold interval, and the detection calibration value is obtained based on the comparison result and the second detection data sequence.

[0011] The electrochemical sensor is calibrated based on the detection calibration values.

[0012] Therefore, when the electrochemical sensor is in the preheating stage, by acquiring and calculating the average of the detection data over a continuous time period, the sensor's detection data during the preheating stage can be calibrated quickly and accurately, improving the user experience. For applications requiring rapid detection of TVOC concentration, it can provide relevant data references for efficient catalytic removal of TVOC and remind users to take precautions.

[0013] In one optional implementation, the start time of the second preset time period is a preset time after the start time of the first preset time period, and the durations of the first preset time period and the second preset time period are equal.

[0014] The first detection mean and the threshold interval are compared, and based on the comparison result and the second detection data sequence, a detection calibration value is obtained, including:

[0015] When the mean value of the first detection is less than the lower limit of the threshold interval, the mean value of the second detection data sequence is calculated to obtain the second detection mean value, which is then used as the detection calibration value.

[0016] When the first detection mean is within the threshold range, the mean of the second detection data sequence is calculated to obtain the second detection mean; based on the second detection mean and the second detection data sequence, the third detection mean is obtained, and the third detection mean is used as the detection calibration value;

[0017] When the first detection mean is greater than the upper limit of the threshold interval, the maximum and minimum values ​​in the second detection data sequence are filtered out to obtain the remaining detection data sequence. The mean of the remaining detection data sequence is calculated to obtain the fourth detection mean, which is then used as the detection calibration value.

[0018] Therefore, by comparing the first detection mean with the threshold interval, and selecting the processing method for the detection data within the second preset time period based on the comparison result, the detection data of the electrochemical sensor can be calibrated quickly and accurately.

[0019] In one optional implementation, obtaining a third detection mean based on a second detection mean and a second detection data sequence includes:

[0020] Based on the second detection mean and the second detection data sequence, determine the first neighbor value and the second neighbor value in the second detection data sequence that are closest to the second detection mean; the second detection mean is greater than or equal to the first neighbor value and less than or equal to the second neighbor value.

[0021] Calculate the mean of the first neighbor value, the second neighbor value, and the second detection mean to obtain the third detection mean.

[0022] Therefore, by comparing the first detection mean with the threshold interval, when the first detection mean is within the threshold interval, the mean of multiple detection data within the second preset time period is calculated. Then, based on this value, the mean of the value and the mean of the two detection data to the left and right of this value are calculated, thereby quickly and accurately calibrating the detection data of the electrochemical sensor.

[0023] In one optional implementation, obtaining a first detection mean and a threshold range based on a first detection data sequence includes:

[0024] Calculate the mean of the first detection data sequence to obtain the first detection mean;

[0025] Based on the maximum value in the first detection data sequence, determine the upper limit and lower limit of the threshold interval;

[0026] The threshold interval is obtained by defining the upper limit and the lower limit of the threshold interval.

[0027] Therefore, by obtaining and calculating the mean of the detection data over a continuous period of time, and based on this mean, a threshold range is obtained to subsequently measure the volatility and accuracy of the detection data within the current continuous time period.

[0028] In one alternative implementation, after acquiring the detection data from the electrochemical sensor, the method further includes:

[0029] The acquired detection data is verified, and the electrochemical sensor is judged to be faulty based on the verification results.

[0030] When the electrochemical sensor malfunctions, the acquisition of detection data from the electrochemical sensor is stopped, a reset command is sent to the electrochemical sensor, and the return data from the electrochemical sensor is received.

[0031] When the returned data is detected to be reset response data, and the reset response data is successfully verified, the acquisition of detection data from the electrochemical sensor will resume.

[0032] Therefore, the ability to diagnose and recover from faults ensures the normal operation of the sensor in outdoor environments, extends the sensor's lifespan, and allows users to use products with sensors without worrying about the details of the internal sensors.

[0033] In one alternative implementation, after sending a reset command to the electrochemical sensor and receiving return data from the electrochemical sensor, the method further includes:

[0034] When it is detected that the returned data is not reset response data, check whether the returned data is environmental parameter data;

[0035] When the returned data is detected to be environmental parameter data, and the environmental parameter data is successfully verified, the acquisition of detection data from the electrochemical sensor is restarted.

[0036] Therefore, while waiting for the sensor reset response, the data uploaded by the sensor is checked to determine whether it is a reset response. If it is not a reset response, it is checked whether it is environmental parameter data, that is, whether the data uploaded by the sensor is normal data, so as to restore the sensor from fault.

[0037] In one optional implementation, the acquired detection data is verified, and based on the verification result, it is determined whether the electrochemical sensor has malfunctioned, including:

[0038] Verification is performed based on multiple detection data acquired at consecutive time points;

[0039] For each piece of detection data, if the detection data includes a frame header, frame length, command word, checksum, and frame trailer, then the detection data is successfully verified.

[0040] If at least one of the multiple detection data is successfully verified, the electrochemical sensor is determined to be functioning correctly; if none of the detection data is successfully verified, the electrochemical sensor is determined to be faulty.

[0041] Therefore, the frame header, frame length, command word, checksum, and frame tail of the data returned by the sensor are fully checked. Data is only received if all of them meet the requirements; otherwise, it is discarded and the system begins to wait for the next data to be received, in order to prevent detection errors caused by data packet loss.

[0042] Secondly, the present invention provides a calibration device for an electrochemical sensor, the device comprising:

[0043] The acquisition module is used to acquire detection data from the electrochemical sensor;

[0044] The first processing module is used to obtain a first detection data sequence within a first preset time period and a second detection data sequence within a second preset time period based on the detection data when the electrochemical sensor is in the preheating stage.

[0045] The second processing module is used to obtain the first detection mean and threshold range based on the first detection data sequence;

[0046] The third processing module is used to compare the first detection mean with the threshold interval, and obtain the detection calibration value based on the comparison result and the second detection data sequence.

[0047] The fourth processing module is used to calibrate the electrochemical sensor based on the detection calibration value.

[0048] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the calibration method of the electrochemical sensor described in the first aspect or any corresponding embodiment thereof.

[0049] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the calibration method of the electrochemical sensor described in the first aspect or any corresponding embodiment thereof.

[0050] Fifthly, the present invention provides an air purifier, which includes a main control chip, an electrochemical sensor, and a display screen. The main control chip, the electrochemical sensor, and the display screen are interconnected. The main control chip performs the calibration method of the electrochemical sensor according to the first aspect or any corresponding embodiment described above. Attached Figure Description

[0051] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0052] Figure 1 This is a schematic diagram of the structure of an air purifier according to an embodiment of the present invention;

[0053] Figure 2 This is a schematic flowchart of a calibration method for an electrochemical sensor according to an embodiment of the present invention;

[0054] Figure 3 This is a schematic flowchart of a calibration method for another electrochemical sensor according to an embodiment of the present invention;

[0055] Figure 4 This is a schematic flowchart of another calibration method for an electrochemical sensor according to an embodiment of the present invention.

[0056] Figure 5A This is a detailed flowchart of a calibration method for an electrochemical sensor according to an embodiment of the present invention;

[0057] Figure 5B This is a detailed flowchart of a calibration method for another electrochemical sensor according to an embodiment of the present invention;

[0058] Figure 6 This is a structural block diagram of a calibration device for an electrochemical sensor according to an embodiment of the present invention;

[0059] Figure 7 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] Electrochemical sensors, as commonly used sensors, can detect various gases such as formaldehyde, ammonia, hydrogen sulfide, sulfur dioxide, and TVOC. They are often used in fields such as atmospheric environmental monitoring, indoor air quality, and medical health.

[0062] Electrochemical sensors typically require a 3-minute warm-up period after power-on. During this phase, the sensor's readings are inaccurate and fluctuate significantly. In general applications, the data from the warm-up phase is discarded, and the sensor's data from the actual measurement phase is used directly. However, for products like air purifiers that need to display values ​​to users quickly, a 3-minute wait time can negatively impact the user experience. Furthermore, for applications requiring rapid detection of TVOC and efficient catalytic removal of TVOC, excessively long wait times may lead to excessively high TVOC concentrations, resulting in excessive inhalation and harming human health.

[0063] Electrochemical sensors have a wide range of applications, often in complex environments, especially in industrial settings where TVOC detection is frequently used. This means that electrochemical sensors have a relatively high failure rate. Furthermore, high communication baud rates can lead to communication instability and malfunctions. Most commercially available electrochemical sensors use UART (Universal Asynchronous Receiver / Transmitter) with a baud rate of 115.2 kbit / s, while also being compatible with IIC (Inter-Integrated Circuit) communication at a rate of 100 kbit / s. High communication rates increase the probability of data loss, and if the main control program does not perform data verification, the sensor is highly susceptible to malfunctions.

[0064] Due to the long preheating time required for electrochemical sensors and the fact that they are often used in complex environments, these sensors are prone to problems such as inaccurate detection, large fluctuations in detected values ​​within a short period, and high failure rates. Therefore, this invention provides a calibration scheme for electrochemical sensors. The scheme calibrates the sensors based on detection data collected during the preheating phase to address the issues of inaccurate detection and large fluctuations in detected values ​​during this stage. Furthermore, by verifying the sensor's detection data, the scheme identifies its fault status, enabling recovery in the event of a sensor malfunction.

[0065] This invention provides an air purifier, such as... Figure 1 As shown, the air purifier includes a main control chip 101, an electrochemical sensor 102, and a display screen 103, which are interconnected.

[0066] The main control chip 101 is used to send different types of commands to the electrochemical sensor 102, receive and process the data returned by the electrochemical sensor 102, and control the display screen 103 to display the corresponding values; the electrochemical sensor 102 is used to receive and execute the instructions sent by the main control chip 101 and return the data to the main control chip 101; the display screen 103 is used to display the values ​​to the user.

[0067] Specifically, the main control chip 101 can send commands such as data acquisition command, start measurement command, end measurement command and reset command to the electrochemical sensor 102. The data returned by the electrochemical sensor 102 to the main control chip 101 may include detection data, reset data and environmental parameter data.

[0068] After the main control chip 101 and the electrochemical sensor 102 are powered on, the electrochemical sensor 102 enters the preheating stage. During this time, the main control chip 101 starts timing the preheating stage. After the preset preheating time is reached, the electrochemical sensor 102 ends the preheating stage and begins the formal measurement. It should be noted that the preheating time can be determined according to the technical requirements of the sensor. In practical applications, the sensor manufacturer's specifications should be consulted for details.

[0069] The air purifier provided in this embodiment of the invention can acquire and calibrate the detection data of the electrochemical sensor 102 through the main control chip 101 during the preheating stage, so that the display screen 103 can quickly and accurately display the values ​​to the user, improving the user experience. It can also send commands such as reset command, start measurement command, data acquisition command and end measurement command to the electrochemical sensor 102 through the main control chip 101 to perform fault detection, fault recovery and normal measurement after fault recovery of the sensor, ensuring the normal operation of the sensor in the outdoor environment, extending the service life of the air purifier, so that the user does not need to consider the details of the internal sensor when using the air purifier, thus improving the user experience.

[0070] According to an embodiment of the present invention, a calibration method for an electrochemical sensor is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0071] This embodiment provides a calibration method for an electrochemical sensor, which can be used for, for example... Figure 1 The main control chip 101 of the air purifier shown is such as an MCU or microcontroller. Figure 2 This is a flowchart of a calibration method for an electrochemical sensor according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:

[0072] Step S201: Obtain the detection data from the electrochemical sensor.

[0073] Specifically, data acquisition is achieved by sending data acquisition commands to the electrochemical sensor. It's important to note that the frequency of these commands varies depending on the sensor's operating stage. Data acquisition is more frequent during the preheating phase than during the actual measurement phase. This improves calibration accuracy when using preheating data and also reduces energy consumption.

[0074] For example, data is acquired every 1 second during the warm-up phase and every 3 seconds during the formal measurement phase. While the main control chip is acquiring data, the display shows "----" or a preset fixed value.

[0075] Step S202: When the electrochemical sensor is in the preheating stage, a first detection data sequence within a first preset time period and a second detection data sequence within a second preset time period are obtained based on the detection data.

[0076] Specifically, timing begins after the electrochemical sensor is powered on. If the preset preheating time has not yet been reached, the electrochemical sensor is determined to still be in the preheating stage. At this time, a first detection data sequence and a second detection data sequence are obtained based on the sensor's detection data during the preheating stage. It should be noted that the start time of the second preset time period is a preset time after the start time of the first preset time period, and the durations of the first and second preset time periods are equal.

[0077] For example, data is acquired every second. The first 10 detection data acquired during the 1s-10s time period are used as the first detection data sequence, and the second 11 detection data acquired during the 2s-11s time period are used as the second detection data sequence. Simultaneously, if the number of detection data acquired during the warm-up phase is less than 10 (within the 1s-10s), the display shows "----" or a preset fixed value. If the 11th detection data has not yet been acquired (within the 10s-11s), the display shows the average of the first 10 detection data.

[0078] Step S203: Based on the first detection data sequence, obtain the first detection mean and threshold range.

[0079] Specifically, the first detection mean is the mean of the detection data obtained within the first preset time period.

[0080] Step S204: Compare the first detection mean with the threshold interval, and obtain the detection calibration value based on the comparison result and the second detection data sequence.

[0081] Specifically, the second detection data sequence is processed accordingly by comparing the first detection mean with the threshold interval. Since the sensor's detection values ​​fluctuate significantly during the warm-up phase, calibration can be performed based on the sensor's average detection value over a time period to address the issue of large data fluctuations.

[0082] As the preheating time increases, the detection values ​​of the electrochemical sensor become more accurate. Since the second preset time period is after the first preset time period, the data in the second detection data sequence is, to some extent, closer to the data measured by the sensor during the actual measurement phase. Therefore, if the detection data obtained within the first preset time period is insufficient, obtaining calibration values ​​based on the second detection data sequence can further improve the accuracy of the detection calibration values.

[0083] Step S205: Calibrate the electrochemical sensor according to the detection calibration value.

[0084] Specifically, during the warm-up phase, the calibration value is used as the current detection value of the electrochemical sensor, and this calibration value is displayed to the user on the screen. After the warm-up phase, the main control chip controls the sensor to perform the actual measurement, and the screen directly displays the detection data from the actual measurement.

[0085] The electrochemical sensor calibration method provided in this embodiment calibrates the sensor quickly and accurately during the preheating phase by acquiring and calculating the average value of detection data over a continuous time period, thus improving the user experience. For applications requiring rapid detection of TVOC concentrations, this method can provide relevant data references for efficient catalytic removal of TVOCs and remind users to take precautions.

[0086] This embodiment provides a calibration method for an electrochemical sensor, which can be used for, for example... Figure 1 The main control chip 101 of the air purifier shown is such as an MCU or microcontroller. Figure 3 This is a flowchart of a calibration method for an electrochemical sensor according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:

[0087] Step S301: Acquire the detection data from the electrochemical sensor. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.

[0088] Step S302: When the electrochemical sensor is in the preheating stage, a first detection data sequence within a first preset time period and a second detection data sequence within a second preset time period are obtained based on the detection data. For details, please refer to [link to details]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.

[0089] Step S303: Based on the first detection data sequence, obtain the first detection mean and threshold interval.

[0090] Specifically, step S303 includes:

[0091] Step S3031: Calculate the mean of the first detection data sequence to obtain the first detection mean.

[0092] For example, if data is acquired once every 1 second, the average of the 1st to 10th detection data acquired within the time period of 1s-10s is calculated to obtain the first detection average.

[0093] Step S3032: Based on the maximum value in the first detection data sequence, determine the upper limit and lower limit of the threshold interval.

[0094] Specifically, the upper and lower limits of the threshold range can be determined based on human experience and the technical requirements of the sensor. In practical applications, the sensor manufacturer's specifications should be consulted. For example, in determining the maximum value C in the first detection data sequence... max Then, the maximum value C max Two-thirds of this value is used as the upper limit of the threshold interval, and the maximum value C is set as the upper limit. max One-third of the threshold range is used as the lower limit value, but this invention is not limited thereto.

[0095] Step S3033: Obtain the threshold interval based on the upper limit and lower limit of the threshold interval.

[0096] Specifically, the threshold range can be determined based on human experience and the technical requirements of the sensor. In practical applications, the sensor manufacturer's specifications should be consulted. For example, the threshold range could be [1 / 3C]. max 2 / 3C max This invention is not limited thereto.

[0097] Therefore, by obtaining and calculating the mean of the detection data over a continuous period of time, and based on this mean, a threshold range is obtained to subsequently measure the volatility and accuracy of the detection data within the current continuous time period.

[0098] Step S304: Compare the first detection mean with the threshold interval, and obtain the detection calibration value based on the comparison result and the second detection data sequence.

[0099] Specifically, step S304 includes:

[0100] Step S3041: When the first detection mean is less than the lower limit of the threshold interval, calculate the mean of the second detection data sequence to obtain the second detection mean, and use the second detection mean as the detection calibration value.

[0101] For example, data is acquired every second, and the first to tenth detection data are acquired within the time period of 1s to 10s, resulting in the first detection mean A and the maximum value C among the first to ten detection data. max When the mean value A of the first test is less than the maximum value C max When the value is 1 / 3, after the 11th detection data is obtained in the 11th second, the mean value of the 2nd to 11th detection data is calculated to obtain the second detection mean value B, and the second detection mean value B is used as the detection calibration value.

[0102] Step S3042: When the first detection mean is within the threshold range, calculate the mean of the second detection data sequence to obtain the second detection mean; based on the second detection mean and the second detection data sequence, obtain the third detection mean, and use the third detection mean as the detection calibration value.

[0103] For example, data is acquired every second, and the first to tenth detection data are acquired within the time period of 1s to 10s, resulting in the first detection mean A and the maximum value C among the first to ten detection data. max When the mean value A of the first test is greater than or equal to the maximum value C. max 1 / 3 of, and less than or equal to the maximum value C max At 2 / 3 of the time, after acquiring the 11th detection data in the 11th second, the average value of the 2nd to 11th detection data is calculated to obtain the second detection mean value B. Then, based on the second detection mean value B and the 2nd to 11th detection data, the third detection mean value C is obtained, and the third detection mean value C is used as the detection calibration value.

[0104] In some optional implementations, obtaining the third detection mean based on the second detection mean and the second detection data sequence in step S3042 above includes:

[0105] Step a1: Based on the second detection mean and the second detection data sequence, determine the first neighboring value and the second neighboring value in the second detection data sequence that are closest to the second detection mean; the second detection mean is greater than or equal to the first neighboring value and less than or equal to the second neighboring value.

[0106] Step a2: Calculate the mean of the first neighbor value, the second neighbor value, and the second detection mean to obtain the third detection mean.

[0107] Specifically, the second detection mean B and the detection data in the second detection data sequence are sorted in ascending order to obtain the first and second neighboring values ​​that are around the second detection mean B after sorting. The mean between the first neighboring value, the second neighboring value and the second detection mean B is calculated to obtain the third detection mean C.

[0108] Step S3043: When the first detection mean is greater than the upper limit of the threshold interval, filter out the maximum and minimum values ​​in the second detection data sequence to obtain the remaining detection data sequence, calculate the mean of the remaining detection data sequence to obtain the fourth detection mean, and use the fourth detection mean as the detection calibration value.

[0109] For example, data is acquired every second, and the first to tenth detection data are acquired within the time period of 1s to 10s, resulting in the first detection mean A and the maximum value C among the first to ten detection data. max When the mean value A of the first test is greater than the maximum value C max When 2 / 3 of the time has elapsed, after acquiring the 11th detection data in the 11th second, the maximum and minimum values ​​in the data from the 2nd to the 11th time are removed, and the mean value of the remaining detection data is calculated to obtain the fourth detection mean value D. The fourth detection mean value D is used as the detection calibration value.

[0110] Therefore, by comparing the first detection mean with the threshold interval, and selecting the processing method for the detection data within the second preset time period based on the comparison result, the detection data of the electrochemical sensor can be calibrated quickly and accurately. The processing methods include: directly calculating the mean of multiple detection data within the second preset time period; calculating the mean of multiple detection data within the second preset time period after removing the maximum and minimum values; and calculating the mean of multiple detection data within the second preset time period, and then using this value as a benchmark, calculating the mean of this value and the mean of the two detection data points to its left and right.

[0111] Step S305: Calibrate the electrochemical sensor according to the detection calibration value. For details, please refer to [link to relevant documentation]. Figure 2 Step S205 of the illustrated embodiment will not be described again here.

[0112] The calibration method for the electrochemical sensor provided in this embodiment addresses the problem of large data fluctuations during the preheating stage of the electrochemical sensor. By acquiring and calculating the average value of the data within a first preset time period, comparing the average value of the data within the first preset time period with a threshold range, and selecting the processing method for the detection data within a second preset time period based on the comparison result, the sensor can be calibrated quickly and relatively accurately.

[0113] Therefore, for products such as air purifiers that need to display values ​​to users quickly, providing more accurate gas detection data improves the user experience. For applications that require rapid detection of harmful gases such as TVOC, it can provide effective data when efficiently removing TVOC and remind people to take precautions.

[0114] This embodiment provides a calibration method for an electrochemical sensor, which can be used for, for example... Figure 1 The main control chip 101 of the air purifier shown is such as an MCU or microcontroller. Figure 4 This is a flowchart of a calibration method for an electrochemical sensor according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps:

[0115] Step S401: Acquire the detection data from the electrochemical sensor. For details, please refer to [link to relevant documentation]. Figure 3 Step S301 of the illustrated embodiment will not be described again here.

[0116] Step S402: Verify the acquired detection data and determine whether the electrochemical sensor has malfunctioned based on the obtained verification results.

[0117] Specifically, step S402 includes:

[0118] Step S4021: Verification is performed based on multiple detection data acquired at consecutive time points.

[0119] Step S4022: For each piece of detection data, if the detection data includes a frame header, frame length, command word, checksum, and frame tail, then the detection data is successfully verified.

[0120] Specifically, the detection data is checked for the frame header, frame length, command word, checksum, and frame trailer. If all of the above bytes are present, it means that the detection data is correct.

[0121] In step S4023, if at least one of the multiple detection data is successfully verified, the electrochemical sensor is determined to be functioning correctly; if none of the detection data is successfully verified, the electrochemical sensor is determined to be functioning correctly.

[0122] For example, during the preheating phase, sensor data is acquired every second, and each acquired data is verified. If the data fails verification for 10 consecutive acquisitions, the data uploaded by the electrochemical sensor is deemed incorrect, indicating a sensor malfunction. During the formal measurement phase, sensor data is acquired every 3 seconds, and each acquired data is verified. If the data fails verification for 5 consecutive acquisitions, the sensor is deemed to have malfunctioned.

[0123] Furthermore, a disconnection between the main control chip and the electrochemical sensor is also considered a sensor malfunction. For example, during the warm-up phase, the main control chip sends a data acquisition command to the sensor every second. If the sensor does not respond for 10 consecutive times (i.e., the main control chip does not receive any data uploaded by the sensor for 10 consecutive times (a total of 10 seconds), it is determined that the sensor and the main control chip are disconnected, and the sensor has malfunctioned. After the warm-up phase and entering the formal measurement phase, the main control chip acquires data every 3 seconds. If the sensor does not respond for 5 consecutive times (a total of 15 seconds), it is determined that the sensor and the main control chip are disconnected, and the sensor has malfunctioned.

[0124] It should be noted that if the preset preheating time is reached during the process of determining whether the electrochemical sensor has malfunctioned, i.e. the preheating stage ends before the determination is completed, the preheating stage will be extended until the sensor malfunction is determined.

[0125] Step S403: When the electrochemical sensor malfunctions, stop acquiring the detection data of the electrochemical sensor, send a reset command to the electrochemical sensor, and receive the return data from the electrochemical sensor.

[0126] Once the fault is identified, the main control chip will no longer send data acquisition commands to the sensor, but will instead send a sensor reset command.

[0127] For example, when a sensor malfunctions (the sensor uploads incorrect data), the main control chip sends a reset command to the sensor every 3 seconds and waits for the sensor to respond. During the waiting period, the display shows the value before the malfunction. After 20 consecutive times (60 seconds in total) without a response, the main control chip continues to send a reset command every 3 seconds. During this period, the display shows "----" or a preset fixed value.

[0128] For example, when the sensor malfunctions (the main control chip disconnects from the sensor), the main control chip sends a reset command every 3 seconds and waits for the sensor to respond. During the waiting period, the display shows the value before the malfunction. After 20 consecutive times (60 seconds in total) without response, the main control chip sends a reset command every 10 seconds, during which time "----" or a fixed value is displayed.

[0129] Step S404: When the returned data is detected to be reset response data and the reset response data is successfully verified, the acquisition of detection data from the electrochemical sensor is restarted.

[0130] Specifically, after a reset command is sent, the main control chip receives the data returned by the sensor. First, it returns whether the data is the sensor's reset response data. If so, it continues to verify the data. If the data includes a frame header, frame length, command word, checksum, and frame tail, the verification is successful, normal communication with the sensor is restored, and the acquisition of detection data from the electrochemical sensor is restarted.

[0131] Step S405: When it is detected that the returned data is not reset response data, check whether the returned data is environmental parameter data.

[0132] Specifically, after determining that the data is not the sensor's reset response data, it then determines whether the data is normal environmental parameter data, which is the data that the main control chip needs to acquire and display.

[0133] Step S406: When the returned data is detected to be environmental parameter data and the environmental parameter data is successfully verified, the acquisition of detection data from the electrochemical sensor is restarted.

[0134] Specifically, when the returned data is detected to be environmental parameter data, the environmental parameter data is checked for frame header, frame length, command word, checksum, and frame tail. If the check passes, normal communication with the sensor is restored, and the acquisition of detection data from the electrochemical sensor is restarted.

[0135] To address the possibility of data packet loss, a comprehensive check is performed on the frame header, frame length, command word, checksum, and frame trailer of the data returned by the sensor. Data is only received if all requirements are met; otherwise, it is discarded and the system waits for the next data reception. If the main control chip fails to receive data 10 times consecutively, it actively sends a reset command until the sensor responds to the reset command. After a successful reset, the main control chip first sends a start measurement command and then a data acquisition command.

[0136] In this embodiment of the invention, a reset command is sent to the sensor at intervals until the sensor responds. During the waiting period, the data uploaded by the sensor is checked to determine if it is a reset response. If it is not a reset response, it is then determined whether it is environmental parameter data. This fault diagnosis and recovery ensures the normal operation of the sensor in outdoor environments, extends the sensor's lifespan, and allows users to use products with sensors without worrying about the details of the internal sensors.

[0137] The calibration method for the electrochemical sensor provided in this invention will be described in detail below with reference to a specific embodiment, which includes the following process:

[0138] 1. Testing during the preheating stage:

[0139] like Figure 5A As shown, after the main control chip and electrochemical sensor are powered on, a preheating phase is initiated. The main control chip acquires data every second. After acquiring 10 consecutive data points, the maximum value among the 10 data points is determined, and the average of the 10 data points is directly calculated and displayed to the user. During data acquisition, the display shows "----" or a fixed value.

[0140] When the mean A is less than 1 / 3 of its maximum value, after obtaining the 11th data, the mean B of the data from the 2nd to the 11th data is calculated and displayed to the user.

[0141] When the mean A is greater than or equal to 1 / 3 of its maximum detection value and less than or equal to 2 / 3 of its maximum detection value, after obtaining the 11th data, the mean B of the data from the 2nd to the 11th data is calculated. Based on the mean B, the mean C of the mean B and the two data on each side of the mean B (sorted from smallest to largest) is calculated and the mean C is displayed to the user.

[0142] When the mean A is greater than 2 / 3 of its maximum value, after obtaining the 11th data, the maximum and minimum values ​​in the data from the 2nd to the 11th data are removed, the mean B is calculated, and the mean B is displayed to the user.

[0143] During the warm-up phase, the above process is repeated for the next (12th) and subsequent calculations. After the warm-up phase ends, the main control chip acquires data every 3 seconds and controls the display screen to directly display the acquired data, without entering the above algorithm again.

[0144] In addition, the preheating time and the detection range of the average value A can be determined according to the technical requirements of the sensor. For details, refer to the sensor manufacturer's specifications. When calculating the average value, obtain 10 detection data from the most recent 10 seconds.

[0145] 2. Fault identification:

[0146] First, if the sensor disconnects from the main control chip, the sensor is considered faulty. The specific criteria are as follows: During the warm-up phase, the main control chip sends a data acquisition command to the sensor every second. If the sensor does not respond, meaning the main control chip has not received any data uploaded by the sensor, and this continues for 10 consecutive times (10 seconds in total), the sensor is considered disconnected from the main control chip, and the sensor has malfunctioned. After the warm-up phase and entering the formal measurement phase, the main control chip acquires data every 3 seconds. If it fails to acquire any data uploaded by the sensor for 5 consecutive times (15 seconds in total), the sensor is considered disconnected from the main control chip, and the sensor has malfunctioned.

[0147] Secondly, if the sensor uploads incorrect data, the sensor is considered faulty. The specific criteria are as follows: During the warm-up phase, the main control chip acquires data every second. If 10 consecutive data acquisitions fail verification, the sensor upload is considered faulty, and the sensor has malfunctioned. After the warm-up phase and entering the formal measurement phase, the main control chip acquires data every 3 seconds. If 5 consecutive data acquisitions (a total of 15 seconds) fail verification, the sensor upload is considered faulty, and the sensor has malfunctioned. This verification involves the main control chip checking the frame header, frame length, command word, checksum, and frame trailer of the sensor upload data. Only data whose frame header, frame length, command word, checksum, and frame trailer are present is considered correct.

[0148] During the warm-up phase, if either of the above two judgments occurs, and the sensor ends the warm-up phase before the main control chip has finished its judgment (i.e., before the warm-up time has ended after 10 consecutive judgments), the sensor's warm-up phase will be extended until the main control chip completes 10 consecutive data verifications. If the fault is recovered during this period, the formal measurement phase will begin immediately.

[0149] 3. Fault recovery:

[0150] Fault diagnosis takes time. During the diagnosis process, the display shows the values ​​before the main control chip entered the diagnosis phase. If the sensor recovers to normal operation during the diagnosis phase, the diagnosis ends, and the display shows the corresponding value. During the warm-up phase, the display shows the average of 10 valid data points before the sensor recovers to normal operation. During the actual measurement phase, the display directly shows the measurement value after the sensor recovers to normal operation.

[0151] like Figure 5B As shown, when a sensor malfunction is identified, the main control chip stops sending data acquisition commands and instead sends a sensor reset command. For the first type of malfunction (the sensor is disconnected from the main control chip), the main control chip sends a reset command every 3 seconds and waits for the sensor to respond. During the waiting period, the display shows the value of the sensor before the malfunction. After the sensor does not respond for 20 consecutive times (60 seconds in total), the main control chip sends a reset command every 10 seconds. During this period, the display shows "----" or a fixed value.

[0152] For the second type of fault (incorrect sensor data upload), the main control chip sends a reset command every 3 seconds and waits for the sensor to respond. During the waiting period, the display shows the value before the fault occurred. After the sensor fails to respond for 20 consecutive times (60 seconds in total), the main control chip continues to send a reset command every 3 seconds. During this period, the display shows "----" or a fixed value.

[0153] After a reset command is sent, the main control chip receives data uploaded by the sensor. First, it determines if the data is the sensor's reset response. If so, it performs data verification. This verification involves the main control chip checking the frame header, frame length, command word, checksum, and frame end of each frame uploaded by the sensor. Passing the verification restores normal communication. If the data is determined not to be the sensor's reset response, it then checks if the data is normal environmental parameter data—the data the main control chip needs to acquire and display. If so, it performs data verification again. This verification involves the main control chip checking the frame header, frame length, command word, checksum, and frame end of each frame uploaded by the sensor. Passing the verification restores normal communication with the sensor and allows the display screen to display values ​​normally.

[0154] 4. Fault recovery timeout:

[0155] When a sensor malfunctions, the main control chip may continuously send reset commands at intervals. If the application scenario does not rely heavily on the data from the electrochemical sensor, or if a power-saving mode is available, the main control chip will send a reset command 20 times (60 seconds in total) after detecting a sensor malfunction. If communication is still not restored, it can directly cut off communication with the sensor and the power supply to the sensor itself.

[0156] 5. Post-fault recovery procedures:

[0157] After the electrochemical sensor malfunction is resolved, the values ​​displayed on the screen will still be based on the calculations made by the main control chip during the preheating or formal measurement phase.

[0158] It should be noted that, Figure 5A The mean A is calculated using different methods depending on the division of the measurement range of the parameter. This division can be set based on human experience, application scenarios, and measurement parameters, and is not fixed. Figure 5B The time interval for sending reset commands, and the time interval for sending reset commands after exceeding a certain number of times, can be set according to the application scenario and actual display requirements; this invention is not limited thereto. By flexibly configuring the above parameters, the electrochemical sensor can be restored to normal detection as quickly as possible after a fault, and the display screen can quickly and accurately display values ​​during the preheating stage of the electrochemical sensor, thereby ensuring the normal use of the sensor.

[0159] In this embodiment of the invention, after the sensor is powered on, sensor data is acquired every second. After acquiring data 10 times or more, the average value is taken and displayed to the user. Thereafter, the displayed value is updated every 3 seconds, showing the average value over the most recent 10 seconds. Because the detection values ​​fluctuate significantly during the warm-up phase, to avoid frequent jumps in the displayed data that might cause the user to skip ahead before fully understanding the current data, the displayed value is updated every 3 seconds instead of every second. Once warm-up is complete, the displayed data is the real-time detection value, also updated every 3 seconds.

[0160] Furthermore, in this embodiment of the invention, a reset command is sent to the sensor at intervals (once every 3 seconds) until the sensor responds to the reset command. If a set time is exceeded (assuming it is 5 minutes after the first reset command is sent), the interval is increased to once every 10 seconds, or the sensor is directly determined to be faulty and unrecoverable. During the waiting period for the sensor reset response, the data uploaded by the sensor is checked to determine if it is a reset response. If it is not a reset response, it is checked to determine if it is environmental parameter data. Therefore, fault diagnosis and recovery ensure the normal operation of the sensor in outdoor environments, extend the sensor's lifespan, and allow users to use products with sensors without worrying about the details of the internal sensors.

[0161] This embodiment also provides a calibration device for an electrochemical sensor, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0162] This embodiment provides a calibration device for an electrochemical sensor, such as... Figure 6 As shown, it includes:

[0163] The acquisition module 601 is used to acquire detection data from the electrochemical sensor;

[0164] The first processing module 602 is used to obtain a first detection data sequence within a first preset time period and a second detection data sequence within a second preset time period based on the detection data when the electrochemical sensor is in the preheating stage.

[0165] The second processing module 603 is used to obtain the first detection mean and threshold range based on the first detection data sequence;

[0166] The third processing module 604 is used to compare the first detection mean with the threshold interval, and obtain the detection calibration value based on the comparison result and the second detection data sequence.

[0167] The fourth processing module 605 is used to calibrate the electrochemical sensor based on the detection calibration value.

[0168] In some alternative implementations, the second processing module 603 includes:

[0169] The first processing unit is used to calculate the mean of the first detection data sequence to obtain the first detection mean.

[0170] The second processing unit is used to determine the upper limit and lower limit of the threshold interval based on the maximum value in the first detection data sequence.

[0171] The third processing unit is used to obtain the threshold interval based on the upper limit and lower limit of the threshold interval.

[0172] In some optional implementations, the start time of the second preset time period is a preset time after the start time of the first preset time period, and the durations of the first and second preset time periods are equal. The third processing module 604 includes:

[0173] The fourth processing unit is used to calculate the mean of the second detection data sequence when the first detection mean is less than the lower limit of the threshold interval, to obtain the second detection mean, and to use the second detection mean as the detection calibration value.

[0174] The fifth processing unit is used to calculate the mean of the second detection data sequence when the first detection mean is within the threshold range, to obtain the second detection mean; and to obtain the third detection mean based on the second detection mean and the second detection data sequence, and to use the third detection mean as the detection calibration value.

[0175] The sixth processing unit is used to filter out the maximum and minimum values ​​in the second detection data sequence when the first detection mean is greater than the upper limit of the threshold interval, to obtain the remaining detection data sequence, calculate the mean of the remaining detection data sequence to obtain the fourth detection mean, and use the fourth detection mean as the detection calibration value.

[0176] In some alternative implementations, the fifth processing unit includes:

[0177] The first processing subunit is used to determine, based on the second detection mean and the second detection data sequence, the first neighboring value and the second neighboring value in the second detection data sequence that are closest in magnitude to the second detection mean; the second detection mean is greater than or equal to the first neighboring value and less than or equal to the second neighboring value.

[0178] The second processing subunit is used to calculate the average of the first neighbor value, the second neighbor value, and the second detection mean to obtain the third detection mean.

[0179] In some optional embodiments, the calibration device for the electrochemical sensor further includes:

[0180] The fifth processing module 606 is used to verify the acquired detection data and determine whether the electrochemical sensor has malfunctioned based on the obtained verification results.

[0181] The sixth processing module 607 is used to stop acquiring the detection data of the electrochemical sensor, send a reset command to the electrochemical sensor, and receive the return data from the electrochemical sensor when the electrochemical sensor malfunctions.

[0182] The seventh processing module 608 is used to restart acquiring detection data from the electrochemical sensor when the returned data is detected to be reset response data and the reset response data is successfully verified.

[0183] The eighth processing module 609 is used to detect whether the returned data is environmental parameter data when it is detected that the returned data is not reset response data.

[0184] The ninth processing module 610 is used to restart acquiring the detection data of the electrochemical sensor when it is detected that the returned data is environmental parameter data and the environmental parameter data is successfully verified.

[0185] In some alternative implementations, the fifth processing module 606 includes:

[0186] The seventh processing unit is used for verification based on multiple detection data acquired at consecutive time points;

[0187] The eighth processing unit is used to verify each piece of detection data if it includes a frame header, frame length, command word, checksum, and frame tail.

[0188] The ninth processing unit is used to determine that the electrochemical sensor is not faulty if at least one of the multiple detection data is successfully verified, and to determine that the electrochemical sensor is faulty if none of the detection data is successfully verified.

[0189] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0190] In this embodiment, the calibration device for the electrochemical sensor is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0191] This invention also provides a computer device having the above-described features. Figure 6 The calibration device for the electrochemical sensor shown.

[0192] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 7 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 7 Take a processor 10 as an example.

[0193] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0194] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0195] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0196] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0197] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0198] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0199] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A calibration method for an electrochemical sensor, characterized in that, The method includes: Acquire detection data from electrochemical sensors; When the electrochemical sensor is in the preheating stage, a first detection data sequence within a first preset time period and a second detection data sequence within a second preset time period are obtained based on the detection data. Based on the first detection data sequence, the first detection mean and threshold range are obtained; The first detection mean value is compared with the threshold interval, and a detection calibration value is obtained based on the comparison result and the second detection data sequence. The electrochemical sensor is calibrated based on the detection calibration value; The step of comparing the first detection mean with the threshold interval, and obtaining a detection calibration value based on the obtained comparison result and the second detection data sequence, includes: When the first detection mean is less than the lower limit of the threshold interval, the mean of the second detection data sequence is calculated to obtain the second detection mean, and the second detection mean is used as the detection calibration value. When the first detection mean is within the threshold range, the mean of the second detection data sequence is calculated to obtain the second detection mean; based on the second detection mean and the second detection data sequence, a third detection mean is obtained, and the third detection mean is used as the detection calibration value; When the first detection mean is greater than the upper limit of the threshold interval, the maximum and minimum values ​​in the second detection data sequence are filtered out to obtain the remaining detection data sequence. The mean of the remaining detection data sequence is calculated to obtain the fourth detection mean, and the fourth detection mean is used as the detection calibration value. The process of obtaining the third detection mean based on the second detection mean and the second detection data sequence includes: Based on the second detection mean and the second detection data sequence, determine the first neighbor value and the second neighbor value in the second detection data sequence that are closest to the second detection mean; the second detection mean is greater than or equal to the first neighbor value and less than or equal to the second neighbor value. The mean of the first neighbor value, the second neighbor value, and the second detection mean is calculated to obtain the third detection mean.

2. The calibration method for the electrochemical sensor according to claim 1, characterized in that, The start time of the second preset time period is a preset time after the start time of the first preset time period, and the durations of the first preset time period and the second preset time period are equal.

3. The calibration method for the electrochemical sensor according to claim 1, characterized in that, The step of obtaining the first detection mean and threshold interval based on the first detection data sequence includes: Calculate the mean of the first detection data sequence to obtain the first detection mean; Based on the maximum value in the first detection data sequence, determine the upper limit and lower limit of the threshold interval; The threshold interval is obtained based on the upper limit and the lower limit of the threshold interval.

4. The calibration method for the electrochemical sensor according to claim 1, characterized in that, After acquiring the detection data from the electrochemical sensor, the method further includes: The acquired detection data is verified, and the electrochemical sensor is judged to be faulty based on the verification results. When the electrochemical sensor malfunctions, the acquisition of detection data from the electrochemical sensor is stopped, a reset command is sent to the electrochemical sensor, and the return data from the electrochemical sensor is received. When the returned data is detected to be reset response data, and the reset response data is successfully verified, the acquisition of detection data from the electrochemical sensor is restarted.

5. The calibration method for the electrochemical sensor according to claim 4, characterized in that, After sending a reset command to the electrochemical sensor and receiving return data from the electrochemical sensor, the method further includes: When it is detected that the returned data is not reset response data, it is detected whether the returned data is environmental parameter data; When the returned data is detected to be environmental parameter data, and the environmental parameter data is successfully verified, the acquisition of detection data from the electrochemical sensor is restarted.

6. The calibration method for the electrochemical sensor according to claim 4, characterized in that, The step of verifying the acquired detection data and determining whether the electrochemical sensor has malfunctioned based on the obtained verification results includes: Verification is performed based on multiple detection data acquired at consecutive time points; For each piece of detection data, if the detection data includes a frame header, frame length, command word, checksum, and frame tail, then the detection data is successfully verified. If at least one of the multiple detection data is successfully verified, the electrochemical sensor is determined to be functioning correctly; if none of the detection data is successfully verified, the electrochemical sensor is determined to be faulty.

7. A calibration device for an electrochemical sensor, characterized in that, The device includes: The acquisition module is used to acquire detection data from the electrochemical sensor; The first processing module is used to obtain a first detection data sequence within a first preset time period and a second detection data sequence within a second preset time period based on the detection data when the electrochemical sensor is in the preheating stage. The second processing module is used to obtain the first detection mean and threshold range based on the first detection data sequence; The third processing module is used to compare the first detection mean with the threshold interval, and obtain a detection calibration value based on the comparison result and the second detection data sequence. The fourth processing module is used to calibrate the electrochemical sensor according to the detection calibration value; The third processing module is also used for: When the first detection mean is less than the lower limit of the threshold interval, the mean of the second detection data sequence is calculated to obtain the second detection mean, and the second detection mean is used as the detection calibration value. When the first detection mean is within the threshold range, the mean of the second detection data sequence is calculated to obtain the second detection mean; based on the second detection mean and the second detection data sequence, a third detection mean is obtained, and the third detection mean is used as the detection calibration value; When the first detection mean is greater than the upper limit of the threshold interval, the maximum and minimum values ​​in the second detection data sequence are filtered out to obtain the remaining detection data sequence. The mean of the remaining detection data sequence is calculated to obtain the fourth detection mean, and the fourth detection mean is used as the detection calibration value. The third processing module is also used for: Based on the second detection mean and the second detection data sequence, determine the first neighbor value and the second neighbor value in the second detection data sequence that are closest to the second detection mean; the second detection mean is greater than or equal to the first neighbor value and less than or equal to the second neighbor value. The mean of the first neighbor value, the second neighbor value, and the second detection mean is calculated to obtain the third detection mean.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the calibration method of the electrochemical sensor according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the calibration method of the electrochemical sensor according to any one of claims 1 to 6.

10. An air purifier, characterized in that, The air purifier includes a main control chip, an electrochemical sensor, and a display screen. The main control chip, the electrochemical sensor, and the display screen are interconnected. The main control chip performs the calibration method of the electrochemical sensor according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Time delay calibration method, base station and computer readable storage medium

    CN115118633A

  • Detection method for preheating stage of gas sensor, electronic equipment and medium

    CN116046850A