CN112432975A - Method for measuring liquid conductivity - Google Patents
Method for measuring liquid conductivity Download PDFInfo
- Publication number
- CN112432975A CN112432975A CN202110101276.9A CN202110101276A CN112432975A CN 112432975 A CN112432975 A CN 112432975A CN 202110101276 A CN202110101276 A CN 202110101276A CN 112432975 A CN112432975 A CN 112432975A
- Authority
- CN
- China
- Prior art keywords
- pin
- liquid
- sampling
- singlechip
- conductivity
- 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
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N27/00—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means
- G01N27/02—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance
- G01N27/04—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance by investigating resistance
- G01N27/06—Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance by investigating resistance of a liquid
Landscapes
- Chemical & Material Sciences (AREA)
- Chemical Kinetics & Catalysis (AREA)
- Electrochemistry (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Measurement Of Resistance Or Impedance (AREA)
- Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)
Abstract
The invention discloses a method for measuring the conductivity of liquid, which comprises the following steps: s1: placing two metal electrodes in the liquid, respectively connecting a first pin and a second pin of the singlechip, then equating the electrical parameter characteristics of the liquid to be parallel capacitance and resistance, simultaneously connecting a resistance in parallel, and then connecting a resistance in series between the first pin and the metal electrodes to form a measuring circuit; s2: a first pin of the single chip microcomputer repeatedly transmits a group of level signals, and a second pin of the single chip microcomputer repeatedly transmits a group of pulse signals, so that the charging and discharging time of the two metal electrodes is consistent, and the polarization effect is avoided; s3: and sampling for multiple times by using the sampling pin of the singlechip in the process of transmitting the level signal by the first pin, and calculating to obtain the conductivity according to the sampling value. The invention not only can effectively avoid the problem of liquid polarization, but also has the characteristics of simple circuit, high measurement precision and the like.
Description
Technical Field
The invention relates to the technical field of measurement of liquid conductivity, in particular to a method for measuring liquid conductivity.
Background
With the rapid development of industrial and agricultural production, and with the production and living of human beings, the measurement of the conductivity of a solution has been a very important topic. For example, in the field of new energy vehicles, the measurement of the conductivity of a solution in a lithium battery on an electric vehicle is a key technology, and influences the energy utilization rate, the endurance mileage, the peak power and the like of the electric vehicle. In the field of water treatment, a lot of useful information can be obtained by measuring the conductivity of water, and water quality detection plays a crucial role in water pollution control and whole water environment protection. If the fluorine content is too high, the teeth may be stained, which may cause a dental disease, namely, plaque, and serious patients may completely collapse their teeth. Even the domestic sewage discharged in daily life can spread various diseases. Therefore, the method can also find that the detection of the quality of the drinking water has very important significance in the aspect of drinking water safety of people.
Current measurements of liquid conductivity are generally divided into three categories: ultrasonic measurement, electromagnetic measurement, and electrode measurement. The former two methods have the disadvantages of limited use range, high cost, narrow measurement range and the like. Therefore, the electrode type conductivity measurement method is the most commonly used measurement method at present, and many high-end instruments applied in the current market are expensive, low-end instruments are low in precision and insufficient in resolution. As shown in the following figure, the circuit of the voltage division method which is widely applied in the market at present is shown in the following figure, two metal electrodes are placed in a solution, a resistor is connected in series on a line, and a singlechip samples the voltage division value of the solution resistor, so that the resistance of the solution is calculated and converted into the conductivity. Conductivity is the inverse of resistance. The partial pressure method ignores the capacitive effect in solution: the principle is as follows: two IO pins of the single chip microcomputer respectively drive and output high and low levels, equivalent resistance in the solution can generate partial pressure, and the partial pressure value is sent to analog quantity of the single chip microcomputer for AD conversion. Namely: as can be seen from the above equation, the voltage value and the conductivity are measured as inversely proportional functions, and if the final measured physical quantity and the conductivity are in a direct or inverse proportional relationship, the measured value may not be sufficiently resolved at the high value or the low value. Namely: the rate of change of the measured value becomes smaller and smaller with the change of the physical quantity, thus resulting in insufficient accuracy of measurement.
Disclosure of Invention
It is an object of the present invention to provide a method for measuring the conductivity of a liquid. The invention not only can effectively avoid the problem of liquid polarization, but also has the characteristics of simple circuit, high measurement precision and the like.
The technical scheme of the invention is as follows: a method for measuring the conductivity of a liquid, comprising the steps of:
s1: two metal electrodes are placed in the liquid and respectively connected with first pin and second pin of single-chip microcomputer, and then the electric parameter characteristics of the liquid are equivalent to parallel capacitorsAnd a resistorSimultaneously connecting a resistor in parallelAnd a resistor is connected in series between the first pin and the metal electrodeForming a measuring circuit;
s2: a first pin of the single chip microcomputer repeatedly transmits a group of level signals, and a second pin of the single chip microcomputer repeatedly transmits a group of pulse signals, so that the charging and discharging time of the two metal electrodes is consistent, and the polarization effect is avoided;
s3: and sampling for multiple times by using the sampling pin of the singlechip in the process of transmitting the level signal by the first pin, and calculating to obtain the conductivity according to the sampling value.
In the above method for measuring the conductivity of the liquid, in step S2, the level signal transmitted by the first pin sends out a set of waveforms every 2S, where the waveforms are high level for 1ms, low level for 2ms, high level lasts for 1ms again, and finally low level all the time; the pulse signal transmitted by the second pin sends a group of pulses every 2s, and the waveform of the pulses is high level 2 ms; wherein, the high level in the pulse signal and the low level of 2ms in the level signal are transmitted at the same time, and the waveforms of the two signals are symmetrical.
In the foregoing method for measuring the conductivity of the liquid, in step S3, the sampling pin of the single chip microcomputer samples 4 times every 2S, and the sampling time points are respectively 0.1ms, 1.1ms, 3.1ms and 4.1ms when the level signal changes from low level to high level for the first time.
In the method for measuring the conductivity of the liquid, the charge and discharge formula of the capacitor during the charge and discharge of the two metal electrodes is as follows:
in the formula:, a resistance equivalent to an electrical parameter characteristic of the liquid;is a resistorThe resistance value of (1);is a resistorThe resistance value of (1);is time;a capacitance equivalent to an electrical parameter characteristic of the liquid;supplying power level to the pins of the singlechip;
and calculating according to the four sampling values:
in the formula:is a 4-time mode value converted from the sampling value of the singlechip,the sampling value of the singlechip at a first sampling time point is obtained;is an analog quantity reference level of the singlechip,the sampling value of the singlechip at the second sampling time point is obtained;the sampling value of the singlechip at the third sampling time point is obtained;the sampling value of the singlechip at the fourth sampling time point is obtained;
establishing the following relation according to the 4-time mode value converted from the sampling value of the single chip microcomputer:
in the formula (I), the compound is shown in the specification,is proportional to;, a resistance equivalent to an electrical parameter characteristic of the liquid;is a resistorThe resistance value of (1);is a resistorThe resistance value of (1);a capacitance equivalent to an electrical parameter characteristic of the liquid;supplying power level to the pins of the singlechip;
resistance equivalent according to the resulting electrical parameter characteristic of the liquidFrom the relation of conductivity and resistanceDeriving the conductivity of the liquid。
Compared with the prior art, the liquid level measuring circuit has the advantages that the electrical parameter characteristics of the liquid are equivalent to the parallel capacitance and resistance, the resistance is connected in parallel, the resistance is connected in series between the first pin and the metal electrode, the two resistances are used for dividing and adjusting the charging and discharging time of the circuit, so that the measuring circuit is formed, the first pin of the single chip microcomputer is used for repeatedly transmitting a group of level signals, the second pin of the single chip microcomputer is used for repeatedly transmitting a group of pulse signals, the charging and discharging time of the two metal electrodes is consistent, and the polarization effect is avoided; finally, in the process of level signals transmitted by the first pin, the sampling pin of the singlechip is used for sampling for multiple times, and the conductivity is calculated according to the sampling value, so that the problem of inaccurate measurement precision caused by the fact that the change rate of the measurement value is smaller and smaller along with the change of physical quantity in the background technology by adopting a voltage division method can be solved, and the liquid polarization problem can be effectively avoided. In addition, the invention adopts the algorithm similar to X4 to calculate the conductivity, further improves the measurement accuracy, and has very simple circuit and lower cost.
Drawings
FIG. 1 is a schematic diagram of an algorithmic circuit of the present invention;
FIG. 2 is a timing diagram of the activation of the single-chip microcomputer.
Detailed Description
The invention is further illustrated by the following figures and examples, which are not to be construed as limiting the invention.
Example (b): a method for measuring the conductivity of a liquid, comprising the steps of:
s1: as shown in figure 1, two metal electrodes are placed in the liquid and respectively connected with a first pin and a second pin of a singlechip, and then the electrical parameter characteristic of the liquid is equivalent to a parallel capacitorAnd a resistorSimultaneously connecting a resistor in parallelAnd a resistor is connected in series between the first pin and the metal electrodeForming a measuring circuit; the resistance value of the resistor is 1K, the resistance value of the resistor is 1M, and the singlechip is powered by 3.3V;
s2: a first pin of the single chip microcomputer repeatedly transmits a group of level signals, and a second pin of the single chip microcomputer repeatedly transmits a group of pulse signals, so that the charging and discharging time of the two metal electrodes is consistent, and the polarization effect is avoided;
specifically, as shown in fig. 2, a level signal transmitted by the first pin (IO 1) sends a set of waveforms every 2s, where the waveforms are high level 1ms, low level 2ms, high level lasts for 1ms again, and finally, the waveforms are always low level; the pulse signal transmitted by the second pin (IO 2) sends a group of pulses every 2s, and the waveform of the pulses is high level 2 ms; wherein, the high level in the pulse signal and the low level of 2ms in the level signal are transmitted at the same time, and the waveforms of the two signals are symmetrical.
S3: and sampling for multiple times by using a sampling pin of the singlechip in the process of transmitting the level signal by the first pin, wherein the sampled voltage value is equivalent to the sum of partial voltage and charge and discharge of a capacitor, and the conductivity is calculated according to the sampling value.
Specifically, as shown in an AD value curve in fig. 2, the sampling pin of the single chip microcomputer samples 4 times every 2s, and the sampling time points are respectively 0.1ms, 1.1ms, 3.1ms and 4.1ms when the level signal changes from low level to high level for the first time;
in the charging and discharging processes of the two metal electrodes, the charging and discharging formula of the capacitor is as follows:
in the formula:, a resistance equivalent to an electrical parameter characteristic of the liquid;is a resistorThe resistance value of (1);is a resistorThe resistance value of (1);is time;a capacitance equivalent to an electrical parameter characteristic of the liquid;supplying power level to the pins of the singlechip;
and calculating according to the four sampling values:
in this embodiment, the AD bit width of the single chip microcomputer is 10 bits, and the calculation formula is:
in the formula:is a 4-time mode value converted from the sampling value of the singlechip,the sampling value of the singlechip at a first sampling time point is obtained;is an analog quantity reference level of the singlechip,the sampling value of the singlechip at the second sampling time point is obtained;the sampling value of the singlechip at the third sampling time point is obtained;the sampling value of the singlechip at the fourth sampling time point is obtained;
establishing the following relation according to the 4-time mode value converted from the sampling value of the single chip microcomputer:
in the formula (I), the compound is shown in the specification,is proportional to;, a resistance equivalent to an electrical parameter characteristic of the liquid;is a resistorThe resistance value of (1);is a resistorThe resistance value of (1);a capacitance equivalent to an electrical parameter characteristic of the liquid;supplying power level to the pins of the singlechip;
finally, according to the curve diagram, the relation between the conductivity and the resistance is calculatedDeriving the conductivity of the liquidI.e. first obtainedAndaccording to the standard curve obtained in the subsequent measurementCorrespondingly obtaining the equivalent resistance of the electrical parameter characteristic of the liquid in the standard curve chartBy a resistanceAnd then the conductivity is obtained.
In summary, the formulaIt can be seen that with the liquidThe resolution ratio is further improved by adopting an algorithm similar to X4, so that the overall resolution ratio is at a low resistance value, the high conductivity is greatly improved, and the circuit is very simple. The invention not only can effectively avoid the problem of liquid polarization, but also has the characteristics of simple circuit, high measurement precision and the like.
Claims (4)
1. A method for measuring the conductivity of a liquid, characterized by: the method comprises the following steps:
s1: two metal electrodes are placed in the liquid and respectively connected with first pin and second pin of single-chip microcomputer, and then the electric parameter characteristics of the liquid are equivalent to parallel capacitorsAnd a resistorSimultaneously connecting a resistor in parallelAnd a resistor is connected in series between the first pin and the metal electrodeForming a measuring circuit;
s2: a first pin of the single chip microcomputer repeatedly transmits a group of level signals, and a second pin of the single chip microcomputer repeatedly transmits a group of pulse signals, so that the charging and discharging time of the two metal electrodes is consistent, and the polarization effect is avoided;
s3: and sampling for multiple times by using the sampling pin of the singlechip in the process of transmitting the level signal by the first pin, and calculating to obtain the conductivity according to the sampling value.
2. Method for measuring the conductivity of a liquid according to claim 1, characterized in that: in step S2, the level signal transmitted by the first pin sends a set of waveforms every 2S, where the waveforms are high level 1ms, low level 2ms, high level lasts for 1ms again, and finally low level all the time; the pulse signal transmitted by the second pin sends a group of pulses every 2s, and the waveform of the pulses is high level 2 ms; wherein, the high level in the pulse signal and the low level of 2ms in the level signal are transmitted at the same time, and the waveforms of the two signals are symmetrical.
3. Method for measuring the conductivity of a liquid according to claim 2, characterized in that: in step S3, the sampling pin of the single chip microcomputer samples 4 times every 2S, and the sampling time points are respectively 0.1ms, 1.1ms, 3.1ms and 4.1ms when the level signal changes from low level to high level for the first time.
4. A method for measuring the conductivity of a liquid according to claim 3, characterized in that: in the charging and discharging processes of the two metal electrodes, the charging and discharging formula of the capacitor is as follows:
in the formula:, a resistance equivalent to an electrical parameter characteristic of the liquid;is a resistorThe resistance value of (1);is a resistorThe resistance value of (1);is time;a capacitance equivalent to an electrical parameter characteristic of the liquid;supplying power level to the pins of the singlechip;
and calculating according to the four sampling values:
in the formula:is a 4-time mode value converted from the sampling value of the singlechip,the sampling value of the singlechip at a first sampling time point is obtained;is an analog quantity reference level of the singlechip,the sampling value of the singlechip at the second sampling time point is obtained;the sampling value of the singlechip at the third sampling time point is obtained;the sampling value of the singlechip at the fourth sampling time point is obtained;
establishing the following relation according to the 4-time mode value converted from the sampling value of the single chip microcomputer:
in the formula (I), the compound is shown in the specification,is proportional to;, a resistance equivalent to an electrical parameter characteristic of the liquid;is a resistorThe resistance value of (1);is a resistorThe resistance value of (1);a capacitance equivalent to an electrical parameter characteristic of the liquid;supplying power level to the pins of the singlechip;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110101276.9A CN112432975B (en) | 2021-01-26 | 2021-01-26 | Method for measuring liquid conductivity |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110101276.9A CN112432975B (en) | 2021-01-26 | 2021-01-26 | Method for measuring liquid conductivity |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112432975A true CN112432975A (en) | 2021-03-02 |
CN112432975B CN112432975B (en) | 2021-04-09 |
Family
ID=74697279
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110101276.9A Active CN112432975B (en) | 2021-01-26 | 2021-01-26 | Method for measuring liquid conductivity |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112432975B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022029244A1 (en) * | 2020-08-07 | 2022-02-10 | Ast (Advanced Sensor Technologies) International Asset Gmbh | Sensor arrangement for determining a quality of a liquid, and method |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3887868A (en) * | 1972-09-14 | 1975-06-03 | Contraves Ag | Measuring device for determining the concentration and the mean particle size of particles suspended in an electrolytically conductive liquid |
CA980860A (en) * | 1973-02-22 | 1975-12-30 | Halogen Controls | Apparatus for monitoring and controlling halogen levels in a water treatment system |
US4309660A (en) * | 1978-11-02 | 1982-01-05 | Ahi Operations, Limited | Methods and apparatus for measuring electrical conductivity |
CN101261148A (en) * | 2008-04-16 | 2008-09-10 | 太原理工大学 | Pressure type digital material-level sensor and its measurement method |
CN102116756A (en) * | 2009-12-30 | 2011-07-06 | 上海城投原水有限公司 | Single chip microcomputer-based liquid electrical conductivity measurement method |
CN103257278A (en) * | 2013-04-24 | 2013-08-21 | 兰州空间技术物理研究所 | Medium material conductivity testing device and method |
CN104502713A (en) * | 2014-12-26 | 2015-04-08 | 上海神开石油设备有限公司 | Low-power-consumption conductivity sensor applied to wireless transmission system |
CN204945080U (en) * | 2015-09-02 | 2016-01-06 | 浙江水利水电学院 | A kind of high precision conductivity measurement system |
CN107490726A (en) * | 2016-06-12 | 2017-12-19 | 天津工业大学 | A kind of liquid or gel impedance bioelectrical measurement system and its information acquisition method |
CN107621489A (en) * | 2016-07-15 | 2018-01-23 | 大众汽车股份公司 | Liquid measuring device and measuring head device for moisture detection |
CN110286145A (en) * | 2019-08-14 | 2019-09-27 | 上海海事大学 | A kind of Metal Crack electromagnetic test imager |
CN210401525U (en) * | 2019-05-21 | 2020-04-24 | 沈阳航空航天大学 | Novel liquid resistivity measuring device |
-
2021
- 2021-01-26 CN CN202110101276.9A patent/CN112432975B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US3887868A (en) * | 1972-09-14 | 1975-06-03 | Contraves Ag | Measuring device for determining the concentration and the mean particle size of particles suspended in an electrolytically conductive liquid |
CA980860A (en) * | 1973-02-22 | 1975-12-30 | Halogen Controls | Apparatus for monitoring and controlling halogen levels in a water treatment system |
US4309660A (en) * | 1978-11-02 | 1982-01-05 | Ahi Operations, Limited | Methods and apparatus for measuring electrical conductivity |
CN101261148A (en) * | 2008-04-16 | 2008-09-10 | 太原理工大学 | Pressure type digital material-level sensor and its measurement method |
CN102116756A (en) * | 2009-12-30 | 2011-07-06 | 上海城投原水有限公司 | Single chip microcomputer-based liquid electrical conductivity measurement method |
CN103257278A (en) * | 2013-04-24 | 2013-08-21 | 兰州空间技术物理研究所 | Medium material conductivity testing device and method |
CN104502713A (en) * | 2014-12-26 | 2015-04-08 | 上海神开石油设备有限公司 | Low-power-consumption conductivity sensor applied to wireless transmission system |
CN204945080U (en) * | 2015-09-02 | 2016-01-06 | 浙江水利水电学院 | A kind of high precision conductivity measurement system |
CN107490726A (en) * | 2016-06-12 | 2017-12-19 | 天津工业大学 | A kind of liquid or gel impedance bioelectrical measurement system and its information acquisition method |
CN107621489A (en) * | 2016-07-15 | 2018-01-23 | 大众汽车股份公司 | Liquid measuring device and measuring head device for moisture detection |
CN210401525U (en) * | 2019-05-21 | 2020-04-24 | 沈阳航空航天大学 | Novel liquid resistivity measuring device |
CN110286145A (en) * | 2019-08-14 | 2019-09-27 | 上海海事大学 | A kind of Metal Crack electromagnetic test imager |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022029244A1 (en) * | 2020-08-07 | 2022-02-10 | Ast (Advanced Sensor Technologies) International Asset Gmbh | Sensor arrangement for determining a quality of a liquid, and method |
Also Published As
Publication number | Publication date |
---|---|
CN112432975B (en) | 2021-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112432975B (en) | Method for measuring liquid conductivity | |
WO2004004662A3 (en) | Compositions and methods for the diagnosis and treatment of tumor | |
CN106645981A (en) | Capacitance measuring circuit for capacitor | |
CN203016951U (en) | Human skin moisture content detection device | |
WO2009036770A3 (en) | Electrode connection monitoring | |
CN106990275B (en) | The insulation against ground resistive voltage method of sampling and device | |
CN109581261B (en) | Calibrating system for grounding on-resistance tester | |
CN105433963A (en) | Novel gel thin-film capacitive sensor for measuring occlusal force of single pair of teeth and method | |
CN104083168B (en) | A kind of survey fat circuit and Human fat balance | |
CN207654176U (en) | A kind of ac square wave signal generator for measuring saliva impedance | |
JPH07303618A (en) | Measuring apparatus of skin impedance | |
CN206161730U (en) | New forms of energy electric motor car shunting digit current sensor | |
CN113131586A (en) | High-precision energy discharge control method for defibrillator | |
CN111551873B (en) | Open circuit detection method for electrical stimulation output of percutaneous/percutaneous needle | |
CN210775318U (en) | Flexible three-electrode sodium ion detection device | |
CN109683024B (en) | Neuron bionic circuit and capacitance detection system | |
CN204106008U (en) | A kind of survey fat circuit and Human fat balance | |
CN106526304A (en) | Shunting type digital current sensor for new energy electric vehicle | |
CN114264886B (en) | Rapid measurement method for super capacitor parameters | |
CN201508209U (en) | Capacitance electronic fuel sensor | |
RU2338461C2 (en) | Device for diagnostics of condition of biological objects | |
SU1607810A1 (en) | Device for measuring potential and impedance of biological object | |
CN208795720U (en) | A kind of ion gauge caliberating device | |
US20220151735A1 (en) | Split wireless detection mask and detection methods thereof | |
CN211453889U (en) | High-resolution battery internal resistance measuring circuit |
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 |