CN115326886A - Calibration coefficient acquisition method, TDS detection method and device - Google Patents

Calibration coefficient acquisition method, TDS detection method and device Download PDF

Info

Publication number
CN115326886A
CN115326886A CN202210996830.9A CN202210996830A CN115326886A CN 115326886 A CN115326886 A CN 115326886A CN 202210996830 A CN202210996830 A CN 202210996830A CN 115326886 A CN115326886 A CN 115326886A
Authority
CN
China
Prior art keywords
tds
value
temperature
standard
solution
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.)
Pending
Application number
CN202210996830.9A
Other languages
Chinese (zh)
Inventor
陈力军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xinlin Weizhi Electronics Shanghai Co ltd
Original Assignee
Xinlin Weizhi Electronics Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xinlin Weizhi Electronics Shanghai Co ltd filed Critical Xinlin Weizhi Electronics Shanghai Co ltd
Priority to CN202210996830.9A priority Critical patent/CN115326886A/en
Publication of CN115326886A publication Critical patent/CN115326886A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N27/00Investigating or analysing materials by the use of electric, electrochemical, or magnetic means
    • G01N27/02Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance
    • G01N27/04Investigating or analysing materials by the use of electric, electrochemical, or magnetic means by investigating impedance by investigating resistance
    • G01N27/06Investigating 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)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The technical scheme of the invention discloses a calibration coefficient acquisition method, a TDS detection method and a TDS detection device. The method for acquiring the calibration coefficient uses a plurality of different TDS standard solutions, including: acquiring at least two sets of TDS measurement values, each set of TDS measurement values including TDS measurement values of a TDS standard solution at a plurality of sampling times; comprehensively comparing the at least two groups of TDS measured values with corresponding TDS standard values, and setting the sampling time corresponding to the TDS measured value with the minimum deviation relative to the TDS standard value as the actual sampling time; obtaining TDS measured values of all TDS standard solutions at actual sampling time respectively; and determining the TDS calibration coefficient according to the ratio of each TDS standard value to the corresponding TDS measured value. The technical scheme of the invention can be self-adapted to various probes, ensure the consistent precision of the probes in different batches, reduce the product cost while ensuring the testing precision, and expand the measuring range.

Description

