CN107664527B - Liquid level detection method and liquid level detection device - Google Patents

Liquid level detection method and liquid level detection device Download PDF

Info

Publication number
CN107664527B
CN107664527B CN201610619619.XA CN201610619619A CN107664527B CN 107664527 B CN107664527 B CN 107664527B CN 201610619619 A CN201610619619 A CN 201610619619A CN 107664527 B CN107664527 B CN 107664527B
Authority
CN
China
Prior art keywords
capacitance
value
detection unit
compensation
liquid level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610619619.XA
Other languages
Chinese (zh)
Other versions
CN107664527A (en
Inventor
何世娴
李奇峰
杨云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BYD Semiconductor Co Ltd
Original Assignee
BYD Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201610619619.XA priority Critical patent/CN107664527B/en
Publication of CN107664527A publication Critical patent/CN107664527A/en
Application granted granted Critical
Publication of CN107664527B publication Critical patent/CN107664527B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01FMEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
    • G01F23/00Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm
    • G01F23/22Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm by measuring physical variables, other than linear dimensions, pressure or weight, dependent on the level to be measured, e.g. by difference of heat transfer of steam or water
    • G01F23/26Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm by measuring physical variables, other than linear dimensions, pressure or weight, dependent on the level to be measured, e.g. by difference of heat transfer of steam or water by measuring variations of capacity or inductance of capacitors or inductors arising from the presence of liquid or fluent solid material in the electric or electromagnetic fields
    • G01F23/263Indicating or measuring liquid level or level of fluent solid material, e.g. indicating in terms of volume or indicating by means of an alarm by measuring physical variables, other than linear dimensions, pressure or weight, dependent on the level to be measured, e.g. by difference of heat transfer of steam or water by measuring variations of capacity or inductance of capacitors or inductors arising from the presence of liquid or fluent solid material in the electric or electromagnetic fields by measuring variations in capacitance of capacitors

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Electromagnetism (AREA)
  • Thermal Sciences (AREA)
  • Fluid Mechanics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)

Abstract

The invention discloses a liquid level detection method and a liquid level detection device, wherein the method comprises the following steps: acquiring an initial capacitance value of each capacitance detection unit in a plurality of capacitance detection units; detecting the current capacitance value of each capacitance detection unit; acquiring a current environment compensation value, and acquiring a reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit; the current capacitance value of each capacitance detection unit is compared with the corresponding reference capacitance value to acquire the capacitance variation of each capacitance detection unit, and liquid level information is generated according to the capacitance variation of each capacitance detection unit, so that the accuracy of capacitance detection is improved, the accuracy of liquid level detection is improved, and the liquid level detection has good anti-interference performance on environmental changes such as temperature drift, power supply jitter, PCB noise and the like, and is applicable to complex environments.

Description

