Liquid detection method and system
By employing AC detection signals and signal processing technology in the electronic device interface, accurate detection and identification of liquid intrusion are achieved, solving the problems of large space occupation, low accuracy and false alarms in existing technologies, and ensuring the robustness and safety of the equipment.
Patent Information
- Application Number
- CN202511343377.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-12-02
AI Technical Summary
Existing liquid detection technologies have shortcomings such as large space requirements, low accuracy, susceptibility to false alarms, and inability to identify the type of liquid, thus failing to effectively protect electronic device interfaces from damage caused by liquid intrusion.
Alternating current (AC) detection signals are used instead of direct current (DC) signals. An AC signal path is established through the transmitting and receiving terminals. By combining signal processing and differential comparison, the presence and type of liquid can be detected in real time. Accurate detection and identification can be achieved by dynamically comparing the signal characteristic parameters with the reference characteristic parameters.
It avoids electrochemical corrosion problems, improves detection accuracy and anti-interference ability, ensures the robustness and consistency of detection results, and can identify different liquid types and trigger corresponding protection measures.
Smart Images

Figure CN121049983A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic device safety technology, and in particular to a liquid detection method and system. Background Technology
[0002] With the increasing prevalence and complexity of electronic devices, their sensitivity to the external environment has also increased, especially the protection capabilities of their interfaces. High-density, multi-functional connectors, such as the USB Type-C interface, are widely used in various consumer electronics products, including smartphones, laptops, and tablets, due to their support for high-speed data transmission, fast charging, and audio / video output. However, the open structure of these interfaces makes them highly vulnerable to liquid intrusion, such as water, beverages, and sweat. Once liquid enters the interface, it may cause momentary short circuits between pins due to conductivity, or even lead to circuit corrosion and permanent damage to components, resulting in significant economic losses and data security risks for users.
[0003] Currently, the mainstream liquid detection technologies in the industry can be mainly divided into resistive detection, capacitive detection, and optical detection. Resistive detection is one of the most traditional methods. Its principle is to apply a DC voltage to the area to be tested (such as between two or more pins of an interface) and determine whether liquid has entered by monitoring the change in resistance between the pins. Although this method is simple to implement and inexpensive, its inherent defects are also quite obvious: the applied DC current will accelerate the electrochemical corrosion of the metal plating of the pins, and long-term use will permanently damage the interface, affecting its charging and data transmission functions; at the same time, this method is only sensitive to conductive liquids, cannot detect non-conductive liquids such as oils, and has difficulty distinguishing between liquids with different conductivity.
[0004] Capacitive sensing is another commonly used technique, which detects changes in capacitance between electrodes or between an electrode and ground. When a liquid with a different dielectric constant (most liquids have a dielectric constant much higher than air) approaches or contacts the electrode, it causes a change in the coupling capacitance. However, it also has limitations, such as being susceptible to interference from environmental humidity, parasitic capacitance, etc., and having limited ability to accurately identify the specific type of liquid intrusion. Furthermore, reliability issues may arise in complex electromagnetic environments.
[0005] Optical detection methods utilize the differences in the propagation characteristics of light in different media. By placing a miniaturized light source and a light sensor in the area to be tested, when liquid intrusion alters the light propagation path or intensity, the light signal received by the sensor changes, thus achieving detection. Optical methods completely avoid electrical contact, pose no risk of corrosion, and are unaffected by electromagnetic interference. However, their disadvantages include relatively complex structure, higher cost, and high sensitivity to contamination. Dust, lint, and other impurities commonly found at the interface can easily clog the light path, leading to detection failure or false alarms. Integration into standardized connectors with extremely limited space also presents significant challenges.
[0006] Therefore, how to overcome the shortcomings of existing liquid detection technologies, such as large footprint, low accuracy, susceptibility to false alarms, and inability to identify liquid types, and to provide a more accurate, reliable, durable, and easily integrated liquid detection solution has become an urgent technical problem to be solved in this field. Summary of the Invention
[0007] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a liquid detection method and system that can reduce the space occupied by the detection equipment, improve the accuracy of liquid detection, anti-interference ability, and overall system robustness.
[0008] In a first aspect, embodiments of this application provide a liquid detection method.
[0009] A liquid detection method according to an embodiment of this application includes: generating an AC detection signal corresponding to preset reference characteristic parameters; injecting the AC detection signal into a transmitting endpoint of a region to be tested via a transmitting module; capturing a response signal of the AC detection signal from a receiving endpoint via a receiving module, wherein the receiving endpoint is located in the region to be tested and is adjacent to the transmitting endpoint; performing signal processing on the response signal to obtain signal characteristic parameters; and outputting a corresponding liquid detection signal based on a comparison result between the signal characteristic parameters and the reference characteristic parameters.
[0010] The liquid detection method according to the embodiments of this application has at least the following beneficial effects: Firstly, the liquid detection method uses an AC detection signal instead of the DC signal commonly used in traditional technologies. By establishing an AC signal path between the transmitting and receiving endpoints, the electrochemical corrosion problem caused by DC current in the tested area (such as interface terminals) is fundamentally avoided, preventing irreversible damage to the terminal metal plating. Secondly, this method does not simply determine whether the path is conductive, but rather performs professional signal processing on the response signal captured by the receiving endpoint to extract the signal's characteristic parameters. This approach can obtain richer and more refined information than traditional resistance or capacitance threshold judgments. Furthermore, this method dynamically compares the signal characteristic parameters detected in real time with preset benchmark characteristic parameters to make a final judgment. This differential comparison detection mechanism can effectively compensate for and eliminate inherent systematic errors caused by factors such as component aging, environmental temperature changes, or manufacturing tolerances, ensuring that the detection results are not limited by fixed thresholds, thereby guaranteeing the consistency, accuracy, and stability of detection results under different devices and environments. In summary, the liquid detection method of the embodiment, by employing AC detection and differential comparison analysis, not only solves the problem of electro-corrosion in traditional solutions, but also significantly improves the accuracy of detection, anti-interference ability, and overall system robustness.
[0011] According to some embodiments of this application, the liquid detection signal includes a liquid intrusion signal, which indicates the presence of liquid in the area to be tested; the signal characteristic parameters include amplitude characteristics and phase characteristics. The reference characteristic parameters include a reference amplitude and a reference phase; the step of outputting a corresponding liquid detection signal based on the comparison result between the signal characteristic parameters and the reference characteristic parameters includes: Based on the difference between the amplitude characteristics and the corresponding reference amplitude, the liquid intrusion signal is output; or, Based on the difference between the phase feature and the corresponding reference phase, the liquid intrusion signal is output.
[0012] According to some embodiments of this application, generating an AC detection signal corresponding to preset reference characteristic parameters includes: Send the target setting signal to the transmission module under standard external conditions; The actual received signal is received through the receiving module; The difference between the electrical characteristics of the actual received signal and the reference characteristic parameters is calculated to obtain the calibration error; When the calibration error is less than a preset calibration threshold, the target setting signal is used as the AC detection signal; When the calibration error is greater than or equal to the calibration threshold, the target setting signal is adjusted according to the calibration error based on the model predictive control algorithm until the calibration error is less than the calibration threshold, and the finally adjusted target setting signal is used as the AC detection signal.
[0013] According to some embodiments of this application, the liquid detection signal further includes a liquid discrimination signal, the liquid discrimination signal characterizing the type of liquid that has invaded the area to be tested; The step of processing the response signal to obtain signal characteristic parameters further includes: The response signal is converted from analog to digital to obtain a digital response signal; The reference feature parameters also include a preset truth table of substance categories; the step of outputting a corresponding liquid detection signal based on the comparison result between the signal feature parameters and the reference feature parameters further includes: Based on a preset substance discrimination model, the response digital signal is matched with the substance category truth table to obtain a matching result; Based on the matching results, a corresponding liquid discrimination signal is generated and output.
[0014] According to some embodiments of this application, the step of performing signal processing on the response signal to obtain signal characteristic parameters further includes: The response signal is judged based on a preset quality judgment standard to obtain a quality judgment signal. If the quality judgment signal is unqualified, the receiving module recaptures the response signal of the AC detection signal from the receiving endpoint.
[0015] According to some embodiments of this application, the step of outputting a corresponding liquid detection signal further includes: If the liquid detection signal indicates the presence of liquid intrusion, safety protection measures will be triggered. The security protection measures include any one of the following: Issue a warning signal; Cut off the energy output and input of the region under test, and cut off the signal output and input of the region under test.
[0016] Secondly, embodiments of this application provide a liquid detection system.
[0017] A liquid detection system according to an embodiment of this application is used to implement the liquid detection method described in any embodiment of the first aspect, comprising: a control system for generating the AC detection signal; a transmitting module connected to the control system and the transmitting endpoint for receiving the AC detection signal and injecting the AC detection signal into the transmitting endpoint; a receiving module connected to the control system and the receiving endpoint for acquiring the response signal; and a signal processing module connected to the receiving module for processing the response signal to obtain the signal characteristic parameters; the control system is further configured to compare the signal characteristic parameters with reference characteristic parameters and output a corresponding liquid detection signal based on the comparison result.
[0018] The liquid detection system according to the embodiments of this application has at least the following beneficial effects: by setting up a functionally independent control system, a transmitting module, a receiving module, and a signal processing module, a complete closed-loop detection link is constructed. The liquid detection system of this embodiment does not employ a simple passive detection circuit, but rather the control system actively generates a precisely controllable AC detection signal and applies it to the area to be tested through the transmitting module. This active detection method lays the foundation for subsequent accurate analysis. The inclusion of the receiving module and the signal processing module is one of the core advantages of this system, enabling it to capture and deeply process the response signal generated after the interaction between the detection signal and the area to be tested, extracting signal feature parameters that can finely reflect the state of the area to be tested, rather than the single scalar values of resistance or capacitance used in traditional technologies. Finally, the control system compares the real-time feature parameters extracted by the signal processing module with a reference value to make a final judgment. The liquid detection system of this embodiment decouples and organically integrates signal generation, acquisition, processing, and comparison judgment functions into one system, providing a high-performance and highly reliable liquid detection hardware solution for the liquid detection method described in any embodiment of the first aspect.
[0019] According to some embodiments of this application, the transmitting module includes: A driving circuit, whose input terminal is connected to the control system and whose output terminal is connected to the transmitting terminal, is used to drive the AC detection signal; A filter circuit, connected to the drive circuit, is used to condition the AC detection signal.
[0020] The receiving module includes: A current mirror circuit, whose input is connected to the receiving endpoint and whose output is connected to the signal processing module, is used to mirror and copy the current signal received by the receiving endpoint to obtain the response signal.
[0021] According to some embodiments of this application, the AC detection signal includes: a first detection signal and a second detection signal, wherein the timing of the first detection signal and the second detection signal is reversed; The driving circuit includes: A first driving circuit, wherein the input terminal of the first driving circuit receives the first detection signal, and its output terminal is connected to the transmitting terminal; A second driving circuit, wherein the input terminal of the second driving circuit receives the second detection signal, and its output terminal is connected to the transmitting terminal; The first driving circuit responds to the high level of the first detection signal and outputs a preset high potential to the transmitting endpoint, while the second driving circuit responds to the high level of the second detection signal and outputs a preset low potential to the transmitting endpoint.
[0022] According to some embodiments of this application, the receiving endpoint and the receiving endpoint are inherent terminals in an electrical connector. Attached Figure Description
[0023] The present application will be further described below with reference to the accompanying drawings and embodiments, wherein: Figure 1 This is a schematic diagram of the overall process of the liquid detection method in the embodiment; Figure 2 This is a flowchart illustrating the self-calibration process in an example embodiment; Figure 3 This is a schematic diagram of the circuit structure of the transmitting module and receiving module of the liquid detection system in the embodiment. Figure 4 This is a schematic diagram of the circuit structure of the transmitting module and the receiving module according to another embodiment. Detailed Implementation
[0024] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0025] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0026] In the description of this application, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0027] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0028] In the description of this application, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0029] In a first aspect, embodiments of this application provide a liquid detection method, which can be used in various electronic devices, especially in various interfaces of electronic devices, to detect in real time whether liquid has entered the interface, so as to prevent damage such as short circuits and corrosion caused by liquid.
[0030] like Figure 1 As shown, the liquid detection method in this embodiment includes, but is not limited to, steps S100 to S500: S100: Generate an AC detection signal corresponding to the preset reference characteristic parameters; S200: Injects the AC detection signal into the transmitting endpoint of the area to be tested through the transmitting module; S300, The receiving module captures the response signal of the AC detection signal from the receiving endpoint, wherein the receiving endpoint is located in the area to be tested and is set near the transmitting endpoint; S400: Perform signal processing on the response signal to obtain signal characteristic parameters; S500: Based on the comparison results between the signal characteristic parameters and the reference characteristic parameters, output the corresponding liquid detection signal.
[0031] In step S100, the control system (e.g., a microcontroller unit (MCU) or a dedicated detection chip in the device) generates an AC probe signal. This signal is the excitation source used to detect the electrical characteristics of the area under test. Specifically, the AC probe signal can be a sine wave, square wave, or other periodic waveform with a specific frequency and amplitude. Choosing an appropriate frequency helps distinguish impedance changes caused by different types of liquids and effectively avoids power frequency interference. "Reference characteristic parameters" are electrical characteristic parameters pre-calibrated and stored under a standard external environment of "dry state" (standard external environment, i.e., the area under test is determined to be free of liquid intrusion). For example, using a determined dry Type-C interface as the standard environment, an AC probe signal is injected into it, and the resulting response signal is measured. Its amplitude, phase, and other electrical characteristics are stored as reference amplitude and reference phase. The purpose of the control system generating the AC probe signal is to determine whether the electrical environment of the area under test has changed in subsequent steps by comparing the differences between the actually measured signal characteristic parameters and these reference characteristic parameters.
[0032] In step S200, the "area to be tested" refers to a critical area prone to liquid intrusion; in some embodiments, it specifically refers to the interior of the electrical connector interface of an electronic product. The "transmitting endpoint" and the "receiving endpoint" (mentioned later) are two or more physical endpoints located within this area. To save cost and space, preferably, these endpoints can directly utilize the inherent pins in the electrical connector interface. Taking a Type-C connector as an example, a VBUS (power) pin can be selected as the transmitting endpoint, and a CC (configuration channel) or SBU (sideband use) pin can be selected as the receiving endpoint. Driven by the control system, the transmitting module loads the generated AC probe signal onto the selected transmitting endpoint. This transmitting module typically includes a drive circuit, a filter circuit, etc., to ensure that the injected signal is stable and pure, reducing noise interference to subsequent detection.
[0033] In step S300, when an AC detection signal is injected into the transmitting end, it creates an electric field between the transmitting and receiving ends. These two ends and the medium between them (primarily air in a dry state) constitute an equivalent complex impedance network. A response signal is thus coupled to the receiving end. When liquid (such as water, sweat, or beverages) enters the connector interface and fills the space between the transmitting and receiving ends, the liquid's conductivity (resistivity) and dielectric constant (capacitance) differ significantly from air, drastically altering the equivalent complex impedance between the two ends. Typically, the presence of conductive liquid significantly reduces the impedance value. Therefore, the electrical characteristics (such as amplitude and phase) of the response signal captured by the receiving module at the receiving end change significantly. For example, due to the reduced impedance, more signal current flows to the receiving end or is shunted through the liquid, causing a significant attenuation of the signal amplitude captured at the receiving end compared to the dry state. The receiving module performs preliminary processing on this weak response signal, such as amplification and filtering, for subsequent precise analysis.
[0034] In step S400, to perform accurate digital analysis, the signal processing module first demodulates, detects, and performs analog-to-digital conversion on the response signal in the pre-processed analog signal state captured by the receiving module. Then, the signal processing module extracts one or more key signal characteristic parameters from the response signal. In some embodiments, these signal characteristic parameters mainly include the "amplitude characteristic" and / or "phase characteristic" of the response signal. The amplitude characteristic directly reflects the degree of signal attenuation, while the phase characteristic reflects the signal's delay or lead; both are related to the complex impedance between the endpoints.
[0035] In step S500, the control system or signal processing module compares the real-time "signal characteristic parameters" extracted in the previous step (e.g., the currently measured amplitude) with the preset "reference characteristic parameters" mentioned in step S100 (e.g., the reference amplitude calibrated in dry conditions). The comparison can be performed by calculating the difference, ratio, or other correlation metrics between the two. Then, the result of this metric is compared with one or more preset decision thresholds. For example, if the currently measured amplitude is lower than 80% of the reference amplitude (i.e., the decision threshold), or if the measured phase shift exceeds a preset 10 degrees, the control system can determine that the impedance of the area under test has undergone a significant abnormal change. Once the comparison result exceeds the decision threshold, the system determines that liquid has intruded. At this time, the system outputs a corresponding "liquid detection signal," for example, by setting a flag in a register or sending an interrupt request to the main processor. This signal indicates that "liquid exists in the area under test," thereby triggering subsequent safety protection measures, such as disconnecting the charging function of the interface or issuing a warning to the user.
[0036] Understandably, the liquid detection signal may specifically include a liquid intrusion signal. This signal is a logical indication used to characterize the current state of the area under test (e.g., inside a Type-C interface). For example, the signal can be a binary value, where "0" represents "dry" or "safe," and "1" represents "liquid intrusion" or "danger." When the system detects liquid, it generates and outputs this liquid intrusion signal (e.g., by setting the signal value to "1"), thereby providing a clear trigger for subsequent system responses.
[0037] To achieve accurate detection of liquid intrusion, the signal characteristic parameters include both amplitude and phase characteristics. Amplitude characteristics primarily reflect the resistive change in the equivalent impedance between the endpoints. When conductive liquids (such as tap water or sweat) intrude, a low-resistance path is formed between the endpoints, causing a significant diversion of signal energy and a substantial attenuation of the amplitude of the response signal captured by the receiver. Phase characteristics primarily reflect the capacitive change in the equivalent impedance between the endpoints. The endpoints themselves form a miniature capacitor, with air as the dielectric. When liquid intrudes, the dielectric constant of the liquid is much greater than that of air, causing a sharp increase in the equivalent capacitance between the endpoints, resulting in a significant phase shift in the AC response signal flowing through this capacitive load. Amplitude and phase characteristics describe the changes in the response signal from two different physical dimensions; their combination provides a more comprehensive reflection of the changes in the electrical characteristics of the area under test. Correspondingly, the preset reference characteristic parameters also include reference amplitude and reference phase calibrated under standard dry conditions.
[0038] Based on the above principle, step S500, "outputting the corresponding liquid detection signal based on the comparison result between the signal characteristic parameters and the reference characteristic parameters," can specifically include the following two parallel decision paths S510 or S520. The system can use either path, or combine the two paths to improve the robustness of the detection.
[0039] S510: Based on the difference between the amplitude characteristics and the corresponding reference amplitude, output a liquid intrusion signal; S520 outputs a liquid intrusion signal based on the difference between the phase characteristics and the corresponding reference phase.
[0040] In step S510, the control system compares the "amplitude characteristic" of the real-time extracted response signal with the stored "reference amplitude". For example, it can calculate the difference or ratio between the two and compare it with a preset "amplitude decision threshold". In step S520, the control system compares the "phase characteristic" of the real-time extracted response signal with the stored "reference phase". Typically, it calculates the absolute value of the phase difference between the two and compares it with a preset "phase decision threshold".
[0041] Understandably, in some preferred embodiments, the system can simultaneously execute the decisions of both paths described above. As long as either condition is met (i.e., amplitude difference exceeds the limit or phase difference exceeds the limit), the system will immediately generate and output a liquid intrusion signal. This "OR" logic design significantly improves the sensitivity and coverage of the detection. For example, for some liquids with low conductivity but high dielectric constant (such as pure water), it may mainly cause phase changes with little amplitude change; while for liquids with high conductivity (such as saline), it will cause drastic amplitude attenuation. Employing a dual-path parallel decision mechanism ensures reliable detection of liquids with various properties, thereby avoiding false negatives.
[0042] In some embodiments, the functionality of liquid detection is expanded to include not only detecting the presence of liquid intrusion but also identifying and determining the specific type of intruding liquid. This provides a basis for the system to adopt more targeted and intelligent protection strategies. In conjunction with this, the liquid detection signal, in addition to the aforementioned "liquid intrusion signal," further includes a liquid discrimination signal. This liquid discrimination signal is used to specifically characterize the physical or chemical category of the liquid intruding into the test area, for example, distinguishing whether the liquid is "pure water," "tap water," "salt water," or "alcohol," etc.
[0043] To achieve the above functions, during the signal processing stage, the response signal undergoes high-precision analog-to-digital conversion to obtain a response digital signal containing rich details. This response digital signal completely preserves the morphology, distortion, and minute fluctuations of the response signal in the time domain. Correspondingly, the reference characteristic parameters also include a preset truth table of substance categories. For example, its construction process is as follows: 1) Select a variety of typical and representative liquids, such as deionized water, saline solutions of different concentrations, municipal tap water, sweat, coffee, alcohol solutions, and fruit juice. 2) Under strictly controlled experimental conditions, introduce each liquid into a standardized test area. 3) For each liquid, apply an AC probe signal to the transmitting end and collect the generated response signal at the receiving end. Preferably, AC probe signals of different frequencies and phases can also be applied to obtain the response of the liquid at different frequencies and phases. 4) Digitize the collected response signals of each liquid to obtain digital waveforms of the response signals of various liquids at different frequencies and phases. 5) Store these extracted digital waveforms, which correspond one-to-one with specific liquids, to form the "truth table of substance categories".
[0044] Based on the above characteristics, step S500, "outputting the corresponding liquid detection signal according to the comparison result of the signal characteristic parameters and the reference characteristic parameters," may further include, but is not limited to, S530 to S540: S530. Based on the preset substance discrimination model, the response digital signal is matched with the substance category truth table to obtain the matching result; S540. Based on the matching results, generate and output the corresponding liquid discrimination signal.
[0045] In S530 and S540, to handle complex feature data and achieve accurate classification, a substance discrimination model is provided. This model is typically a pre-trained machine learning model. Examples of suitable models include, but are not limited to, support vector machines, decision trees, random forests, or a small artificial neural network. Through training, this model learns the non-linear mapping relationship between the digital waveforms corresponding to different liquid types and the liquid category labels. For example, in actual operation of the device, the decision-making steps are as follows: the system captures the response signal in real time and converts it into a high-fidelity digital response signal; this digital response signal is imported into the deployed substance discrimination model; the model calculates and infers from the input digital response signal and outputs a matching result, i.e., the liquid discrimination signal.
[0046] Understandably, the operating environment of electronic devices (such as temperature and humidity) is constantly changing, and electronic components themselves also undergo aging. These factors can cause the electrical characteristics of the system to drift slowly under "dry conditions (standard external environment)". If the system always uses a fixed AC detection signal, this drift may accumulate, eventually causing the reference of the response signal to deviate, resulting in the system misinterpreting "dry conditions" as "wet conditions", or reducing its sensitivity to actual liquid intrusion.
[0047] To overcome the aforementioned problems, some embodiments also include a dynamic self-calibration method to ensure that the generated AC probe signal always corresponds to a preset, ideal reference characteristic parameter. That is, by dynamically adjusting the AC probe signal, the "output" (response signal) under "dry" conditions is ensured to remain stable at a preset ideal reference. Therefore, as... Figure 2 As shown, step S100, "generating an AC detection signal corresponding to preset reference characteristic parameters," may further include, but is not limited to, steps S110 to S150: S110. Send a target setting signal to the transmission module under standard external conditions; S120. Receive the actual received signal through the receiving module; S130. Calculate the difference between the electrical characteristics of the actual received signal and the reference characteristic parameters to obtain the calibration error; S140. When the calibration error is less than the preset calibration threshold, the target setting signal is used as the AC detection signal. S150. When the calibration error is greater than or equal to the calibration threshold, the target setting signal is adjusted according to the calibration error based on the model predictive control algorithm until the calibration error is less than the calibration threshold, and the final adjusted target setting signal is used as the AC detection signal.
[0048] In S110, the control system first generates and sends an initial "target setting signal" to the transmitting module. This signal can be understood as a tentative probe signal used for calibration. For example, its initial parameters (such as amplitude, frequency, DC bias, etc.) can be based on the results of the last successful calibration or a default value set at the factory.
[0049] In S120 and S130, after the target setting signal is injected into the area under test, the receiving module captures the "actual received signal". The signal processing module then extracts the electrical characteristics (such as amplitude and phase) of the actual received signal. The system then calculates the difference between these real-time measured electrical characteristics and the "reference characteristic parameters" representing the ideal dry state pre-stored in the memory, and quantifies this difference into one or more "calibration error" values.
[0050] In steps S140 and S150, the system compares the calculated calibration error with a preset "calibration threshold." This threshold represents an acceptable error range that does not affect normal detection. When the calibration error is less than the calibration threshold, it indicates that the system's current state is very close to the ideal reference and no adjustment is needed. At this point, the currently used "target setting signal" is considered accurate, and the system designates it as the "AC probe signal" to be used in this work cycle, ending the calibration process. When the calibration error is greater than or equal to the calibration threshold, it indicates that the system has experienced a non-negligible drift and requires adjustment. At this point, the system initiates an iterative adjustment loop.
[0051] Preferably, this adjustment process is performed based on a Model Predictive Control (MPC) algorithm. For example, the control system internally stores a simplified mathematical model of the probe loop, which describes the relationship between the parameters of the "target setpoint signal" and the characteristics (output) of the "actual received signal." In each iteration of the MPC: First, the MPC algorithm uses this model and, based on the currently calculated "calibration error," predicts what adjustments to the "target setpoint signal" will most effectively bring the next "actual received signal" closer to the "reference characteristic parameters." For example, the MPC algorithm predicts that increasing the amplitude of the target signal by 2mV will increase the amplitude of the response signal by approximately 5mV. Subsequently, the algorithm calculates one or a set of optimal adjustment amounts and fine-tunes the parameters of the "target setpoint signal" accordingly, generating a new, adjusted "target setpoint signal." The system repeats the first and second steps above, using this new target setpoint signal for the next probe and error calculation. This "transmit-receive-calculate error-adjust" cycle continues. Once the calculated "calibration error" finally falls below the "calibration threshold" after several iterations, the iteration loop will stop. At this point, the last "target setting signal" that has been adjusted and successfully verified will be officially adopted by the system and used as a stable and reliable "AC detection signal" for liquid detection for a period of time.
[0052] The calibration process is preferably performed automatically when the device is powered on or wakes up from hibernation. Alternatively, the system can be configured to automatically initiate the calibration process upon detecting a drastic change in ambient temperature or at a preset fixed interval.
[0053] Understandably, to enhance the system's anti-interference capability and the reliability of detection results in complex electromagnetic environments, in some embodiments, the liquid detection method also includes a pre-screening process for signal quality. Before step S400, "processing the response signal to obtain signal characteristic parameters," steps S610 to S620 are also included: S610. Based on the preset quality judgment criteria, the response signal is judged to obtain a quality judgment signal; S620. If the quality judgment signal is unqualified, the receiving module re-captures the response signal of the AC detection signal from the receiving endpoint.
[0054] In steps S610 and S620, before processing the response signal to extract its signal characteristic parameters, the system evaluates the usability of the response signal according to a preset quality judgment standard. For example, the evaluation standard may include: a signal-to-noise ratio threshold to determine whether the effective energy of the signal is significantly higher than the background noise; waveform distortion check to determine whether the signal waveform exhibits obvious clipping or distortion through methods such as harmonic analysis; and stability check to check whether there are drastic, physically irregular fluctuations in the signal amplitude or frequency within a small time window. Based on the judgment result, the system generates a quality judgment signal (e.g., "qualified" or "unqualified").
[0055] If the signal is deemed "qualified," the response signal is considered reliable, and the process continues, sending it to the subsequent signal processing module for feature extraction and decision-making. If the signal is deemed "unqualified," the system considers the acquisition invalid and immediately re-acquires the response signal from the receiving endpoint via the receiving module. Optionally, the system can set a retry count, such as three consecutive attempts. If the signal quality of all three acquisitions is unqualified, the system can determine that the detection module may have a hardware failure or that the current environmental interference is too strong. In this case, the detection function can be paused, an error log can be recorded, or a system self-check prompt can be issued to the user.
[0056] Understandably, proactive safety measures can be implemented after successful detection of liquid intrusion. Following step S500, which involves "outputting the corresponding liquid detection signal," further steps, including but not limited to S710, may be implemented: S710. When the liquid detection signal indicates the presence of liquid intrusion, trigger safety protection measures.
[0057] For example, in S710, safety protection measures may include any one or two of the following actions, performed in parallel or sequentially: Issue a warning signal, for example, the warning signal could be a visual warning or an auditory warning; Cutting off the energy and signal path of the area under test, in the context of electrical connectors, can be understood as cutting off the connector's charging and power supply behavior, as well as data transmission.
[0058] Secondly, embodiments of this application also provide a liquid detection system for implementing the liquid detection system described in any embodiment of the first aspect.
[0059] The liquid detection system of this embodiment includes a control system, a transmitting module, a receiving module, and a signal processing module. The control system can be a microcontroller (MCU), digital signal processor (DSP), or field-programmable gate array (FPGA) or other unit with computing and control capabilities. This control system generates an AC detection signal and sends it to the transmitting module. Furthermore, the control system receives signal characteristic parameters from the signal processing module, compares these parameters with preset reference characteristic parameters, and outputs a corresponding liquid detection signal, such as a liquid intrusion signal or a liquid discrimination signal, based on the comparison result.
[0060] The transmitting module connects to the control system and the transmitting endpoint. It receives AC probe signals from the control system, conditions and drives the signals, and ultimately injects the signals into the area under test through the transmitting endpoint. In some embodiments, the transmitting module may include a driving circuit and a filtering circuit.
[0061] like Figure 3 As shown, in some embodiments, the AC probe signal may include a first probe signal (such as TX_1) and a second probe signal (such as TX_2) with opposite timing (e.g., 180-degree phase reversal). The driving circuit accordingly includes a first driving circuit and a second driving circuit. Figure 3 As shown, the first driving circuit uses transistor Q28 as its core, with its base receiving the first probe signal TX_1 through resistor R8. When TX_1 is high, Q28 conducts, outputting a high potential to the region under test through its transmitting endpoint (e.g., a node connected to the VBUS bus). The second driving circuit uses transistor Q22 as its core, with its base receiving the second probe signal TX_2 through resistor R1. When TX_2 is high, Q22 conducts, pulling the region under test down to a low potential (e.g., GND) through its transmitting endpoint. This push-pull structure, consisting of two driving circuits, can effectively inject alternating signals into the region under test. Resistors R6, R7, and R9 are pull-up or pull-down resistors used to determine the circuit's quiescent operating point. Furthermore, a filter circuit (R3 and C13 in the figure) can be connected to the driving circuit to filter and condition the AC probe signal to obtain a cleaner waveform.
[0062] The receiving module connects to the receiving endpoint and the control system (or signal processing module) to acquire the response signal from the receiving endpoint. To accurately capture the response without significantly affecting the original signal in the region under test, the receiving module in this embodiment may employ a current mirror circuit. For example, such as... Figure 3As shown, the receiving module may include a current mirror circuit composed of transistors Q29 and Q30. Its input is connected to the receiving endpoint Rx. When a weak current signal flows through the receiving endpoint, the current mirror circuit can replicate the current at a preset ratio (e.g., 1:1) and generate a mirrored current signal as a response signal at its output. This response signal is then transmitted to the signal processing module. Resistors R4 and R5 are bias resistors used to ensure the normal operation of the current mirror circuit. This design enables high-precision detection of weak currents.
[0063] The signal processing module is connected to the receiving module. It processes the response signal acquired by the receiving module, performing actions such as amplification, filtering, and analog-to-digital conversion (ADC) to extract signal characteristic parameters such as amplitude and phase. The function of the signal processing module can also be integrated into the aforementioned control system (such as an MCU).
[0064] The liquid detection system can be applied to electrical connectors (such as...) Figure 3 In the liquid detection scenario (P1) described in the diagram, the transmitting and receiving terminals can be inherent terminals of the electrical connector to save space. For example, the VBUS or CC terminal of a Type-C interface can be used as the transmitting terminal, and the adjacent GND terminal as the receiving terminal. The area to be tested is the physical space formed between these terminals. When liquid (such as water, sweat, beverages, etc.) enters this area, it changes the equivalent electrical parameters (such as conductivity and dielectric constant) between the terminals, resulting in a significant change in the amplitude and / or phase of the response signal acquired by the receiving module.
[0065] In the embodiment of the liquid detection system, during operation, the control system generates TX_1 and TX_2 signals to drive the transmitting module, injecting an AC signal into the area under test between the connector terminals through the transmitting endpoint. The current mirror circuit of the receiving module captures the response current at the receiving endpoint Rx. The signal processing module processes this response signal to obtain real-time signal characteristic parameters. Finally, the control system compares these real-time parameters with the reference characteristic parameters when there is no liquid intrusion. Once the difference exceeds a threshold, liquid intrusion is determined, and further safety protection measures such as power-off and alarms can be triggered.
[0066] In another embodiment, such as Figure 4As shown, the transmitting module directly applies an AC probe signal TX_PWM to the transmitting endpoint of the area under test. For example, this transmitting endpoint can be the VBUS pin of a Type-C interface. The receiving module includes a push-pull circuit, an operational amplifier, and several peripheral components. The push-pull circuit consists of a first transistor Q21 and a second transistor Q22 connected in parallel. For example, the base of the first transistor Q21 receives the first control signal TX_1 through resistor R8, its collector is connected to a power supply (e.g., 3.3V), and its emitter serves as the output node of the push-pull circuit. The base of the second transistor Q22 receives the second control signal TX_2 through resistors R13 and R14, its emitter is grounded, and its collector also serves as the output node of the push-pull circuit. The first control signal TX_1 and the second control signal TX_2 are preset periodic signals with opposite timing (e.g., two sine or square wave signals with opposite phases), used to alternately turn the first and second transistors on and off, forming a stable push-pull output stage.
[0067] The output node of a push-pull circuit, such as Figure 4 The connection point for Q21 and Q22 is, on the one hand, connected to an operational amplifier (such as... Figure 4 The inverting input of AR1 is connected to the output node, which is also connected to one or more receiving endpoints in the area under test. Figure 4 For example, the receiving endpoint can specifically be the CC pin, D+ pin, and D- pin of a Type-C interface. This connection method allows the voltage level of the receiving endpoint to directly affect the output of the push-pull circuit.
[0068] Operational amplifier AR1 and its peripheral resistors R3, R4, R11 together form a signal amplification circuit used to amplify changes in the push-pull circuit output. Its output terminal RX_AD is connected to the analog-to-digital converter (AD) pin of the control module (e.g., a microcontroller MCU) for subsequent signal processing and logic judgment.
[0069] like Figure 4 The liquid detection system in the illustrated embodiment operates as follows: Under normal dry conditions, the internal impedance of the Type-C interface is extremely high. The transmitting endpoint VBUS is approximately insulated from the receiving endpoints (CC / D+ / D-). At this time, the AC probe signal TX_PWM cannot be transmitted through the area under test to the receiving endpoint. In the receiving module, the output level of the push-pull circuit is determined solely by the first and second control signals TX_1 and TX_2, and their bias circuit, exhibiting a stable and regular level change. This signal is amplified by operational amplifier AR1 and used as a reference signal at the output RX_AD. The signal system records the characteristics of the signal at this time (e.g., amplitude, DC bias, or AC component).
[0070] When liquid (such as water, beverages, or other conductive liquids) enters the Type-C interface, the AC probe signal TX_PWM applied to the VBUS pin will couple or leak to the CC / D+ / D- pins through the liquid, causing a disturbance to the level of the receiving endpoint. This disturbance signal with an AC component is superimposed on the output node of the push-pull circuit, disrupting the original stable state.
[0071] This weak disturbance signal, superimposed with the AC probe signal, is input to operational amplifier AR1 for amplification. Therefore, the output RX_AD of operational amplifier AR1 will no longer be the reference signal, but will instead produce an output signal with obvious AC characteristics or DC level offset that varies with the AC probe signal TX_PWM.
[0072] The control system continuously monitors the voltage signal of the RX_AD converter. When it detects that the signal is no longer the preset reference signal but fluctuates or has a significant level jump, it can determine that liquid has entered the system. Furthermore, the control system can analyze the waveform, amplitude, and frequency of the RX_AD signal to distinguish different types of liquids or interference, and then take appropriate actions, such as disconnecting the charging connection or issuing an alarm to the user.
[0073] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application. Furthermore, unless otherwise specified, the embodiments and features described in the embodiments of this application can be combined with each other.
Claims
1. A liquid detection method, characterized in that, include: Generate an AC detection signal corresponding to the preset reference characteristic parameters; The AC detection signal is injected into the transmitting endpoint of the area to be tested through the transmitting module; The receiving module captures the response signal of the AC detection signal from the receiving endpoint, wherein the receiving endpoint is located in the area to be tested and is located near the transmitting endpoint; The response signal is processed to obtain signal characteristic parameters; Based on the comparison results between the signal characteristic parameters and the reference characteristic parameters, the corresponding liquid detection signal is output.
2. The liquid detection method according to claim 1, characterized in that, The liquid detection signal includes a liquid intrusion signal, which indicates the presence of liquid in the area to be tested; the signal characteristic parameters include amplitude characteristics and phase characteristics. The reference characteristic parameters include reference amplitude and reference phase; The step of outputting a corresponding liquid detection signal based on the comparison result between the signal feature parameters and the reference feature parameters includes: Based on the difference between the amplitude characteristics and the corresponding reference amplitude, the liquid intrusion signal is output; or, Based on the difference between the phase characteristic and the corresponding reference phase, the liquid intrusion signal is output.
3. The liquid detection method according to claim 1, characterized in that, The generation of the AC detection signal corresponding to the preset reference characteristic parameters includes: Send the target setting signal to the transmission module under standard external conditions; The actual received signal is received through the receiving module; The difference between the electrical characteristics of the actual received signal and the reference characteristic parameters is calculated to obtain the calibration error; When the calibration error is less than a preset calibration threshold, the target setting signal is used as the AC detection signal; When the calibration error is greater than or equal to the calibration threshold, the target setting signal is adjusted according to the calibration error based on the model predictive control algorithm until the calibration error is less than the calibration threshold, and the finally adjusted target setting signal is used as the AC detection signal.
4. The liquid detection method according to claim 2, characterized in that, The liquid detection signal also includes a liquid discrimination signal, which characterizes the type of liquid that has invaded the area to be tested. The step of processing the response signal to obtain signal characteristic parameters further includes: The response signal is converted from analog to digital to obtain a digital response signal; The reference feature parameters also include a preset truth table of substance categories; the step of outputting a corresponding liquid detection signal based on the comparison result between the signal feature parameters and the reference feature parameters further includes: Based on a preset substance discrimination model, the response digital signal is matched with the substance category truth table to obtain a matching result; Based on the matching results, a corresponding liquid discrimination signal is generated and output.
5. The liquid discrimination method according to claim 1, characterized in that, The step of processing the response signal to obtain signal characteristic parameters further includes, prior to: The response signal is judged based on a preset quality judgment standard to obtain a quality judgment signal. If the quality judgment signal is unqualified, the receiving module recaptures the response signal of the AC detection signal from the receiving endpoint.
6. The liquid detection method according to any one of claims 1-5, characterized in that, The output of the corresponding liquid detection signal is followed by: If the liquid detection signal indicates the presence of liquid intrusion, safety protection measures will be triggered. The security protection measures include any one of the following: Issue a warning signal; Cut off the energy output and input of the region under test, and cut off the signal output and input of the region under test.
7. A liquid detection system, characterized in that, To implement the liquid detection method according to any one of claims 1-6, comprising: A control system for generating the AC detection signal; A transmitting module, connected to the control system and the transmitting endpoint, is used to receive the AC detection signal and inject the AC detection signal into the transmitting endpoint; A receiving module, connected to the control system and the receiving endpoint, is used to acquire the response signal; A signal processing module, connected to the receiving module, is used to process the response signal to obtain the signal characteristic parameters; The control system is also used to compare the signal characteristic parameters with the reference characteristic parameters and output the corresponding liquid detection signal according to the comparison result.
8. The liquid detection system according to claim 7, characterized in that, The transmitting module includes: A driving circuit, whose input terminal is connected to the control system and whose output terminal is connected to the transmitting terminal, is used to drive the AC detection signal; A filter circuit, connected to the drive circuit, is used to condition the AC detection signal. The receiving module includes: A current mirror circuit, whose input is connected to the receiving endpoint and whose output is connected to the signal processing module, is used to mirror and copy the current signal received by the receiving endpoint to obtain the response signal.
9. The liquid detection system according to claim 8, characterized in that, The AC detection signal includes: a first detection signal and a second detection signal, wherein the timing of the first detection signal and the second detection signal is reversed; The driving circuit includes: A first driving circuit, wherein the input terminal of the first driving circuit receives the first detection signal, and its output terminal is connected to the transmitting terminal; A second driving circuit, wherein the input terminal of the second driving circuit receives the second detection signal, and its output terminal is connected to the transmitting terminal; The first driving circuit responds to the high level of the first detection signal and outputs a preset high potential to the transmitting endpoint, while the second driving circuit responds to the high level of the second detection signal and outputs a preset low potential to the transmitting endpoint.
10. The liquid detection system according to claim 7, characterized in that, The receiving endpoint and the receiving endpoint are inherent terminals in an electrical connector.
Citation Information
Patent Citations
Appliance interface, system and method for liquid entry detection in appliance interface
CN114401702A
Terminal equipment and liquid inlet protection method
CN115022455A
Internet-of-things system for identifying fruit juice through visible light signals and identification method
CN116500000A