Calibration coefficient acquisition method, TDS detection method and device
Technical Field
The invention relates to the technical field of TDS detection, in particular to a calibration coefficient acquisition method, a TDS detection method and a TDS detection device.
Background
Along with the improvement of living standard of people, the requirement of human beings on healthy water is increasingly improved, and the identification cognitive wish of the people on water resources is gradually increased when the geological environment is more and more severe due to work development. How to know the health degree of the current water consumption becomes a social universal requirement. In China, "hygienic Standard for Drinking Water" (GB 5749-85), specifications of 35 water quality standards are clear, wherein Total Dissolved Solids (TDS) is one of the key indexes. TDS reflects the total amount of all solid matter dissolved in water, in milligrams per liter (mg/L), colloquially referred to as PPM. Mainly refers to mineral ions such as magnesium ions, potassium ions, sodium ions, calcium ions and the like in water, organic matters and the like) can reflect the purity of water, and is a standard for directly measuring water quality at present: the smaller the TDS value, the lower the impurity content in the water, the better the water quality, and conversely, the higher the impurity content, the lower the water quality. The TDS value of the current drinking water is normal when the TDS value is less than or equal to 1000mg/L, and the TDS value of the national direct drinking water standard is within 0-50 PPM.
In view of monitoring mechanism TDS detects that the cost is high enough, can't popularize to the clean aquatic products of market end. The TDS that takes certainly among most water purification class products in the existing market detects can be in high accuracy and low-cost dilemma, and this device that mainly reflects in TDS detection scheme adopts is to precision and cost's influence. Taking the core device of the TDS water quality detection scheme as an example, the structure, sectional area, length and surface smoothness of the probe can influence the detection result in application. Most of good probe materials are graphite or titanium alloy, but the production and processing are difficult, the process requirement is high, and the cost is always high. Therefore, the common probe is mainly a titanium alloy or stainless steel needle. The factors have influence on detection precision, the consistency of the detection precision of the batch of the low-end probes in mass production is a problem in the industry, and the reason is that all the formed schemes in the prior art need to be matched with a specified probe and cannot be replaced randomly. During quantification, a large amount of manpower is required to be spent on selecting probes for products with high consistency requirements, so that cost control of the products is greatly restricted.
Disclosure of Invention
The technical problem to be solved by the technical scheme of the invention is that the detection precision and consistency of devices such as low-cost probes adopted by the existing TDS detection scheme are not high, so that the cost control of products is restrained.
In order to solve the technical problems, the technical scheme of the invention provides a method for acquiring a calibration coefficient, which uses n different TDS standard solutions, wherein the TDS standard values of the n TDS standard solutions are sorted into TDS 1 、TDS 2 、……、TDS n-1 、TDS n ,n≥3;
The method for acquiring the calibration coefficient comprises the following steps:
acquiring at least two sets of TDS measurement values, each set of TDS measurement values including a TDS standard solution at m sampling times t 1 、t 2 、……、t m The TDS measured value m is more than or equal to 3, and an electrode conductivity detection method is adopted to obtain the TDS measured value of the TDS standard solution at the sampling time;
comprehensively comparing the at least two groups of TDS measured values with corresponding TDS standard values, and setting sampling time t corresponding to the TDS measured value with the minimum relative TDS standard value deviation c C is more than or equal to 1 and less than or equal to m for the actual sampling time;
acquiring TDS standard solutions at actual sampling time t c TDS measurement value TDS 1c 、TDS 2c 、……、TDS (n-1)c 、TDS nc
According to each TDS standard value and corresponding actual sampling time t c Determining a TDS calibration factor F from the ratio of the TDS measurement values 1 、F 2 、……、F n-1 、F n
Alternatively, n =4,m =8,tds 1 =(60±2%)PPM、TDS 2 =(250±2%)PPM、TDS 3 =(707±1%)PPM、TDS 4 = (1500 ± 1%) PPM; respectively acquire TDS 2 Standard solution and TDS 3 Standard solution at 8 sampling times t 1 、t 2 、……、t 8 TDS measurement of (a).
Optionally, the electrode conductivity detection method includes: applying a first pulse to the first end of the probe, the high level duration of the first pulse being determined according to the sampling time; reading voltage measurements at the second end of the probe during a high duration of the first pulse to obtain corresponding conductivity and TDS measurements; a second pulse is applied to the second end of the probe for the low duration of the first pulse.
Optionally, two sets of TDS measurements are acquired, one set of TDS measurements comprising TDS x Standard solution at m sampling times t 1 、t 2 、……、t m TDS measured value TDS x1 、TDS x2 、……、TDS xm Another set of TDS measurements includes TDS x+1 Standard solution at m sampling times t 1 、t 2 、……、t m TDS measurement value TDS (x+1)1 、TDS (x+1)2 、……、TDS (x+1)m ,1≤x≤n-1;
The actual sampling time t c The settings were as follows:
calculating | TDS x /TDS xa -TDS x+1 /TDS (x+1)a Taking a value from 1 to m, and taking a value corresponding to the sampling time t when the minimum calculated value is taken a Then t is c =t a (ii) a Alternatively, the first and second liquid crystal display panels may be,
calculation (TDS) x /TDS xa +TDS x+1 /TDS (x+1)a ) A is taken from 1 to m, and the sampling time t corresponding to the value of a is taken when the minimum calculated value is taken a Then t is c =t a (ii) a Alternatively, the first and second liquid crystal display panels may be,
calculate [ TDS ] xa -TDS x |/TDS x -|TDS (x+1)a -TDS x+1 |/TDS x+1 Taking a value from 1 to m, and taking a value corresponding to the sampling time t when the minimum calculated value is taken a Then t is c =t a (ii) a Alternatively, the first and second electrodes may be,
calculating (| TDS) xa -TDS x |/TDS x +|TDS (x+1)a -TDS x+1 |/TDS x+1 I)/2, a takes a value from 1 to m, and a takes a corresponding sampling time t when the minimum calculated value is taken a Then t is c =t a
According to each TDS standard value and corresponding actual sampling time t c Determining a TDS calibration factor F from the ratio of the TDS measurements 1 、F 2 、……、F n-1 、F n The method comprises the following steps: according to TDS i And TDS ic Determining the TDS i Corresponding F i I is taken from 1 to n;
alternatively, the method comprises the following steps: according to TDS i And TDS ic Determining the TDS i Corresponding F i I takes values from 1 to (x-1) and (x + 2) to n; according to TDS x And TDS xc Is determined by x According to TDS x+1 And TDS (x+1)c Is determined by x+1 ', determination of TDS x+1 Corresponding toF x+1 =(F x ’+F x+1 ’)/2。
Optionally, the method for obtaining the calibration coefficient further includes: detecting the temperature measurement value T of the temperature standard solution by using a temperature sensor C The temperature standard value of the temperature standard solution is T B (ii) a Calculating the temperature calibration coefficient F T Said temperature calibration factor F T Is the temperature standard value T of the temperature standard solution B With a measured value of temperature T C The ratio of (a) to (b).
In order to solve the above technical problems, the technical solution of the present invention further provides a TDS detection method, including the following steps:
obtaining the actual sampling time t of the solution to be detected c Conductivity K of dc
Conductivity K based on solution to be measured dc Obtain TDS measured value TDS of solution that awaits measuring dc
Calibrating TDS measurement value TDS with TDS calibration coefficient corresponding to adjacent TDS standard value dc Obtaining the TDS calibration value TDS of the solution to be detected dcj
Wherein the adjacent TDS criterion value comprises less than TDS dc And/or is greater than the TDS dc The minimum value of the TDS standard values of (a); the actual sampling time t c And acquiring the TDS calibration coefficient according to the acquisition method of the calibration coefficient.
Optionally, the conductivity K based on the solution to be measured dc Obtaining a TDS measurement value TDS dc The method comprises the following steps: detecting the temperature measurement value T of the solution to be detected by adopting a temperature sensor dc (ii) a According to said temperature measurement T dc Compensating the conductivity K of the solution to be measured dc (ii) a According to the conductivity K of the compensated solution to be measured dc ' determining a TDS measurement TDS dc
Alternatively, the method comprises the following steps: detecting the temperature measurement value T of the solution to be detected by adopting a temperature sensor dc (ii) a Calibrating the coefficient F by temperature T Calibrating the temperature measurement value T of the solution to be measured dc Obtaining a temperature calibration value T dc '; according to the temperature calibration value T dc ' Compensation of the conductivity K of the solution to be measured dc (ii) a According to the conductivity K of the compensated solution to be measured dc ' determining TDS measurement value TDS dc (ii) a Wherein the temperature calibration coefficient F T Is the temperature standard value T of the temperature standard solution B With a measured value of temperature T C Detecting the temperature standard solution by using a temperature sensor to obtain a temperature measurement value T of the temperature standard solution C
Optionally, the TDS calibration coefficients corresponding to the adjacent TDS standard values are used for calibrating the TDS measured values TDS dc Obtaining TDS calibration value TDS dcj The method comprises the following steps:
TDS calibration coefficient F corresponding to adjacent TDS standard value y Calibrating the TDS measurement value TDS dc ,F y =TDS y /TDS yc ,TDS dcj =TDS dc *F y (ii) a Alternatively, the first and second electrodes may be,
TDS calibration coefficient F corresponding to two adjacent TDS standard values e 、F e+1 Calibrating the TDS measurement value TDS of the solution to be measured dc ,F e =TDS e /TDS ec ,F e+1 =TDS e+1 /TDS (e+1)c ,F y ’=f(F e ,F e+1 ),TDS dcj =TDS dc *F y ’,f(F e ,F e+1 ) To include a parameter F e 、F e+1 Is described in (1).
In order to solve the above technical problem, the technical solution of the present invention further provides a TDS detection apparatus, including: a processor and memory for storing one or more programs; the one or more programs are executed by the processor to cause the processor to implement the TDS detection method.
Optionally, the TDS detection apparatus further includes: a TDS detection circuit and a temperature detection circuit,
the TDS detection circuit comprises an MOS switch tube, a first resistor, a second resistor and a third resistor, and the processor is provided with a first IO end, a second IO end and a first AD sampling end; the first resistor is connected between the first IO end and the grid of the MOS switch tube, the second resistor is connected between the first end of the probe and the low level voltage end, and the source electrode and the drain electrode of the MOS switch tube are respectively connected with the high level voltage end and the first end of the probe; the third resistor is connected between a second end of the probe and the second IO end, and the first AD sampling end is used for reading a voltage value of the second end of the probe;
the temperature detection circuit comprises a temperature sensor, a fourth resistor and a bypass capacitor, and the processor is also provided with a third IO end and a second AD sampling end; the first end of the temperature sensor is connected with the high-level voltage end, the fourth resistor and the bypass capacitor are connected in parallel between the second end of the temperature sensor and the third IO end, and the second AD sampling end is used for reading the voltage value of the second end of the temperature sensor; and the third IO end outputs low level voltage during temperature measurement and suspends at other times.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
detect the TDS measured value of a plurality of TDS standard solutions and compare with the TDS standard value, confirm the actual sampling time that the TDS detected to the TDS standard value with the TDS measured value that actual sampling time detected calculates TDS calibration coefficient. Actual sampling time, probe detection circuitry's stability and degree of accuracy are high, recycle the TDS measured value of the solution that awaits measuring of calibration coefficient calibration can obtain the high accuracy TDS value that does not receive factors such as probe material, structure influence, therefore the probe selection range that TDS detected the adoption is wider, especially can select low-cost probe to possible compromise low-cost and high accuracy on TDS detects product design.
The influence of the probe difference of dynamic point collection (different probes, different determined actual time), and grading calibration (different TDS ranges and different calibration coefficients) is adopted, so that the defect that the probe cannot be replaced in the same scheme in the past is effectively overcome. In addition, due to different production and processing processes of different circuits, equivalent capacitances parasitic on the PCBA (Printed Circuit Board Assembly) are slightly different, which is a non-negligible problem in terms of high sensitivity and pursuit of high-precision products.
The temperature acquisition part provides a temperature calibration coefficient to carry out temperature calibration, and then the calibration temperature is used for compensating a TDS measurement value, so that the solution detection precision can be further improved, the influence of individual difference of devices is effectively solved, and the precision deviation caused by device batch difference during mass production is ensured.
The first IO terminal controls the working voltage of the TDS detection circuit, and the power switch of the TDS detection circuit is switched to provide a pulse signal with enough energy for the power switch through level conversion of the control port. That is to say, TDS detection circuit's drive directly comes from the power supply unit rather than IO end, has ensured sufficient driving force, can not influence the accurate of AD module sampling because of different load current to promote the controllability of solution different interval concentration sampling precision. Under the condition of different solution concentrations, the voltage of the sampling circuit is stable, so that the detection precision is improved.
Adopt two-way dynamic pulse mode, when TDS sampling promptly, the second IO end exports low level voltage, and the instantaneous voltage signal of cooperation first AD sampling end sampling, after the sampling, the second IO end switches output high level voltage, utilizes two-way electric current to flow through the probe electrode, has effectively balanced probe polarization problem, prolongs its life.
The third IO end is used as a virtual ground end in the temperature detection circuit, the temperature sampling working time is controlled, the static power consumption of the product is effectively reduced, the problem of standby time in handheld products is solved, and the advantages are very obvious.
Drawings
Fig. 1 is a schematic flowchart of a method for acquiring a calibration coefficient according to embodiment 1 of the present invention;
fig. 2 is a schematic flowchart of a method for obtaining a calibration coefficient according to embodiment 2 of the present invention;
FIG. 3 is a schematic flow chart of a TDS detection method according to embodiment 3 of the present invention;
FIG. 4 is a schematic flow chart of a TDS detection method according to embodiment 4 of the present invention;
FIG. 5 is a schematic view of a TDS detection apparatus according to embodiment 5 of the present invention;
fig. 6 is a waveform diagram of a signal terminal of the TDS detection circuit according to embodiment 5 of the present invention.
Detailed Description
The invention provides a high-precision TDS detection scheme which is not required to pick up probes and can adapt to various different probe types, and aims to solve the problem that the TDS detection precision is limited by adopting different probes in the prior art. The following detailed description is made with reference to the accompanying drawings and examples.
Example 1
The embodiment provides a calibration coefficient acquisition method, which adopts a probe to detect a plurality of TDS standard solutions to obtain TDS measurement values and compares the TDS measurement values with TDS standard values, determines the actual sampling time of TDS detection, and calculates the calibration coefficient by using the TDS standard values and the TDS measurement values detected at the actual sampling time. The calibration coefficient can be used for calibrating TDS measured values of the solution to be detected at actual sampling time, so that the high-precision TDS value of the solution to be detected is output.
The method for acquiring the calibration coefficient of the embodiment needs to use n different TDS standard solutions, wherein the TDS standard values of the n TDS standard solutions are sorted into TDS 1 、TDS 2 、……、TDS n-1 、TDS n And n is more than or equal to 3. The sorting refers to sorting according to the magnitude of the numerical value, and the sorting is from small to large in the embodiment.
The TDS standard value also is called TDS nominal value, and standard solution is the collective name of the standard reagent who is used for experiment or detection and analysis work, and TDS standard solution has confirmed accurate TDS value (be the TDS standard value) and has been used for TDS detection and analysis's a solution, can purchase from the market, also can utilize high accuracy TDS detector configuration. Although the TDS value of the TDS standard solution is known, due to the influence of the elements of the detection circuit, such as the material and the structure of the probe, the actually detected TDS value (i.e., the TDS measurement value) can deviate from the TDS standard value to different degrees, and the actual sampling time and the calibration coefficient determined by the TDS measurement value and the TDS standard value can be used for calibrating the TDS measurement value of the solution to be detected, so as to obtain the high-precision TDS value which is not influenced by the material and the structure of the probe. Therefore, the TDS detection is wider in probe selection range, can be adaptive to various probes, and is particularly feasible in application of low-cost probes, so that high precision and low cost can be considered in the design of TDS detection products.
Referring to fig. 1, the method for obtaining the calibration coefficient of the present embodiment includes the following steps: step S11, acquiring at least two groups of TDS measured values, wherein each group of TDS measured values comprises the TDS measured values of a TDS standard solution at a plurality of sampling times; step S12, comprehensively comparing the at least two groups of TDS measured values with corresponding TDS standard values, and setting the sampling time corresponding to the TDS measured value with the minimum deviation relative to the TDS standard value as actual sampling time; s13, acquiring TDS measured values of all TDS standard solutions at actual sampling time respectively; and S14, determining a TDS calibration coefficient according to the ratio of each TDS standard value to the corresponding TDS measured value. Wherein, the TDS measured value of the TDS standard solution at the sampling time is obtained by adopting an electrode conductivity detection method.
In specific implementation, step S11 is performed by taking two sets of TDS measurements as an example, and an electrode conductivity detection method is used to obtain the two sets of TDS measurements, wherein one set of TDS measurements includes TDS x Standard solution (namely TDS standard value is TDS) x TDS standard solution) at m sampling times t 1 、t 2 、……、t m TDS measured value TDS x1 、TDS x2 、……、TDS xm Another set of TDS measurements is TDS x+1 Standard solution (namely TDS standard value is TDS) x+1 TDS standard solution) at m sampling times t 1 、t 2 、……、t m TDS measured value TDS (x+1)1 、TDS (x+1)2 、……、TDS (x+1)m M is more than or equal to 3, x is more than or equal to 1 and less than or equal to n-1. The number m of sampling time points and the interval between each sampling time point can be set according to the actual situation, and the larger m is, the longer the total sampling time is. At TDS standard value sequence TDS 1 、TDS 2 、……、TDS x 、TDS x+1 、……、TDS n-1 、TDS n In, the difference between each TDS standard value, adjacent TDS standard value can be according to TDS measuring range setting among the practical application, TDS x And TDS x+1 Can be two adjacent values selected from a TDS standard value sequence, and most of the TDS values of the solution to be detected (detected liquid object) in practical application are in the two adjacent TDS standardsWithin a quasi-value range. TDS x And TDS x+1 The middle two values of the sequence can also be chosen, for example, n is an even number, x = n/2; n is an odd number, and x = (n-1)/2 or (n + 1)/2. The standard solution in this example is water, and the water temperature is normal temperature, i.e. 25 ℃.
Continuing to execute step S12, comprehensively comparing the two sets of TDS measured values with the corresponding TDS standard values, and setting a relative TDS x 、TDS x+1 Sampling time t corresponding to TDS measured value with minimum deviation c C is more than or equal to 1 and less than or equal to m, which is the actual sampling time. TDS x Standard solution at sampling time t 1 、t 2 、……、t m Corresponding in turn to the TDS measurement value of x1 、TDS x2 、……、TDS xm ,TDS x+1 Standard solution at sampling time t 1 、t 2 、……、t m Corresponding in turn to the TDS measurement value of (x+1)1 、TDS (x+1)2 、……、TDS (x+1)m . The combined comparison actually takes into account the measurement deviations of the two solutions.
Actual sampling time t c May be selected from, but is not limited to, the following:
1) Calculating | TDS x /TDS xa -TDS x+1 /TDS (x+1)a Taking a value from 1 to m, and taking a value corresponding to the sampling time t when the minimum calculated value is taken a Then t is c =t a
2) Calculation (TDS) x /TDS xa +TDS x+1 /TDS (x+1)a ) A is taken from 1 to m, and the sampling time t corresponding to the value a when the minimum calculated value is taken a Then t is c =t a
3) Calculate [ TDS ] xa -TDS x |/TDS x -|TDS (x+1)a -TDS x+1 |/TDS x+1 Taking a value from 1 to m, and taking a value corresponding to the sampling time t when the minimum calculated value is taken a Then t is c =t a
4) Calculating (| TDS) xa -TDS x |/TDS x +|TDS (x+1)a -TDS x+1 |/TDS x+1 I)/2, a is taken from 1 to m, and the minimum calculated value is takenSampling time t corresponding to time a value a Then t is c =t a
This embodiment adopts 1) to determine the actual sampling time, for example, let m =8, take a =1 to 8, calculate | TDS x /TDS x1 -TDS x+1 /TDS (x+1)1 |、|TDS x /TDS x2 -TDS x+1 /TDS (x+1)2 |、……、|TDS x /TDS x8 -TDS x+1 /TDS (x+1)8 Absolute value of 8 ratios of difference is calculated to obtain the minimum calculated value of | TDS x /TDS x4 -TDS x+1 /TDS (x+1)4 I, then a =4 or TDS x4 、TDS (x+1)4 Corresponding sampling time t 4 Is the actual sampling time.
It should be noted that, in the embodiment, two sets of TDS measurement values and TDS standard values are comprehensively compared, analyzed, and the actual sampling time is set, when the n value is larger in the practical application, more sets (e.g., three sets, four sets, etc.) of TDS measurement values can be adopted to compare and set the actual sampling time according to the practical application requirements, and the setting manner can be analogized or changed according to the above manner.
Use the probe to insert the TDS value of solution measurement, compromise the TDS measured value deviation of considering multiple standard solution, the TDS measured value is close to the TDS standard value more, explains that probe detection circuitry's precision is higher to this sets for to the TDS value deviation that the sampling time of solution to be measured can measure and obtain is more accurate less promptly. In fact, step S12 is to determine a preferred sampling time for TDS detection, and to adapt the application of different probes in the TDS detection scheme.
Continuing to execute step S13, acquiring each TDS standard solution at the actual sampling time t by adopting an electrode conductivity detection method c TDS measured value TDS 1c 、TDS 2c 、……、TDS (n-1)c 、TDS nc . Because the stable and more accurate detection sampling time point of the probe is determined, other TDS standard solutions do not need to be detected at all sampling time, and only need to be detected at the actual sampling time t c Detecting to obtain TDS 1 The standard solution is sampled at the actual sampling time t c TDS measured value TDS 1c 、TDS 2 Standard solution at actual sampling time t c TDS measured value TDS 2c 、……、TDS n-1 The standard solution is sampled at the actual sampling time t c TDS measured value TDS (n-1)c 、TDS n-1 The standard solution is sampled at the actual sampling time t c TDS measured value TDS nc
Continuing to execute step S14 according to each TDS standard value and corresponding actual sampling time t c Determining a TDS calibration factor F from the ratio of the TDS measurements 1 、F 2 、……、F n-1 、F n
Step S14 may be to determine n TDS calibration coefficients, i.e. based on the TDS i And TDS ic Determining the TDS i Corresponding F i And i is taken from 1 to n. Specifically, step S14 may include: according to TDS 1 And TDS 1c Determining the TDS 1 Corresponding F 1 According to TDS 2 And TDS 2c Determining the TDS 2 Corresponding F 2 823060 @, 8230based on TDS x-1 And TDS (x-1)c Determining the TDS x-1 Corresponding F x-1 According to TDS x And TDS xc Determining the TDS x Corresponding F x According to TDS x+1 And TDS (x+1)c Determining the TDS x+1 Corresponding F x+1 823060 @, 8230based on TDS n-1 And TDS (n-1)c Determining TDS n-1 Corresponding F n-1 According to TDS n And TDS nc Determining the TDS n Corresponding F n
In this embodiment, TDS calibration coefficient = TDS standard value/TDS measurement value, and n TDS calibration coefficients are: f 1 =TDS 1 /TDS 1c 、F 2 =TDS 2 /TDS 2c 、……、F x =TDS x /TDS xc 、F x+1 =TDS x+1 /TDS (x+1)c 、……、F n-1 =TDS n-1 /TDS (n-1)c 、F n =TDS n /TDS nc . In other embodiments, the TDS calibration coefficient = T may beDS measurement/TDS standard, n TDS calibration coefficients: f 1 =TDS 1c /TDS 1 、F 2 =TDS 2c /TDS 2 、……、F x =TDS xc /TDS x 、F x+1 =TDS (x+1)c /TDS x+1 、……、F n-1 =TDS (n-1)c /TDS n-1 、F n =TDS nc /TDS n
Alternatively, step S14 may also be to determine n-1 TDS calibration coefficients, namely: according to TDS i And TDS ic Determining TDS i Corresponding F i I takes values from 1 to (x-1) and (x + 2) to n; according to TDS x And TDS xc Is determined by x ', according to TDS x+1 And TDS (x+1)c Is determined by x+1 ', determination of TDS x+1 Corresponding F x+1 =(F x ’+F x+1 ')/2. Specifically, step S14 may include: according to TDS 1 And TDS 1c Determining the TDS 1 Corresponding F 1 According to TDS 2 And TDS 2c Determining TDS 2 Corresponding F 2 823060 @, 8230based on TDS x-1 And TDS (x-1)c Determining TDS x-1 Corresponding F x-1 According to TDS x And TDS xc Is determined by x ', according to TDS x+1 And TDS (x+1)c Is determined by x+1 ', \8230, and \8230, according to TDS n-1 And TDS (n-1)c Determining the TDS n-1 Corresponding F n-1 According to TDS n And TDS nc Determining the TDS n Corresponding F n (ii) a Determining TDS x+1 Corresponding F x+1 =(F x ’+F x+1 ')/2. Does not require TDS x Corresponding F x
In this embodiment, the TDS calibration coefficient = TDS standard value/TDS measurement value, and the n-1 TDS calibration coefficients are: f 1 =TDS 1 /TDS 1c 、F 2 =TDS 2 /TDS 2c 、……、F x-1 =TDS x-1 /TDS (x -1)c、F x+1 =(TDS x /TDS xc +TDS x+1 /TDS (x+1)c )/2、F x+2 =TDS x+2 /TDS (x+2)c 、……、F n-1 =TDS n-1 /TDS (n-1)c 、F n =TDS n /TDS nc . In other embodiments, the TDS calibration coefficient = TDS measured value/TDS standard value, and the n-1 TDS calibration coefficients are: f 1 =TDS 1c /TDS 1 、F 2 =TDS 2c /TDS 2 、……、F x-1 =TDS (x-1)c /TDS x-1 、F x+1 =(TDS xc /TDS x +TDS (x+1)c /TDS x+1 )/2、F x+2 =TDS (x+2)c /TDS x+2 、……、F n-1 =TDS (n-1)c /TDS n-1 、F n =TDS nc /TDS n
Theoretically, the larger the n value is, the more the calibration coefficient is, and the more accurate the calibration of the TDS measurement value is; however, the larger the n value is, the longer the time for acquiring the calibration coefficient is, and the higher the implementation complexity is, so that the value of n and the TDS standard value can be reasonably set according to the measurement range of TDS in consideration of both time and implementation complexity. N, m, t are set reasonably in practical application 1 、t 2 、……、t m And a proper TDS standard value is selected, so that the measurement range can be expanded on the premise of ensuring the detection precision, the detection precision and the measurement range are not influenced by the type and the batch of the probe, or the detection precision and the measurement range have small dependence on the consistency of the probe. It can be generally 3. Ltoreq. N.ltoreq.8, 3. Ltoreq. M.ltoreq.10.
For example, n =4,m =8,x =2,tds 1 =(60±2%)PPM、TDS 2 =(250±2%)PPM、TDS 3 =(707±1%)PPM、TDS 4 =(1500±1%)PPM,TDS x =TDS 2 、TDS x+1 =TDS 3 (ii) a With TDS 1 =60PPM、TDS 2 =250PPM、TDS 3 =707PPM、TDS 4 =1500PPM as an example, the actual sampling time t determined in step S12 c =t 4 Then TDS calibration factor F 1 =60/TDS 14 、TDS F 2 =250/TDS 24 、F 3 =707/TDS 34 、F 4 =1500/TDS 44 . When the TDS measured value of the solution to be measured needs to be calibrated, the corresponding TDS calibration coefficient can be selected according to the TDS calibration value adjacent to the TDS measured value to calibrate the measured value, for example, the TDS measured value of the solution to be measured is 180PPM, and then the TDS calibration coefficient F can be used 2 Calibrating 180 PPM; the TDS measurement value of the solution to be measured is 1350PPM, and the TDS calibration coefficient F can be used 4 Calibration is performed 1350 PPM. In practical application, the TDS measurement value is in a certain range of more than 1500PPM, such as [1500PPM, 3000PPM ]]Interval, also by calibration factor F 4 And (6) carrying out calibration.
The electrode conductivity detection method is to detect the conductivity of a solution by using a probe electrode, and can adopt the existing circuit and driving mode of the TDS of the probe detection solution: when two probe electrodes (a first end of the probe and a second end of the probe) are inserted into the solution, the resistance R between the two electrodes can be measured; according to ohm's law, at a given temperature, there is R = ρ L/a, where ρ is the resistivity, L is the inter-electrode spacing in centimeters (cm), and a is the cross-sectional area of the electrodes in square centimeters (cm) 2 ) (ii) a Since a and L are fixed, L/a is a constant, called conductivity cell constant Q, and R = ρ Q; the conductance S and the resistance R form a reciprocal relation, namely S =1/R, and S reflects the strength of the conductive capacity; the conductivity K is inverse to the resistivity p, i.e. K = 1/p, and K = 1/p = Q/R = QS since p = R/Q. When the conductivity cell constant Q is known, the resistance R of the solution is measured, and the conductivity K is determined. Standard units for conductivity are siemens per meter (S/m), typically used in millisiemens per meter (mS/m), and commonly used in microsiemens per centimeter (μ S/cm), with interconversions between units of 1mS/m =0.01mS/cm =10 μ S/cm. The conductivity has a corresponding relationship with the TDS value, and the conversion of the conductivity and the TDS value can be realized by using the prior art, for example, the conductivity can be calculated by using the formula: TDS = Z × K, TDS is typically Z times the conductivity, Z ranges from 0.5 to 0.7, and Z =0.5 is typically taken, so TDS =0.5K.
When measuring the conductivity of the solution using the probe electrode, it is necessary to apply a driving voltage to a first end of the probe and read a voltage value from a second end of the probe to calculate a resistance value of the solution. In this embodiment, the electrode conductivity detection method includes: applying a first pulse to the first end of the probe, the pulse width of the first pulse being determined according to the sampling time; reading voltage measurements at the second end of the probe at a sample time during a high duration of the first pulse to obtain corresponding conductivity and TDS measurements; during the low level duration of the first pulse, a second pulse is applied to the second end of the probe. Alternately applying a drive voltage across the probe prevents polarization of the probe.
The high level of the pulse refers to the highest voltage value of the pulse, and is usually the working voltage of the circuit; the low level of the pulse means that the lowest voltage of the pulse is a low level voltage, typically 0V (ground). The pulse width (pulse width for short) of the first pulse refers to the high level duration of the first pulse, and in step S11, the pulse width of the first pulse is not less than t m In step S13 or when measuring the solution to be measured, the pulse width of the first pulse is not less than t c . The range of the pulse width of the first pulse may be 30 μ S to 100 μ S according to the practical application, in this embodiment, in step S11, the pulse width of the first pulse is 100 μ S, t 1 、t 2 、……、t m Set within 100 μ s, e.g. m =8,t 1 =38μs,t 2 =46μs,t 3 =54μs,t 4 =62μs,t 5 =70μs,t 6 =78μs,t 7 =86μs,t 8 =94 μ s. The pulse width of the second pulse is less than or equal to the low level duration of the first pulse, generally, the low level duration of the first pulse is longer, a plurality of continuous second pulses can be applied within the low level duration of the first pulse, the pulse width (high level duration) of the second pulse is more than or equal to the pulse width (high level duration) of the first pulse, and for example, the pulse width of the second pulse is 110 μ s.
Example 2
This embodiment provides a method for obtaining a calibration coefficient, since the temperature of the solution to be measured is uncertain, and the conductivity changes with the temperature change, taking an aqueous solution as an example, the conductivity increases by about 2% for each 1 ℃ rise of the temperature, and usually 25 ℃ is defined as the standard temperature for measuring the conductivity. In the prior art, considering the influence of temperature factors, before calculating the TDS value by using the conductivity, the conductivity measured by a probe is compensated by using the temperature measurement value of the solution to be measured. Therefore, considering the influence of the temperature of the solution to be measured on the TDS measurement value, the method for acquiring the calibration coefficient of the embodiment further acquires the temperature calibration coefficient, and when TDS is detected, the temperature calibration coefficient is used to calibrate the temperature measurement value of the solution to be measured, the calibrated temperature measurement value is used to compensate the conductivity measured by the probe, and then the compensated conductivity is used to calculate the TDS measurement value.
Referring to fig. 2, different from embodiment 1, the method for obtaining the calibration coefficient of the present embodiment further includes: step S15, detecting the temperature measurement value T of the temperature standard solution by adopting a temperature sensor C The temperature standard value of the temperature standard solution is T B (ii) a Step S16, calculating a temperature calibration coefficient F T Said temperature calibration factor F T Is the temperature standard value T of the temperature standard solution B With a measured value of temperature T C The ratio of (a) to (b). In this example, F T =T B /T C . In other embodiments, it may be F T =T C /T B . Step S15 and step S16 may be performed prior to step S11 to step S14.
In this embodiment, the temperature standard value is T B The Temperature sensor can adopt a Negative Temperature Coefficient (NTC) thermistor, a voltage value at one end of the NTC thermistor in the solution is read by using a resistance voltage division method, and a resistance value of the NTC thermistor can be obtained according to the read voltage value, so that a Temperature measurement value of the solution corresponding to the resistance value is determined, the Temperature measurement value can be determined by adopting the corresponding relation between the thermistor and the Temperature in the prior art, and the description is omitted. Temperature calibration factor F T The dependence of the detection accuracy on the consistency of the temperature sensor, such as an NTC thermistor, can be reduced to some extent.
Example 3
The present embodiment provides a TDS detection method, please refer to fig. 3, which includes the following steps: s21, acquiring the conductivity of the solution to be detected at the actual sampling time; step S22, acquiring a TDS (total dissolved solids) measurement value of the solution to be detected based on the conductivity of the solution to be detected; and S23a, calibrating the TDS measured value by using a TDS calibration coefficient corresponding to an adjacent TDS standard value to obtain a TDS calibration value of the solution to be measured. Wherein one adjacent TDS standard value is less than TDS dc Is greater than the maximum value of the TDS standard values dc (iii) minimum value of TDS standard values of (a); the actual sampling time and TDS calibration coefficients may be acquired according to the calibration coefficient acquisition method of the above embodiment.
In specific implementation, step S21 is executed to obtain the actual sampling time t of the solution to be detected by using an electrode conductivity detection method c Conductivity K of dc . As described in example 1, K can be obtained dc =Q/R dc Wherein Q = L/A, L is the inter-electrode spacing, i.e. the spacing between the first end and the second end of the probe, A is the cross-sectional area of the electrode, L and A are fixed values, therefore Q is constant, R is constant dc By at the actual sampling time t c Reading the voltage measurement V of the second end of the probe dc And (4) calculating.
Continuing to step S22, based on the conductivity K of the solution to be measured dc Obtain TDS measured value TDS of solution to be measured dc . Generally, the influence of the temperature of the solution to be measured on the measured conductivity needs to be considered, and therefore, step S22 of this embodiment further may include: step S221 to step S222.
Specifically, step S221, detecting a temperature measurement value T of the solution to be detected by using a temperature sensor dc . The temperature of the solution to be measured can be detected simultaneously with step S21, i.e. at the actual sampling time t c Reading a voltage measurement value V at one end of a temperature sensor (such as an NTC thermistor) in a solution to be measured Tdc And calculates a resistance measurement value R of the temperature sensor Tdc To determine the corresponding temperature measurement value T of the solution to be measured dc . In other embodiments, the temperature of the solution to be tested may be detected in a time-sharing manner with step S21.
Step S222, calibrating the coefficient F by temperature T Calibrating the temperature measurement T of the solution to be measured dc Obtaining the temperatureDegree calibration value T dc ', wherein the temperature calibration coefficient F T Reference is made to the description of example 2 for acquisition. In this example, F T =T B /T C Then T is dc ’=T dc *F T . In other embodiments, F T =T C /T B Then T is dc ’=T dc /F T
Step S223, calibrating value T according to the temperature dc ' Compensation of the conductivity K of the solution to be measured dc Obtaining the conductivity K of the compensated solution to be measured dc '. The use of temperature to compensate the conductivity of the solution can be achieved using known techniques, for example using the formula: k dc ’=K dc *(1+0.02*(T dc ' -25)), the temperature is calibrated firstly and then the value T is calibrated based on the existing formula dc ' Compensation conductivity K dc
Step S224, according to the conductivity K of the compensated solution to be measured dc ' determining TDS measurement value TDS dc . In this example, TDS dc =0.5K dc ’。
In other embodiments, if the temperature measurement can be made more accurate, and the temperature calibration can also be omitted, step S22 further may include: detecting the temperature measurement value T of the solution to be detected by adopting a temperature sensor dc (ii) a According to said temperature measurement T dc Compensating the conductivity K of the solution to be measured dc Obtaining the conductivity K of the compensated solution to be measured dc ', e.g. K dc ’=K dc *(1+0.02*(T dc -25)); according to the conductivity K of the compensated solution to be measured dc ' determining TDS measurement value TDS dc E.g. TDS dc =0.5K dc ’。
If the influence of the temperature of the solution to be measured on the conductivity of the solution is not considered, or the temperature of the solution to be measured is known to be the same as the temperature of the standard solution, directly according to the conductivity K of the solution to be measured dc Obtaining a TDS measurement value TDS dc E.g. TDS dc =0.5K dc
Step S23a is continued with oneTDS calibration coefficient calibration that adjacent TDS standard value corresponds TDS measured value TDS dc Obtaining the TDS calibration value TDS of the solution to be measured dcj
Specifically, TDS is mostly dc Not equal to a certain value of the sequence of TDS standard values, said adjacent TDS standard values comprise two values: less than TDS dc Is greater than the sum of the TDS standard values dc Of the TDS standard value of (1), that is, TDS dc Is a value between these two TDS standard values. One of the TDS criteria can be selected as the adjacent TDS criteria of the present embodiment, and usually, the selected TDS criteria is the adjacent TDS criteria dc The TDS standard value with smaller absolute difference value is used as the adjacent TDS standard value, namely, one of the two values is selected to be closer to the TDS standard value dc TDS standard value of (d). The TDS calibration coefficient corresponding to the selected adjacent TDS standard value is recorded as F y In this example, F y =TDS y /TDS yc Then TDS dcj =TDS dc *F y . In other embodiments, it may also be F y =TDS yc /TDS y Then TDS dcj =TDS dc /F y . In addition, if TDS dc Equal to one of the series of TDS normal values, the TDS normal value is set as an adjacent TDS normal value.
Example 4
Referring to fig. 4, a difference from embodiment 3 is that, in step S23b, the TDS measurement value is calibrated by TDS calibration coefficients corresponding to two adjacent TDS standard values, so as to obtain a TDS calibration value of the solution to be measured. Wherein two adjacent TDS criterion values comprise less than TDS dc Is greater than the sum of the TDS standard values dc Is the minimum value of the TDS standard values of (a).
Practical application finds that if the TDS calibration coefficient corresponding to two adjacent TDS standard values is used (set as F) e 、F e+1 ) Calibrating TDS for any one of F values dc May not reach too high precision, and in order to reach higher detection precision, two TDS calibration coefficients F can be used first e 、F e+1 Determining a TDS measurement TDS that is more likely to be suitable dc TDS calibration factor of y ’。
For example, TDS can be used e ~TDS e+1 And (6) dynamically dividing. Cut apart TDS e ~TDS e+1 Before the interval, a division constant is firstly taken as TDS ek Then according to TDS e And TDS e+1 The ratio of the difference between the two calibration coefficients to the difference between the corresponding TDS measurement values is TDS e ~TDS e+1 The method comprises the following steps of dividing the method into a plurality of TDS intervals TDS1, TDS2, TDS 8230, TDSN, N is more than or equal to 2, and respectively setting corresponding F values: TDS dc In the interval TDS1, F y ’=F e1 ;TDS dc Within the interval TDS2, F y ’=F e2 ;……;TDS dc In the TDSN F y ’=F eN ;F e <F e1 <F e2 <……F eN <F e+1 Or, alternatively, F e >F e1 >F e2 >……F eN >F e+1
A parameter-containing formula can also be set for determining TDS calibration coefficients F y ', is provided with F y ’=f(F e ,F e+1 ),f(F e ,F e+1 ) To include a parameter F x ,F x+1 Expression of (a), F (F) e ,F e+1 ) There are many forms of expression, for example:
f(F e ,F e+1 )=F e+1 -|F e+1 -F e |*|TDS e+1 -TDS dc |/|TDS e+1 -TDS e |,F e+1 >F e (ii) a Alternatively, the first and second electrodes may be,
f(F e ,F e+1 )=F e+1 -(TDS ek *F e+1 /1000+|F e+1 -F e |-TDS ek *F e /1000),F e+1 >F e (ii) a Alternatively, the first and second electrodes may be,
f(F e ,F e+1 )=F e -|F e -F e+1 |*|TDS e+1 -TDS dc |/|TDS e+1 -TDS e |,F e >F e+1 (ii) a Alternatively, the first and second liquid crystal display panels may be,
f(F e ,F e+1 )=F e -(TDS ek *F e /1000+|F e+1 -F e |-TDS ek *F e+1 /1000),F e >F e+1
the above is merely an example, the practical application is not limited to the above example, and the suitable TDS calibration coefficient F can be set according to experimental experience in general y ' is used.
In determining corresponding TDS measurement values TDS dc TDS calibration factor of y ' thereafter, the coefficient F is calibrated with TDS y ' calibrating the TDS measurement value TDS of the solution to be measured dc In this example, F e =TDS e /TDS ec ,F e+1 =TDS e+1 /TDS (e+1)c Then TDS dcj =TDS dc *F y '. In other embodiments, it may also be F e =TDS ec /TDS e ,F e+1 =TDS (e+1)c /TDS e+1 Then TDS dcj =TDS dc /F y ’。
To take an example of practical application, n =4,m =8,x =2,tds 1 =60PPM、TDS 2 =250PPM、TDS 3 =707PPM、TDS 4 =1500PPM, detection of TDS 2 Standard solution and TDS 3 The standard solution sets the actual sampling time t 4 ,F 1 =60/TDS 14 ,F 2 ’=250/TDS 24 ,F 3 ’=707/TDS 34 ,F 4 =1500/TDS 44 At the actual sampling time t 4 Measuring and calculating to obtain corresponding TDS 1 TDS calibration factor of 1 =0.625, corresponding to TDS 3 TDS calibration factor of 3 =(F 2 ’+F 3 ')/2 =0.668 corresponding to TDS 4 TDS calibration factor F 4 =0.603, corresponding TDS omitted from this example 2 TDS calibration factor F 2 Mainly considering that the TDS value span of 60 PPM-250 PPM is smaller than that of 250 PPM-707 PPM, 60 PPM-250 PPM and 250 PPM-707 PPM can be combined, and because the TDS is utilized 2 And TDS 3 Actual sampling time, minimum deviation, TDS determined for two standard solutions 3 The corresponding calibration coefficients mayThe mean of the two ratios is taken. Using three-gear TDS calibration coefficient for calibration, namely the TDS calibration coefficient F of the first gear 0-60 PPM 1 TDS calibration coefficient F of 60 PPM-707 PPM in second gear 3 TDS calibration coefficient F of 707 PPM-1500 PPM of third gear 4
Following calculation of TDS results rounding off the retained integer, calculation of F results rounding off the three bits after the retained decimal point, assuming TDS of the solution to be measured dc =180PPM, 60 PPM-707 PPM in the second gear,
can be prepared from F 1 Calibration, TDS dcj =TDS dc *F 1 =180*0.625=112PPM;
Also can use F 3 Calibration, TDS dcj =TDS dc *F 3 =180*0.668=120PPM。
Experiments show that the compound is expressed as F 1 Calibration is small and is measured by F 3 If the calibration is too large, use F y ' calibration of a device in a vehicle,
F y ’=F 3 -(F 3 -F 1 )*(TDS 3 -TDS dc )/(TDS 3 -TDS 1 )=0.668-(0.668-0.625)*(707-180)/(707-60)=0.633,
TDS dcj =TDS dc *F y ’=180*0.633=114PPM。
assuming TDS of the solution to be measured dc =1350PPM,
Can be made of F 3 Calibration, TDS dcj =TDS dc *F 3 =1350*0.668=902PPM;
Also can use F 4 Calibration, TDS dcj =TDS dc *F 4 =1350*0.603=814PPM。
Experiments show that the compound is expressed as F 3 Calibration is larger than normal by F 4 For small alignment, use F y ' a calibration of the device is carried out,
F y ’=F 3 -(F 3 -F 4 )*(TDS 4 -TDS dc )/(TDS 4 -TDS 3 )=0.668-(0.668-0.603)*(1500-1350)/(1500-707)=0.656,
TDS dcj =TDS dc *F y ’=1350*0.656=886。
as can be seen, the TDS of the solution to be measured dc The larger the calibration, the more pronounced the calibration effect.
Example 5
The embodiment provides a TDS detection device, which comprises a processor and a memory for storing one or more programs; the one or more programs are executed by the processor to cause the processor to implement the TDS detection method as in the above embodiments.
The processor may be a Micro Control Unit (MCU), commonly known as a single chip microcomputer, the single chip microcomputer configures a program memory and a data memory, and a program for implementing the TDS detection method is stored in the program memory of the single chip microcomputer in the form of a program code, wherein the actual sampling time, the TDS standard value, and the TDS calibration coefficient and the temperature calibration coefficient corresponding thereto are stored in the data memory of the single chip microcomputer in the form of data.
Referring to fig. 5, the TDS detecting apparatus of the present embodiment includes: the singlechip U1 is configured with a program memory and a data memory, the singlechip U1 is further configured with a plurality of groups of general input and output ends (IO ends), AD sampling ends, communication ends and the like, and fig. 5 only shows that the singlechip U1 needs to use ports in this embodiment. The high-voltage end VDD of the singlechip U1 is connected with the power supply end MCU _ VDD, and the input power supply voltage, namely the working voltage of the singlechip U1, is generally 3.3V-5V; the low-voltage end VSS of the singlechip U1 is grounded, and the input voltage is 0V. Based on the program code that realizes TDS detection that program memory stored, singlechip U1 can the measuring circuit of external adaptation for realize that the TDS of high accuracy detects. The single chip microcomputer U1 can be suitable for an existing temperature measuring circuit and a TDS measuring circuit.
In this embodiment, referring to fig. 5, the TDS detecting apparatus further includes: TDS detection circuit U2 and temperature detection circuit U3.
The TDS detection circuit U2 comprises an MOS switching tube Q1, a first resistor R1, a second resistor R2 and a third resistor R3; the processor is configured with a first IO terminal PB3, a second IO terminal PA4/A3 and a first AD sampling terminal PB2/A2. The MOS switch tube of the embodiment adopts a PMOS tube.
The first resistor R1 is connected between the first IO end PB3 and the grid G of the MOS switch tube Q1, the second resistor R2 is connected between the first end P1 of the Probe TDS _ Probe and the low level voltage end (ground end), and the source S and the drain D of the MOS switch tube Q1 are respectively connected with the high level voltage end (power end) MCU _ VDD and the first end P1 of the Probe TDS _ Probe. The third resistor R3 is connected between the second end P2 of the Probe TDS _ Probe and the second IO end PA4/A3, and the first AD sampling end PB2/A2 is used for reading the voltage value of the second end P2 of the Probe TDS _ Probe.
In this embodiment, the second end P2 of Probe TDS _ Probe is connected to first AD sampling end PB2/A2 through fifth resistance R5, and fifth resistance R5 is used for protecting MCU analog voltage input port. In other embodiments, the protection resistor R5 may not be needed according to practical applications, and the first AD sampling terminal may be directly connected to the second terminal P2 of the Probe TDS _ Probe.
Referring to fig. 6 in combination, when TDS detection is required, a first pulse (high level voltage pulse) having a high level duration (i.e., a pulse width of the first pulse) t is applied to the first terminal P1 of the Probe TDS _ Probe through the first IO terminal PB3 P1 、t P1 ' is determined from the sample time. Specifically, the pulse width of the first pulse is adaptively adjusted while acquiring the TDS x Standard solution at m sampling times t 1 、t 2 、……、t m TDS measurement value of (d), TDS x+1 Standard solution at m sampling times t 1 、t 2 、……、t m The TDS of (1), the pulse width t of the first pulse P1 ≥t m (ii) a At the sampling time t of obtaining TDS standard solution c TDS measured value, sampling time t of solution to be measured c The TDS of (1), the pulse width t of the first pulse P1 ’≥t c . The width of the first pulse may generally range from 30 μ s to 100 μ s, depending on the application.
Utilize singlechip U1's first IO end PB3 control TDS detection circuit U2 operating voltage, switch over TDS detection circuit's switch (MOS switch tube Q1) through control port level transition and provide the sufficient pulse signal of energy for it. This mode is direct to get the electricity from the power supply unit (power end MCU _ VDD) of product, and TDS detection circuit's drive is direct to come from the power supply unit rather than the IO end, has ensured sufficient driving force, can not influence the accuracy of AD module sampling because of different load current to promote the controllability of the different interval concentration sampling precision of solution.
During the high level duration t of the first pulse P1 、t P1 In this case, the second IO terminal PA4/A3 outputs a low level voltage, and a voltage measurement value of the second terminal P2 of the Probe TDS _ Probe is read at a sampling time through the first AD sampling terminal PB2/A2 to obtain a corresponding conductivity and TDS measurement value; during the low level duration of the first pulse, a second pulse is applied to the second terminal of the probe through the second IO terminal PA 4/A3. Generally, the low level duration of the first pulse is longer than the pulse width of the first pulse, and a plurality of second pulses having a pulse width t of a plurality of pulses can be continuously output during the low level duration of the first pulse P2 Typically set to be greater than or equal to the pulse width of the first pulse.
During TDS detection, outputting low level voltage through the second IO end PA4/A3, and sampling instantaneous voltage signals by matching with the first AD sampling end PB 2/A2; after the detection is finished (when the detection is not carried out), the probe can be prevented from being polarized by switching and outputting a high-level voltage (such as a second pulse) through the second IO terminal PA 4/A3.
With continued reference to FIG. 5, the temperature detecting circuit U3 includes a temperature sensor NTC, a fourth resistor R4 and a bypass capacitor C1, and the processor further configures a third IO terminal PA5/A4 and a second AD sampling terminal PB0/A0. In this embodiment, the temperature sensor is an NTC thermistor. The effect of the bypass capacitor C1 is to obtain stable temperature data even in case of instantaneous sampling. The fourth resistor R4 and the NTC thermistor form a voltage division circuit for obtaining the equivalent resistance of the NTC at the current temperature.
The first terminal P3 of the temperature sensor NTC is connected to the high-level voltage terminal MCU _ VDD, the fourth resistor R4 and the bypass capacitor C1 are connected in parallel between the second terminal P4 of the temperature sensor NTC and the third IO terminal PA5/A4, and the second AD sampling terminal PB0/A0 is used for reading the voltage value of the second terminal P4 of the temperature sensor NTC.
In this embodiment, the second AD sampling terminal PB0/A0 is connected to the second terminal P4 of the temperature sensor NTC through a sixth resistor R6, and the sixth resistor R6 is used to protect the MCU analog voltage input port. In other embodiments, according to practical application, the protection resistor R6 may not be needed, and the second AD sampling terminal may be directly connected to the second terminal P4 of the temperature sensor NTC.
The temperature detection circuit U3 acquires the current temperature of the solution in real time when TDS is detected to help more accurate TDS data analysis. The third IO end PA5/A4 of the single chip microcomputer U1 is used as a virtual ground end in the circuit, the third IO end PA5/A4 outputs low-level voltage during temperature measurement sampling, the third IO end PA5/A4 is suspended (floating) at other time (non-temperature measurement), and no current exists in the voltage division circuit, so that control of power consumption in a non-sampling stage is achieved, zero standby power consumption can be achieved, and the problem of standby time in handheld products is effectively solved.
In order to realize probe self-adaptation and real-time supervision TDS and detect the data of acquireing, the TDS detection device of this embodiment still provides two kinds of conventional communication modes that the universal ratio is very high: a Universal Asynchronous Receiver/Transmitter (UART) communication mode, and an Inter-Integrated Circuit (IIC) communication mode.
The UART protocol has high data transmission rate and is a common interface module used in debugging. As shown in fig. 5, the UART communication circuit U4 utilizes the UART port of the single chip, and the external only needs to be externally connected with two safety resistors R9 and R10 to form a debugging channel. Specifically, the UART communication circuit U4 includes two branches: one end of the TX branch is connected with a TX end PC0/TX of the singlechip U1, the other end of the TX branch is connected with a third end of the connecting piece CN1 in a plugging way, and the middle of the TX branch is connected with a resistor R9 in series; and one end of the RX branch is connected with the RX end PC1/RX of the singlechip U1, the other end of the RX branch is connected with the fourth end of the connector CN1, and the middle part of the RX branch is connected with a resistor R10 in series.
The IIC protocol occupies less data and is a data transmission scheme with high security, which is not the second choice in applications with long distance and high application environment. The IIC communication circuit U5 utilizes an IIC SLAVE module (a single chip microcomputer serves as a SLAVE end) of the single chip microcomputer U1, and a debugging channel can be formed by externally connecting two safety resistors R7 and R8 and two pull-up resistors R11 and R12. Specifically, the IIC communication circuit U5 circuit includes two branches: one end of the SDA branch is connected with an SDA end PA3/SDA of the singlechip U1, the other end of the SDA branch is connected with a third end of the connector CN2, and a resistor R7 is connected in series in the middle of the SDA branch; one end of the SCL branch is connected with an SCL end PB6/SCL of the singlechip U1, the other end of the SCL branch is connected with a fourth end of the connector CN2, and the middle part of the SCL branch is connected with a resistor R8 in series; the resistors R11 and R12 are optional resistors, and if the IIC host end communication port is provided with a built-in pull-up resistor, the two devices can be omitted.
During practical application, a manufacturer of a water quality detection product can directly use a computer to connect the plug connectors with the modules, provide instructions in order according to the provided communication mode through related driving software, and coordinate with customer-defined standard solutions to realize the acquisition of calibration coefficients so as to complete the self-adaptive calibration of the probe.
In conclusion, the technical scheme of the invention can be self-adaptive to various probes, particularly, the low-cost probes are applicable, a multi-point calibration mode is adopted to ensure the consistent precision of the probes in different batches, the test precision is ensured, the product cost is reduced, and the measurement range can be expanded. The technical scheme of the invention can be widely applied to different probes to realize the detection scheme for detecting the content of the impurities in the solution, such as the detection fields of domestic water and industrial wastewater and the like.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to limit the present invention, and those skilled in the art can make modifications and variations of the present invention without departing from the spirit and scope of the present invention.

Claims (10)

1. The method for acquiring the calibration coefficient is characterized in that n different TDS standard solutions are used, wherein the TDS standard values of the n TDS standard solutions are sorted into TDS 1 、TDS 2 、……、TDS n-1 、TDS n ,n≥3;
The method for acquiring the calibration coefficient comprises the following steps:
acquiring at least two sets of TDS measurements, each set of TDS measurements including a TDS standard solutionm sampling times t 1 、t 2 、……、t m The TDS measured value m is more than or equal to 3, and an electrode conductivity detection method is adopted to obtain the TDS measured value of the TDS standard solution at the sampling time;
comprehensively comparing the at least two groups of TDS measured values with corresponding TDS standard values, and setting sampling time t corresponding to the TDS measured value with the minimum relative TDS standard value deviation c C is more than or equal to 1 and less than or equal to m for the actual sampling time;
acquiring each TDS standard solution at actual sampling time t c TDS measured value TDS 1c 、TDS 2c 、……、TDS (n-1)c 、TDS nc
According to each TDS standard value and corresponding actual sampling time t c Determining a TDS calibration factor F from the ratio of the TDS measurements 1 、F 2 、……、F n-1 、F n
2. The method of acquiring calibration coefficients according to claim 1, wherein n =4,m =8,tds 1 =(60±2%)PPM、TDS 2 =(250±2%)PPM、TDS 3 =(707±1%)PPM、TDS 4 = (1500 ± 1%) PPM; separately acquiring TDS 2 Standard solution and TDS 3 Standard solution at 8 sampling times t 1 、t 2 、……、t 8 TDS measurement of (a).
3. The method of obtaining calibration coefficients according to claim 1, wherein said electrode conductivity detection method comprises:
applying a first pulse to the first end of the probe, wherein the high level duration of the first pulse is determined according to the sampling time;
reading voltage measurements at the second end of the probe during a high duration of the first pulse to obtain corresponding conductivity and TDS measurements;
a second pulse is applied to the second end of the probe for the low duration of the first pulse.
4. Calibration according to claim 1The method for obtaining the coefficient is characterized in that two sets of TDS measured values are obtained, wherein one set of TDS measured values comprises TDS x Standard solution at m sampling times t 1 、t 2 、……、t m TDS measured value TDS x1 、TDS x2 、……、TDS xm Another set of TDS measurements includes TDS x+1 Standard solution at m sampling times t 1 、t 2 、……、t m TDS measured value TDS (x+1)1 、TDS (x+1)2 、……、TDS (x+1)m ,1≤x≤n-1;
The actual sampling time t c The settings were as follows:
calculating | TDS x /TDS xa -TDS x+1 /TDS (x+1)a Taking a value from 1 to m, and taking a value corresponding to the sampling time t when the minimum calculated value is taken a Then t is c =t a (ii) a Alternatively, the first and second electrodes may be,
calculation (TDS) x /TDS xa +TDS x+1 /TDS (x+1)a ) A is taken from 1 to m, and the sampling time t corresponding to the value of a is taken when the minimum calculated value is taken a Then t is c =t a (ii) a Alternatively, the first and second electrodes may be,
calculate [ TDS ] xa -TDS x |/TDS x -|TDS (x+1)a -TDS x+1 |/TDS x+1 Taking a value from 1 to m, and taking a value corresponding to the sampling time t when the minimum calculated value is taken a Then t is c =t a (ii) a Alternatively, the first and second electrodes may be,
calculating (| TDS) xa -TDS x |/TDS x +|TDS (x+1)a -TDS x+1 |/TDS x+1 I)/2, a takes a value from 1 to m, and a takes a corresponding sampling time t when the minimum calculated value is taken a Then t is c =t a
According to each TDS standard value and corresponding actual sampling time t c Determining a TDS calibration factor F from the ratio of the TDS measurements 1 、F 2 、……、F n-1 、F n The method comprises the following steps: according to TDS i And TDS ic Determining the TDS i Corresponding F i I is taken from 1 to n;
alternatively, it comprises: according to TDS i And TDS ic Determining the TDS i Corresponding F i I takes values from 1 to (x-1) and (x + 2) to n; according to TDS x And TDS xc Is determined by x According to TDS x+1 And TDS (x+1)c Is determined by x+1 ', determination of TDS x+1 Corresponding F x+1 =(F x ’+F x+1 ’)/2。
5. The method for acquiring calibration coefficients according to claim 1, further comprising:
detecting the temperature measurement value T of the temperature standard solution by using a temperature sensor C The temperature standard value of the temperature standard solution is T B
Calculating the temperature calibration coefficient F T Said temperature calibration coefficient F T Is the temperature standard value T of the temperature standard solution B With a measured value of temperature T C The ratio of (a) to (b).
6. A TDS detection method is characterized by comprising the following steps:
obtaining the actual sampling time t of the solution to be detected c Conductivity K of dc
Conductivity K based on solution to be measured dc Obtain TDS measured value TDS of solution that awaits measuring dc
Calibrating TDS measurement value TDS with TDS calibration coefficient corresponding to adjacent TDS standard value dc Obtaining the TDS calibration value TDS of the solution to be measured dcj
Wherein the adjacent TDS criterion values comprise less than TDS dc Is greater than the TDS and/or is greater than the TDS dc (iii) minimum value of TDS standard values of (a); the actual sampling time t c And TDS calibration coefficients are acquired according to the method of acquiring calibration coefficients of any of claims 1 to 4.
7. The TDS detection method of claim 6 wherein the conductivity K is based on the solution to be tested dc Obtaining a TDS measurement value TDS dc The method comprises the following steps: detecting the temperature measurement value T of the solution to be detected by adopting a temperature sensor dc (ii) a According to said temperature measurement T dc Compensating the conductivity K of the solution to be measured dc (ii) a According to the conductivity K of the compensated solution to be measured dc ' determining TDS measurement value TDS dc
Alternatively, the method comprises the following steps: detecting the temperature measurement value T of the solution to be detected by adopting a temperature sensor dc (ii) a Calibrating the coefficient F with temperature T Calibrating the temperature measurement T of the solution to be measured dc Obtaining a temperature calibration value T dc '; according to the temperature calibration value T dc ' Compensation of the conductivity K of the solution to be measured dc (ii) a According to the conductivity K of the compensated solution to be measured dc ' determining TDS measurement value TDS dc (ii) a Wherein the temperature calibration coefficient F T Is the temperature standard value T of the temperature standard solution B With a measured value of temperature T C Detecting the temperature standard solution by using a temperature sensor to obtain a temperature measurement value T of the temperature standard solution C
8. The TDS detection method of claim 6 wherein calibrating the TDS measurement TDS values with TDS calibration coefficients corresponding to adjacent TDS standard values dc Obtaining TDS calibration value TDS dcj The method comprises the following steps:
TDS calibration coefficient F corresponding to adjacent TDS standard value y Calibrating the TDS measurement TDS dc ,F y =TDS y /TDS yc ,TDS dcj =TDS dc *F y (ii) a Alternatively, the first and second electrodes may be,
TDS calibration coefficient F corresponding to two adjacent TDS standard values e 、F e+1 Calibrating the TDS measurement value TDS of the solution to be measured dc ,F e =TDS e /TDS ec ,F e+1 =TDS e+1 /TDS (e+1)c ,F y ’=f(F e ,F e+1 ),TDS dcj =TDS dc *F y ’,f(F e ,F e+1 ) To contain a parameter F e 、F e+1 Is described in (1).
9. A TDS detection device, comprising: a processor and memory for storing one or more programs; the one or more programs being executable by the processor to cause the processor to implement the TDS detection method of any of claims 6 to 8.
10. The TDS detection device of claim 9, further comprising: a TDS detection circuit and a temperature detection circuit,
the TDS detection circuit comprises an MOS switching tube, a first resistor, a second resistor and a third resistor, and the processor is provided with a first IO end, a second IO end and a first AD sampling end; the first resistor is connected between the first IO end and the grid of the MOS switch tube, the second resistor is connected between the first end of the probe and the low level voltage end, and the source electrode and the drain electrode of the MOS switch tube are respectively connected with the high level voltage end and the first end of the probe; the third resistor is connected between a second end of the probe and the second IO end, and the first AD sampling end is used for reading a voltage value of the second end of the probe;
the temperature detection circuit comprises a temperature sensor, a fourth resistor and a bypass capacitor, and the processor is also provided with a third IO end and a second AD sampling end; the first end of the temperature sensor is connected with the high-level voltage end, the fourth resistor and the bypass capacitor are connected in parallel between the second end of the temperature sensor and the third IO end, and the second AD sampling end is used for reading the voltage value of the second end of the temperature sensor; and the third IO end outputs low level voltage during temperature measurement and is suspended at other times.
CN202210996830.9A 2022-08-19 2022-08-19 Calibration coefficient acquisition method, TDS detection method and device Pending CN115326886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210996830.9A CN115326886A (en) 2022-08-19 2022-08-19 Calibration coefficient acquisition method, TDS detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210996830.9A CN115326886A (en) 2022-08-19 2022-08-19 Calibration coefficient acquisition method, TDS detection method and device

