Method for detecting humidity-sensitive resistor failure, air conditioner, and computer-readable storage medium
By adjusting the output electrical signal of the MCU interface status in the humidity sensing circuit, combined with environmental humidity detection, the convenience and accuracy of moisture-resistor fault detection are solved, and fault detection without modification is achieved.
Patent Information
- Application Number
- CN202310990609.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2043-08-08
AI Technical Summary
In the prior art, the humidity sensor circuit is difficult to detect, especially for circuits that are already in service, and the detection process is cumbersome and requires auxiliary instruments or modified circuit structures.
By adjusting the input and output status of the specific I/O interface of the MCU, outputting specific electrical signals and reading the electrical signals, combining the environmental humidity detection value, short-circuit or open-circuit fault detection is performed to avoid circuit modification.
It realizes timely and effective detection of moisture-resistor faults, avoids additional equipment and circuit modifications, and improves detection accuracy and convenience.
Smart Images

Figure CN116753595B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of circuit fault detection, and in particular to a method for detecting a humidity-sensitive resistor fault, an air conditioner, and a computer-readable storage medium. Background Art
[0002] In the existing technology, more and more air conditioners and dehumidifiers are required to be equipped with humidity sensors. Among the various components of humidity sensors, hyristors are gaining more and more attention from manufacturers due to their low cost advantage.
[0003] As attached Figure 1 As shown in the figure, in the existing humidity sensing circuit, the MCU is provided with at least three I / O interfaces, namely P1 interface, P2 interface, and P3 interface. P1 and P3 output reverse PWM waves, P2 is AD sampling, Rs and R are fixed resistors, and Rh is a humidity-sensitive resistor. By sampling the voltage at point P2 before the high-level output of the P1 port jumps to a low level, the resistance value of Rh is calculated, and then the ambient humidity is obtained by looking up the table based on the current ambient temperature and the sensor resistance.
[0004] However, in existing technologies, humidity resistors have a wide range of resistance values (from 1kΩ to 24MΩ), making it difficult to directly identify a fault in a humidity resistor. This is primarily due to the fixed resistance of the resistor, which cannot accommodate a wide range of humidity resistor values.
[0005] At the same time, existing detection technologies often require the use of auxiliary instruments or secondary modifications to the circuit structure of the existing humidity sensing circuit when performing humidity-sensitive resistor fault detection on the humidity sensing circuit, resulting in a more complicated detection process. In addition, it is difficult to perform fault detection on the humidity sensing circuit that is already in service, and it is difficult to detect faults in a timely manner. Summary of the Invention
[0006] In view of this, the present invention aims to propose a method for detecting humidity-sensitive resistor faults, an air conditioner, and a computer-readable storage medium to solve the problem in the prior art of how to detect humidity-sensitive resistor faults in existing humidity sensor circuits, especially for humidity sensor circuits that are already in service, how to detect humidity-sensitive resistor faults in a timely and effective manner without changing the circuit structure.
[0007] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0008] A method for detecting a humidity-sensitive resistor fault comprises: obtaining a detection value K of an ambient humidity value, determining whether K is a maximum value; if so, performing short-circuit fault detection; if not, determining whether K is a minimum value, and if K is the minimum value, performing open-circuit fault detection; the short-circuit fault detection comprises: using a P1 interface and a P2 interface as output ports, using a P3 interface as an analog input port, the P1 interface outputting a low level, the P2 interface outputting a high level, reading a voltage value U through the P3 interface, determining whether U is less than or equal to a preset value, and if so, determining that a short-circuit fault has occurred in the humidity-sensitive resistor Rh; if not, restoring each I / O interface to a normal sampling configuration; the open-circuit fault detection comprises: using the P2 interface as an output port, using the P1 interface and the P3 interface as analog input ports, the P2 interface outputting a level signal, reading the level signal through the P1 interface and the P3 interface respectively, determining whether the type of the level signal read by the P1 interface is the same as the type of the level signal read by the P3 interface, and if so, restoring each I / O interface to a normal sampling configuration; if not, determining that an open-circuit fault has occurred in the humidity-sensitive resistor Rh. Therefore, on the basis of the existing humidity sensing circuit structure, specific short-circuit fault detection or open-circuit fault detection is performed according to the detection conditions of the ambient humidity, thereby realizing timely and effective detection of the short-circuit fault or open-circuit fault of the humidity-sensitive resistor; at the same time, the fault detection process of the present application does not require the use of additional auxiliary instruments, nor does it require secondary modification of the existing humidity sensing circuit structure. By simply adjusting the input and output states of a specific I / O interface in the MCU, using the output port to output a specific electrical signal, and then based on the electrical signal read at the input port, it is possible to conveniently and quickly determine whether the humidity-sensitive resistor Rh has a short-circuit fault or an open-circuit fault.
[0009] Furthermore, the open circuit fault detection process is as follows: the P2 interface is used as the output port, and the P1 interface and the P3 interface are used as analog input ports. The P2 interface outputs a high-level signal, and the level signals are read through the P1 interface and the P3 interface respectively, and it is determined whether the P1 interface and the P3 interface both read high-level signals. If not, it is determined that an open circuit fault occurs in the humidity-sensitive resistor Rh. If so, the P2 interface outputs a low-level signal, and the level signals are read through the P1 interface and the P3 interface respectively, and it is determined whether the P1 interface and the P3 interface both read low-level signals. If so, each I / O interface is restored to a normal sampling configuration. If not, it is determined that an open circuit fault occurs in the humidity-sensitive resistor Rh. Therefore, in the open circuit fault detection process, the P2 interface is first used to output a high-level signal for the first-level analysis and judgment. If both the P1 interface and the P3 interface read high-level signals, the P2 interface is then used to output a low-level signal for the second-level analysis and judgment to determine whether the humidity-sensitive resistor Rh is normal. On the one hand, the open circuit fault of the humidity-sensitive resistor Rh can be discovered in time. On the other hand, the two-level analysis and judgment process is conducive to improving the accuracy of fault detection and avoiding the occurrence of misjudgment.
[0010] Furthermore, the process for determining whether K is at its maximum value is to determine whether K remains at its maximum value for a specified duration; the process for determining whether K is at its minimum value is to determine whether K remains at its minimum value for a specified duration. This prevents brief fluctuations in the K value under certain circumstances, which could cause the humidity sensor circuit to perform unnecessary detection processes, thereby maintaining the normal operation of the humidity sensor circuit and the corresponding appliance. The maximum value is the maximum humidity value that the humidity sensor circuit can detect, and the minimum value is the minimum humidity value that the humidity sensor circuit can detect. The preset values are 0V-0.2V.
[0011] Furthermore, the normal sampling configuration is as follows: the P1 and P3 interfaces serve as output ports, and the P1 and P3 interfaces output inverse PWM waves, while the P2 interface serves as an analog input port. Therefore, after performing fault detection on the humidity-sensitive resistor, if it is determined that the humidity-sensitive resistor is not faulty, the interfaces are adjusted to the normal sampling configuration, allowing the humidity sensing circuit to perform normal humidity detection, ensuring the normal use of the corresponding electrical appliance and humidity detection function.
[0012] Furthermore, if the minimum value < K < the maximum value, each I / O interface maintains a normal sampling configuration, thereby first analyzing the detection value K of the ambient humidity. When K is in the normal humidity range, it indicates that the humisistor has not failed, and there is no need to adjust the status of each I / O interface. The corresponding components are maintained to continue to operate normally to provide the humidity sensing function normally.
[0013] An air conditioner includes a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, the method for detecting a humidity-sensitive resistor failure is implemented.
[0014] A computer-readable storage medium stores a computer program. When the computer program is read and executed by a processor, the method for detecting a humidity-sensitive resistor failure is implemented.
[0015] Compared with the prior art, the method for detecting a humidity-sensitive resistor failure, the air conditioner, and the computer-readable storage medium of the present invention have the following advantages:
[0016] The method for detecting a humidity-sensitive resistor fault, the air conditioner, and the computer-readable storage medium described in the present invention perform specific short-circuit fault detection or open-circuit fault detection based on the detection of the ambient humidity on the basis of the existing humidity sensing circuit structure, thereby realizing timely and effective detection of short-circuit faults or open-circuit faults in the humidity-sensitive resistor. At the same time, the fault detection process of the present application does not require the use of additional auxiliary instruments, nor does it require secondary modification of the existing humidity sensing circuit structure. By simply adjusting the input and output states of a specific I / O interface in the MCU, using the output port to output a specific electrical signal, and then based on the electrical signal read at the input port, it is possible to conveniently and quickly determine whether the humidity-sensitive resistor Rh has a short-circuit fault or an open-circuit fault. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which constitute part of the present invention, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:
[0018] Figure 1 A schematic diagram of a humidity sensing circuit provided with a humidity-sensitive resistor in the prior art;
[0019] Figure 2 This is a flow chart of a method for detecting a humidity-sensitive resistor failure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The inventive concepts of the present disclosure will be described below using terms commonly used by those skilled in the art to convey the essence of their work to other persons skilled in the art. However, these inventive concepts can be embodied in many different forms and should not be considered limited to the embodiments described herein.
[0021] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. Humidity in this application refers to relative humidity, but in view of the conventional conversion between relative humidity and absolute humidity, it can also be absolute humidity.
[0022] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0023] In the existing humidity sensing circuit (such as the attached Figure 1 Circuit structure), since the humidity resistance of the humidity resistor often has a large span (the resistance range is 1kΩ~24MΩ), once the humidity resistor fails, it is often impossible to directly determine.
[0024] Existing detection technologies often require the use of auxiliary instruments or secondary modifications to the circuit structure of the existing humidity sensing circuit when performing hyristor fault detection on the humidity sensing circuit, resulting in a more complicated detection process. In addition, it is difficult to perform fault detection on the humidity sensing circuit that is already in service, making it difficult to detect faults in a timely manner.
[0025] In order to solve the problem of how to detect humidity resistor failure in the existing humidity sensor circuit in the prior art, especially for the humidity sensor circuit that has been in service, how to detect humidity resistor failure in a timely and effective manner without changing the circuit structure. Figure 1 Based on the conventional humidity sensing circuit structure, this embodiment proposes a method for detecting humidity resistor failure, as shown in the attached figure. Figure 2 As shown, the detection method includes:
[0026] The ambient humidity value K is obtained and a determination is made as to whether K is at its maximum value. If so, a short-circuit fault detection is performed. If not, a determination is made as to whether K is at its minimum value. If so, an open-circuit fault detection is performed. Accordingly, if the minimum value < K < the maximum value, each I / O interface maintains its normal sampling configuration, maintaining the normal operation of the corresponding components and providing the normal humidity sensing function.
[0027] Among them, the maximum value and the minimum value are preset parameters of the humidity sensing circuit during the production process. The preset values are different due to the influence of different manufacturers, component performance, component detection accuracy and other conditions. This application only provides individual examples for reference. For example: the maximum value is the maximum humidity that can be detected by the humidity sensing circuit, such as 90%-95%, and the minimum value is the minimum humidity that can be detected by the humidity sensing circuit, such as 10%-20%.
[0028] The short-circuit fault detection includes: using the P1 interface and the P2 interface as output ports, and the P3 interface as an analog input port, the P1 interface outputs a low level, and the P2 interface outputs a high level, reading the voltage value U through the P3 interface, and judging whether U ≤ a preset value. If so, it is determined that a short-circuit fault occurs in the humidity-sensitive resistor Rh; if not, each I / O interface is restored to a normal sampling configuration.
[0029] Among them, the preset value is also a preset parameter. Affected by different component performance, component detection accuracy and other conditions, the value of the preset value is also different. This application only provides individual examples for reference, for example: the preset value is 0V-0.2V. Of course, under ideal conditions, the preset value can be 0V.
[0030] The open circuit fault detection includes: using the P2 interface as the output port, using the P1 interface and the P3 interface as analog input ports, the P2 interface outputs a level signal, reading the level signal through the P1 interface and the P3 interface respectively, and judging whether the type of the level signal read by the P1 interface is the same as the type of the level signal read by the P3 interface. If so, restoring each I / O interface to a normal sampling configuration; if not, determining that an open circuit fault occurs in the humidity-sensitive resistor Rh.
[0031] Therefore, based on the existing humidity sensing circuit structure, the present application performs specific short-circuit fault detection or open-circuit fault detection according to the detection conditions of the ambient humidity, thereby realizing timely and effective detection of short-circuit faults or open-circuit faults of the humidity-sensitive resistor; at the same time, the fault detection process of the present application does not require the use of additional auxiliary instruments, nor does it require secondary modification of the existing humidity sensing circuit structure. It only requires adjusting the input and output states of a specific I / O interface in the MCU, using the output port to output a specific electrical signal, and then, based on the electrical signal read at the input port, it is possible to quickly and conveniently determine whether the humidity-sensitive resistor Rh has a short-circuit fault or an open-circuit fault.
[0032] The process of determining whether K is the maximum value is as follows: whether K is always the maximum value within the rated time; the process of determining whether K is the minimum value is as follows: whether K is always the minimum value within the rated time. Among them, within the rated time, the humidity sensing circuit can obtain the detection value K of the ambient humidity value in real time and continuously. The rated time is also a preset parameter. This application only provides individual examples for reference, for example: the rated time is 30min-120min. This avoids temporary fluctuations in the K value in certain special cases, which may cause the humidity sensing circuit to perform unnecessary detection processes, so as to maintain the normal working state of the humidity sensing circuit and the corresponding electrical appliance.
[0033] The open circuit fault detection process is as follows: the P2 interface is used as the output port, the P1 interface and the P3 interface are used as analog input ports, the P2 interface outputs a high-level signal, the level signals are read through the P1 interface and the P3 interface respectively, and it is determined whether the P1 interface and the P3 interface both read high-level signals. If not, it is determined that an open circuit fault occurs in the humidity resistor Rh. If so, the P2 interface outputs a low-level signal, the level signals are read through the P1 interface and the P3 interface respectively, and it is determined whether the P1 interface and the P3 interface both read low-level signals. If so, each I / O interface is restored to a normal sampling configuration. If not, it is determined that an open circuit fault occurs in the humidity resistor Rh. Therefore, in the open circuit fault detection process of this application, the P2 interface is first used to output a high-level signal for the first-level analysis and judgment. If the P1 interface and the P3 interface are both read as high-level signals, the P2 interface is then used to output a low-level signal for the second-level analysis and judgment to determine whether the humidity-sensitive resistor Rh is normal. On the one hand, the open circuit fault of the humidity-sensitive resistor Rh can be discovered in time. On the other hand, the two-level analysis and judgment process is conducive to improving the accuracy of fault detection and avoiding the occurrence of misjudgment.
[0034] At least for the P1, P2, and P3 interfaces, the normal sampling configuration is as follows: the P1 and P3 interfaces serve as output ports, outputting inverse PWM waves, and the P2 interface serves as an analog input port. Therefore, after performing fault detection on the humidity-sensitive resistor, if it is determined that the humidity-sensitive resistor is not faulty, the interfaces are adjusted to the normal sampling configuration, allowing the humidity sensing circuit to perform normal humidity detection, ensuring the normal operation of the corresponding electrical appliance and the humidity detection function.
[0035] In order to avoid misunderstandings, this application briefly explains the humidity sensor circuit structure and individual terms.
[0036] MCU is the abbreviation of Microcontroller Unit. PWM wave is a pulse waveform with variable duty cycle. Figure 1 As shown in the rectangular wave in the figure, it can be seen that the waveforms of the PWM wave output by the P1 interface and the PWM wave output by the P3 interface are opposite.
[0037] As attached Figure 1As shown, the humidity sensing circuit includes an MCU, a humidity-sensitive resistor Rh, a first fixed resistor Rs, and a second fixed resistor R. The MCU includes at least three I / O interfaces, which are respectively denoted as P1 interface, P2 interface, and P3 interface. The P1 interface is directly connected to the humidity-sensitive resistor Rh, the P2 interface is directly connected to the second fixed resistor R, and the P3 interface is directly connected to the first fixed resistor Rs. When the P1 interface, P2 interface, and P3 interface are in a normal sampling configuration state (i.e., the P1 interface and P3 interface serve as output ports, and the P2 interface serves as an analog input port), the humidity-sensitive resistor Rh is connected in parallel with the first fixed resistor Rs, and the parallel humidity-sensitive resistor Rh and the first fixed resistor Rs are connected in series with the second fixed resistor R. In actual use of the circuit, a current limiting resistor and a sampling capacitor (not shown) are usually added to the analog input port. Since it can refer to the existing humidity sensing circuit, it will not be described in detail.
[0038] In addition, in the humidity sensing circuit of the present application, the resistance of the second fixed resistor R is relatively small, generally not exceeding 10kΩ, to avoid a slow rise in the sampling capacitance; for the first fixed resistor Rs, its resistance generally ranges from 6kΩ to 100kΩ, and can be selected according to the detection accuracy requirements under different humidity conditions. For example, if high detection accuracy is required in a low humidity environment, a first fixed resistor Rs with as large a resistance as possible can be used; if high detection accuracy is required in a high humidity environment, a first fixed resistor Rs with as small a resistance as possible can be used.
[0039] In the present invention, the method for detecting a humidity sensor failure described in this embodiment can be used for any device with a humidity detection function. As a preferred embodiment of the present application, an air conditioner is also proposed that uses the method for detecting a humidity sensor failure described in this embodiment. The air conditioner can be a conventional wall-mounted air conditioner, a ceiling air conditioner, a cabinet air conditioner, a multi-split air conditioning system, etc. The specific component structure of the air conditioner, such as the specific structure of the indoor unit, can be referenced from existing technologies and will not be described in detail here.
[0040] In addition, the air conditioner includes a computer-readable storage medium storing a computer program and a processor. When the computer program is read and executed by the processor, the method for detecting a hygroscopic resistor failure is implemented. At the same time, the present application also proposes a computer-readable storage medium storing a computer program. When the computer program is read and executed by the processor, the method for detecting a hygroscopic resistor failure is implemented.
[0041] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for detecting a humidity sensor failure, characterized in that: The detection method is used for a humidity sensing circuit; the humidity sensing circuit includes an MCU, a humidity-sensitive resistor Rh, a first fixed resistor Rs, and a second fixed resistor R; the MCU includes at least three I / O interfaces, which are respectively denoted as a P1 interface, a P2 interface, and a P3 interface; the P1 interface is directly connected to one end of the humidity-sensitive resistor Rh, the P2 interface is directly connected to one end of the second fixed resistor R, the P3 interface is directly connected to one end of the first fixed resistor Rs, and the other end of the humidity-sensitive resistor Rh, the other end of the second fixed resistor R, and the other end of the first fixed resistor Rs are connected to each other; The detection method comprises: obtaining a detection value K of the ambient humidity value, determining whether K is a maximum value; if so, performing a short circuit fault detection; if not, determining whether K is a minimum value, and if K is a minimum value, performing an open circuit fault detection; The short-circuit fault detection includes: using the P1 interface and the P2 interface as output ports, and the P3 interface as an analog input port, the P1 interface outputs a low level, and the P2 interface outputs a high level, reading the voltage value U through the P3 interface, and judging whether U ≤ a preset value. If so, it is determined that the humidity-sensitive resistor Rh has a short-circuit fault; if not, restoring each I / O interface to a normal sampling configuration; The open circuit fault detection includes: using the P2 interface as the output port, using the P1 interface and the P3 interface as analog input ports, the P2 interface outputs a level signal, reading the level signal through the P1 interface and the P3 interface respectively, and judging whether the type of the level signal read by the P1 interface is the same as the type of the level signal read by the P3 interface. If so, restoring each I / O interface to a normal sampling configuration; if not, determining that an open circuit fault occurs in the humidity-sensitive resistor Rh.
2. The method for detecting a humidity sensor failure according to claim 1, wherein: The open circuit fault detection process is as follows: the P2 interface is used as the output port, the P1 interface and the P3 interface are used as analog input ports, the P2 interface outputs a high-level signal, the level signals are read through the P1 interface and the P3 interface respectively, and it is determined whether the P1 interface and the P3 interface both read high-level signals. If not, it is determined that an open circuit fault occurs in the humidity resistor Rh. If so, the P2 interface outputs a low-level signal, the level signals are read through the P1 interface and the P3 interface respectively, and it is determined whether the P1 interface and the P3 interface both read low-level signals. If so, each I / O interface is restored to a normal sampling configuration. If not, it is determined that an open circuit fault occurs in the humidity resistor Rh.
3. The method for detecting a humidity sensor failure according to claim 1, wherein: The process of judging whether K is the maximum value is as follows: whether K is always the maximum value within the rated time; the process of judging whether K is the minimum value is as follows: whether K is always the minimum value within the rated time.
4. The method for detecting a humidity sensor failure according to claim 1, wherein: The maximum value is the maximum humidity value that can be detected by the humidity sensing circuit, and the minimum value is the minimum humidity value that can be detected by the humidity sensing circuit.
5. The method for detecting a humidity sensor failure according to claim 1, wherein: The default value is 0V-0.2V.
6. The method for detecting a humidity sensor failure according to claim 1, wherein: The normal sampling configuration is: the P1 interface and the P3 interface are used as output ports, and the P1 interface and the P3 interface output reverse PWM waves, and the P2 interface is used as an analog input port.
7. The method for detecting a humidity sensor failure according to claim 1, wherein: If the minimum value < K < the maximum value, each I / O interface maintains the normal sampling configuration.
8. An air conditioner, characterized in that: The invention comprises a computer-readable storage medium storing a computer program and a processor, wherein when the computer program is read and executed by the processor, the method for detecting a humidity-sensitive resistor failure according to any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is read and executed by a processor, the method for detecting a humidity-sensitive resistor failure according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method for sampling of humidity sensors by using square waves
CN102353699A
Humidity detection device and fault detection method thereof
CN111912461A