Capacitive Liquid Level Detection Device and Liquid Level Detection Method
Through the capacitive liquid level detection device, impedance detection and IQ separation technology are used to solve the problem of existing liquid level detection methods being affected by environmental factors, and more accurate liquid level measurement is achieved.
Patent Information
- Application Number
- CN202210420679.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-04-20
AI Technical Summary
Existing liquid level detection methods are susceptible to external environmental factors, resulting in inaccurate measurements.
The capacitive liquid level detection device is adopted, including a liquid level detection electrode module, a capacitive sensor module based on IQ modulation, and a processor module. The liquid level is accurately determined through impedance detection and IQ separation technology.
It effectively reduces the impact of environmental factors such as temperature and humidity on liquid level detection and improves the accuracy of liquid level measurement.
Smart Images

Figure CN114777879B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of liquid level detection, and in particular, to a capacitive liquid level detection device and a liquid level detection method. Background Art
[0002] As a measuring instrument for various liquids, liquid level gauges are widely used in industries such as mining, chemical processing, food and beverage, etc. By using a liquid level gauge to measure the liquid level, the adverse factors brought by manual tape measurement can be eliminated, and online measurement can also be realized. Common liquid level detection principles include photoelectric, microwave / radar, ultrasonic, float, pressure, etc.
[0003] Although the above measurement methods can achieve the measurement of a specific liquid level, there are still many deficiencies. For example, the photoelectric type is prone to misjudgment due to some viscous substances (such as butter) remaining on the prism; the microwave / radar type is easily affected by the medium and has a high cost; the float type belongs to a mechanical measurement method, with low automation level, risk of corrosion, inconvenient maintenance, etc. That is, the devices for liquid level detection in the prior art are easily affected by external environmental factors and it is difficult to accurately measure the liquid level. Summary of the Invention
[0004] The embodiments of the present application provide a capacitive liquid level detection device and a liquid level detection method, which can reduce the influence of environmental factors and make the measurement of the liquid level more accurate.
[0005] In a first aspect, the embodiments of the present application provide a capacitive liquid level detection device, which includes a liquid level detection electrode module, a capacitive sensor module based on IQ modulation, and a processor module; wherein, the liquid level detection electrode module is used to perform impedance detection on a detection target; the detection end of the capacitive sensor module is electrically connected to the liquid level detection electrode module, and the capacitive sensor module is used to perform impedance detection on the detection target based on the liquid level detection module, collect impedance information, and the capacitive sensor is further used to perform IQ separation on the detection result to obtain a resistance component and a capacitance component, and the impedance information includes the resistance component and the capacitance component; the processor module is electrically connected to the capacitive sensor and is used to read the impedance information collected by the capacitive sensor module to determine the liquid level of the detection target.
[0006] In a second aspect, the embodiments of the present application further provide a liquid level detection method, which includes:
[0007] Obtain the sampling data of the detection target in a liquidless state;
[0008] Determine the linear change relationship between the reference impedance value corresponding to the reference electrode and the detection impedance value corresponding to the detection electrode according to the sampling data;
[0009] Obtain detection data of the detection target;
[0010] Combine the detection data and the linear variation relationship to determine the current liquid level of the detection target.
[0011] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and one or more processors; the memory is used to store one or more programs; when one or more of the programs are executed by one or more of the processors, one or more of the processors implement the liquid level detection method as described in the embodiment of the present application.
[0012] In a fourth aspect, an embodiment of the present application further provides a storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute the liquid level detection method as described in the embodiment of the present application when executed by a computer processor.
[0013] In a fifth aspect, an embodiment of the present application further provides a liquid level monitoring device, which includes the capacitive liquid level detection device as described in the embodiment of the present application, and further includes a display device. The capacitive liquid level detection device is connected to the display device, and the display screen is used to display the liquid level information detected by the capacitive liquid level detection device.
[0014] In the embodiment of the present application, impedance detection is performed on the detection target through the liquid level detection electrode module, and the resistance component and the capacitance component are separated through the capacitance sensor module based on IQ modulation, so that the processor module combines the impedance information, and then determines whether the current liquid level reaches the position corresponding to the detection electrode according to the linear variation relationship and the impedance difference, and further can determine the liquid level of the detection target, which can effectively reduce the influence of environmental factors such as temperature and humidity, and improve the accuracy of liquid level measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic module diagram of a capacitive liquid level detection device provided by an embodiment of the present application;
[0016] Figure 2 It is a top view schematic diagram of the liquid level detection electrode module provided by an embodiment of the present application arranged on the tank body;
[0017] Figure 3 It is a flowchart of a liquid level detection method provided by an embodiment of the present application;
[0018] Figure 4 It is a flowchart of determining the linear variation relationship provided by an embodiment of the present application;
[0019] Figure 5 It is a flowchart of another liquid level detection method provided by an embodiment of the present application;
[0020] Figure 6 The structural schematic diagram of a computer device provided by an embodiment of the present application. Specific embodiments
[0021] The following further elaborates on the embodiments of the present application in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than limiting the embodiments of the present application. Additionally, it should be noted that for the sake of description, only parts related to the embodiments of the present application are shown in the drawings, rather than all structures.
[0022] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.
[0023] The present application uses capacitive liquid level detection, which has obvious advantages, can effectively reduce costs, and capacitive liquid level detection is a non-invasive detection method, that is, it can detect without invading the liquid, reducing the pollution of the liquid.
[0024] Figure 1 The module schematic diagram of a capacitive liquid level detection device provided by an embodiment of the present application, as Figure 1 shown, the capacitive liquid level detection device includes a liquid level detection electrode module 101, a capacitance sensor module 102, and a processor module 103. The liquid level detection electrode module 101 is disposed on the detection target, such as on a container such as a tank or a cylinder with a chamber for containing liquid inside. The liquid level detection electrode module 101 is used to perform impedance detection on the tank, and the liquid level detection electrode module 101 is connected to the detection end of the capacitance sensor module 102. The capacitance sensor module 102 detects the tank through the liquid level detection electrode module 101 to obtain a detection result, thereby collecting impedance information. Among them, the detection result can be a waveform signal, etc.
[0025] It can be understood that the capacitance sensor module 102 can perform IQ separation on the collected information based on IQ modulation technology to obtain two component information. The following is an exemplary description of its detection principle. Exemplarily, the TX pin of the capacitance sensor module 102 sends a sine wave signal with a frequency of 125KHz. The sine wave signal is transmitted to the RX pin through the detection target. After being processed by an amplifier and a multiplier, an in-phase signal I (In-phase) component is obtained, and a quadrature signal Q (Quadrature-phase) component can also be obtained. The I vector corresponds to the resistance component of the detected target liquid level, and the Q vector corresponds to the capacitance component of the detected target liquid level. The impedance information includes both the resistance component and the capacitance component.
[0026] Moreover, the processor module 103 is electrically connected to the capacitance sensor module 102 and can determine the current liquid level of the detection target after reading the corresponding impedance information. It can be envisioned that the capacitance sensor module 102 can store the resistance component and capacitance component obtained after IQ separation in a storage module such as a register, and the processor module 103 can read the impedance information by reading the register.
[0027] As can be seen from the above solution, the capacitance sensor module performs IQ separation on the detection result detected by the liquid level detection electrode module, transmits the obtained impedance information to the processor module, and the processor module determines the current liquid level according to the impedance information. The impedance information obtained after IQ separation can reduce the influence of environmental factors on liquid level detection, making the liquid level detection more accurate.
[0028] In an embodiment, the liquid level detection electrode module includes a plurality of electrode terminals for impedance detection, and the plurality of electrode terminals are arranged in sequence. Exemplarily, when the liquid level detection electrode module is disposed on the outer sidewall of the tank, the electrode terminals thereon are vertically arranged from bottom to top or from top to bottom along the outer sidewall. The capacitance sensor module has corresponding detection ends, and the detection ends are connected to the electrode terminals. It can be envisioned that the number of detection ends can correspond to the number of electrode terminals, or alternatively, the number of electrode terminals can be less than the number of detection ends.
[0029] Among multiple electrode terminals, one of the electrode terminals is used as a reference electrode, and the remaining electrode terminals are detection electrodes. Exemplarily, the electrode terminal located at the uppermost position, i.e., the electrode terminal with the highest position in the tank among all electrode terminals, can be used as the reference electrode, and the remaining electrode terminals are used as detection electrodes. A detection end corresponding to the capacitance sensor module is connected to the reference electrode, and the reference electrode is used to measure the impedance of the detection tank in an air medium environment. Exemplarily, a detection end on the capacitance module can also be left floating, so that this detection end can play the role of measuring the impedance of the detection tank in an air medium environment when connecting to the reference electrode.
[0030] Taking one of the electrode terminals as an example, its detection principle is elaborated. A grounded parallel plate is provided on the other side of the tank relative to the electrode terminal. The electrode terminal is parallel to the parallel plate, forming the basic structure of a capacitor, that is, the electrode terminal and the parallel plate are the two capacitor plates of the capacitor structure. When the height of the liquid level changes between the capacitor plates, the medium between the capacitor plates becomes a medium composed of air and liquid with different proportions, and the relative permittivity between the capacitor plates corresponding to different media is different. Correspondingly, the capacitance value will also be different.
[0031] When ignoring the edge effect, the capacitance value between the capacitor plates can be calculated using the following formula:
[0032] C = εS / d = ε 0 ε r S / d
[0033] Among them, C is the capacitance value, d is the distance between the capacitor plates, ε is the permittivity of the medium between the capacitor plates, S is the area of the capacitor plates, ε 0 is the vacuum permittivity, and ε r is the relative permittivity of the medium between the capacitor plates. Based on the change in the capacitance value, the corresponding liquid level change can be determined.
[0034] Figure 2 This is a top view schematic diagram of the liquid level detection electrode module provided by the embodiment of the present application disposed on the tank. As Figure 2 shown, exemplarily, the liquid level detection electrode module is disposed on the outer sidewall of the tank 230. The liquid detection electrode module includes a detection layer 210 and a grounding layer 220. The grounding layer 220 and the detection layer 210 are relatively disposed on both sides of the tank 230, such as the left side and the right side. The grounding layer 220 and the detection layer 210 are parallel to each other, so that the capacitance value between the parallel plates between the grounding layer 220 and the detection layer 210 can be used to represent the capacitance value when the tank 230 is filled with air or liquid. Moreover, a plurality of electrode terminals are disposed in the detection layer 210, thereby forming a segmented detection structure, so as to determine the liquid level position in the tank 230, that is, the liquid level.
[0035] The detection layer 210 includes a shielding layer 211, an insulating layer 212, and a detection channel layer 213. The detection channel layer 213, which is the part of the detection layer 210 closest to the tank body 230, is disposed on the outer sidewall of the tank body 230. For example, it can be attached to the outer sidewall of the tank body 230. Exemplarily, the detection channel layer 213 can be adsorbed on the outer sidewall of the tank body 230 by a suction cup or fixed to the outer sidewall of the tank body 230 by bolts.
[0036] The electrode terminals are disposed on the detection channel layer 213 and form a parallel-plate capacitor with the grounding layer 220 to facilitate liquid level detection. The insulating layer 212 covers the detection channel layer 213. The insulating layer 212 can be formed of an insulating material such as rubber and has a certain thickness. Exemplarily, the thickness of the insulating layer 212 can be 1 - 5 mm. The shielding layer 211 is laid on the insulating layer 212 to isolate the electrode terminals from the external environment. Exemplarily, the shielding layer 211 can adopt shielding materials such as nickel-plated conductive cloth and carbon-plated conductive cloth.
[0037] In some embodiments, the capacitive sensor module further includes a grounding pin and a shielding pin. Among them, the grounding pin is connected to the grounding layer, and the shielding pin is connected to the shielding layer.
[0038] In some embodiments, the processor module is connected to the capacitive sensor module through an SPI bus. The processor module is a processing unit such as a single-chip microcomputer, such as an STM32 single-chip microcomputer or a 51 single-chip microcomputer, and is connected to the capacitive sensor module through the SPI bus to receive the resistance component and capacitance component after IQ separation by the capacitive sensor module. An SPI interface, a UART interface, etc. are provided on the processor module, and the processor module can be connected to the capacitive sensor module through the SPI interface.
[0039] In some embodiments, the capacitive liquid level detection device further includes a power supply module to supply power to each module. Exemplarily, it provides a 5V voltage for the processor module and the capacitive sensor module.
[0040] In some embodiments, a filtering module is further disposed between the capacitive sensor module and the liquid level detection electrode module. The input end of the filtering module is connected to the output end of the liquid level detection electrode module, and the output end of the filtering module is connected to the input end of the capacitive sensor module. The filtering module is used to filter out interference and improve the accuracy of liquid level detection. It should be noted that the filtering module can be an EMC filter, such as an MLAD-V-SC output filter for inverters or an MLAD-SW sine wave filter, etc.; the filtering module can also be a filtering circuit composed of active components or passive components, such as an RC filtering circuit, an LC filtering circuit, etc.
[0041] The present application also provides a liquid level monitoring device, which includes a capacitive liquid level detection device and a display device as described in the above real-time example. Among them, the display device is connected to the processor module in the capacitive liquid level detection device, and the display device is used to display the liquid level information detected by the capacitive liquid level detection device. Exemplarily, the display device can be an OLED (Organic Electroluminescence Display) display, and the processor module is a single-chip microcomputer. The single-chip microcomputer periodically transmits the liquid level information to the OLED display, and this period can be set according to actual display requirements. The liquid level monitoring device can be used for liquid level monitoring, such as being applied to the tank for storing liquor.
[0042] In some embodiments, a communication module is further included, and the processor module is connected to the communication module through a UART (Universal Asynchronous Receiver / Transmitter) interface. UART is a general-purpose serial data bus for asynchronous communication. This bus can communicate bidirectionally and can achieve full-duplex transmission and reception. In the present application, UART is used for communication between the processor module and the communication module. It can be understood that the processor module can transmit the current liquid level information of the detection target to the communication module through the UART interface, and then the communication module transmits it to the terminal or other receiving devices.
[0043] Among them, the communication module is a Bluetooth communication module. It can be understood that the Bluetooth communication module is a module integrated with Bluetooth function and can be used for wireless network communication. Exemplarily, the Bluetooth communication module can adopt a Bluetooth module with the model HC05, and the power supply module also supplies power to the Bluetooth communication module, such as providing a 5V working voltage.
[0044] The communication module can also be a WiFi module. Exemplarily, a WiFi module with the model ESP8266 can be adopted to transmit the signal to receiving devices such as terminals. In addition, the power supply module also supplies power to the WiFi module, that is, the power supply module provides the working voltage for the communication module. It should be noted that the communication module can also be a ZigBee module, a 4G module, or other modules that can be used for communication.
[0045] Figure 3 The figure is a flowchart of a liquid level detection method provided by an embodiment of the present application, which can be applied to the capacitive liquid level detection device described in the above embodiment. It should be noted that the illustrated order is for a clearer description of the solution of the present application and does not represent a limitation on its order. As Figure 3 shown, the method at least includes the following steps:
[0046] Step S100: Obtain the sampling data of the detection target in the liquid-free state.
[0047] It is understandable that taking the detection target as the tank body and used for storing liquor as an example for illustration, the electrode terminals of the liquid level detection electrode module, such as 10 electrode terminals, are sequentially arranged along the outer side wall of the tank body. The no-liquid state means that there is no liquor stored in the tank body, and the liquid state means that there is liquor stored in the tank body. The sampling data includes the impedance information corresponding to each electrode terminal collected in the no-liquid state. The liquid level detection electrode module includes 10 electrode terminals. Correspondingly, the liquid level of the tank body is divided into 10 liquid level grades. Therefore, for each liquid level grade, sampling is performed once or multiple times, that is, the sampling data includes the impedance information corresponding to multiple detection electrodes.
[0048] Step S200: According to the sampling data, determine the linear change relationship between the reference impedance value corresponding to the reference electrode and the detection impedance value corresponding to the detection electrode.
[0049] The processor module can determine the linear change relationship between the reference impedance value corresponding to the reference electrode and the detection impedance value corresponding to the detection electrode according to the sampling data. It should be noted that the reference impedance value is the impedance information corresponding to the reference electrode, and the detection impedance value is the impedance information corresponding to the detection electrode.
[0050] Exemplarily, taking the reference electrode and detection electrode I for illustration, each sampling data at least includes the reference impedance value corresponding to the reference electrode and the detection impedance value corresponding to detection electrode I. The impedance value is affected by environmental factors such as environmental temperature. For example, when other conditions except environmental temperature remain unchanged, the higher the environmental temperature, the higher the corresponding impedance value. However, regardless of how the environmental temperature changes, the reference impedance value and the detection impedance value show a linear change.
[0051] Therefore, it is possible to obtain the sampling data in the no-liquid state at different environmental temperatures, such as sampling once every 2°C or once every 5°C. It should be noted that the sampling temperature interval can be set according to the actual measurement requirements. Therefore, the sampling data includes the reference impedance value of the reference electrode corresponding to the no-liquid state and the detection impedance value I of detection electrode I corresponding to the no-liquid state at a certain temperature. The processor module can obtain the linear change relationship between the reference impedance value and the detection impedance value I according to multiple groups of sampling data.
[0052] In one embodiment, referring to Figure 4 , Figure 4 is the flowchart for determining the linear change relationship provided by the embodiment of the present application. Among them, for determining the linear change relationship between the reference impedance value corresponding to the reference electrode and the detection impedance value corresponding to the detection electrode, the following steps can be adopted:
[0053] Step S210: Generate a fitting curve corresponding to the linear change relationship according to the sampling data.
[0054] Step S220: Determine the calibration coefficients corresponding to the linear variation relationship according to the fitting curve.
[0055] Among them, the calibration coefficients include a proportional coefficient and an offset coefficient. The fitting curve is used to represent the linear relationship between the reference impedance value and the detected impedance value on the coordinate system. Exemplarily, in the XY coordinate system, the reference impedance value is used as the X-axis, and the detected impedance value is used as the Y-axis. Therefore, the sampled data includes the reference impedance value and the detected impedance value at each temperature. The sampled data is imported and processed by computer software, such as processed by MATLAB. The sampled data is imported into MATLAB. Multiple groups of reference impedance values and detected impedance values form multiple scatter points in the coordinate system. The multiple scatter points are connected to form a continuous curve that can represent the linear relationship between the reference impedance value and the detected impedance value, that is, the fitting curve. Since the reference impedance value and the detected impedance value satisfy linear variation, for the fitting curve, a relational expression corresponding to the linear variation relationship can be obtained, and the relational expression y = k * x + b can be obtained, where k is the proportional coefficient and b is the offset coefficient. It can be imagined that for different detection electrodes, different relational expressions can be obtained, that is, the calibration coefficients in the relational expression are different.
[0056] Step S300: Obtain the detection data of the detection target.
[0057] In one embodiment, for the detection data of a detection target such as a tank, it should be noted that the detection data includes the reference impedance value and the detected impedance value of the reference electrode and multiple detection electrodes when the tank is at the current liquid level. Exemplarily, when the liquid surface reaches the position where the detection electrode is located, that is, when the bottom end of the detection electrode is on the liquid surface, it is considered that the liquid level reaches the detection electrode. Therefore, the corresponding detected impedance value is the impedance value detected by the detection electrode when the liquid surface reaches the position where the detection electrode is located.
[0058] Step S400: Combine the detection data and the linear variation relationship to determine the current liquid level of the detection target.
[0059] Whether in the case of continuous power-on or in the case of power-on again after power-off, it is possible that each detection electrode is affected by temperature, resulting in a situation where the liquid level has not reached, but the corresponding detected impedance value is already greater than the impedance value in the case of having liquid, that is, misjudging the liquid level of the detection target. Therefore, it is necessary to combine the detection data and the linear variation relationship. Since in the liquid-free state, the reference impedance value corresponding to the reference electrode and the detected impedance value corresponding to the detection electrode satisfy a linear relationship, if the reference impedance value and the detected impedance value in the detection data satisfy a linear relationship, then the liquid level has not reached the corresponding detection electrode.
[0060] In one embodiment, refer to Figure 5 ,Figure 5 The figure is a flowchart of another liquid level detection method provided by an embodiment of the present application, which is used to determine the current liquid level of a detection target. Among them, for determining the current liquid level of the detection target by combining detection data and a linear change relationship, the following steps are included:
[0061] Step S410: Determine the reference impedance value of the detection electrode in the liquid-free state according to the calibration coefficient and the reference impedance value corresponding to the reference electrode in the detection data.
[0062] Step S420: Determine the impedance difference according to the reference impedance value and the detection impedance value corresponding to the detection electrode in the detection data.
[0063] Step S430: When the impedance difference is greater than or equal to the first threshold, it is determined that the current liquid level of the detection target is at the position corresponding to the detection electrode.
[0064] The reference impedance value and the detection impedance value corresponding to the reference electrode and the detection electrode after the current detection can be obtained from the detection data. It can be understood that for each detection electrode, there is a calibration coefficient. Since the calibration coefficient has been determined, the relational expression of the corresponding linear change relationship can also be determined. Then, according to the calibration coefficient, the reference impedance value in the liquid-free state can be determined. It can be imagined that through the relational expression corresponding to this calibration coefficient, the reference impedance value can be determined, where the reference impedance value is the reference value determined according to the relational expression.
[0065] The difference between the detection impedance value corresponding to the detection electrode in the detection data and the reference impedance value is the impedance difference. And when the impedance difference is greater than or equal to the first threshold, it can be determined that the current liquid level of the detection target is located at the position corresponding to the detection electrode.
[0066] Exemplarily, taking the reference electrode and the detection electrode I as examples for further elaboration, the current detection data includes the reference impedance value Cf of the reference electrode and the detection impedance value C1 of the detection electrode I. According to the linear variation relationship between the reference impedance value and the detection impedance value, for example, the proportional coefficient k1 and the offset coefficient b1 in the calibration coefficient can be determined from the relational expression corresponding to the detection electrode I. Therefore, corresponding to the reference impedance value Cf, the reference impedance value Ce can be obtained, and Ce and Cf satisfy Ce = k1 * Cf + b1. Then, the impedance difference is the difference between the reference impedance value Ce and the detection impedance value C1. When the impedance difference is greater than or equal to the first threshold, it can be determined that the liquid level in the tank reaches the position where the detection electrode I is located. Among them, the first threshold is pre-stored in the storage device, and the first threshold can be set to 200. The first threshold can also be different for different detection electrodes. Exemplarily, corresponding to the detection electrode I, the first threshold can be set to 200, and corresponding to the detection electrode II, the first threshold can be set to 220. It should be noted that for other detection electrodes, the above method is also applicable to determine whether the liquid level reaches the position corresponding to the detection electrode, so as to determine the liquid level of the detection target.
[0067] As can be seen from the above solution, the liquid level detection method provided by the embodiment of the present application can sample the detection target in different states to obtain sampling data, so as to obtain the linear variation relationship between the reference impedance value and the detection impedance value that satisfies linear variation. Through the above linear variation relationship and the detection data for judgment, the liquid level of the detection target can be determined. According to the determined linear variation relationship and the detection data, the reference impedance value corresponding to each detection electrode can be determined, and the reference impedance value can ignore the influence of external environmental factors, thereby effectively reducing the influence of environmental factors and improving the accuracy of liquid level measurement.
[0068] In some embodiments, in each set of detection data, both the reference impedance value and the detection impedance value are impedance values obtained after processing the received impedance information. For example, the resistance component and the capacitance component obtained after IQ separation by the capacitance sensor module, that is, the impedance information. The capacitance sensor module transmits the impedance information to the processor module, and the processor module sets the resistance component and the capacitance component with the first weight ratio pre-stored in the storage module, so as to determine the reference impedance value and the detection impedance value.
[0069] Exemplarily, the first weight ratio can be set to 0:1, that is, the resistance component is 0% and the capacitance component is 100%, that is, only the capacitance component is taken. Therefore, only the capacitance component after IQ separation is included in the reference impedance value and the detection impedance value. It should be noted that the first weight ratio can be set according to actual design needs.
[0070] Determining the reference impedance value and the detection impedance value with the first weight ratio can make the reference impedance value and the detection impedance value more valuable, and can also adjust the reference impedance value and the detection impedance value by setting different weight ratios so that they can meet the needs of more measurement scenarios.
[0071] In some embodiments, a plurality of detection electrodes are sequentially arranged on the side wall of a detection target such as a tank body. For example, the order of the detection electrodes is defined from bottom to top. If detection electrode I is below detection electrode II, then detection electrode I is the pre-order detection electrode of detection electrode II. When the liquor in the tank body is on detection electrode II, if the impedance difference of detection electrode II is greater than or equal to the first threshold, it is also necessary to determine whether the impedance difference of the pre-order detection electrode, that is, detection electrode I, is also greater than or equal to the first threshold. It should be noted that if the impedance difference of the current detection electrode is greater than or equal to the first threshold, the impedance differences of all its pre-order detection electrodes should also be greater than or equal to the first threshold.
[0072] Therefore, if the impedance differences corresponding to the current detection electrode and its pre-order detection electrodes are both greater than or equal to the first threshold, it can be determined that the position corresponding to this detection electrode is the current liquid level of the tank body. It should be noted that if there is a situation where the impedance differences of the pre-order detection electrodes are all less than the first threshold, it means that the liquid level is abnormal, and the position corresponding to this detection electrode cannot be determined as the current liquid level of the tank body.
[0073] Exemplarily, if there are 10 detection electrodes, the first detection electrode to the tenth detection electrode are sequentially arranged from bottom to top. It should be noted that the first detection electrode and the second detection electrode are the pre-order detection electrodes of the third detection electrode, that is, all the detection electrodes below this detection electrode are pre-order detection electrodes. If the liquid level is at the position corresponding to the third detection electrode and the impedance difference of the third detection electrode is greater than the first threshold, it is also necessary to determine whether the impedance differences corresponding to the first detection electrode and the second detection electrode are both greater than or equal to the first threshold.
[0074] When the impedance differences corresponding to the first detection electrode and the second detection electrode are both greater than or equal to the first threshold, it can be determined that the current liquid level of the tank body is at the position corresponding to the third detection electrode. When the impedance differences corresponding to the first detection electrode and the second detection electrode are both less than the first threshold, it means that the liquid level is abnormal. For example, an abnormal report can be sent through a processor to inform the user of the abnormal situation.
[0075] By judging again whether the impedance differences of the pre-order detection electrodes meet the condition of being greater than or equal to the first threshold, the solution of the present application can effectively reduce the occurrence of misjudging the liquid level and improve the detection accuracy.
[0076] In some embodiments, for the determination of the liquid level, when the impedance difference of the corresponding detection motor is less than the first threshold, if the impedance difference is still greater than the second threshold, the liquid level state of the tank needs to be determined. The liquid level state includes the rising state and the falling state, which is used to represent the change of the liquid level in the tank. It should be noted that the tank can correspond to one of the rising state and the falling state at the same liquid level. It should be noted that the second threshold is pre-stored in the storage device, and the second threshold can be set to 180. The second threshold can also be different for different detection electrodes. Exemplarily, for detection electrode I, the second threshold can be set to 180, and for detection electrode II, the second threshold can be set to 200.
[0077] Exemplarily, for the judgment of the rising state or the falling state, it can be judged based on historical data. For each liquid level detection, the impedance difference of the corresponding detection electrode is stored as historical data. When it is necessary to judge the rising state or the falling state, the currently detected impedance difference is compared with the historical data. If the impedance difference is greater than the historical data, the liquid level state of the tank can be determined to be the rising state; if the impedance difference is less than the historical data, the liquid level state of the tank can be determined to be the falling state. For example, during a liquid level detection, the impedance difference I of the detection electrode is stored as historical data. During the next liquid level detection, the impedance difference II of the detection electrode is compared with the impedance difference I to determine the liquid level state.
[0078] It can be imagined that the historical data can also be continuously updated. For example, after the judgment of the liquid level state is completed, the impedance difference II is used as historical data, and the impedance difference I is deleted for update; when the liquid level is detected for the first time, the historical data is 0.
[0079] When the liquid level state is the falling state, the position corresponding to the detection electrode is the current liquid level of the tank; when the liquid level state is the rising state, the position corresponding to the adjacent previous detection electrode of the detection electrode is the current liquid level of the tank.
[0080] It can be understood that if there are 10 detection electrodes, the first detection electrode to the tenth detection electrode are arranged from bottom to top in sequence. It should be noted that the first detection electrode and the second detection electrode are the previous detection electrodes of the third detection electrode, and the second detection electrode is the adjacent previous detection electrode of the third detection electrode. If the impedance difference of the third detection electrode is greater than the second threshold and less than the first threshold, when the liquid level state of the tank is the falling state, the position corresponding to the third detection electrode is taken as the current liquid level of the tank; when the liquid level state of the tank is the rising state, the position corresponding to the second detection electrode is taken as the current liquid level of the tank.
[0081] Figure 6The structural schematic diagram of a computer device provided by an embodiment of the present application is as follows. Figure 6 As shown, the device includes a processor 301, a memory 302, an input device 303, and an output device 304. The number of processors 301 in the device can be one or more. Figure 6 Here, one processor 301 is taken as an example. The processor 301, memory 302, input device 303, and output device 304 in the device can be connected through a bus or other means. Figure 6 Here, the connection through the bus is taken as an example. The memory 302, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the video encoding control method in the embodiment of the present application. The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 302, that is, implements the above-mentioned liquid level detection method. The input device 303 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the device. The output device 304 may include a display device such as a display screen.
[0082] The embodiment of the present application also provides a storage medium containing computer-executable instructions. The computer-executable instructions are used to execute the liquid level detection method described in the above embodiment when executed by a computer processor, and implement the corresponding functions and beneficial effects.
[0083] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0084] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0085] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.
[0086] Note that the above is only a preferred embodiment of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments. Without departing from the concept of the present application, it can also include more other equivalent embodiments, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A liquid level detection method, applied to a capacitive liquid level detection device, characterized in that, the capacitive liquid level detection device includes a liquid level detection electrode module, a capacitive sensor module based on IQ modulation, and a processor module; wherein, the liquid level detection electrode module is used for impedance detection of a detection target; the detection end of the capacitive sensor module is electrically connected to the liquid level detection electrode module, the capacitive sensor module is used for impedance detection of the detection target based on the liquid level detection module, collecting impedance information, the capacitive sensor module is further used for IQ separation of the detection result to obtain a resistance component and a capacitance component, and the impedance information includes the resistance component and the capacitance component; the processor module is electrically connected to the capacitive sensor, and is used for reading the impedance information collected by the capacitive sensor module to determine the liquid level of the detection target; the liquid level detection electrode module is provided with a plurality of electrode terminals for impedance detection, and the plurality of electrode terminals are arranged in sequence, the capacitive sensor module is correspondingly provided with a plurality of the detection ends corresponding to the electrode terminals, and the detection ends are connected to the electrode terminals; and the liquid level detection electrode module includes a detection layer and a grounding layer, the grounding layer and the detection layer are relatively arranged on both sides of the tank body, and a plurality of the electrode terminals are arranged in the detection layer to form a segmented detection structure; among the plurality of electrode terminals, one is a reference electrode, and the rest of the electrode terminals are detection electrodes, and the reference electrode is used for detecting the impedance in an air medium environment; the liquid level detection method includes: acquiring sampling data of the detection target in a liquidless state; determining a linear change relationship between a reference impedance value corresponding to the reference electrode and a detection impedance value corresponding to the detection electrode according to the sampling data; acquiring detection data of the detection target; combining the detection data and the linear change relationship to determine the current liquid level of the detection target; wherein, the determining a linear change relationship between a reference impedance value corresponding to the reference electrode and a detection impedance value corresponding to the detection electrode according to the sampling data includes: generating a fitting curve corresponding to the linear change relationship according to the sampling data; determining a calibration coefficient corresponding to the linear change relationship according to the fitting curve, and the calibration coefficient includes a proportionality coefficient and an offset coefficient; and, the combining the detection data and the linear change relationship to determine the current liquid level of the detection target includes: determining a reference impedance value corresponding to the detection electrode in a liquidless state according to the calibration coefficient and the reference impedance value corresponding to the reference electrode in the detection data; determining an impedance difference according to the reference impedance value and the detection impedance value corresponding to the detection electrode in the detection data; when the impedance difference is greater than or equal to a first threshold, determining that the current liquid level of the detection target is at the position corresponding to the detection electrode.
2. The liquid level detection method according to claim 1, characterized in that, When the impedance difference is greater than or equal to the first threshold, it is determined that the current liquid level of the detection target is at the position corresponding to the detection electrode, including: When the impedance difference is greater than or equal to the first threshold, it is determined whether the detection impedance values of the previous detection electrodes of the detection electrode are all greater than or equal to the first threshold; When the detection impedance values of the previous detection electrodes are all greater than or equal to the first threshold, the position corresponding to the detection electrode is determined as the current liquid level of the detection target.
3. The liquid level detection method according to claim 1, wherein, after determining the impedance difference according to the reference impedance value and the detection impedance value corresponding to the detection electrode in the detection data, further including: When the impedance difference is greater than the second threshold and less than the first threshold, the liquid level state of the detection target is determined, and the liquid level state includes an ascending state and a descending state; If the liquid level state is the ascending state, the position corresponding to the previous detection electrode adjacent to the detection electrode is determined as the current liquid level of the detection target; If the liquid level state is the descending state, the position corresponding to the detection electrode is determined as the current liquid level of the detection target.
4. The liquid level detection method according to any one of claims 1-3, wherein, further including: Determining the reference impedance value corresponding to the reference electrode and the detection impedance value corresponding to the detection electrode according to the resistance component and the capacitance component set with a preset first weight ratio.
5. A computer device, wherein, including a memory and one or more processors; The memory is used for storing one or more programs; When one or more of the programs are executed by one or more of the processors, the one or more processors implement the liquid level detection method according to any one of claims 1-4.
6. A storage medium containing computer-executable instructions, wherein, the computer-executable instructions are used for executing the liquid level detection method according to any one of claims 1-4 when executed by a computer processor.
Citation Information
Patent Citations
Liquid level detection method and liquid level detection device
CN107228699A
Liquid level detection method and device
CN107664527A
Liquid level monitoring method, storage medium and electronic equipment
CN111076790A
Moisture detection device and method
CN112198199A