Publications (1)

Publication Number Publication Date
CN115326886A true CN115326886A (en) 2022-11-11

Family

ID=83925101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210996830.9A Pending CN115326886A (en) 2022-08-19 2022-08-19 Calibration coefficient acquisition method, TDS detection method and device

Country Status (1)

Country Link
CN (1) CN115326886A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103675023A (en) * 2012-09-12 2014-03-26 珠海格力电器股份有限公司 Detection circuit and detection method of total dissolved solids (TDS)
CN103675022A (en) * 2012-09-06 2014-03-26 珠海格力电器股份有限公司 TDS (total dissolved solids) detection method, device and system
CN109211981A (en) * 2018-09-05 2019-01-15 广东点球电子科技有限公司 The probe calibration method, apparatus and TDS detector of TDS detector
US20190101609A1 (en) * 2017-10-04 2019-04-04 SYNCRUDE CANADA LTD. in trust for the owners of Predicting solids content, boiling point information, and micro carbon residue content of extra heavy oil samples using low-field time-domain nmr
CN110823963A (en) * 2018-08-09 2020-02-21 上海朴道水汇环保科技股份有限公司 TDS detection method and system, and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103675022A (en) * 2012-09-06 2014-03-26 珠海格力电器股份有限公司 TDS (total dissolved solids) detection method, device and system
CN103675023A (en) * 2012-09-12 2014-03-26 珠海格力电器股份有限公司 Detection circuit and detection method of total dissolved solids (TDS)
US20190101609A1 (en) * 2017-10-04 2019-04-04 SYNCRUDE CANADA LTD. in trust for the owners of Predicting solids content, boiling point information, and micro carbon residue content of extra heavy oil samples using low-field time-domain nmr
CN110823963A (en) * 2018-08-09 2020-02-21 上海朴道水汇环保科技股份有限公司 TDS detection method and system, and terminal
CN109211981A (en) * 2018-09-05 2019-01-15 广东点球电子科技有限公司 The probe calibration method, apparatus and TDS detector of TDS detector

