Conductivity measuring device and method capable of compensating environmental changes

文档序号:875991 发布日期:2021-03-19 浏览:2次 中文

阅读说明:本技术 一种可补偿环境变化的电导率测量装置及测量方法 (Conductivity measuring device and method capable of compensating environmental changes ) 是由 杜立彬 陈光源 李正宝 孟祥谦 吕婧 于 2020-11-12 设计创作,主要内容包括:本发明公开了一种可补偿环境变化的电导率测量装置及测量方法,该装置包括电导率传感器和信号处理电路,电导率传感器包括位于传感器外壳内的初级磁芯、次级磁芯和液体导流管,初级磁芯上绕有初级绕组,次级磁芯上绕有次级绕组,初级绕组和次级绕组的缠绕方向相反;初级磁芯和次级磁芯之间有液体回路和电阻回路,液体回路上存在液体电阻R-w,电阻回路的导线在初级磁芯和次级磁芯上各绕一圈并在两磁芯间隙处交叉,电阻回路中串入回路电阻R-r和模拟开关S1;信号处理电路包括依次连接的反相放大电路、积分电路、采样保持电路、A/D模块和MCU。本发明所公开的装置及方法可以补偿温度等外部环境变化引起的测量值漂移,实现液体电导率的精确测量。(The invention discloses a conductivity measuring device and a conductivity measuring method capable of compensating environmental changes, wherein the device comprises a conductivity sensor and a signal processing circuit, the conductivity sensor comprises a primary magnetic core, a secondary magnetic core and a liquid guide pipe which are positioned in a sensor shell, a primary winding is wound on the primary magnetic core, a secondary winding is wound on the secondary magnetic core, and the winding directions of the primary winding and the secondary winding are opposite; a liquid loop and a resistance loop are arranged between the primary magnetic core and the secondary magnetic core, and a liquid resistance R is arranged on the liquid loop w The wires of the resistance loop are respectively wound for one circle on the primary magnetic core and the secondary magnetic core and are crossed at the gap between the two magnetic cores, and a loop resistor R is connected in series in the resistance loop r And analog switchS1; the signal processing circuit comprises an inverting amplifying circuit, an integrating circuit, a sampling holding circuit, an A/D module and an MCU which are connected in sequence. The device and the method disclosed by the invention can compensate the drift of the measured value caused by external environment changes such as temperature and the like, and realize the accurate measurement of the liquid conductivity.)

1. A conductivity measuring device capable of compensating environmental changes comprises a conductivity sensor and a signal processing circuit, wherein the conductivity sensor comprises a primary magnetic core, a secondary magnetic core and a liquid guide pipe, the primary magnetic core, the secondary magnetic core and the liquid guide pipe are positioned in a sensor shell, the liquid guide pipe penetrates through the primary magnetic core and the secondary magnetic core, and the primary magnetic core is provided with a holeA primary winding is wound, a secondary winding is wound on the secondary magnetic core, and the winding directions of the primary winding and the secondary winding are opposite; a liquid loop and a resistance loop are arranged between the primary magnetic core and the secondary magnetic core, and a liquid resistance R exists on the liquid loopwThe conducting wires of the resistance loop are respectively wound for one circle on the primary magnetic core and the secondary magnetic core and are crossed at the gap between the two magnetic cores, and a loop resistor R is connected in the resistance loop in seriesrAnd an analog switch S1; the signal processing circuit comprises an inverting amplifying circuit, an integrating circuit, a sampling holding circuit, an A/D module and an MCU which are connected in sequence, wherein the sampling holding circuit comprises a sampling holding circuit I and a sampling holding circuit II which are connected in parallel.

2. The apparatus of claim 1, wherein an analog switch S2 is disposed between the inverting amplifier circuit and the integrator circuit, an analog switch S3 is connected in parallel across a capacitor C1 of the integrator circuit, an analog switch S4 is disposed between the integrator circuit and the sample-and-hold circuit I, and an analog switch S5 is disposed between the integrator circuit and the sample-and-hold circuit II.

3. A method of measuring conductivity which can compensate for environmental changes, using the apparatus of claim 2, comprising the steps of:

immersing a conductivity sensor into liquid to be detected, wherein the inside of a liquid guide pipe and the outside of a sensor shell are filled with the liquid to be detected to form a liquid loop;

step two, the MCU controls to generate an excitation signal, and the excitation signal is input into the primary winding and is a standard square wave signal;