Liquid level detection method and liquid level detection device
Technical Field
The invention relates to the technical field of measurement and control, in particular to a liquid level detection method and a liquid level detection device.
Background
The related art provides an intelligent capacitance type liquid level measuring instrument, the scheme converts capacitance change into frequency change through a capacitance frequency conversion circuit, and then a central processing unit calculates the liquid level according to the frequency change and through a software formula, so that the liquid level is indirectly measured.
However, the related art has a problem that the liquid level is judged by comparing the difference between the capacitance without liquid and the capacitance with liquid, and since the capacitance without liquid is a fixed reference value, when the fixed reference value does not follow the change of the environment in time, such as the dry temperature rise of the environment, the difference error is easily caused, and the judgment of the liquid level is messy.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, an object of the present invention is to provide a liquid level detection method, which can accurately determine the liquid level change, and effectively suppress the interference of the environment on the liquid level detection.
Another object of the present invention is to provide a liquid level detecting device.
In order to achieve the above object, an embodiment of the invention provides a liquid level detection method, which includes the following steps: acquiring an initial capacitance value of each capacitance detection unit in a plurality of capacitance detection units; detecting the current capacitance value of each capacitance detection unit; acquiring a current environment compensation value, and acquiring a reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit; and comparing the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to obtain the capacitance variation of each capacitance detection unit, and generating liquid level information according to the capacitance variation of each capacitance detection unit.
According to the liquid level detection method provided by the embodiment of the invention, the current capacitance value of each capacitance detection unit is detected, the current environment compensation value is obtained, the reference capacitance value of each capacitance detection unit is obtained according to the current environment compensation value and the initial capacitance value of each capacitance detection unit, the current capacitance value of each capacitance detection unit is compared with the corresponding reference capacitance value to obtain the capacitance variation of each capacitance detection unit, and the liquid level information is generated according to the capacitance variation of each capacitance detection unit, so that the accuracy of capacitance detection is improved, the accuracy of liquid level detection is improved, and the liquid level detection method has good anti-interference performance on environment variation such as temperature drift, power supply jitter, PCB noise and the like, and is suitable for complex environments.
In order to achieve the above object, an embodiment of another aspect of the present invention provides a liquid level detecting device, including: a plurality of capacitance detection units; the control unit is used for detecting the current capacitance value of each capacitance detection unit, acquiring a current environment compensation value, acquiring the reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit, comparing the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to acquire the capacitance variation of each capacitance detection unit, and generating liquid level information according to the capacitance variation of each capacitance detection unit.
According to the liquid level detection device provided by the embodiment of the invention, the control unit acquires the current capacitance value of each capacitance detection unit, acquires the current environment compensation value, acquires the reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit, compares the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to acquire the capacitance variation of each capacitance detection unit, and generates liquid level information according to the capacitance variation of each capacitance detection unit, so that the accuracy of capacitance detection is improved, the accuracy of liquid level detection is improved, and the liquid level detection device has good anti-interference performance on environment variation such as temperature drift, power supply jitter, PCB noise and the like, and is suitable for complex environments.
Drawings
FIG. 1 is a flow chart of a method of liquid level detection according to an embodiment of the invention;
FIG. 2 is a flow chart of a method of liquid level detection according to one embodiment of the present invention;
FIG. 3 is a flow chart of a method of liquid level detection according to another embodiment of the invention;
FIG. 4 is a flow chart of a method of liquid level detection according to yet another embodiment of the invention;
FIG. 5 is a block schematic diagram of a liquid level detection device according to an embodiment of the invention;
FIG. 6 is a block schematic diagram of a fluid level detection apparatus according to one embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a liquid level detection device according to one embodiment of the present invention; and
FIG. 8 is a schematic view of the installation of a liquid level detection unit according to one embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
Hereinafter, a liquid level detection method and a liquid level detection apparatus according to an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a flow chart of a method of liquid level detection according to an embodiment of the invention. As shown in fig. 1, the liquid level detection method of the embodiment of the present invention includes the following steps:
s1: an initial capacitance value of each of the plurality of capacitance detecting units is acquired.
In one specific example of the present invention, the plurality of capacitive sensing units may be closely attached to the container, for example, by 3M glue, and it should be understood that the arrangement of the plurality of capacitive sensing units to the container is not limited to the attachment.
Further, the plurality of capacitance detecting units may be arranged in sequence in a rising direction of the liquid in the container, for example, the plurality of capacitance detecting units may be arranged in sequence in a vertical direction of a bottom of the container, and the number of capacitance detecting units covered by the liquid level may vary according to a variation of the liquid level.
In step S1, the initial capacitance value may be a capacitance value when the capacitance detection units are not covered by liquid, that is, when there is no liquid in the container, the initial capacitance value of each capacitance detection Unit may be stored in a Memory of the control Unit, for example, an EEPROM (Electrically Erasable programmable read-Only Memory) of an MCU (micro control Unit).
S2: the current capacitance value of each capacitance detection unit is detected.
Specifically, after the capacitance detection is started, the current capacitance value of each capacitance detection unit can be detected, and the current capacitance value can be the real-time capacitance value of the capacitance detection unit.
S3: and acquiring a current environment compensation value, and acquiring a reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit.
According to an embodiment of the present invention, as shown in fig. 2, the step S3 of obtaining the current environmental compensation value includes:
s31: and acquiring an initial compensation capacitance value of the capacitance compensation unit.
The initial compensation capacitance value of the capacitance compensation unit can be detected simultaneously with the initial capacitance value of each capacitance detection unit, and is stored in the memory of the control unit together with the initial capacitance value of each capacitance detection unit, that is, when the initial capacitance value of each capacitance detection unit is detected, the initial compensation capacitance value of the capacitance compensation unit is also detected.
In one embodiment of the present invention, the capacitance compensation unit may be disposed on the same PCB as the plurality of capacitance detection units. And, a plurality of capacitance detecting units are installed below the upper limit of the liquid level, and a capacitance compensating unit is installed above the upper limit of the liquid level, and more particularly, the capacitance compensating unit may be higher than the upper edge of the container.
S32: and detecting the current compensation capacitance value of the capacitance compensation unit.
The current compensation capacitance value of the capacitance compensation unit can be detected simultaneously with the current capacitance value of each capacitance detection unit, that is, when the current capacitance value of each capacitance detection unit is detected, the current compensation capacitance value of the capacitance compensation unit is also detected, and the current compensation capacitance value is the real-time capacitance value of the capacitance compensation unit.
S33: and calculating the ratio of the current compensation capacitance value to the initial compensation capacitance value to obtain a current environment compensation value.
That is, the current environment compensation value a is equal to the current compensation capacitance value Cb 1/the initial compensation capacitance value Cb 0.
It should be noted that, the capacitance compensation units may be one or more, and when there are a plurality of capacitance compensation units, the corresponding environment compensation values may be obtained according to the current compensation capacitance values and the initial compensation capacitance values of the capacitance compensation units, and then the average values of the environment compensation values corresponding to the plurality of capacitance compensation units are averaged, so that the average value of the environment compensation values corresponding to the plurality of capacitance compensation units is used as the current environment compensation value.
Further, according to an embodiment of the present invention, obtaining the reference capacitance value of each capacitance detection unit includes: and calculating the product of the initial capacitance value of each capacitance detection unit and the current environment compensation value to obtain the reference capacitance value of each capacitance detection unit.
Specifically, assuming that there are N capacitance detection units and the initial capacitance value of the ith capacitance detection unit is Ci0, the reference capacitance value Ci2 of the ith capacitance detection unit is the current environment compensation value a × the initial capacitance value Ci0 of the ith capacitance detection unit, where i is 1, 2, 3, … …, N and N is a positive integer.
S4: and comparing the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to obtain the capacitance variation of each capacitance detection unit, and generating liquid level information according to the capacitance variation of each capacitance detection unit.
That is, each capacitance detection unit is matched with an environment scale factor, namely, the current environment compensation value A, when the liquid level is judged each time, the initial capacitance value and the current environment compensation value A are operated to be used as a reference capacitance value, then the current capacitance value and the reference capacitance value are operated, and the change of the liquid level is judged according to the operated result.
Thus, the current environment compensation value a follows the change of the environment, such as temperature drift, power supply jitter, PCB noise, etc., in real time. The influence of liquid on the capacitance detection unit is fixed, and the influence of the environment on the capacitance detection unit can be inhibited by bringing the current environment compensation value A into the environment compensation value, so that the accuracy of capacitance detection is greatly improved, the accuracy of liquid level detection is improved, good anti-interference performance is realized on the change of the environment, and the capacitance detection device is suitable for being used in complex environments.
Specifically, according to an embodiment of the present invention, as shown in fig. 3, the step S4 of generating liquid level information according to the capacitance variation of each capacitance detection unit includes:
s41: and calculating the difference value between the current capacitance value of each capacitance detection unit and the corresponding reference capacitance value to obtain the capacitance variation of each capacitance detection unit.
S42: and judging whether the capacitance variation of each capacitance detection unit is larger than a corresponding preset variation threshold value.
S43: and acquiring liquid level information according to the capacitance detection unit with the capacitance variation larger than the corresponding preset variation threshold.
Specifically, assuming that N capacitance detection units are provided, the current capacitance value of the ith capacitance detection unit is Ci1, the reference capacitance value Ci2 of the ith capacitance detection unit, and the preset change threshold corresponding to the ith capacitance detection unit can be Vrefi, the capacitance change amount of the ith capacitance detection unit can be | Ci1-Ci2|, and then whether | Ci1-Ci2| is greater than Vrefi is judged, if | Ci1-Ci2| is greater than Vrefi, it is judged that the ith capacitance detection unit is covered by liquid, that is, the liquid level reaches the height of the ith capacitance detection unit; if the Ci1-Ci2 is smaller than or equal to Vrefi, the ith capacitance detection unit is judged not to be covered by liquid, namely the liquid level does not reach the height of the ith capacitance detection unit. Therefore, the change of the liquid level can be judged.
It should be understood that if the capacitance variation of each capacitance detection unit is less than or equal to the corresponding preset variation threshold, it indicates that there is no liquid in the container or the liquid level does not cover any capacitance detection unit.
The liquid level detection method according to the embodiment of the present invention is described below by taking 4 capacitance detection units and 1 capacitance compensation unit as an example, and the current environment compensation value a of the 4 capacitance detection units is calculated by the 1 capacitance compensation unit, and then the initial capacitance value is multiplied by the current environment compensation value a to obtain the reference capacitance value after environment compensation, and the liquid level change is determined by determining the variation of the current capacitance value of each capacitance detection unit with respect to the reference capacitance value. As shown in fig. 4, the liquid level detection method of the embodiment of the present invention includes the following steps:
s101: after power-on initialization.
S102: the capacitance values of the capacitance compensation units and each capacitance detection unit in the no-liquid state, namely the initial compensation capacitance value Cb0 of 1 capacitance compensation unit, and the initial capacitance values of 4 capacitance detection units are respectively C10, C20, C30 and C40, which are read from the built-in EEPROM.
S103: and starting capacitance detection, and detecting real-time capacitance values of the capacitance compensation units and each capacitance detection unit, namely the current compensation capacitance values Cb1 of 1 capacitance compensation unit, and the current capacitance values of 4 capacitance detection units are respectively C11, C21, C31 and C41.
S104: and calculating the current environment compensation value A ═ Cb1/Cb 0.
S105: the current environment compensation value a is substituted into the initial capacitance values of the capacitance detection units to obtain the reference capacitance values of the capacitance detection units, i.e., the reference capacitance values of the 4 capacitance detection units are respectively C12-a × C10, C22-a × C20, C32-a × C30, and C42-a × C40.
S106: calculating the capacitance variation of each capacitance detection unit, namely the capacitance variations of the 4 capacitance detection units are respectively as follows: d1 ═ C11-C12|, D2 ═ C21-C22|, D3 ═ C31-C32|, D4 ═ C41-C42 |.
S107: whether the capacitance variation amount of each capacitance detection unit is larger than a corresponding preset variation threshold value is judged, namely whether D1 is larger than Vref1 or D2 is larger than Vref2 or D3 is larger than Vref3 or D4 is larger than Vref 4.
If yes, go to step S108; if not, the process returns to step S103, which indicates that there is no liquid covering.
S108: and outputting the liquid level information and returning to the step S103.
Specifically, if D4> Vref4, it is determined that the capacitive sensing cell corresponding to C41 is covered by liquid, and the liquid level reaches the height of the capacitive sensing cell corresponding to C41, and the determination manners of D1, D2, and D3 are the same.
If the capacitance detection unit corresponding to C41 is located at the bottom of the container, the capacitance detection unit corresponding to C31 is located above the capacitance detection unit corresponding to C41, the capacitance detection unit corresponding to C21 is located above the capacitance detection unit corresponding to C31, and the capacitance detection unit corresponding to C11 is located above the capacitance detection unit corresponding to C31, it may be determined whether D1 is greater than Vref1, if D1 is greater than Vref1, it is determined that the liquid level covers the capacitance detection unit corresponding to C11, at this time, the position where the capacitance detection unit corresponding to C11 is located is the liquid level of the liquid, if D1 is less than or equal to Vref1, it is determined that the liquid level does not cover the capacitance detection unit corresponding to C11, and then it is determined whether D2 is greater than Vref 2; if D2 is greater than Vref2, the liquid level already covers the capacitance detection unit corresponding to C21, at this time, the position where the capacitance detection unit corresponding to C21 is located is the liquid level of the liquid, if D2 is less than or equal to Vref2, the liquid level does not cover the capacitance detection unit corresponding to C21, and whether D3 is greater than Vref3 is further judged; if D3 is greater than Vref3, the liquid level already covers the capacitance detection unit corresponding to C31, at this time, the position where the capacitance detection unit corresponding to C31 is located is the liquid level of the liquid, if D3 is less than or equal to Vref3, the liquid level does not cover the capacitance detection unit corresponding to C31, and then whether D4 is greater than Vref4 is judged; if D4 is greater than Vref4, it indicates that the liquid level has covered the capacitance detection unit corresponding to C41, and at this time, the position where the capacitance detection unit corresponding to C41 is located is the liquid level of the liquid, and if D4 is less than or equal to Vref4, it indicates that the liquid level does not cover the capacitance detection unit corresponding to C41, and it indicates that no liquid or little liquid cannot be detected.
In summary, according to the liquid level detection method provided by the embodiment of the invention, the current capacitance value of each capacitance detection unit is detected, the current environment compensation value is obtained, the reference capacitance value of each capacitance detection unit is obtained according to the current environment compensation value and the initial capacitance value of each capacitance detection unit, the current capacitance value of each capacitance detection unit is compared with the corresponding reference capacitance value to obtain the capacitance variation of each capacitance detection unit, and the liquid level information is generated according to the capacitance variation of each capacitance detection unit, so that the accuracy of capacitance detection is improved, the accuracy of liquid level detection is improved, and the liquid level detection method has good anti-interference performance on environmental changes such as temperature drift, power jitter, PCB noise and the like, and is applicable to complex environments.
FIG. 5 is a block schematic diagram of a liquid detection device according to an embodiment of the invention. As shown in fig. 5, the liquid detection apparatus includes a plurality of capacitance detection units 100 and a control unit 200.
The control unit 200 is configured to obtain a current capacitance value of each capacitance detection unit, obtain a current environmental compensation value, obtain a reference capacitance value of each capacitance detection unit according to the current environmental compensation value and an initial capacitance value of each capacitance detection unit, compare the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to obtain a capacitance variation of each capacitance detection unit, and generate liquid level information according to the capacitance variation of each capacitance detection unit.
It should be noted that the initial capacitance value may be a capacitance value when the capacitance detection units are not covered by liquid, that is, when there is no liquid in the container, the initial capacitance value of each capacitance detection Unit may be stored in a Memory of the control Unit in advance, for example, an EEPROM (Electrically Erasable programmable read-Only Memory) of an MCU (micro control Unit, microprocessor), after power-on initialization, the control Unit 200 may read the initial capacitance value of each capacitance detection Unit from the Memory, and after the capacitance detection is started, the control Unit 200 may obtain a current capacitance value of each capacitance detection Unit, where the current capacitance value may be a real-time capacitance value of the capacitance detection Unit.
That is, each capacitance detection unit is matched with an environmental scale factor, i.e., the current environmental compensation value a, and when the liquid level is determined each time, the control unit 200 calculates the initial capacitance value and the current environmental compensation value a as the reference capacitance value, then calculates the current capacitance value and the reference capacitance value, and determines the change of the liquid level according to the calculated result.
Thus, the current environment compensation value a follows the change of the environment, such as temperature drift, power supply jitter, PCB noise, etc., in real time. The influence of liquid on the capacitance detection unit is fixed, and the influence of the environment on the capacitance detection unit can be inhibited by bringing the current environment compensation value A into the environment compensation value, so that the accuracy of capacitance detection is greatly improved, the accuracy of liquid level detection is improved, good anti-interference performance is realized on the change of the environment, and the capacitance detection device is suitable for being used in complex environments.
According to an embodiment of the present invention, as shown in fig. 6, the liquid level detecting apparatus further includes a capacitance compensation unit 300, the capacitance compensation unit 300 is connected to the control unit 200, and the control unit 200 is configured to obtain an initial compensation capacitance value of the capacitance compensation unit 300, obtain a current compensation capacitance value of the capacitance compensation unit 300, and calculate a ratio between the current compensation capacitance value and the initial compensation capacitance value to obtain a current environment compensation value. That is, the current environment compensation value a is equal to the current compensation capacitance value Cb 1/the initial compensation capacitance value Cb 0.
The initial compensation capacitance value of the capacitance compensation unit 300 can be detected simultaneously with the initial capacitance value of each capacitance detection unit, and is stored in the memory of the control unit 200 together with the initial capacitance value of each capacitance detection unit, that is, the control unit 200 obtains the initial compensation capacitance value of the capacitance compensation unit 300 when obtaining the initial capacitance value of each capacitance detection unit. Moreover, the current compensation capacitance value of the capacitance compensation unit 300 can be detected simultaneously with the current capacitance value of each capacitance detection unit, that is, the control unit 200 further obtains the current compensation capacitance value of the capacitance compensation unit 300 when obtaining the current capacitance value of each capacitance detection unit, where the current compensation capacitance value is the real-time capacitance value of the capacitance compensation unit 300.
It should be noted that, the capacitance compensation unit 300 may be one or more, and when there are a plurality of capacitance compensation units 300, the corresponding environment compensation values may be obtained according to the current compensation capacitance value and the initial compensation capacitance value of the capacitance compensation unit 300, and then the environment compensation values corresponding to the plurality of capacitance compensation units 300 are averaged, so as to use the average value of the environment compensation values corresponding to the plurality of capacitance compensation units 300 as the current environment compensation value.
Further, according to an embodiment of the present invention, the control unit 200 obtains the reference capacitance value of each capacitive detection unit by calculating a product between the initial capacitance value of each capacitive detection unit and the current environmental compensation value.
Specifically, assuming that there are N capacitance detection units and the initial capacitance value of the ith capacitance detection unit is Ci0, the reference capacitance value Ci2 of the ith capacitance detection unit is the current environment compensation value a × the initial capacitance value Ci0 of the ith capacitance detection unit, where i is 1, 2, 3, … …, N and N is a positive integer.
In one specific example of the present invention, the plurality of capacitive sensing units 100 may be closely attached to the container, for example, by 3M glue, and it should be understood that the arrangement of the plurality of capacitive sensing units 100 to the container is not limited to the attaching manner.
Also, as shown in fig. 7 and 8, a plurality of capacitive sensing units 100 may be sequentially arranged in a rising direction of the liquid in the container (arrow direction in fig. 7), for example, a plurality of capacitive sensing units 100 may be sequentially arranged in a vertical direction of the bottom of the container, and the number of capacitive sensing units covered by the liquid level may vary according to the liquid level.
In one embodiment of the present invention, as shown in fig. 7, a plurality of capacitance detecting units 100, capacitance compensating units 300, and control units 200 are disposed on the same PCB 400. Also, as shown in fig. 8, a plurality of capacitance detecting units 200 are installed below the upper limit of the liquid level, and a capacitance compensating unit 300 is installed above the upper limit of the liquid level, and more particularly, the capacitance compensating unit 300 may be higher than the upper edge of the container 600.
In addition, as shown in fig. 6, a plurality of capacitance detecting units 100 and capacitance compensating units 300 may be disposed on the front surface of the PCB 400, and the control unit 200 may be disposed on the rear surface of the PCB 400. The PCB 400 may be connected to a power board through a bus cable 500.
Specifically, according to an embodiment of the present invention, the control unit 200 is further configured to calculate a difference value between the current capacitance value of each capacitance detection unit and the corresponding reference capacitance value to obtain a capacitance variation of each capacitance detection unit, determine whether the capacitance variation of each capacitance detection unit is greater than a corresponding preset variation threshold, and obtain the liquid level information according to the capacitance detection unit whose capacitance variation is greater than the corresponding preset variation threshold.
Specifically, assuming that N capacitance detection units are provided, the current capacitance value of the ith capacitance detection unit is Ci1, the reference capacitance value Ci2 of the ith capacitance detection unit, and the preset change threshold corresponding to the ith capacitance detection unit can be Vrefi, then the capacitance change amount of the ith capacitance detection unit can be | Ci1-Ci2|, then the control unit 200 determines whether | Ci1-Ci2| is greater than Vrefi, if | Ci1-Ci2| is greater than Vrefi, it is determined that the ith capacitance detection unit is covered by liquid, that is, the liquid level reaches the height of the ith capacitance detection unit; if the Ci1-Ci2 is smaller than or equal to Vrefi, the ith capacitance detection unit is judged not to be covered by liquid, namely the liquid level does not reach the height of the ith capacitance detection unit. Thus, the control unit 200 can determine the change of the liquid level.
It should be understood that if the capacitance variation of each capacitance detection unit is less than or equal to the corresponding preset variation threshold, it indicates that there is no liquid in the container or the liquid level does not cover any capacitance detection unit.
The following describes an embodiment of the present invention by taking 4 capacitance detection units and 1 capacitance compensation unit as an example, wherein 1 capacitance compensation unit calculates a current environmental compensation value a of the 4 capacitance detection units, then multiplies the initial capacitance value by the current environmental compensation value a to obtain a reference capacitance value after environmental compensation, and determines a liquid level change by determining a variation amount of the current capacitance value of each capacitance detection unit with respect to the reference capacitance value. As shown in fig. 7, the 4 capacitance detection units may be a capacitance detection unit 102, a capacitance detection unit 103, a capacitance detection unit 104, and a capacitance detection unit 105, respectively.
The working process of the liquid level detection device provided by the embodiment of the invention is as follows:
after power-on initialization, the control unit 200 reads the initial compensation capacitance Cb0 of the capacitance compensation unit 300 in the no-liquid state and the initial capacitance C10, C20, C30 and C40 corresponding to the 4 capacitance detection units 102, 103, 104 and 105, respectively, from the built-in EEPROM.
After the capacitance detection is started, the control unit 200 obtains the current compensation capacitance Cb1 of the capacitance compensation unit 300 and the current capacitance C11, C21, C31, and C41 corresponding to the 4 capacitance detection units 102, 103, 104, and 105, respectively.
The control unit 200 calculates the current environmental compensation value a — Cb1/Cb0 again, and brings the current environmental compensation value a into the initial capacitance value of the capacitance detection unit to obtain the reference capacitance value of the capacitance detection unit, that is, the 4 capacitance detection units 102, 103, 104, and 105 are C12 — a × C10, C22 — a × C20, C32 — a × C30, and C42 — a × C40, respectively.
The control unit 200 further calculates the capacitance change amount of each capacitance detection unit, that is, the capacitance change amounts of the 4 capacitance detection units 102, 103, 104, and 105 are respectively: d1 ═ C11-C12|, D2 ═ C21-C22|, D3 ═ C31-C32|, D4 ═ C41-C42|, and determine whether the capacitance variation amount of each capacitance detection unit is greater than the corresponding preset variation threshold, that is, determine whether D1 is greater than Vref1 or D2 is greater than Vref2 or D3 is greater than Vref3 or D4 is greater than Vref4, and output liquid level information according to the determination result, wherein if D4> Vref4, it is determined that the capacitance detection unit 105 corresponding to C41 is covered by liquid, the liquid level reaches the height of the capacitance detection unit 105, and the determination manners of D1, D2, and D3 are the same.
As shown in fig. 7, assuming that the capacitance detection unit 105 corresponding to C41 is located at the bottom of the container, the capacitance detection unit 104 corresponding to C31 is located above the capacitance detection unit 105 corresponding to C41, the capacitance detection unit 103 corresponding to C21 is located above the capacitance detection unit 104 corresponding to C31, and the capacitance detection unit 102 corresponding to C11 is located above the capacitance detection unit 103 corresponding to C21, the control unit 200 may first determine whether D1 is greater than Vref1, if D1 is greater than Vref1, it indicates that the liquid level covers the capacitance detection unit 102 corresponding to C11, at this time, the position of the capacitance detection unit 102 corresponding to C11 is the liquid level of the liquid, if D1 is less than or equal to Vref1, it indicates that the liquid level does not cover the capacitance detection unit 102 corresponding to C11, and then determines whether D2 is greater than Vref 2; if D2 is greater than Vref2, it indicates that the liquid level has covered the capacitance detection unit 103 corresponding to C21, and at this time, the position where the capacitance detection unit 103 corresponding to C21 is located is the liquid level of the liquid, and if D2 is less than or equal to Vref2, it indicates that the liquid level does not cover the capacitance detection unit 103 corresponding to C21, and further determines whether D3 is greater than Vref 3; if D3 is greater than Vref3, it indicates that the liquid level has covered the capacitance detection unit 104 corresponding to C31, and at this time, the position where the capacitance detection unit 104 corresponding to C31 is located is the liquid level of the liquid, and if D3 is less than or equal to Vref3, it indicates that the liquid level does not cover the capacitance detection unit 104 corresponding to C31, and then it is determined whether D4 is greater than Vref 4; if D4 is greater than Vref4, it indicates that the liquid level covers the capacitive detection unit 105 corresponding to C41, and at this time, the position where the capacitive detection unit 105 corresponding to C41 is located is the liquid level of the liquid, and if D4 is less than or equal to Vref4, it indicates that the liquid level does not cover the capacitive detection unit 105 corresponding to C41, and it indicates that no liquid or little liquid cannot be detected.
In summary, according to the liquid level detection apparatus provided in the embodiment of the present invention, the control unit obtains the current capacitance value of each capacitance detection unit, obtains the current environment compensation value, obtains the reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit, compares the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to obtain the capacitance variation of each capacitance detection unit, and generates the liquid level information according to the capacitance variation of each capacitance detection unit, so that the accuracy of capacitance detection is improved, the accuracy of liquid level detection is further improved, and the liquid level detection apparatus has good anti-interference performance on environmental changes such as temperature drift, power jitter, PCB noise, and the like, and is applicable to a complex environment.
In the description of the present invention, it is to be understood that the terms "central," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," and the like are used in the orientations and positional relationships indicated in the drawings for convenience in describing the invention and to simplify the description, and are not intended to indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and are therefore not to be considered limiting of the invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (6)

