CN107664527A - Liquid-level detecting method and liquid level detection device - Google Patents
Liquid-level detecting method and liquid level detection device Download PDFInfo
- Publication number
- CN107664527A CN107664527A CN201610619619.XA CN201610619619A CN107664527A CN 107664527 A CN107664527 A CN 107664527A CN 201610619619 A CN201610619619 A CN 201610619619A CN 107664527 A CN107664527 A CN 107664527A
- Authority
- CN
- China
- Prior art keywords
- capacitance
- detection unit
- value
- capacitance detection
- unit
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01F—MEASURING VOLUME, VOLUME FLOW, MASS FLOW OR LIQUID LEVEL; METERING BY VOLUME
- G01F23/00—Indicating 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/22—Indicating 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/26—Indicating 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/263—Indicating 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
Abstract
The invention discloses a kind of liquid-level detecting method and liquid level detection device, the described method comprises the following steps:Obtain the initial capacitance value of each capacitance detection unit in multiple capacitance detection units;Detect the capacitance present value of each capacitance detection unit;Current environment offset is obtained, and the reference capacitance value of each capacitance detection unit is obtained according to the initial capacitance value of the current environment offset and each capacitance detection unit;By the capacitance present value of each capacitance detection unit to obtain the capacitance change of each capacitance detection unit with corresponding reference capacitance value compared with, and liquid level information is generated according to the capacitance change of each capacitance detection unit, so as to, improve the accuracy of capacitance detecting, and then improve the accuracy of level sensing, and the change to environment has good anti-interference such as temperature drift, power jitter, PCB noises, is applicable to complex environment.
Description
Technical field
The present invention relates to observation and control technology field, more particularly to a kind of liquid-level detecting method and a kind of liquid level detection device.
Background technology
Correlation technique proposes a kind of capacitive liquid level survey meter of intelligence, and the program is by capacitive frequency change-over circuit by electricity
Hold change and be converted to frequency change, then CPU changes according to frequency and calculates liquid level by software formula, so as to
Measurement liquid level indirectly.
But correlation technique the problem of existing is, between electric capacity during by comparing no liquid and electric capacity when having liquid
Difference judge liquid level, electric capacity during because of no liquid is a fixed reference, thus fixed reference not in time with
When the change of upper environment such as environment does temperature rise, it is easy to cause difference mistake, cause liquid level judgment disturbance.
The content of the invention
It is contemplated that at least solves one of technical problem in correlation technique to a certain extent.Therefore, the present invention
One purpose is to propose a kind of liquid-level detecting method, this method can the change of accurate judgement liquid level, effectively suppress environment to liquid
The interference of position detection.
It is another object of the present invention to propose a kind of liquid level detection device.
To reach above-mentioned purpose, one aspect of the present invention embodiment proposes a kind of liquid-level detecting method, comprised the following steps:
Obtain the initial capacitance value of each capacitance detection unit in multiple capacitance detection units;Detect each capacitance detection unit
Capacitance present value;Current environment offset is obtained, and according to the current environment offset and each capacitance detection unit
Initial capacitance value obtain the reference capacitance value of each capacitance detection unit;By the current of each capacitance detection unit
Capacitance compared with corresponding reference capacitance value to obtain the capacitance change of each capacitance detection unit, and according to
The capacitance change generation liquid level information of each capacitance detection unit.
The liquid-level detecting method proposed according to embodiments of the present invention, the capacitance present value of each capacitance detection unit is detected,
And current environment offset is obtained, then obtained according to the initial capacitance value of current environment offset and each capacitance detection unit
The reference capacitance value of each capacitance detection unit, then by the capacitance present value of each capacitance detection unit and corresponding reference capacitance
Value is compared to obtain the capacitance change of each capacitance detection unit, and according to the capacitance variations of each capacitance detection unit
Amount generation liquid level information, so as to, the accuracy of capacitance detecting is improved, and then the accuracy of level sensing is improved, and it is right
The change of environment has good anti-interference such as temperature drift, power jitter, PCB noises, is applicable to complex environment.
To reach above-mentioned purpose, another aspect of the present invention embodiment proposes a kind of liquid level detection device, including:Multiple electricity
Hold detection unit;Control unit, described control unit are respectively connected with the multiple capacitance detection unit, and described control unit is used
In the capacitance present value of each capacitance detection unit of detection, and current environment offset is obtained, while according to the current environment
The initial capacitance value of offset and each capacitance detection unit obtains the reference capacitance value of each capacitance detection unit, and
By the capacitance present value of each capacitance detection unit with corresponding reference capacitance value compared with it is described each electric to obtain
Hold the capacitance change of detection unit, and liquid level information is generated according to the capacitance change of each capacitance detection unit.
The liquid level detection device proposed according to embodiments of the present invention, control unit obtain the current of each capacitance detection unit
Capacitance, and current environment offset is obtained, then according to current environment offset and the initial electricity of each capacitance detection unit
Capacitance obtains the reference capacitance value of each capacitance detection unit, then by the capacitance present value of each capacitance detection unit with it is corresponding
Reference capacitance value is compared to obtain the capacitance change of each capacitance detection unit, and according to each capacitance detection unit
Capacitance change generates liquid level information, so as to improve the accuracy of capacitance detecting, and then improve the accurate of level sensing
Property, and the change to environment has good anti-interference such as temperature drift, power jitter, PCB noises, is applicable to complicated ring
Border.
Brief description of the drawings
Fig. 1 is the flow chart of liquid-level detecting method according to embodiments of the present invention;
Fig. 2 is the flow chart of liquid-level detecting method according to an embodiment of the invention;
Fig. 3 is the flow chart of liquid-level detecting method in accordance with another embodiment of the present invention;
Fig. 4 is the flow chart according to the liquid-level detecting method of another embodiment of the invention;
Fig. 5 is the block diagram of liquid level detection device according to embodiments of the present invention;
Fig. 6 is the block diagram of liquid level detection device according to an embodiment of the invention;
Fig. 7 is the structural representation of liquid level detection device according to an embodiment of the invention;And
Fig. 8 is the scheme of installation of liquid level detection device according to an embodiment of the invention.
Embodiment
Embodiments of the invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning to end
Same or similar label represents same or similar element or the element with same or like function.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to for explaining the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings come describe the embodiment of the present invention proposition liquid-level detecting method and liquid level detection device.
Fig. 1 is the flow chart of liquid-level detecting method according to embodiments of the present invention.As shown in figure 1, the embodiment of the present invention
Liquid-level detecting method comprises the following steps:
S1:Obtain the initial capacitance value of each capacitance detection unit in multiple capacitance detection units.
In the specific example of the present invention, multiple capacitance detection units can be brought into close contact with container, such as pass through 3M
Glue, it should be appreciated that the set-up mode of multiple capacitance detection units and container is not limited to laminating type.
Also, multiple capacitance detection units can be arranged in order according to ascent direction of the liquid in container, such as multiple electricity
Holding detection unit can be arranged in order in the vertical direction of the bottom of container, will by the quantity of the capacitance detection unit of liquid level covering
Change with the change of liquid level.
In step sl, initial capacitance value can not be covered with the liquid the electricity i.e. in container during no liquid for capacitance detection unit
Capacitance, the initial capacitance value of each capacitance detection unit can be stored in advance in the memory of control unit, such as MCU
EEPROM ((the Electrically Erasable Programmable of (MicroControl Unit, microprocessor)
Read-Only Memory, EEPROM) in.After power-up initializing, it can be read from memory each
The initial capacitance value of capacitance detection unit.
S2:Detect the capacitance present value of each capacitance detection unit.
Specifically, after start-up capacitance detection, the capacitance present value of each capacitance detection unit, capacitance present be can detect
Value can be the real-time capacitance of capacitance detection unit.
S3:Current environment offset is obtained, and according to current environment offset and the initial electricity of each capacitance detection unit
Capacitance obtains the reference capacitance value of each capacitance detection unit.
According to one embodiment of present invention, as shown in Fig. 2 it is that step S3 includes to obtain current environment offset:
S31:Obtain the initial compensation capacitance of capacitance compensation unit.
Wherein, the initial compensation capacitance of capacitance compensation unit can be with the initial capacitance value of each capacitance detection unit simultaneously
Detection, and be together stored in the initial capacitance value of each capacitance detection unit the memory of control unit, that is, say, it is every in detection
During the initial capacitance value of individual capacitance detection unit, the initial compensation capacitance of capacitance compensation unit is also detected.
In one embodiment of the invention, capacitance compensation unit can be arranged on same with multiple capacitance detection units
On PCB printed circuit board (PCB)s.Also, multiple capacitance detection units are arranged on the lower section of the liquid level upper limit, and capacitance compensation unit is installed
In the top of the liquid level upper limit, more specifically, capacitance compensation unit can be higher than edge on container.
S32:Detect the current compensating electric capacity value of capacitance compensation unit.
Wherein, the current compensating electric capacity value of capacitance compensation unit can be with the capacitance present value of each capacitance detection unit simultaneously
Detection, that is, say, when detecting the capacitance present value of each capacitance detection unit, that also detects capacitance compensation unit works as precompensation electricity
Capacitance, current compensating electric capacity value are the real-time capacitance of capacitance compensation unit.
S33:The ratio between current compensating electric capacity value and initial compensation capacitance is calculated to obtain current environment offset.
That is, the current compensating electric capacity value Cb1/ initial compensations capacitance Cb0 of current environment offset A=.
It should be noted that capacitance compensation unit can be one or more, can basis when capacitance compensation unit is multiple
Ambient compensation value corresponding to current compensating electric capacity value and initial compensation the capacitance acquisition of capacitance compensation unit, then to multiple electricity
Hold ambient compensation value corresponding to compensating unit and carry out average value processing, by ambient compensation value corresponding to multiple capacitance compensation units
Average value as current environment offset.
Further, according to one embodiment of present invention, the reference capacitance value of each capacitance detection unit is obtained, is wrapped
Include:Calculate the product between the initial capacitance value of each capacitance detection unit and current environment offset and examined with obtaining each electric capacity
Survey the reference capacitance value of unit.
Specifically, it is assumed that capacitance detection unit is N number of, and the initial capacitance value of i-th of capacitance detection unit is Ci0, that
The capacitance detection unit of the reference capacitance value Ci2=current environment offsets A of i-th of capacitance detection unit × i-th it is initial
Capacitance Ci0, wherein, i=1,2,3 ..., N, N be positive integer.
S4:By the capacitance present value of each capacitance detection unit compared with corresponding reference capacitance value it is each to obtain
The capacitance change of capacitance detection unit, and liquid level information is generated according to the capacitance change of each capacitance detection unit.
That is, it is current environment offset A to match an environment scale factor to each capacitance detection unit, every
During secondary judgement liquid level, initial capacitance value and current environment offset A are done computing as reference capacitance value, then capacitance present value
Computing is carried out with the reference capacitance value, and the change of liquid level is judged according to the result after computing.
Thus, current environment offset A follows the change of environment, such as temperature drift, power jitter, PCB noises etc. in real time.Liquid
Influence of the body for capacitance detection unit is fixed, and influence of the environment to capacitance detection unit, by bringing current environment into
Offset A can suppress, and so as to substantially increase the accuracy of capacitance detecting, improve the accuracy of level sensing, and to ring
The change in border has good anti-interference, is adapted to use in complex environment.
Specifically, according to one embodiment of present invention, as shown in figure 3, being become according to the electric capacity of each capacitance detection unit
Change amount generation liquid level information is step S4, including:
S41:The difference between the capacitance present value of each capacitance detection unit and corresponding reference capacitance value is calculated to obtain
Take the capacitance change of each capacitance detection unit.
S42:Judge whether the capacitance change of each capacitance detection unit is more than default change threshold accordingly.
S43:The capacitance detection unit for being more than corresponding default change threshold according to capacitance change obtains liquid level information.
Specifically, it is assumed that for capacitance detection unit to be N number of, the capacitance present value of i-th of capacitance detection unit is Ci1, i-th
The reference capacitance value Ci2 of individual capacitance detection unit, default change threshold corresponding to i-th of capacitance detection unit can be Vrefi, that
The capacitance change of i-th of capacitance detection unit can be | Ci1-Ci2 |, then judge | Ci1-Ci2 | whether more than Vrefi,
If | Ci1-Ci2 | more than Vrefi, judge that i-th of capacitance detection unit is covered with the liquid, i.e., liquid level reaches i-th of electric capacity
Height where detection unit;If | Ci1-Ci2 | less than or equal to Vrefi, judge i-th of capacitance detection unit not by liquid
Body covers, i.e., the height that liquid level is not up to where i-th of capacitance detection unit.Thus, you can judge the change of liquid level.
It should be appreciated that if the capacitance change of each capacitance detection unit is respectively less than or equal to corresponding default change
Change threshold value, then illustrate that no liquid in container, or liquid level do not cover any one capacitance detection unit.
The inspection of the liquid level of the embodiment of the present invention is described by taking 4 capacitance detection units and 1 capacitance compensation unit as an example below
Survey method, the current environment offset A of 4 capacitance detection units is calculated by 1 capacitance compensation unit, then initial capacitance
Value is multiplied by current environment offset A to obtain the reference capacitance value after ambient compensation, by judging each capacitance detection unit
Capacitance present value judges that liquid level changes with respect to the variable quantity of reference capacitance value.As shown in figure 4, the liquid level inspection of the embodiment of the present invention
Survey method comprises the following steps:
S101:After power-up initializing.
S102:Capacitance compensation unit and each capacitance detection unit under no liquid state are read in built-in EEPROM
Capacitance, i.e., the initial compensation capacitance Cb0 of 1 capacitance compensation unit, the initial capacitance value of 4 capacitance detection units are respectively
C10, C20, C30 and C40.
S103:Start-up capacitance detects, the real-time capacitance of detection capacitance compensation unit and each capacitance detection unit, i.e., and 1
The current compensating electric capacity value Cb1 of individual capacitance compensation unit, the capacitance present values of 4 capacitance detection units be respectively C11, C21,
C31、C41。
S104:Calculate current environment offset A=Cb1/Cb0.
S105:Current environment offset A is brought into the initial capacitance value of capacitance detection unit to obtain capacitance detection unit
Reference capacitance value, i.e., the reference capacitance value of 4 capacitance detection units is respectively C12=A × C10, C22=A × C20, C32=
A × C30, C42=A × C40.
S106:Calculate the capacitance change of each capacitance detection unit, i.e., the capacitance change point of 4 capacitance detection units
It is not:D1=| C11-C12 |, D2=| C21-C22 |, D3=| C31-C32 |, D4=| C41-C42 |.
S107:Judge whether the capacitance change of each capacitance detection unit is more than default change threshold accordingly, that is, sentence
Whether disconnected D1 is more than whether Vref1 or D2 is more than whether Vref2 or D3 more than Vref3 or D4 be more than Vref4.
If it is, perform step S108;If it is not, then return to step S103, illustrates that no liquid covers.
S108:Export liquid level information, return to step S103.
Specifically, if D4>Vref4, then judge that capacitance detection unit is covered with the liquid corresponding to C41, liquid level reaches C41
The height of corresponding capacitance detection unit, D1, D2, D3 judgment mode are identical.
Assuming that capacitance detection unit corresponding to C41 is located at container bottom, capacitance detection unit corresponding to C31 is located at C41 pairs
On the capacitance detection unit answered, capacitance detection unit corresponding to C21 is located at corresponding to C31 on capacitance detection unit, C11 pairs
The capacitance detection unit answered is located at corresponding to C31 on capacitance detection unit, then, it can first judge whether D1 is more than Vref1, such as
Fruit D1 is more than Vref1, then illustrates that liquid level has covered capacitance detection unit corresponding to C11, now capacitance detecting list corresponding to C11
The location of first is the liquid level of liquid, if D1 is less than or equal to Vref1, it is electric corresponding to C11 to illustrate that liquid level does not cover
Hold detection unit, then judge whether D2 is more than Vref2;If D2 is more than Vref2, illustrate that liquid level has been covered corresponding to C21
Capacitance detection unit, now the location of capacitance detection unit corresponding to C21 is the liquid level of liquid, if D2 is less than or waited
In Vref2, then illustrate that liquid level does not cover capacitance detection unit corresponding to C21, determine whether D3 is more than Vref3;If
D3 is more than Vref3, then illustrates that liquid level has covered capacitance detection unit corresponding to C31, now capacitance detection unit corresponding to C31
Location is the liquid level of liquid, if D3 is less than or equal to Vref3, illustrates that liquid level does not cover electric capacity corresponding to C31
Detection unit, then judge whether D4 is more than Vref4;If D4 is more than Vref4, it is electric corresponding to C41 to illustrate that liquid level has covered
Hold detection unit, now the location of capacitance detection unit corresponding to C41 is the liquid level of liquid, if D4 is less than or equal to
Vref4, then illustrate that liquid level does not cover capacitance detection unit corresponding to C41, illustrate that no liquid or liquid can not seldom detect.
To sum up, the liquid-level detecting method proposed according to embodiments of the present invention, the current electricity of each capacitance detection unit is detected
Capacitance, and current environment offset is obtained, then according to the initial capacitance of current environment offset and each capacitance detection unit
Value obtains the reference capacitance value of each capacitance detection unit, then by the capacitance present value of each capacitance detection unit and corresponding ginseng
Capacitance is examined to be compared to obtain the capacitance change of each capacitance detection unit, and according to the electricity of each capacitance detection unit
Hold variable quantity generation liquid level information, so as to, the accuracy of capacitance detecting is improved, and then the accuracy of level sensing is improved,
And the change to environment has good anti-interference such as temperature drift, power jitter, PCB noises, is applicable to complex environment.
Fig. 5 is the block diagram of liquid-detecting according to embodiments of the present invention.As shown in figure 5, the liquid detecting
Device includes multiple capacitance detection units 100 and control unit 200.
Wherein, control unit 200 is respectively connected with multiple capacitance detection units 100, and control unit 200 is each for obtaining
The capacitance present value of capacitance detection unit, and current environment offset is obtained, while according to current environment offset and each electricity
The initial capacitance value for holding detection unit obtains the reference capacitance value of each capacitance detection unit, and by each capacitance detection unit
Capacitance present value compared with corresponding reference capacitance value to obtain the capacitance change of each capacitance detection unit, and root
Liquid level information is generated according to the capacitance change of each capacitance detection unit.
It is not covered with the liquid i.e. in container during no liquid it should be noted that initial capacitance value can be capacitance detection unit
Capacitance, the initial capacitance value of each capacitance detection unit can be stored in advance in the memory of control unit, such as MCU
EEPROM ((the Electrically Erasable Programmable of (MicroControl Unit, microprocessor)
Read-Only Memory, EEPROM) in.After power-up initializing, control unit 200 can be from storage
Device reads the initial capacitance value of each capacitance detection unit.Also, after start-up capacitance detection, control unit 200 can obtain often
The capacitance present value of individual capacitance detection unit, capacitance present value can be the real-time capacitance of capacitance detection unit.
That is, it is current environment offset A to match an environment scale factor to each capacitance detection unit, every
During secondary judgement liquid level, initial capacitance value and current environment offset A are done computing as reference capacitance value by control unit 200, then
Capacitance present value and the reference capacitance value are carried out computing, and the change of liquid level is judged according to the result after computing.
Thus, current environment offset A follows the change of environment, such as temperature drift, power jitter, PCB noises etc. in real time.Liquid
Influence of the body for capacitance detection unit is fixed, and influence of the environment to capacitance detection unit, by bringing current environment into
Offset A can suppress, and so as to substantially increase the accuracy of capacitance detecting, improve the accuracy of level sensing, and to ring
The change in border has good anti-interference, is adapted to use in complex environment.
According to one embodiment of present invention, as shown in fig. 6, liquid level detection device also includes capacitance compensation unit 300, electricity
Hold compensating unit 300 with control unit 200 to be connected, control unit 200 is used for the initial compensation electricity for obtaining capacitance compensation unit 300
Capacitance, and the current compensating electric capacity value of capacitance compensation unit 300 is obtained, and calculate current compensating electric capacity value and initial compensation electricity
Ratio between capacitance is to obtain current environment offset.That is, the current compensating electric capacity values of current environment offset A=
Cb1/ initial compensation capacitances Cb0.
Wherein, the initial compensation capacitance of capacitance compensation unit 300 can be with the initial capacitance value of each capacitance detection unit
Detect simultaneously, and the memory of control unit 200 be together stored in the initial capacitance value of each capacitance detection unit, that is, say,
Control unit 200 also obtains the initial benefit of capacitance compensation unit 300 when obtaining the initial capacitance value of each capacitance detection unit
Repay capacitance.Also, the current compensating electric capacity value of capacitance compensation unit 300 can be with the capacitance present value of each capacitance detection unit
Detect, that is, say simultaneously, control unit 200 also obtains capacitance compensation when obtaining the capacitance present value of each capacitance detection unit
The current compensating electric capacity value of unit 300, current compensating electric capacity value are the real-time capacitance of capacitance compensation unit 300.
It should be noted that capacitance compensation unit 300 can be one or more, when capacitance compensation unit 300 is multiple,
Can according to current the compensating electric capacity value and initial compensation capacitance of capacitance compensation unit 300 obtain corresponding to ambient compensation value, so
Average value processing is carried out to ambient compensation value corresponding to multiple capacitance compensation units 300 afterwards, by multiple capacitance compensation units 300
The average value of corresponding ambient compensation value is as current environment offset.
Further, according to one embodiment of present invention, control unit 200 is by calculating each capacitance detection unit
Product between initial capacitance value and current environment offset, to obtain the reference capacitance value of each capacitance detection unit.
Specifically, it is assumed that capacitance detection unit is N number of, and the initial capacitance value of i-th of capacitance detection unit is Ci0, that
The capacitance detection unit of the reference capacitance value Ci2=current environment offsets A of i-th of capacitance detection unit × i-th it is initial
Capacitance Ci0, wherein, i=1,2,3 ..., N, N be positive integer.
In the specific example of the present invention, multiple capacitance detection units 100 can be brought into close contact with container, such as be passed through
3M glues, it should be appreciated that the set-up mode of multiple capacitance detection units 100 and container is not limited to laminating type.
Also, as shown in FIG. 7 and 8, multiple capacitance detection units 100 can be according to the ascent direction (Fig. 7 of liquid in container
The middle direction of arrow) it is arranged in order, such as multiple capacitance detection units 100 can be arranged successively in the vertical direction of the bottom of container
Row, it will be changed by the quantity of the capacitance detection unit of liquid level covering with the change of liquid level.
In one embodiment of the invention, as shown in fig. 7, multiple capacitance detection units 100, capacitance compensation unit 300
It is arranged on control unit 200 on same PCB printed circuit board (PCB)s 400.Also, as shown in figure 8, multiple capacitance detection units
200 are arranged on the lower section of the liquid level upper limit, and capacitance compensation unit 300 is arranged on the top of the liquid level upper limit, more specifically, electric capacity is mended
Edge on container 600 can be higher than by repaying unit 300.
In addition, as shown in fig. 6, multiple capacitance detection units 100 and capacitance compensation unit 300 may be provided at PCB printing electricity
The front of road plate 400, and control unit 200 may be provided at the back side of PCB printed circuit board (PCB)s 400.PCB printed circuit board (PCB)s 400 can
Power panel is connected by winding displacement 500.
Specifically, according to one embodiment of present invention, control unit 200 is further used for, and calculates each capacitance detecting
Difference between the capacitance present value of unit and corresponding reference capacitance value is to obtain the capacitance variations of each capacitance detection unit
Amount, and judge whether the capacitance change of each capacitance detection unit is more than default change threshold accordingly, and according to electric capacity
The capacitance detection unit that variable quantity is more than corresponding default change threshold obtains liquid level information.
Specifically, it is assumed that for capacitance detection unit to be N number of, the capacitance present value of i-th of capacitance detection unit is Ci1, i-th
The reference capacitance value Ci2 of individual capacitance detection unit, default change threshold corresponding to i-th of capacitance detection unit can be Vrefi, that
The capacitance change of i-th of capacitance detection unit can be | Ci1-Ci2 |, then control unit 200 judges | Ci1-Ci2 | whether
More than Vrefi, if | Ci1-Ci2 | more than Vrefi, judge that i-th of capacitance detection unit is covered with the liquid, i.e., liquid level reaches
Height where i-th of capacitance detection unit;If | Ci1-Ci2 | less than or equal to Vrefi, judge i-th of capacitance detecting
Unit is not covered with the liquid, i.e., the height that liquid level is not up to where i-th of capacitance detection unit.Thus, control unit 200
Judge the change of liquid level.
It should be appreciated that if the capacitance change of each capacitance detection unit is respectively less than or equal to corresponding default change
Change threshold value, then illustrate that no liquid in container, or liquid level do not cover any one capacitance detection unit.
The embodiment of the present invention is described by taking 4 capacitance detection units and 1 capacitance compensation unit as an example below, passes through 1
Capacitance compensation unit calculates the current environment offset A of 4 capacitance detection units, then initial capacitance value is multiplied by current environment
Offset A is to obtain the reference capacitance value after ambient compensation, by judging that the capacitance present value of each capacitance detection unit is relative
The variable quantity of reference capacitance value come judge liquid level change.As shown in fig. 7,4 capacitance detection units can be respectively capacitance detecting list
Member 102, capacitance detection unit 103, capacitance detection unit 104 and capacitance detection unit 105.
The course of work of the liquid level detection device of the embodiment of the present invention is as follows:
After power-up initializing, control unit 200 reads capacitance compensation unit under no liquid state in built-in EEPROM
300 initial compensation capacitance Cb0, initial capacitance value corresponding to 4 difference of capacitance detection units 102,103,104 and 105
C10, C20, C30 and C40.
After capacitance detecting startup, control unit 200 obtains the current compensating electric capacity value Cb1 and 4 of capacitance compensation unit 300
Capacitance present value C11, C21, C31, C41 corresponding to the individual difference of capacitance detection unit 102,103,104 and 105.
Control unit 200 calculates current environment offset A=Cb1/Cb0 again, and current environment offset A is brought into electric capacity
The initial capacitance value of detection unit to obtain the reference capacitance value of capacitance detection unit, i.e. 4 capacitance detection units 102,103,
104 and 105 be respectively C12=A × C10, C22=A × C20, C32=A × C30, C42=A × C40.
Control unit 200 further calculates the capacitance change of each capacitance detection unit, i.e. 4 capacitance detection units
102nd, 103,104 and 105 capacitance change is respectively:D1=| C11-C12 |, D2=| C21-C22 |, D3=| C31-C32 |,
D4=| C41-C42 |, and judge whether the capacitance change of each capacitance detection unit is more than default change threshold accordingly, i.e.,
Judge whether D1 is more than Vref1 or D2 and whether is more than whether Vref2 or D3 more than Vref3 or D4 be more than Vref4, and according to
Judged result exports liquid level information, wherein, if D4>Vref4, then judge that capacitance detection unit 105 is covered by liquid corresponding to C41
Lid, liquid level reach the height of capacitance detection unit 105, and D1, D2, D3 judgment mode are identical.
As shown in Figure 7, it is assumed that capacitance detection unit 105 corresponding to C41 is located at container bottom, capacitance detecting corresponding to C31
Unit 104 is located at corresponding to C41 on capacitance detection unit 105, and capacitance detection unit 103 corresponding to C21 is located at corresponding to C31
On capacitance detection unit 104, capacitance detection unit 102 corresponding to C11 is located at corresponding to C21 on capacitance detection unit 103,
So, control unit 200 can first judge whether D1 is more than Vref1, if D1 is more than Vref1, illustrate that liquid level has covered C11
Corresponding capacitance detection unit 102, now the location of capacitance detection unit 102 corresponding to C11 is the liquid level of liquid, such as
Fruit D1 is less than or equal to Vref1, then illustrates that liquid level does not cover capacitance detection unit 102 corresponding to C11, then judge whether D2 is more than
Vref2;If D2 is more than Vref2, illustrate that liquid level has covered capacitance detection unit 103 corresponding to C21, now C21 is corresponding
The location of capacitance detection unit 103 be liquid liquid level, if D2 is less than or equal to Vref2, illustrate liquid level not
Capacitance detection unit 103 corresponding to covering C21, determines whether D3 is more than Vref3;If D3 is more than Vref3, illustrate
Liquid level has covered capacitance detection unit 104 corresponding to C31, and now the location of capacitance detection unit 104 is corresponding to C31
For the liquid level of liquid, if D3 is less than or equal to Vref3, illustrate that liquid level does not cover capacitance detection unit 104 corresponding to C31,
Judge whether D4 is more than Vref4 again;If D4 is more than Vref4, illustrate that liquid level has covered capacitance detection unit corresponding to C41
105, now the location of capacitance detection unit 105 is the liquid level of liquid corresponding to C41, if D4 is less than or equal to
Vref4, then illustrate that liquid level does not cover capacitance detection unit 105 corresponding to C41, illustrate that no liquid or liquid can not seldom be examined
Survey.
To sum up, the liquid level detection device proposed according to embodiments of the present invention, control unit obtain each capacitance detection unit
Capacitance present value, and current environment offset is obtained, then according to current environment offset and each capacitance detection unit
Initial capacitance value obtains the reference capacitance value of each capacitance detection unit, then by the capacitance present value of each capacitance detection unit with
Corresponding reference capacitance value is compared to obtain the capacitance change of each capacitance detection unit, and according to each capacitance detecting
The capacitance change generation liquid level information of unit, so as to improve the accuracy of capacitance detecting, and then improve level sensing
Accuracy, and the change to environment has good anti-interference such as temperature drift, power jitter, PCB noises, is applicable to multiple
Heterocycle border.
In the description of the invention, it is to be understood that term " " center ", " longitudinal direction ", " transverse direction ", " length ", " width ",
" thickness ", " on ", " under ", "front", "rear", "left", "right", " vertical ", " level ", " top ", " bottom " " interior ", " outer ", " up time
The orientation or position relationship of the instruction such as pin ", " counterclockwise ", " axial direction ", " radial direction ", " circumference " be based on orientation shown in the drawings or
Position relationship, it is for only for ease of and describes the present invention and simplify description, rather than indicates or imply that signified device or element must
There must be specific orientation, with specific azimuth configuration and operation, therefore be not considered as limiting the invention.
In addition, term " first ", " second " are only used for describing purpose, and it is not intended that instruction or hint relative importance
Or the implicit quantity for indicating indicated technical characteristic.Thus, define " first ", the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the invention, " multiple " are meant that at least two, such as two, three
It is individual etc., unless otherwise specifically defined.
In the present invention, unless otherwise clearly defined and limited, term " installation ", " connected ", " connection ", " fixation " etc.
Term should be interpreted broadly, for example, it may be fixedly connected or be detachably connected, or integrally;Can be that machinery connects
Connect or electrically connect;Can be joined directly together, can also be indirectly connected by intermediary, can be in two elements
The connection in portion or the interaction relationship of two elements, limited unless otherwise clear and definite.For one of ordinary skill in the art
For, the concrete meaning of above-mentioned term in the present invention can be understood as the case may be.
In the present invention, unless otherwise clearly defined and limited, fisrt feature can be with "above" or "below" second feature
It is that the first and second features directly contact, or the first and second features pass through intermediary mediate contact.Moreover, fisrt feature exists
Second feature " on ", " top " and " above " but fisrt feature are directly over second feature or oblique upper, or be merely representative of
Fisrt feature level height is higher than second feature.Fisrt feature second feature " under ", " lower section " and " below " can be
One feature is immediately below second feature or obliquely downward, or is merely representative of fisrt feature level height and is less than second feature.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or the spy for combining the embodiment or example description
Point is contained at least one embodiment or example of the present invention.In this manual, to the schematic representation of above-mentioned term not
Identical embodiment or example must be directed to.Moreover, specific features, structure, material or the feature of description can be with office
Combined in an appropriate manner in one or more embodiments or example.In addition, in the case of not conflicting, the skill of this area
Art personnel can be tied the different embodiments or example and the feature of different embodiments or example described in this specification
Close and combine.
Although embodiments of the invention have been shown and described above, it is to be understood that above-described embodiment is example
Property, it is impossible to limitation of the present invention is interpreted as, one of ordinary skill in the art within the scope of the invention can be to above-mentioned
Embodiment is changed, changed, replacing and modification.
Claims (10)
1. a kind of liquid-level detecting method, it is characterised in that comprise the following steps:
Obtain the initial capacitance value of each capacitance detection unit in multiple capacitance detection units;
Detect the capacitance present value of each capacitance detection unit;
Current environment offset is obtained, and according to the current environment offset and the initial electricity of each capacitance detection unit
Capacitance obtains the reference capacitance value of each capacitance detection unit;
By the capacitance present value of each capacitance detection unit with corresponding reference capacitance value compared with obtain it is described often
The capacitance change of individual capacitance detection unit, and according to the capacitance change generation liquid level letter of each capacitance detection unit
Breath.
2. liquid-level detecting method according to claim 1, it is characterised in that the acquisition current environment offset includes:
Obtain the initial compensation capacitance of capacitance compensation unit;
Detect the current compensating electric capacity value of the capacitance compensation unit;
The current ratio between compensating electric capacity value and the initial compensation capacitance is calculated to obtain current environment offset.
3. liquid-level detecting method according to claim 1 or 2, it is characterised in that described to obtain each capacitance detecting
The reference capacitance value of unit, including:
The product between the initial capacitance value of each capacitance detection unit and the current environment offset is calculated to obtain
The reference capacitance value of each capacitance detection unit.
4. liquid-level detecting method according to claim 1, it is characterised in that described according to each capacitance detection unit
Capacitance change generation liquid level information, including:
The difference between the capacitance present value of each capacitance detection unit and corresponding reference capacitance value is calculated to obtain
State the capacitance change of each capacitance detection unit;
Judge whether the capacitance change of each capacitance detection unit is more than default change threshold accordingly;
The capacitance detection unit for being more than corresponding default change threshold according to capacitance change obtains the liquid level information.
A kind of 5. liquid level detection device, it is characterised in that including:
Multiple capacitance detection units;
Control unit, described control unit are respectively connected with the multiple capacitance detection unit, and described control unit is used to detect
The capacitance present value of each capacitance detection unit, and current environment offset is obtained, while according to the current environment offset
The reference capacitance value of each capacitance detection unit is obtained with the initial capacitance value of each capacitance detection unit, and by described in
The capacitance present value of each capacitance detection unit is compared with corresponding reference capacitance value to obtain each capacitance detecting
The capacitance change of unit, and liquid level information is generated according to the capacitance change of each capacitance detection unit.
6. liquid level detection device according to claim 5, it is characterised in that also including capacitance compensation unit, the electric capacity
Compensating unit is connected with described control unit, and described control unit is used for the initial compensation capacitance for obtaining capacitance compensation unit,
And the current compensating electric capacity value of the capacitance compensation unit is obtained, and calculate the current compensating electric capacity value and the initial benefit
The ratio between capacitance is repaid to obtain current environment offset.
7. the liquid level detection device according to claim 5 or 6, it is characterised in that described control unit passes through described in calculating
Product between the initial capacitance value of each capacitance detection unit and the current environment offset, to obtain each electric capacity
The reference capacitance value of detection unit.
8. liquid level detection device according to claim 5, it is characterised in that described control unit is further used for, and calculates
Difference between the capacitance present value and corresponding reference capacitance value of each capacitance detection unit is described each electric to obtain
Hold the capacitance change of detection unit, and judge whether the capacitance change of each capacitance detection unit is more than accordingly in advance
If change threshold, and the corresponding capacitance detection unit for presetting change threshold is more than according to capacitance change and obtains the liquid level
Information.
9. liquid level detection device according to claim 6, it is characterised in that the multiple capacitance detection unit is arranged on liquid
The lower section of the position upper limit, and the capacitance compensation unit is arranged on the top of the liquid level upper limit.
10. liquid level detection device according to claim 6, it is characterised in that the multiple capacitance detection unit, the electricity
Hold compensating unit and described control unit is arranged on same PCB printed circuit board (PCB)s.
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 true CN107664527A (en) | 2018-02-06 |
CN107664527B 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) |
Cited By (3)
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 |
CN113029287A (en) * | 2021-02-04 | 2021-06-25 | 惠州拓邦电气技术有限公司 | Coffee machine water level detection method and coffee machine |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090064757A1 (en) * | 2005-06-08 | 2009-03-12 | Lumenite Control Technology, Inc. | Self-calibrating liquid level transmitter |
CN101430218A (en) * | 2008-12-06 | 2009-05-13 | 俞险峰 | Non-contact type capacitance induction level sensor |
CN103776511A (en) * | 2014-02-07 | 2014-05-07 | 深圳芯邦科技股份有限公司 | Level information monitoring method, device and system |
CN104535135A (en) * | 2015-01-22 | 2015-04-22 | 上海飞科电器股份有限公司 | Non-contact liquid level detection device and non-contact liquid level detection method |
-
2016
- 2016-07-29 CN CN201610619619.XA patent/CN107664527B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090064757A1 (en) * | 2005-06-08 | 2009-03-12 | Lumenite Control Technology, Inc. | Self-calibrating liquid level transmitter |
CN101430218A (en) * | 2008-12-06 | 2009-05-13 | 俞险峰 | Non-contact type capacitance induction level sensor |
CN103776511A (en) * | 2014-02-07 | 2014-05-07 | 深圳芯邦科技股份有限公司 | Level information monitoring method, device and system |
CN104535135A (en) * | 2015-01-22 | 2015-04-22 | 上海飞科电器股份有限公司 | Non-contact liquid level detection device and non-contact liquid level detection method |
Cited By (4)
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 |
CN113029287A (en) * | 2021-02-04 | 2021-06-25 | 惠州拓邦电气技术有限公司 | Coffee machine water level detection method and coffee machine |
CN113029287B (en) * | 2021-02-04 | 2024-02-02 | 惠州拓邦电气技术有限公司 | Water level detection method of coffee machine and coffee machine |
Also Published As
Publication number | Publication date |
---|---|
CN107664527B (en) | 2020-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107228699B (en) | Liquid-level detecting method and liquid level detection device | |
CN107664527A (en) | Liquid-level detecting method and liquid level detection device | |
EP2733466B1 (en) | A Hall effect measurement instrument with temperature compensation | |
CN110018275A (en) | A kind of gas detector with compensation function and compensation method | |
US7946148B2 (en) | Manufacturing-side calibration of a measuring device for capacitive fill level measurement, and corresponding measuring device | |
CN101754506B (en) | Electromagnetic oven power automatic calibration method and circuit | |
US20130218488A1 (en) | Algorithm for detecting activation of a push button | |
CN106482868A (en) | Temperature difference calibration steps and its system | |
CN110599675B (en) | Method and device for detecting number of paper money in money box, terminal equipment and storage medium | |
US9297865B2 (en) | Hall effect measurement instrument with temperature compensation | |
US20100294035A1 (en) | Process for measuring a liquid level in a tank and associated system | |
CN106676831B (en) | Door lock state detection method, system and the washing machine of washing machine | |
CN107121656A (en) | A kind of power supply automatic calibrating method and device | |
CN102209881A (en) | Device for measuring a capacitance variation in a variable capacity structure | |
CN106840247A (en) | A kind of linear sensor bearing calibration and device | |
CN102096057A (en) | Calibration method and device of capacitance measurement circuit | |
US20190056257A1 (en) | Method for determining density of a medium in a tank of a hybrid tank measurement system | |
US20100088057A1 (en) | Method for detection of a physical variable by way of a circuit breaker | |
CN106676830B (en) | Door lock state detection method, system and the washing machine of washing machine | |
EP3364167B1 (en) | Sensor device | |
CN210603488U (en) | Capacitive liquid level detection circuit | |
CN107796482A (en) | Liquid-level detecting method and liquid level detection device | |
US8287182B2 (en) | Method for testing a frying oil tester | |
EP2938989A1 (en) | Algorithm for detecting activation of a push button | |
WO2008142916A1 (en) | Measuring system, measuring method and program |
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 |
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. |
|
TR01 | Transfer of patent right |