Similar Documents

Publication Publication Date Title
CN101398405B (en) Water electric conductivity intelligent sensor
CN104122376B (en) A kind of multiparameter water quality analyzer
CN103472114B (en) Multichannel ion sensitive field effect transistor (ISFET) sensor readout circuit with compensation function
CN107870187A (en) The drinking water conductivity measuring method and measuring circuit of a kind of low-cost and high-precision
US9500614B2 (en) Electrical conductivity module
CN209656613U (en) A kind of two-channel digital TDS sensor
CN115326886A (en) Calibration coefficient acquisition method, TDS detection method and device
CN103149123A (en) Novel storage battery electrolyte density comprehensive measuring instrument
CN101696994B (en) Online conductivity detector for seawater desalting
CN109282856A (en) It is a kind of while detecting temperature/voltage/current signal single-chip sensor
CN116643080B (en) Pulse type direct current sampling and measuring device
CN110763735B (en) Soluble total solid TDS detection method and related equipment
CN102706947B (en) Portable pH instrument
CN204789443U (en) Multi -functional quick detection device
CN206832741U (en) PH value test pen
CN206146893U (en) Dead -stop titration appearance calibrating device
CN101013097A (en) Original position soil salt content sensing transducer
CN102854367A (en) Sensor used for detecting voltages of solar cell module
CN215297228U (en) Ozone digital sensor based on constant voltage
CN204101493U (en) RS-485 interface addressable contact bulk cargo Moisture Meter
CN103051326A (en) Interface circuit of micro electro mechanical system conductivity sensor
CN109406584A (en) A kind of two-channel digital TDS sensor and its implementation
CN202998053U (en) Interface circuit of conductivity sensor of micro-electro-mechanical system
KR20060005037A (en) Sensor and apparatus for measuring electrical conductivity
CN2215722Y (en) Intelligent acidimeter

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