step three, after the sawtooth waveform induced electromotive force generated by the liquid loop and the resistance loop is amplified by the inverting amplifying circuit, the sawtooth waveform induced electromotive force is accumulated by the integrating circuit, then enters a sample-hold circuit I and a sample-hold circuit II, and waits for reading and conversion of the A/D module; the flow direction of the electric signal is controlled by controlling the opening and closing of the analog switches S1-S5, and the induction generated by the liquid loop is respectively measuredElectromotive force VwAnd the induced electromotive force V generated by the resistance loopr

Step four, calculating the conductivity k of the liquid loopw

Wherein k isrIndicating the conductivity, K, of the resistive circuitcRepresenting the conductivity cell constant, R, of the conductivity sensorrIs a loop resistance, KcAnd RrAll are constant values.

4. The method for measuring conductivity capable of compensating environmental changes according to claim 3, wherein the specific method of step three is as follows:

(1) at t0~t1At the moment S1 is opened, only the liquid loop is closed, and under the action of the excitation signal, the induced electromotive force V which is in proportional correlation with the conductivity of the liquid to be measured is generated on the secondary windingwInduced electromotive force VwAmplified by the inverting amplifier circuit, enters the integrating circuit through an analog switch S2, and enters the integrating circuit at t0At the moment, the analog switch S3 is closed for 1/10 square wave periods, so that the integrating circuit is reset and cleared; at t0~t1At the moment, the analog switch S2 is closed only when the excitation square wave outputs high level, and the output voltage value of the integrating circuit increases linearly in the period of time, namely the output isAt t1At that time, the output voltage of the integration circuit is abbreviated as Vw(ii) a At t1When the last excitation square wave period before the moment is output at a high level, the analog switch S4 is closed for a half square wave period, the sampling and holding circuit I carries out tracking sampling, after the S4 is disconnected, the sampling and holding circuit I enters a voltage holding state, and the output voltage V is outputwThe liquid conductivity is related in proportion, converted into digital quantity through an A/D module and stored in the MCU;

(2) at t1~t2At time, S1 is closed; at the moment, under the action of an excitation signal, induced electromotive force which is simultaneously related to the conductivity of the liquid to be detected and the resistance value of the loop is generated on the secondary winding; during this time, the analog switch S2 is closed when the excitation square wave output is low, and the induced electromotive force entering the integration circuit contains VwAnd VrTwo parts, wherein VwAnd t0~t1V of timewThe directions are opposite; because the resistance loop is cross-wound, the induced electromotive force V generated by the resistance looprAnd VwThe directions are opposite; thus, the net output of the integrating circuit during this period isDue to t0~t1And t1~t2Are the same, so at t2At the moment, the output voltage of the integrating circuit isOrAssociated with resistive circuits only, and denoted Vr(ii) a At t2When the last excitation square wave period before the moment is output at a low level, the analog switch S5 is closed for a half square wave period, the sampling and holding circuit II carries out tracking sampling, after the S5 is disconnected, the sampling and holding circuit II enters a voltage holding state, and the voltage V is outputrIs directly related to the resistance loop conductivity; converted into digital quantity by A/D module and stored in MCU.

Technical Field

The invention relates to the technical field of ocean monitoring, in particular to a conductivity measuring device and a conductivity measuring method capable of compensating environmental changes.

Background

Conductivity is a basic characteristic parameter of liquids, and conductivity sensors are widely used in industrial production and marine monitoring. The conductivity measuring sensors commonly used at present are of an electrode type and an induction type. The latter is based on the principle of electromagnetic induction and consists of a primary coil, a secondary coil and a conductive liquid loop. The primary coil winding is electrified with alternating current, the generated annular alternating magnetic field generates induced electromotive force in the secondary coil through the conductive liquid loop, the induced electromotive force is measured, and the conductivity of the liquid can be obtained through calibration. The measuring method has the advantages of high response speed and difficulty in attaching the sensor by pollutants. However, the magnetic permeability of the magnetic core of the coil is obviously influenced by environmental factors such as temperature and the like, so that the inductance of the coil and the induced electromotive force are changed, and the measurement accuracy is influenced.

In order to solve the above problems, it is necessary to add an environmental compensation function to the sensor to improve environmental adaptability of the inductive conductivity sensor.

Disclosure of Invention