1. A liquid level detection method is characterized by comprising the following steps:
acquiring an initial capacitance value of each capacitance detection unit in a plurality of capacitance detection units;
detecting the current capacitance value of each capacitance detection unit;
acquiring a current environment compensation value, and acquiring a reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit;
comparing the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to obtain the capacitance variation of each capacitance detection unit, and generating liquid level information according to the capacitance variation of each capacitance detection unit;
wherein the obtaining the current environmental compensation value comprises:
acquiring an initial compensation capacitance value of a capacitance compensation unit;
detecting a current compensation capacitance value of the capacitance compensation unit;
calculating the ratio of the current compensation capacitance value to the initial compensation capacitance value to obtain a current environment compensation value;
wherein the obtaining the reference capacitance value of each capacitance detection unit includes:
and calculating the product of the initial capacitance value of each capacitance detection unit and the current environment compensation value to obtain the reference capacitance value of each capacitance detection unit.
2. The liquid level detection method according to claim 1, wherein the generating liquid level information according to the capacitance variation of each capacitance detection unit comprises:
calculating a difference value between the current capacitance value of each capacitance detection unit and the corresponding reference capacitance value to obtain a capacitance variation of each capacitance detection unit;
judging whether the capacitance variation of each capacitance detection unit is larger than a corresponding preset variation threshold value or not;
and acquiring the liquid level information according to the capacitance detection unit with the capacitance variation larger than the corresponding preset variation threshold value.
3. A liquid level detection device, comprising:
a plurality of capacitance detection units;
the control unit is used for detecting the current capacitance value of each capacitance detection unit, acquiring a current environment compensation value, acquiring a reference capacitance value of each capacitance detection unit according to the current environment compensation value and the initial capacitance value of each capacitance detection unit, comparing the current capacitance value of each capacitance detection unit with the corresponding reference capacitance value to acquire the capacitance variation of each capacitance detection unit, and generating liquid level information according to the capacitance variation of each capacitance detection unit;
the liquid level detection device further comprises a capacitance compensation unit, the capacitance compensation unit is connected with the control unit, and the control unit is used for acquiring an initial compensation capacitance value of the capacitance compensation unit, acquiring a current compensation capacitance value of the capacitance compensation unit, and calculating a ratio between the current compensation capacitance value and the initial compensation capacitance value to acquire a current environment compensation value;
the control unit obtains a reference capacitance value of each capacitance detection unit by calculating a product between an initial capacitance value of each capacitance detection unit and the current environment compensation value.
4. The liquid level detecting apparatus according to claim 3, wherein the control unit is further configured to calculate a difference between the current capacitance value of each capacitance detecting unit and the corresponding reference capacitance value to obtain a capacitance variation of each capacitance detecting unit, determine whether the capacitance variation of each capacitance detecting unit is greater than a corresponding preset variation threshold, and obtain the liquid level information according to the capacitance detecting unit whose capacitance variation is greater than the corresponding preset variation threshold.
5. The fluid level detection apparatus of claim 3, wherein the plurality of capacitive detection units are mounted below an upper fluid level limit and the capacitive compensation unit is mounted above the upper fluid level limit.
6. A liquid level detection apparatus according to claim 3, wherein the plurality of capacitive detection units, the capacitive compensation unit and the control unit are provided on the same PCB.
CN201610619619.XA 2016-07-29 2016-07-29 Liquid level detection method and liquid level detection device Active CN107664527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610619619.XA CN107664527B (en) 2016-07-29 2016-07-29 Liquid level detection method and liquid level detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610619619.XA CN107664527B (en) 2016-07-29 2016-07-29 Liquid level detection method and liquid level detection device

