## 6 Experimental Results
### Calibration of Sensors
#### 6.1.2 pH Sensor  
The results of the pH sensor comprise the process of calibrating the sensor and comparing the accuracy of the sensor with a digital pH meter. \begin{table}
\begin{tabular}{c c} \hline \hline
**Measuring Scale Reading (cm)** & **Ultrasonic Sensor Reading (cm)** \\ \hline
8 & 23 – 16 = 7 \\ \hline
10 & 23 – 14 = 9 \\ \hline
12 & 23 – 12 = 11 \\ \hline
14 & 23 – 10 = 13 \\ \hline
16 & 23 – 8 = 15 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Reading of the measuring scale. Figure 11: Setup for validation of the Ultrasonic sensor. (i) Calibration  
The steps to calibrate a pH sensor are to take two buffer solutions with pH 4.00 and pH 9.20. First, dip the probe in the 4.00 pH buffer solution and set the sensor to read the pH as 4.00. Wash the probe with distilled water. Dip the probe in the 9.20 pH buffer solution and check the sensor reading. The reading could be less or more than 9.20. The difference in the reading is the error. Then take the solution for which the pH is to be obtained. Dip the probe into the solution and get the reading. Finally, the actual pH is calculated with Equation (4). \[\text{Actual pH}=\text{pH}\,\text{reading}+\text{/ error} \tag{4}\]  
(ii) Calculation  
The first step is to save the average value of 6 sample values in a buffer. Then, by applying the following formula, the analog mean value is converted to millivolt (mV) with Equation (5). \[\text{Value}=\frac{\text{average value}*5}{\frac{1024}{6}} \tag{5}\]  
Then, the pH value is calculated using Equation (6) and it is as follows  
\[\text{pH value}=3.5*\text{value}+\text{offset} \tag{6}\]  
Convert the millivolt into pH value and here, offset is a parameter to change for the calibration. (iii) Validation  
The pH sensor used is validated using a standard digital pH meter 802 by Systronics. The validation was done by first calibrating the digital pH meter. To calibrate it, first, the sensor was set using pH 4.00 buffer solution and then the pH of 9.20 pH buffer solution was measured. Figure 11(a) shows the process of calibrating the digital pH meter to get the 4.00 pH for the 4.00 pH buffer solution. Figure 11(b) shows the obtained pH of a buffer solution with pH 9.20 to get the error in the pH meter. pH of buffer solution 9.20, obtained = 8.90, Error = 9.20 \(-\) 8.90 = 0.30, pH of sample water obtained by the meter = 8.07 and Actual pH = pH obtained pH + error = 8.07 +0.30 = 8.37. Figure 12(b) shows the obtained pH of the sample water solution. The actual pH will be the sum of the pH obtained and the error. Now, the pH sensor used in the research is calibrated using a 4.00 pH buffer solution by setting the offset in the programming. Figure 13(a) shows the sensor calibration using a 4.00 pH buffer solution to get a pH of 4.00 by setting the offset value. Now, the pH value for the 9.20 pH buffer solution is obtained as 8.50. So, the error is 9.20 \(-\) 8.50 = 0.70. Figure 14(c) shows the pH value obtained for the 9.20 pH buffer solution to calculate the error. The error obtained will be added to the pH of the solutions measured. Now, the pH of the sample water is measured using the sensor. pH value obtained = 7.33, Error = 0.70 and Actual pH = pH obtained + Error = 7.33 + 0.70 = 8.03. Figure 12: Calibration of pH sensor. Figure 13: pH of the water sample from pH meter. Table 3 summarizes details regarding the calibration of pH sensors. Generally, during the implementation of any sensor with a hardware prototype, they are a requirement of calibration because it assists the hardware prototype to senses the error-free values. Here to calibrate the pH sensor, two different buffer solutions namely pH 4.00 and pH 9.20 are chosen. In the case of the pH 4 buffer solution, the sensor value is accurate. However, with the pH 9.20 solution, there is a bit of difference between the sensor obtained value and the actual value. Here the calibration is conducted in two different cases, in the first case, the sensor value obtained for pH 9.20 buffer solution is 8.90. It indicates there is an error in the sensor value, i.e., 0.30.