In order to solve the above technical problems, the present invention provides a conductivity measuring device and a conductivity measuring method capable of compensating environmental changes, so as to compensate measured value drift caused by external environmental changes such as temperature, and achieve the purpose of accurately measuring liquid conductivity.

In order to achieve the purpose, the technical scheme of the invention is as follows:

a conductivity measuring device capable of compensating environmental changes comprises a conductivity sensor and a signal processing circuit, wherein the conductivity sensor comprises a primary magnetic core, a secondary magnetic core and a liquid guide pipe, the primary magnetic core, the secondary magnetic core and the liquid guide pipe are positioned in a sensor shell, the liquid guide pipe penetrates through the primary magnetic core and the secondary magnetic core, a primary winding is wound on the primary magnetic core, and a secondary magnetic core is wound on the secondary magnetic coreA secondary winding is wound, and the winding directions of the primary winding and the secondary winding are opposite; a liquid loop and a resistance loop are arranged between the primary magnetic core and the secondary magnetic core, and a liquid resistance R exists on the liquid loopwThe conducting wires of the resistance loop are respectively wound for one circle on the primary magnetic core and the secondary magnetic core and are crossed at the gap between the two magnetic cores, and a loop resistor R is connected in the resistance loop in seriesrAnd an analog switch S1; the signal processing circuit comprises an inverting amplifying circuit, an integrating circuit, a sampling holding circuit, an A/D module and an MCU which are connected in sequence, wherein the sampling holding circuit comprises a sampling holding circuit I and a sampling holding circuit II which are connected in parallel.

In the above scheme, an analog switch S2 is provided between the inverting amplifier circuit and the integrating circuit, an analog switch S3 is connected in parallel to both ends of a capacitor C1 of the integrating circuit, an analog switch S4 is provided between the integrating circuit and the sample-and-hold circuit I, and an analog switch S5 is provided between the integrating circuit and the sample-and-hold circuit II.

The conductivity measuring method capable of compensating the environmental change, which adopts the conductivity measuring device capable of compensating the environmental change, comprises the following steps:

immersing a conductivity sensor into liquid to be detected, wherein the inside of a liquid guide pipe and the outside of a sensor shell are filled with the liquid to be detected to form a liquid loop;

step two, the MCU controls to generate an excitation signal, and the excitation signal is input into the primary winding and is a standard square wave signal;

step three, after the sawtooth waveform induced electromotive force generated by the liquid loop and the resistance loop is amplified by the inverting amplifying circuit, the sawtooth waveform induced electromotive force is accumulated by the integrating circuit, then enters a sample-hold circuit I and a sample-hold circuit II, and waits for reading and conversion of the A/D module; the flow direction of the electric signal is controlled by controlling the opening and closing of the analog switches S1-S5, and the induced electromotive force V generated by the liquid loop is respectively measuredwAnd the induced electromotive force V generated by the resistance loopr

Step four, calculating the conductivity k of the liquid loopw

Wherein k isrIndicating the conductivity, K, of the resistive circuitcRepresenting the conductivity cell constant, R, of the conductivity sensorrIs a loop resistance, KcAnd RrAll are constant values.

In the above scheme, the specific method of the third step is as follows:

(1) at t0~t1At the moment S1 is opened, only the liquid loop is closed, and under the action of the excitation signal, the induced electromotive force V which is in proportional correlation with the conductivity of the liquid to be measured is generated on the secondary windingwInduced electromotive force VwAmplified by the inverting amplifier circuit, enters the integrating circuit through an analog switch S2, and enters the integrating circuit at t0At the moment, the analog switch S3 is closed for 1/10 square wave periods, so that the integrating circuit is reset and cleared; at t0~t1At the moment, the analog switch S2 is closed only when the excitation square wave outputs high level, and the output voltage value of the integrating circuit increases linearly in the period of time, namely the output isAt t1At that time, the output voltage of the integration circuit is abbreviated as Vw(ii) a At t1When the last excitation square wave period before the moment is output at a high level, the analog switch S4 is closed for a half square wave period, the sampling and holding circuit I10 carries out tracking sampling, and after S4 is disconnected, the sampling and holding circuit I10 enters a voltage holding state, and the output voltage V of the sampling and holding circuit I10 is outputwThe liquid conductivity is related in proportion, converted into digital quantity through an A/D module and stored in the MCU;