Publications (2)

Publication Number Publication Date
CN107664527A CN107664527A (en) 2018-02-06
CN107664527B true CN107664527B (en) 2020-02-21

Family

ID=61121881

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610619619.XA Active CN107664527B (en) 2016-07-29 2016-07-29 Liquid level detection method and liquid level detection device

Country Status (1)

Country Link
CN (1) CN107664527B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110361070A (en) * 2019-07-19 2019-10-22 中国航发沈阳发动机研究所 A kind of lubricating oil liquid level scaling method and lubricating oil liquid level determining approach
CN110812598A (en) * 2019-11-20 2020-02-21 周刚 Capacitance type infusion allowance calculation and alarm method with temperature self-calibration function
CN113029287B (en) * 2021-02-04 2024-02-02 惠州拓邦电气技术有限公司 Water level detection method of coffee machine and coffee machine

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1889015A4 (en) * 2005-06-08 2014-06-11 Lumenite Control Technology Inc Self-calibrating liquid level transmitter
CN101430218A (en) * 2008-12-06 2009-05-13 俞险峰 Non-contact type capacitance induction level sensor
CN103776511B (en) * 2014-02-07 2017-01-11 深圳芯邦科技股份有限公司 Level information monitoring method, device and system
CN104535135B (en) * 2015-01-22 2018-11-09 上海飞科电器股份有限公司 Non-contact type liquid level detecting device and method

