Design of High Precision and Low Drift PH Value Online Monitoring Instrument

The geological storage of carbon dioxide is a practical and effective method to reduce the greenhouse effect,In order to prevent the leakage of carbon dioxide bring about a serious impact on the environment, the need to carry out in situ online monitoring of pH value to determine the dynamics of underground carbon dioxide.In this paper,a high precision and low drift pH value online monitoring instrument based on temperature compensation is designed with MSP430F5438 as the core.The software flow chart and the relationship the pH value,the electrode signal and the temperature of the measured liquid,the hardware structure of the instrument and software process are introduced.By comparing pH standard solution and field water sample test, the measurement accuracy of the instrument is about 0.05pH,this instrument can meet the needs of online monitoring,have been used for engineering monitoring and have a wide range of application prospects.


Introduction
When the carbon dioxide stored in the stratum is dissolved into the deep salt water layer, the acidity of the water environment will be enhanced, and the pH value is decreased obviously [1]- [4] . In order to grasp the dynamic information of carbon dioxide in detail, we need to carry out long-term online monitoring of pH value. At present, the software and hardware design of the pH field fast detection instrument is mature, the precision is high [5] , but the fast detection instrument needs to be calibrated periodically.
This paper studies the pH value of the online monitoring instrument is often placed in a poor environment and sparsely populated, so there is a higher requirement for the hardware and software, both to ensure that the instrument is stable for a long time, reduce the number of rectification, but also has high anti-interference ability. Through many experiments, the simulation fitting calculation method of high precision temperature compensation based on quantitative analysis, grasp the characteristics of the pH electrode, and the impedance matching circuit [6] , dual synchronous sampling circuit [9] [10] , and digital filter software algorithm [7] [8] , to ensure that the instrument with high precision and high stability. The experimental results meet the design requirements.

PH value detection relation
Usually the pH value of the voltage measurement follows the Nernst equation [5] , the Nernst equation with pH value as the output can be obtained: In the formula: E is the electrode potential; R is the ideal gas constant, that is 8.314J/ (mol*K); T is the temperature; F is the Faraday constant, i.e. 96487C/mol; pH is the pH of the solution.
The measurement accuracy of pH is mainly affected by two factors, one is to measure the output voltage E, and the other is Liquid temperature is measured T.
In the instrument design, in order to achieve the purpose of temperature compensation, it is necessary to

hardware circuit design
The overall framework of the system is shown in Figure 3, the system based on MSP430F5438 microcontroller [11] , pH electrode collect weak signal through a high impedance amplifier circuit to enlarge, and then through the signal conditioning circuit, filtering, amplifying and shaping of the input signal, and then through the MSP430F5438 of pH signal, incentive reference electrode the voltage signal and 18B20 [12] measured temperature signal for the synchronous data acquisition [13] [14] . The results of the operation to send LCD display or CAN bus [15]- [18] communication.   In order to reduce the influence of various interference factors in field environment and improve the accuracy and accuracy of the acquisition system. Software digital filtering using Pauta criterion and median average filter.

software flow chart
The software flow chart of pH measurement instrument is shown in figure 6.

gross error judgment method
Pauta criterion [20] is assumes a set of pH value detection data only contains random error, this set of data processing to calculate the standard deviation, according to a certain probability determine distribution of interval value. Where more than the error of the interval, that is the gross error, the gross error data will be removed.
Set to be measured for equal precision measurement, independent of X 1 , X 2 ,...... X 40 , calculate the residual error ii V X X  and the arithmetic mean value X i (i=1,2,..., 40), and according to the Bessel formula of standard error. If the residual error V b (1<=b<=n) of a measured value is X b , it is considered that the X b is a bad value with a large error value, which should be removed.

median value filtering
Software design of the median filtering algorithm, this algorithm is equivalent to the median value filtering method and combining the arithmetic mean filtering method, combining the advantages of two kinds of filtering methods, which can eliminate the error caused by sampling pulse interference.
After the removal of gross errors using Pauta rule, the filtering method will be obtained N data, remove a maximum value and a minimum value, and then calculate the arithmetic mean value of N-2 data. The pH of the measured temperature can be obtained by the software filtering is completed into the above detection method.
By comparing the measured data before and after the voltage measurement of the pH electrode,by median filtering and Pauta criterion comprehensive treatment, eliminating gross error, the test results of a small error, reached the requirements of high precision.     The test shows that the instrument has the function of temperature compensation and measurement precision is about 0.05, with high accuracy; through the dual synchronous sampling has good filtering and anti jamming effect, can meet the needs of application.

Conclusion
Due to the need of long-term in situ monitoring, the temperature compensation method is used to fit the relationship between pH value and electrode voltage and liquid temperature. The high precision measurement of pH value is realized, and the instrument is used for field test. The utility model has the advantages of compact structure, high precision, high reliability, etc., and has a positive effect on protecting the environment and water pollution, and has wide application prospect.