(2) at t1~t2At time, S1 is closed; at the moment, under the action of an excitation signal, induced electromotive force which is simultaneously related to the conductivity of the liquid to be detected and the resistance value of the loop is generated on the secondary winding; during this time, the analog switch S2 is closed when the excitation square wave output is low, and the induced electromotive force entering the integration circuit contains VwAnd VrTwo parts, wherein VwAnd t0~t1V of timewThe directions are opposite; because the resistance loop is cross-wound, the induced electromotive force V generated by the resistance looprAnd VwThe directions are opposite; thus, the net output of the integrating circuit during this period isDue to t0~t1And t1~t2Are the same, so at t2At the moment, the output voltage of the integrating circuit isOrAssociated with resistive circuits only, and denoted Vr(ii) a At t2When the last excitation square wave period before the moment is output at a low level, the analog switch S5 is closed for a half square wave period, the sampling and holding circuit II carries out tracking sampling, after the S5 is disconnected, the sampling and holding circuit II enters a voltage holding state, and the voltage V is outputrIs directly related to the resistance loop conductivity; converted into digital quantity by A/D module and stored in MCU.

According to the technical scheme, the conductivity measuring device and the conductivity measuring method capable of compensating environmental changes, provided by the invention, have the advantages that the loop resistor is added into the conductivity sensor, the ratio of the induced electromotive force output of the liquid loop and the resistance loop formed by the liquid to be measured and the conductivity of the resistance loop is multiplied by the conductivity of the liquid to be measured to serve as the conductivity measuring result of the liquid to be measured, the measured value drift caused by external environmental changes such as temperature and the like is completely compensated, and the accurate measurement of the liquid conductivity can be realized.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.

Fig. 1 is a schematic structural diagram of a conductivity sensor according to an embodiment of the present invention;

FIG. 2 is a schematic view of an apparatus for measuring conductivity capable of compensating for environmental changes according to an embodiment of the present invention;

FIG. 3 is a timing diagram of the circuit of the present invention.

In the figure: 1. a primary magnetic core; 2. a secondary magnetic core; 3. a sensor housing; 4. a liquid draft tube; 5. an excitation signal; 6. a primary winding; 7. a secondary winding; 8. an inverting amplifier circuit; 9. an integrating circuit; 10. a sample-and-hold circuit I; 11. a sample-and-hold circuit II; 12. an A/D module; 13. MCU; 14. a resistance loop; 15. a liquid circuit.

Detailed Description

The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

The invention provides a conductivity measuring device capable of compensating environmental changes, which comprises a conductivity sensor and a signal processing circuit, wherein the conductivity sensor comprises a primary magnetic core 1, a secondary magnetic core 2 and a liquid guide pipe 4 which are positioned in a sensor shell 3, the liquid guide pipe 4 penetrates through the primary magnetic core 1 and the secondary magnetic core 2, a primary winding 6 is wound on the primary magnetic core 1, a secondary winding 7 is wound on the secondary magnetic core 2, and the winding directions of the primary winding 6 and the secondary winding 7 are opposite; a liquid loop 15 and a resistance loop 14 are arranged between the primary magnetic core 1 and the secondary magnetic core 2, and a liquid resistance R is arranged on the liquid loop 15wThe conductor of the resistance loop 14 is wound on the primary magnetic core 1 and the secondary magnetic core 2 respectively and is crossed at the gap between the two magnetic cores, and a loop resistor R is connected in the resistance loop 14 in seriesrAnd an analog switch S1; the signal processing circuit comprises an inverting amplifying circuit 8, an integrating circuit 9, a sampling holding circuit, an A/D module 12 and an MCU 13 which are connected in sequence, and the sampling holding circuit comprises a sampling holding circuit I10 and a sampling holding circuit I I11 which are connected in parallel.

An analog switch S2 is arranged between the inverting amplification circuit 8 and the integrating circuit 9, an analog switch S3 is connected in parallel with two ends of a capacitor C1 of the integrating circuit 9, an analog switch S4 is arranged between the integrating circuit 9 and the sample-hold circuit I10, and an analog switch S5 is arranged between the integrating circuit 9 and the sample-hold circuit II 11.

The conductivity measuring method capable of compensating the environmental change, which adopts the conductivity measuring device capable of compensating the environmental change, comprises the following steps:

firstly, immersing a conductivity sensor into liquid to be detected, and filling the liquid to be detected in the liquid guide pipe 4 and the sensor shell 3 to form a liquid loop 15;