Also Published As

Publication number Publication date
CN107664527A (en) 2018-02-06

Similar Documents

Publication Publication Date Title
CN107664527B (en) Liquid level detection method and liquid level detection device
US8590375B2 (en) Self-calibrating capacitive liquid level sensor assembly and method
RU2341780C1 (en) Method of adjusting measuring device for capacitive measurement of level of medium and measuring device (versions)
CN107621279B (en) Data processing method, sensor data calibration method and device
CN210863662U (en) Formaldehyde concentration detection device and air purifier
CN105705914A (en) Precision scale having a removable air-conditioning module
CN107121656A (en) A kind of power supply automatic calibrating method and device
CN110553758A (en) temperature detection device and method
CN113330326B (en) Apparatus and method for calibrating a multiple-input multiple-output radar sensor
JP2016534331A (en) Method and apparatus for detecting the rotation angle of an object about a rotation axis
CN107228699B (en) Liquid-level detecting method and liquid level detection device
CN109560803B (en) Proximity sensor
US20120291541A1 (en) Digital field-induction water-level intelligent sensing system and its implementation method
JP2021508817A (en) Shunt resistor current value correction system and method
EP3109604B1 (en) Integrated active fuel characteristic sensor
CN107796482B (en) Liquid level detection method and liquid level detection device
EP3364167B1 (en) Sensor device
CN103206312A (en) Method And Device For Ascertaining A State Of A Sensor
CN115824048A (en) Spectrum confocal sensor calibration method, system, equipment and readable storage medium
US20110185808A1 (en) Capacitive fill level sensor and method for estimating a fill level
JP6498709B2 (en) Detection apparatus and substance detection method
EP3370074B1 (en) Method for detecting background noise of sensor, and device thereof
CN110530544A (en) A kind of temperature correction method and system
TWI442050B (en) Contact object water content sensing device, sensing method and computer program products
CN109696257B (en) Electromagnetic heating cooking utensil and temperature measuring method and device thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210202

Address after: 518119 No.1 Yan'an Road, Kuiyong street, Dapeng New District, Shenzhen City, Guangdong Province

Patentee after: BYD Semiconductor Co.,Ltd.

Address before: 518118 BYD Road, Pingshan New District, Shenzhen, Guangdong 3009

Patentee before: BYD Co.,Ltd.