Water vapor detection system, method, microprocessor, and storage medium
By working together with the detection circuit and the switching circuit, the problem of the narrow applicability of moisture intrusion detection for USB Type-C interfaces is solved. Moisture intrusion detection is achieved in both the power supply and power consumption states of DRP devices, with wide applicability, high accuracy, and no impact on normal interface use.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI YINGJIXIN SEMICON CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies have a narrow scope of application for moisture intrusion detection in USB Type-C interfaces, cannot be applied to all DRP devices, and are costly or may cause signal interference.
By employing the coordinated operation of detection and switching circuits, and utilizing a detection voltage comparison module, detection selector, counter, and microprocessor, moisture intrusion detection is achieved. This method is applicable to the status of electrical equipment and power supply equipment in DRP equipment, and does not require CC level switching.
It enables water vapor intrusion detection in DRP devices when the interface is not connected, with high accuracy, reduced false positive rate, and no impact on normal interface use.
Smart Images

Figure CN122172067A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of detection circuit technology, and in particular to a water vapor detection system, method, microprocessor, and storage medium. Background Technology
[0002] USB Dual Role Port (DRP): This refers to a USB Type-C interface port that can dynamically switch between the DFP (host / power supply) and UFP (device / power receiver) roles. In recent years, Type-C interfaces have been used in a large number of mobile devices. The wide range of applications of Type-C interfaces also means a wide range of usage scenarios and complex environments. Moisture intrusion in various scenarios can eventually lead to short circuits, corrosion, or signal interference in the interface. Therefore, moisture detection has become an urgent need.
[0003] One related technique utilizes the CC level toggling of a DRP device when it is not inserted, recording the duration of the level's height hold-up during each pull-up. When moisture intrusion is present, due to potential micro-short circuits or parasitic capacitances, the CC pull-up speed slows down, and the time it takes for the level to reach the threshold also shortens, thus determining the presence of moisture intrusion. However, all of the above designs rely on the device being DRP; for power supply and consumer equipment, there is no CC level toggling before connection, limiting their applicability. Summary of the Invention
[0004] One objective of this application is to provide a water vapor detection system, method, microprocessor, and storage medium to improve the technical problem of the narrow applicability of related technologies.
[0005] The first aspect of this invention provides a water vapor detection system, including a detection circuit and a switching circuit. The detection circuit includes a voltage comparison module, a detection selector, a counter, and a microprocessor. The voltage comparison module is connected to the switching circuit. The output terminal of the detection selector is connected to the counter, which is configured to input a clock signal. The microprocessor is connected to the voltage comparison module, the detection selector, the counter, and the switching circuit. The voltage comparison module is configured with a preset voltage range. The microprocessor is configured to send a switching command to the switching circuit to switch the switching circuit from a first state to a second state, wherein the first state is a pull-up state or a pull-down state. The first state is a pull-up state, and the second state is a pull-down state or a pull-up state; in response to the switching circuit switching from the first state to the second state, the switching circuit is controlled to transmit the real-time input voltage of the preset configuration channel to the voltage comparison module; the target selection value of the detection selector is set so that the detection selector controls the voltage comparison module to output an output signal according to the target selection value; in response to the output signal, a short-circuit detection signal is generated, which is used to indicate that the real-time input voltage is maintained for a longer than a preset duration within the preset voltage range or that the real-time input voltage is less than a preset voltage source voltage; in response to the short-circuit detection signal, moisture intrusion information is generated.
[0006] Optionally, in a first implementation of the first aspect of the present invention, the voltage comparison module includes an AND gate, the output of the AND gate is connected to the detection selector, the target selection value includes a first selection value, the output signal includes the AND gate signal output by the AND gate, and the microprocessor is configured to set the target selection value of the detection selector so that the detection selector selects the output signal output by the voltage comparison module, including: setting the target selection value of the detection selector to the first selection value; and controlling the detection selector to select the AND gate to output the AND gate signal based on the first selection value.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the voltage comparison module further includes: a first window comparator, the input terminal of which is connected to the switching circuit, and the output terminal of which is connected to the AND gate, configured to perform a window comparison on the real-time input voltage output by the switching circuit, and output a corresponding first comparison signal to the AND gate; a second window comparator, the input terminal of which is connected to the switching circuit, and the output terminal of which is connected to the AND gate, configured to perform a window comparison on the real-time input voltage output by the switching circuit, and output a corresponding second comparison signal to the AND gate; the AND gate is configured to perform operations on the first comparison signal and the second comparison signal, and when the real-time input voltage is within the preset voltage range, output a valid detection signal to the detection selector.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the microprocessor is configured to generate a short-circuit detection signal in response to the output signal, comprising: responding to the AND gate signal to cause the detection selector to output a counting enable signal to the counter; determining the duration of the counting enable signal; counting clock pulses according to the duration of the counting enable signal to obtain a corresponding target count value; and generating a short-circuit detection signal in response to the target count value being greater than a pre-designed value.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the voltage comparison module further includes a single-threshold comparator, the output of which is connected to the detection selector, the target selection value further includes a second selection value, and the microprocessor is configured to set the target selection value of the detection selector so that the detection selector selects the output signal output by the voltage comparison module, including: setting the target selection value of the detection selector to the second selection value; and controlling the detection selector to select the comparator signal output by the single-threshold comparator based on the second selection value.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the microprocessor is configured to generate a short-circuit detection signal in response to the output signal, comprising: in response to the comparator signal, causing the detection selector to output a counting enable signal to the counter; determining the duration of the counting enable signal; counting clock pulses according to the duration of the counting enable signal to obtain a corresponding target count value; and generating moisture intrusion information in response to the target count value being greater than a pre-designed value.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the microprocessor is configured to respond to the output signal to cause the counter to calculate the duration of the real-time input voltage within a preset voltage range of the voltage comparison module, comprising: responding to the output signal to detect the rate of change of the real-time input voltage, wherein the rate of change is a decreasing rate or an increasing rate; and obtaining the duration of the implementation input voltage within the preset voltage range of the voltage comparison module based on the rate of change.
[0012] A second aspect of the present invention provides a water vapor detection method applied to a microprocessor as described above. The method includes: sending a switching command to the switching circuit to switch the switching circuit from a first state to a second state, wherein the first state is a pull-up state or a pull-down state, and the second state is a pull-down state or a pull-up state; in response to the switching circuit switching from the first state to the second state, controlling the switching circuit to transmit a real-time input voltage of a preset configured channel to the voltage comparison module; setting a target selection value for the detection selector to control the voltage comparison module to output an output signal according to the target selection value, wherein the voltage comparison module is configured with a preset voltage range; in response to the output signal, generating a short-circuit detection signal, wherein the short-circuit detection signal indicates that the real-time input voltage is held for a duration greater than a preset duration within the preset voltage range or that the real-time input voltage is less than a preset voltage source voltage; and in response to the short-circuit detection signal, generating water vapor intrusion information.
[0013] A third aspect of the present invention provides a microprocessor including a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, wherein when the processor executes the one or more computer programs, the microprocessor enables the above-described water vapor detection method.
[0014] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the above-described water vapor detection method.
[0015] The embodiments of this application can achieve the following technical effects: The water vapor detection system provided in this application realizes the detection of water vapor intrusion through the coordinated cooperation of the detection circuit and the switching circuit. When the interface is not connected, regardless of whether the DRP device is in the state of power consumption or power supply, the switching command can be executed without CC level flipping. By maintaining the duration for a longer than the preset duration or the real-time input voltage is less than the preset voltage source voltage, it can be determined that there is water vapor intrusion at the interface, which has a wide range of applications. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the connection between two DRP devices provided in an embodiment of this application; Figure 2 This is an equivalent circuit diagram of a DRP device encountering moisture intrusion, provided in an embodiment of this application; Figure 3 This is an equivalent circuit diagram of a DRP device with a connection detection circuit provided in this application embodiment encountering moisture intrusion; Figure 4 This is a schematic diagram of a detection circuit provided in an embodiment of this application; Figure 5 This is a circuit diagram of a detection circuit provided in an embodiment of this application; Figure 6 The C provided in the embodiments of this application par Detection diagram; Figure 7 The R provided in the embodiments of this application short Detection diagram; Figure 8 This is a flowchart of a water vapor detection method provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a microprocessor provided in an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0019] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0020] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0021] In addition to the problems pointed out in the background art, the inventors also discovered that in related technologies, adding probes to the interface to measure and record the voltage and current characteristics when dry, and then changing these characteristics when the interface becomes wet, can help determine if moisture intrusion has occurred. This solution has been proposed for a long time but has rarely been used. Measuring the voltage and current characteristics of the interface significantly increases costs, even exceeding the losses caused by moisture intrusion. Even disregarding cost, this solution places high demands on the power management chip, requiring high-precision sampling and data storage capabilities, making it difficult to implement.
[0022] Furthermore, related technologies embed a metal plate within the plastic-encapsulated tongue of the Type-C interface female connector. This forms a capacitor with the ground wire. When moisture enters, the dielectric changes, and the capacitance value also changes. An integrator detects this change in capacitance, achieving a moisture detection effect. This solution requires a new Type-C interface, meaning that hundreds of millions of existing devices cannot use this technology, nor can existing Type-C interfaces. It also increases costs for the latest devices. Additionally, this extra capacitor interferes with high-speed signals, making it unusable on devices with high communication speed requirements.
[0023] The following embodiments of this application provide a water vapor detection system, including a detection circuit and a switching circuit. The detection circuit can be applied to a DRP device and is used to detect and process signals when water vapor detection is required. When the DRP device is in both power-consuming and power-supplying states, it can also detect water vapor intrusion. A DRP device (Dual Role Port) is a device that can act as both a power supply and a power consumption end, and can automatically switch between the two. A DRP device can be a mobile phone, tablet, laptop, Switch, or some power banks. A power-consuming device is a device that only consumes power and does not supply power, while a power supply device is a device that only supplies power and does not consume power.
[0024] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating the connection of two DRP devices provided in this embodiment. In the Type-C interface specification, a DRP device functions as both a sink and a source, and has pull-up resistors Rp and Rd. Before establishing a connection, it periodically attempts to act as either a sink or a source, which is manifested by the preset configuration channel cyclically switching between pull-up and pull-down states. Only after a formal connection is established with other devices will it select its role as either a sink or a source. The configuration channel is a key signal line of the USB Type-C interface, primarily used for connection configuration, power negotiation, and reversible insertion detection. Figure 1 The phrase "present as sink or source" indicates that the device is presented as either a sink or a source, and the interface can be a USB Type-C interface, a USB interface, a Lightning interface, or other similar interfaces.
[0025] When moisture enters the interface, the pins are very closely spaced (only 0.5mm for a 24-pin interface), making them extremely susceptible to micro-short circuits from infiltrating liquid droplets. This is equivalent to a short circuit resistance R to ground. short (Micro-Short Resistance), R short This refers to the equivalent micro-short-circuit resistance generated on the channel due to factors such as moisture intrusion, or the parasitic capacitance C induced by the electrolyte in the liquid droplet. par (Parasitic Capacitance), C par This refers to the equivalent capacitance and resistance on the configuration channel caused by factors such as moisture intrusion. Please refer to [link / reference]. Figure 2 , Figure 2 This is an equivalent circuit diagram of a DRP device encountering moisture intrusion, provided in an embodiment of this application, where S1 is a port role selector.
[0026] Please refer to the following: Figure 3 and Figure 4 , Figure 3 This is an equivalent circuit diagram of a DRP device with a connection detection circuit provided in this application embodiment, when it encounters moisture intrusion. Figure 4 This is a schematic diagram of a detection circuit provided in an embodiment of this application; please refer to it as well. Figure 3 and Figure 4 , Figure 3 This is an equivalent circuit diagram of a DRP device with a connection detection circuit provided in this application embodiment, when it encounters moisture intrusion. Figure 4 This is a schematic diagram of a detection circuit provided in an embodiment of this application. The detection circuit 100 includes a voltage comparison module 11, a detection selector 12, a counter 13, and a microprocessor 14. The voltage comparison module 11 is connected to the switching circuit. The output terminal of the detection selector 12 is connected to the counter 13. The counter 13 is configured to input a clock signal. The microprocessor 14 is connected to the voltage comparison module 11, the detection selector 12, the counter 13, and the switching circuit. The voltage comparison module 11 is configured with a preset voltage range.
[0027] The voltage comparison module 11 is used to perform threshold comparison or range judgment on the input real-time voltage, converting the analog voltage signal into a digital logic signal to provide a basis for subsequent logic judgment and timing. The preset voltage range is the voltage range between the pre-set upper limit voltage Vth and the lower limit voltage Vtl of the window.
[0028] The detection selector 12 is a multiplexer used to select and control multiple input detection signals to output a specified signal to the subsequent processing circuit. The detection selector 12 has at least two input terminals, one output terminal, and a selection control terminal. According to the control signal of the selection control terminal, it selects one signal from the multiple input signals to conduct to the output terminal of the detection selector 12. The control signal is such as high level or low level, 0 or 1.
[0029] Counter 13 is used to accumulate the number of pulses of the clock signal to convert the effective duration of the counting enable signal into a digital count value, thereby realizing the quantitative detection of time. The counter 13 has a counting input terminal, a clock input terminal, and a counting output terminal. When the counting enable signal is at an active level, it counts the clock signal; when the counting enable signal is at an inactive level, it stops counting and maintains the current count value.
[0030] Microprocessor 14 is an integrated circuit with arithmetic, control, and processing functions, used to execute instructions, control the coordinated operation of various modules, and perform data processing and judgment.
[0031] The microprocessor 14 is configured to send a switching command to the switching circuit to switch the switching circuit from a first state to a second state, wherein the first state is a pull-up state or a pull-down state, and the second state is a pull-down state or a pull-up state.
[0032] A switching command is a control command output by the switching circuit, used to trigger a change in the level state of the interface configuration channel. The configuration channel, short for Configuration Channel in the USB Type-C interface, is the core control pin of the interface, used to implement functions such as connection detection, orientation recognition, power role negotiation, power configuration, and PD protocol communication.
[0033] The switching circuit includes a pull-up resistor Rp, a pull-down resistor Rd, and a port role selector S1. The first end of the pull-up resistor Rp is connected to a preset voltage source V+, and the first end of the pull-down resistor Rd is grounded. The second ends of the pull-up resistor Rp and the pull-down resistor Rd are respectively connected to the port role selector S1. The pull-up state refers to the configuration channel being connected to the preset voltage source V+ through the pull-up resistor Rp and outputting a high voltage. The pull-down state refers to the configuration channel being grounded through the pull-down resistor Rd and outputting a low voltage. The preset voltage source V+ is responsible for providing the pull-up. When the DRP device switches to a power supply device, it, together with the pull-up resistor Rp, determines the pull-up capability of the configuration channel. The port role selector S1 is used to switch the first state of the switching circuit to the second state, which can actively trigger the configuration channel level state to flip without relying on the autonomous switching of the DRP device. It is suitable for various interfaces such as pure power consumption devices and pure power supply devices, thus expanding the scope of application.
[0034] The microprocessor 14 is configured to control the switching circuit to transmit the real-time input voltage of the preset configuration channel to the voltage comparison module 11 in response to the switching circuit switching from the first state to the second state.
[0035] In the switching circuit, the port role selector S1 first selects the pull-up resistor Rp and then switches to the pull-down resistor Rd. The preset configuration channel uses the transition from the first state to the second state as the trigger condition, ensuring that the voltage comparison module 11 only operates during the effective voltage change phase and avoiding false detections. It can completely and accurately send the true, continuous real-time voltage of the configuration channel to the voltage comparison module 11, reflecting the voltage change characteristics caused by moisture or parasitic capacitance. After the state switch, it transmits the effective detection voltage, filtering out invalid levels and improving detection accuracy.
[0036] The microprocessor 14 is configured to set a target selection value for the detection selector 12, such that the detection selector 12 controls the voltage comparison module 11 to output an output signal according to the target selection value.
[0037] The target selection value can be 1 or 0, and different selection values correspond to different output signals. By setting different target selection values, different detection paths or modes can be switched, improving the applicability and flexibility of the circuit.
[0038] The microprocessor 14 is configured to generate a short-circuit detection signal in response to the output signal, the short-circuit detection signal being used to indicate that the real-time input voltage is held for a duration longer than a preset duration within the preset voltage range or that the real-time input voltage is less than a preset voltage source voltage.
[0039] The holding time is the length of time the real-time input voltage remains within a preset voltage range. The detection circuit 100 can use the holding time and voltage amplitude to determine whether there is an abnormality, which greatly improves the accuracy of abnormality detection and reduces the false judgment rate.
[0040] The microprocessor 14 is configured to generate moisture intrusion information in response to the short-circuit detection signal.
[0041] The moisture intrusion information indicates that there is moisture intrusion at the interface. When the real-time input voltage is maintained within the preset voltage range for a duration longer than the preset duration, there is moisture intrusion at the interface. When the real-time input voltage is less than the preset voltage source voltage, there is moisture intrusion at the interface.
[0042] The water vapor detection system provided in this application embodiment achieves water vapor intrusion detection through the coordinated cooperation of the detection circuit 100 and the switching circuit. When the interface is not connected, regardless of whether the DRP device is in the state of power consumption or power supply, the switching command can be executed without CC level flipping. By maintaining the duration for a longer than the preset duration or the real-time input voltage is less than the preset voltage source voltage, it can be determined that there is water vapor intrusion at the interface, which has a wide range of applications.
[0043] In some embodiments, the voltage comparison module 11 includes an AND gate, the output of which is connected to the detection selector 12, the target selection value includes a first selection value, the output signal includes the AND gate signal output by the AND gate, and the microprocessor 14 is configured to set the target selection value of the detection selector 12 so that the detection selector 12 selects the output signal output by the voltage comparison module 11, including: setting the target selection value of the detection selector 12 to the first selection value; and controlling the detection selector 12 to select the AND gate signal output by the AND gate based on the first selection value.
[0044] Specifically, the AND gate is used to perform a logical AND operation on the signal output by the comparator in the voltage comparison module 11. The first selection value can be 0, indicating that the AND gate is selected. The AND gate is connected to the counter 13 through the detection selector 12. Under the control of the first selection value, the detection selector 12 selects the AND gate signal output by the AND gate. By explicitly specifying the AND gate signal output by the first selection value, the detection path is unique and the timing is stable. The AND gate signal output by the AND gate represents the signal where the real-time input voltage is within the preset voltage range, ensuring that the counter 13 only processes valid detection signals. By configuring different target selection values, multiple detection modes can be expanded, and the circuit has strong versatility.
[0045] Please see Figure 5 , Figure 5 This is a circuit diagram of a detection circuit provided in an embodiment of this application. In some embodiments, the voltage comparison module 11 further includes: A first window comparator Cp1 is configured to perform a window comparison on the real-time input voltage output by the switching circuit and output a corresponding first comparison signal to the AND gate U1Y. The second window comparator Cp2 has its input connected to the switching circuit and its output connected to the AND gate U1Y. It is configured to perform window comparison on the real-time input voltage output by the switching circuit and output the corresponding second comparison signal to the AND gate U1Y. The AND gate U1Y is configured to perform operations on the first comparison signal and the second comparison signal, and when the real-time input voltage is within the preset voltage range, output a valid detection signal to the detection selector 12.
[0046] A valid detection signal refers to the AND gate U1Y signal when both the first comparison signal and the second comparison signal are valid. The real-time input voltage is compared with the preset upper window voltage Vth of the first window comparator Cp1 and the preset lower window voltage Vtl of the second window comparator Cp2. When the real-time input voltage is less than the upper window voltage Vth, a valid first comparison signal is output. When the real-time input voltage is greater than the lower window voltage Vtl, a valid second comparison signal is output. Only when both the first comparison signal and the second comparison signal are valid is it determined that the real-time input voltage is within the preset voltage range, and thus a valid detection signal is output to the detection selector 12.
[0047] In some embodiments, the microprocessor 14 is configured to generate a short-circuit detection signal in response to the output signal, including: in response to the AND gate U1Y signal, causing the detection selector 12 to output a count enable signal to the counter 13; determining the duration of the count enable signal; counting clock pulses according to the duration of the count enable signal to obtain a corresponding target count value; and generating a short-circuit detection signal in response to the target count value being greater than a preset value.
[0048] The count enable signal is the control signal used to start counting for counter 13. If the switching circuit switches from a pull-up state to a pull-down state, and moisture intrusion occurs at the interface, inducing a Cpar voltage, it will slow down the rate of decrease of the real-time input voltage Vin. This causes the real-time input voltage Vin to remain within the preset voltage range for a longer period. This means the count enable signal is held for a longer time, and the number of clock pulses counted also increases. Please refer to [link to relevant documentation]. Figure 6 , Figure 6 The C provided in the embodiments of this application par The detection diagram is used to determine whether Cpar exists, thereby determining whether moisture intrusion has occurred.
[0049] When the counter is enabled, counter 13 increments by one with each rising edge of the clock. Assuming the clock frequency is 1MHz, the value of counter 13 represents how many microseconds the voltage drop lasted. The preset duration is set to 2000. If the duration of the count enable signal exceeds 2000... Then C par Exists; for R short The detection process is similar and will not be elaborated upon here.
[0050] When the counting enable is disabled, the clock sends a signal normally, but counter 13 does not increment its value.
[0051] Furthermore, if there is no moisture intrusion, after the switching circuit switches from the pull-up state to the pull-down state, the voltage of the single threshold comparator in the voltage comparison module 11 should quickly drop from the preset voltage source V+ to 0.
[0052] In some embodiments, for C par The detection is not limited to measuring the fall time of the real-time input voltage Vin. After the real-time input voltage Vin has completely dropped to 0, the switching unit can also be switched from selecting the pull-down resistor Rd to the pull-up resistor Rp. That is, the switching circuit switches from the pull-down state to the pull-up state. At this time, if there is moisture intrusion at the interface and C is induced... parThis will slow down the rise rate of the real-time input voltage Vin, making the time when the real-time input voltage Vin is within the preset voltage range longer. This means that the hold time of the counting enable signal is longer, and the number of clock pulses being counted is also increased, thereby determining C. par The presence of moisture is determined to identify whether moisture intrusion has occurred.
[0053] Furthermore, if there is no moisture intrusion, after the switching circuit switches from the pull-down state to the pull-up state, the voltage of the single threshold comparator in the voltage comparison module 11 should rise from 0 to the preset voltage source V+.
[0054] In some embodiments, the voltage comparison module 11 further includes a single-threshold comparator 111, the output of which is connected to the detection selector 12. The target selection value further includes a second selection value. The microprocessor 14 is configured to set the target selection value of the detection selector 12 so that the detection selector 12 selects the output signal of the voltage comparison module 11. This includes: setting the target selection value of the detection selector 12 to the second selection value; and controlling the detection selector 12 to select the comparator signal output by the single-threshold comparator 111 based on the second selection value.
[0055] The single-threshold comparator 111 is a circuit module that compares the real-time input voltage with a preset voltage source V+. Based on whether the real-time input voltage is greater than or less than the preset voltage source V+, it outputs a corresponding high-level or low-level signal to achieve a single-threshold judgment of the real-time input voltage. The second selection value can be 1, indicating that the single-threshold comparator 111 is selected. The single-threshold comparator 111 is connected to the counter 13 via a detection selector 12. Under the control of the second selection value, the detection selector 12 selects the comparator signal output by the single-threshold comparator 111. The second selection value explicitly specifies the selection of the comparator signal output by the single-threshold comparator 111, ensuring a unique detection path and stable timing. The comparator signal output by the single-threshold comparator 111 represents a signal where the real-time input voltage is less than the preset voltage source V+, ensuring that the counter 13 only processes valid detection signals. By configuring different target selection values, multiple detection modes can be expanded, resulting in strong circuit versatility.
[0056] In some embodiments, the microprocessor 14 is configured to generate a short-circuit detection signal in response to the output signal, including: in response to the comparator signal, causing the detection selector 12 to output a counting enable signal to the counter 13; determining the duration of the counting enable signal; counting clock pulses according to the duration of the counting enable signal to obtain a corresponding target count value; and generating moisture intrusion information in response to the target count value being greater than a preset value.
[0057] Detect the presence of R shortAt this time, the interface is not connected. Regardless of its state, the DRP device executes the switching circuit to switch from a pull-down state to a pull-up state, detects the selection value 1 of selector 12, and selects the comparator signal from single threshold comparator 111. If there is no water vapor intrusion or other abnormality, the real-time input voltage Vin will be quickly pulled up from 0V to the preset voltage source V+; if there is water vapor intrusion, the real-time input voltage Vin will be pulled up due to R short The voltage decreases due to the partial pressure, and its final value is V. R_short V R_short The calculation formula is as follows: Formula 1 In Formula 1, V R_short Because of R short The real-time input voltage Vin, R decreases after voltage division. short Rp is the micro short-circuit resistance formed after moisture enters the interface, and V+ is the pull-up resistor.
[0058] By comparing the real-time input voltage Vin with the preset voltage source V+, if the real-time input voltage Vin is less than the preset voltage source V+, the duration of the counting enable signal and the target count value can be determined. (See also...) Figure 7 , Figure 7 The R provided in the embodiments of this application short Detection diagram, from which R is determined short Does it exist?
[0059] For R short and C par The detection is independent; the detection interface is independent of R. short At this time, only consider whether the real-time input voltage Vin is less than the preset voltage source V+ after stabilization. Set the detection time long enough to ensure that the capacitors on the line are fully charged, then C par The interference is negligible; the detection interface has C par At that time, only the real-time input voltage Vin is considered to drop to 0 in a very short time, and R short Irrelevant.
[0060] In some embodiments, the microprocessor 14 is configured to respond to the output signal to cause the counter 13 to calculate the duration of the real-time input voltage within a preset voltage range of the voltage comparison module 11, including: responding to the output signal to detect the rate of change of the real-time input voltage, the rate of change being a decreasing rate or an increasing rate; and obtaining the duration of the implemented input voltage within the preset voltage range of the voltage comparison module 11 based on the rate of change.
[0061] The calculation of the duration is not limited to a decreasing real-time input voltage; it can also be a rising real-time input voltage. Subsequent speed detection and duration calculation are only initiated when the voltage comparison module 11 outputs a valid signal. The rate of change of the real-time input voltage directly corresponds to C. par The size detection is more intuitive and accurate. It can detect both real-time input voltage drops and increases, making it more widely applicable.
[0062] In summary, the embodiments of this application have at least the following beneficial effects: 1) The embodiments of this application have a reliable moisture detection effect on the interface. Moisture detection can be achieved by adding an additional detection circuit 100, which is not affected by the IC manufacturing process or the difference of electronic components.
[0063] 2) This application embodiment can quantitatively analyze the degree of water vapor intrusion. The higher the electrolyte concentration of the intruding liquid droplets, the stronger the corrosiveness to the interface, which is equivalent to a larger parasitic capacitance value. This result is manifested in a prolonged drop time of the real-time input voltage Vin. The size of the parasitic capacitance can be quantitatively calculated based on existing circuit parameters. The more intruding liquid droplets, the easier it is for micro-short circuits to occur, and the smaller the equivalent short-circuit resistance. This result is manifested in the magnitude of the real-time input voltage Vin after being divided by the micro-short-circuit resistor. The size of the micro-short-circuit resistance can be quantitatively calculated based on existing circuit parameters. Quantitative analysis makes the assessment of water vapor intrusion more accurate.
[0064] 3) The embodiments of this application do not affect the normal use of the interface. The embodiments of this application only actively control the port role selector S1 when the DRP device is not connected. The rest of the circuit design can be integrated into the preset power management IC without changing the interface circuit. It has a wide range of applications and will not cause any interference when the interface is working.
[0065] 4) In the embodiments of this application, all types of water vapor intrusion can be categorized as having short circuits and parasitic capacitances in the configuration channel, while also affecting R... short and C par The detection circuit 100 is reusable, reducing the complexity of circuit design.
[0066] 5) This application embodiment confirms whether there is an abnormality in the interface by detecting changes in the electrical characteristics of the normal configuration channel. It is not limited to moisture detection. Any abnormality that can change the electrical characteristics of the configuration channel can be detected.
[0067] As another aspect of this application, this application provides a water vapor detection method applied to the aforementioned microprocessor 14. Please refer to [link to relevant documentation]. Figure 8 , Figure 8 This is a flowchart of a water vapor detection method provided in an embodiment of this application, including the following steps: S81: Send a switching command to the switching circuit to switch the switching circuit from a first state to a second state, wherein the first state is a pull-up state or a pull-down state, and the second state is a pull-down state or a pull-up state; S82: In response to the switching circuit switching from the first state to the second state, control the switching circuit to transmit the real-time input voltage of the preset configuration channel to the voltage comparison module 11; S83: Set the target selection value of the detection selector 12 so that the detection selector 12 controls the voltage comparison module 11 to output an output signal according to the target selection value; S84: In response to the output signal, a short-circuit detection signal is generated, the short-circuit detection signal being used to indicate that the real-time input voltage is maintained for a duration longer than a preset duration within the preset voltage range or that the real-time input voltage is less than a preset voltage source voltage; S85: In response to the short-circuit detection signal, generate water vapor intrusion information.
[0068] In step S81, the microprocessor 14 sends a switching command to the switching circuit, controlling the switching circuit to switch from the first state to the second state to detect whether C is present. par For example, if no connection is established at this time, the DRP device will switch from the first state to the second state regardless of its current state. In this case, the first state is a pull-up state, and the second state is a pull-down state. If the detection of the presence of R... short For example, when the interface is not connected, the DRP device will switch from the first state to the second state regardless of its state. At this time, the first state is the pull-down state and the second state is the pull-up state.
[0069] In step S82, the port role selector S1 in the switching circuit first selects the pull-up resistor Rp and then switches to the pull-down resistor Rd. The preset configuration channel uses the transition from the first state to the second state as the trigger condition, ensuring that the voltage comparison module 11 only operates during the effective voltage change phase and avoiding false detections. It can completely and accurately send the true, continuous real-time voltage of the configuration channel to the voltage comparison module 11, reflecting the voltage change characteristics caused by moisture or parasitic capacitance. After the state switch, it transmits the effective detection voltage, filtering out invalid levels and improving detection accuracy.
[0070] In step S83, the target selection value can be 1 or 0, and different selection values correspond to different output signals. The preset voltage range is the voltage range between the pre-set upper limit voltage Vth and the lower limit voltage Vtl of the window. By setting different target selection values, different detection paths or modes can be switched, improving the applicability and flexibility of the circuit.
[0071] In step S84, the holding time is the length of time that the real-time input voltage remains within a preset voltage range. The detection circuit 100 can use the holding time and voltage amplitude to determine whether there is an abnormality, which greatly improves the accuracy of abnormality detection and reduces the false judgment rate.
[0072] In step S85, the moisture intrusion information indicates that there is moisture intrusion at the interface. When the duration of the real-time input voltage within the preset voltage range is longer than the preset duration, there is moisture intrusion at the interface. When the real-time input voltage is less than the preset voltage source voltage, there is moisture intrusion at the interface.
[0073] It should be noted that in the above embodiments, there is no necessarily a certain order between the steps. Those skilled in the art can understand from the description of the embodiments of this application that the above steps may have different execution orders in different embodiments, that is, they may be executed in parallel or in turn, etc.
[0074] See Figure 9 , Figure 9 This is a schematic diagram of the structure of a microprocessor 14 provided in an embodiment of this application. The microprocessor 14 includes one or more processors 141 and a memory 142. The memory 142 is connected to one or more processors 141, for example, via a bus.
[0075] Processor 141 is configured to support the microprocessor 14 in performing the corresponding functions in the methods described in the above method embodiments. Processor 141 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0076] Memory 142 is used to store program code, etc. Memory 142 may include volatile memory (VM), such as random access memory (RAM); memory 142 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 142 may also include combinations of the above types of memory 142.
[0077] The memory 142 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the water vapor detection method in the embodiments of this application. The processor 141 executes various functional applications and data processing of the water vapor detection method by running the non-volatile software programs, instructions, and modules stored in the memory 142, that is, it realizes the functions of each module or unit of the water vapor detection method provided in the above method embodiments.
[0078] Memory 142 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function. In some embodiments, memory 142 may optionally include memory 142 remotely located relative to processor 141. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0079] The one or more modules are stored in the memory 142. When executed by the one or more processors 141, they perform the water vapor detection method in any of the above method embodiments. For example, they perform the method steps described in the above method embodiments to realize the functions of the modules described in the above device embodiments.
[0080] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a microprocessor 14, cause the microprocessor 14 to perform the method described in the foregoing embodiments.
[0081] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0082] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A water vapor detection system, characterized by, The circuit includes a detection circuit and a switching circuit. The detection circuit includes a voltage comparison module, a detection selector, a counter, and a microprocessor. The voltage comparison module is connected to the switching circuit. The output of the detection selector is connected to the counter, which is configured to input a clock signal. The microprocessor is connected to the voltage comparison module, the detection selector, the counter, and the switching circuit. The voltage comparison module is configured with a preset voltage range, and the microprocessor is configured to: A switching command is sent to the switching circuit to switch the switching circuit from a first state to a second state, wherein the first state is a pull-up state or a pull-down state, and the second state is a pull-down state or a pull-up state; In response to the switching circuit switching from the first state to the second state, the switching circuit is controlled to transmit the real-time input voltage of the preset configuration channel to the voltage comparison module; Set the target selection value of the detection selector so that the detection selector controls the voltage comparison module to output the output signal according to the target selection value; In response to the output signal, a short-circuit detection signal is generated, which indicates that the real-time input voltage is maintained for a duration longer than a preset duration within the preset voltage range or that the real-time input voltage is less than a preset voltage source voltage. In response to the short-circuit detection signal, moisture intrusion information is generated.
2. The water vapor detection system of claim 1, wherein, The voltage comparison module includes an AND gate, the output of which is connected to the detection selector. The target selection value includes a first selection value, and the output signal includes the AND gate signal output by the AND gate. The microprocessor is configured to set the target selection value of the detection selector so that the detection selector selects the output signal of the voltage comparison module, including: The target selection value of the detection selector is set to the first selection value; The detection selector is controlled to select the AND gate output signal based on the first selection value.
3. The water vapor detection system according to claim 2, characterized in that, The voltage comparison module further includes: A first window comparator is configured to perform a window comparison on the real-time input voltage output by the switching circuit and output a corresponding first comparison signal to the AND gate. A second window comparator, the input of which is connected to the switching circuit, and the output of which is connected to the AND gate, is configured to perform a window comparison on the real-time input voltage output by the switching circuit and output a corresponding second comparison signal to the AND gate. The AND gate is configured to perform operations on the first comparison signal and the second comparison signal, and output a valid detection signal to the detection selector when the real-time input voltage is within the preset voltage range.
4. The water vapor detection system according to claim 2, characterized in that, The microprocessor is configured to generate a short-circuit detection signal in response to the output signal, including: In response to the AND gate signal, the detection selector outputs a count enable signal to the counter; Determine the duration of the counting enable signal; Based on the duration of the counting enable signal, clock pulses are counted to obtain the corresponding target count value; A short-circuit detection signal is generated in response to the target count value being greater than the pre-designed value.
5. The water vapor detection system according to claim 1, characterized in that, The voltage comparison module further includes a single-threshold comparator, the output of which is connected to the detection selector. The target selection value further includes a second selection value. The microprocessor is configured to set the target selection value of the detection selector so that the detection selector selects the output signal output by the voltage comparison module, including: The target selection value of the detection selector is set to the second selection value; The detection selector is controlled to select the single threshold comparator output comparator signal based on the second selection value.
6. The water vapor detection system according to claim 5, characterized in that, The microprocessor is configured to generate a short-circuit detection signal in response to the output signal, including: In response to the comparator signal, the detection selector outputs a count enable signal to the counter; Determine the duration of the counting enable signal; Based on the duration of the counting enable signal, clock pulses are counted to obtain the corresponding target count value; In response to the target count value being greater than the pre-designed value, water vapor intrusion information is generated.
7. The water vapor detection system according to claim 1, characterized in that, The microprocessor is configured to respond to the output signal to cause the counter to calculate the duration for which the real-time input voltage is held within a preset voltage range of the voltage comparison module, including: In response to the output signal, the rate of change of the real-time input voltage is detected, wherein the rate of change is a decreasing rate or an increasing rate; Based on the rate of change, the duration for which the applied input voltage is maintained within the preset voltage range of the voltage comparison module is obtained.
8. A method for detecting water vapor, characterized in that, Applied to a microprocessor as described in any one of claims 1 to 7, the method comprises: A switching command is sent to the switching circuit to switch the switching circuit from a first state to a second state, wherein the first state is a pull-up state or a pull-down state, and the second state is a pull-down state or a pull-up state; In response to the switching circuit switching from the first state to the second state, the switching circuit is controlled to transmit the real-time input voltage of the preset configuration channel to the voltage comparison module; The target selection value of the detection selector is set so that the detection selector controls the voltage comparison module to output an output signal according to the target selection value. The voltage comparison module is configured with a preset voltage range. In response to the output signal, a short-circuit detection signal is generated, which indicates that the real-time input voltage is maintained for a duration longer than a preset duration within the preset voltage range or that the real-time input voltage is less than a preset voltage source voltage. In response to the short-circuit detection signal, moisture intrusion information is generated.
9. A microprocessor, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the microprocessor to implement the water vapor detection method as described in claim 8 when executing the one or more computer programs.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the water vapor detection method as described in any one of claims 8.