step two, the MCU 13 controls to generate an excitation signal 5, the excitation signal 5 is input into the primary winding 6, the excitation signal 5 is a standard square wave signal, the frequency is 1KHz, the high level of the square wave is positive voltage, and the low level is negative voltage with the same absolute value;

step three, after the sawtooth waveform induced electromotive force generated by the liquid loop 15 and the resistance loop 14 is amplified by the inverting amplifying circuit 8, the sawtooth waveform induced electromotive force is accumulated by the integrating circuit 9, then enters the sample-hold circuit I10 and the sample-hold circuit II 11, and waits for the A/D module 12 to read and convert; the flow direction of the electric signal is controlled by controlling the opening and closing of the analog switches S1-S5, and the induced electromotive force V generated by the liquid loop 15 is respectively measuredwAnd the induced electromotive force V generated by the resistance loop 14r(ii) a It takes 20 cycles, about 20ms, to complete one conductivity measurement. The control of the analog switches S1-S5, the reading of the A/D value and the calculation and output of the measurement result are all completed by the MCU 13.

The method comprises the following specific steps:

(1) at t0~t1At the moment S1 is opened, only the liquid circuit 15 is closed, and an induced electromotive force V proportional to the conductivity of the liquid to be measured is generated on the secondary winding 7 under the action of the excitation signal 5wInduced electromotive force VwAmplified by the inverting amplifier circuit 8, and then enters the integrating circuit 9 through the analog switch S2, at t0At the moment, the analog switch S3 is closed for 1/10 excitation cycles, so that the integrating circuit 9 is reset and cleared; the function of the analog switch S2 is to perform phase control, at t0~t1At the moment, the analog switch S2 is closed only when the square wave is excited to the high level, only the induced electromotive force generated when the square wave is excited to the high level is allowed to be integrated, and the output voltage value of the integrating circuit 9 linearly increases during the period, that is, the output isAt t1Time, integral circuit9 output Voltage is abbreviated as Vw(ii) a At t1When the last excitation square wave period before the moment is output at a high level, the analog switch S4 is closed for a half square wave period, the sampling and holding circuit I10 carries out tracking sampling, and after S4 is disconnected, the sampling and holding circuit I10 enters a voltage holding state, and the output voltage V of the sampling and holding circuit I10 is outputwThe liquid conductivity is related in proportion, converted into digital quantity through a CH1 channel of the A/D module and stored in the MCU 13;

(2) at t1~t2At time, S1 is closed; at the moment, the liquid loop 15 and the resistance loop 14 are closed at the same time, and under the action of the excitation signal 5, induced electromotive force which is related to the conductivity of the liquid to be measured and the resistance value of the loop at the same time is generated on the secondary winding 7; during this time, the analog switch S2 is closed when the excitation square wave output is low, and the induced electromotive force entering the integrating circuit 9 contains VwAnd VrTwo parts, wherein VwAnd t0~t1V of timewThe directions are opposite; since the resistance circuit 14 is cross-wound, an induced electromotive force V is generated due to the cross-windingrAnd VwThe directions are opposite; thus, the net output of the integrating circuit 9 during this period isDue to t0~t1And t1~t2Are the same and are all 10ms, so at t2The voltage at time t0~t1And t1~t2Integration results of two time segments, i.e.I.e. the output voltage of the integrating circuit 9 isOrAssociated with the resistive circuit 14 only, and designated Vr(ii) a At t2At the time of low level output in the last excitation square wave period before the moment, the analog switch S5 is closedClosing half square wave period, tracking and sampling by the sampling holding circuit II 11, switching off S5, making the sampling holding circuit II 11 enter a voltage holding state, and outputting a voltage VrIs directly related to the resistance loop 14 conductivity; converted into digital quantity by the CH2 channel of the A/D module 12 and stored in the MCU 13.

Step four, calculating the conductivity k of the liquid loop 15w

Wherein k isrIndicating the conductivity, K, of the resistive circuit 14cRepresenting the conductivity cell constant, R, of the conductivity sensorrIs a loop resistance, KcAnd RrAll are constant values.

When the magnetic permeability of the magnetic core changes due to the change of the external environment such as temperature, an induced electromotive force V is generated in the secondary winding 7w、VrThe same ratio change also occurs, but in this embodiment, because of VwAnd VrThe ratio remains constant so that the measurement of the liquid conductivity is not altered by changes in the external environment.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于主变铁芯夹件接地限流电阻智能计算装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!