{'fraction_non_alphanumeric': 0.02410998937300744, 'fraction_numerical': 0.008435175345377258, 'mean_word_length': 4.845108695652174, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optical absorbance of RGB LEDs in pH measurement of colorimetric solution with phenol red reagent

The use of red, green, and blue (RGB) light-emitting-diode (LED) is a new trend in monochromatic colorimetric sensing due to cost-effective implementation. However, the application of RGB LED in pH measurement depends on the performance of the LED colour towards the colorimetric solution of interest, hence, needs to be evaluated. This work evaluated the performance of RGB LED for pH measurement system based on colorimetric approach using phenol red as a reagent. The main objective was to identify the LED colour with the best performance in terms of signal response and absorbance behavior. In this work, LED and photodiode were used as optical components and NI USB DAQ with LabView as the processing software. Four samples with known pH values were prepared and tested to obtain the voltage and absorbance behavior of each LED colour. Among all, the blue LED with wavelength ranged between 450-495 nm showed the best sensing behavior based on its linearity and error. Both voltage response and absorbance produced linear correlation with R 2=0.883 and R 2=0.9803, respectively. The significant finding from this study is useful in selecting the best RGB LED that is suitable for colorimetric pH measurement with phenol red as its colorimetric reagent.


INTRODUCTION
The use of colorimetric approach with an integrated optical system for pH measurement becomes one of the preferred techniques in numerous scientific and industrial research areas. In this method, various colorimetric reagents are available to produce colour variation for different pH levels including phenol red, bromothymol blue, thymol blue, bromocresol purple, thymolphthalein, and phenolphthalein [1]- [4]. In general, as the pH value of colorimetric solution varies, there will be a colour transition that associates with it. The solution could change from one colour to another or from the lightest colour to the darkest of the same colour [5], [6]. The colour changes are associated with the change of pH that can be quantified using several methods. A conventional method such as through visual inspection and pH indicator is the cheapest way, but less accurate that remains only an approximation [7], [8]. The photometric approach such as using smartphones is a new trend in colorimetric-based sensing as a result of digital technology advancement [9], [10]. The need for complex colour processing and image processing techniques, however, become the drawback for its implementation [11]. The use of a dedicated and commercial device such as standard colorimeter and spectrometer are the best analytical method available. However, these devices are expensive, complex, and not upgradable with fixed features, which limit their applications in all fields [12], [13]. The optical engineering for pH measurement continues to evolve from a classical way to a more sophisticated arrangement [14]. A wide spectrum of wavelength is used in spectrometer design, while only the red, green, and blue (RGB) light source is used in colorimeter design. For both types of instruments, colour variation of the solution has been manipulated to create a signal that represents the measured parameter based on its absorbance behaviour. The use of several optical colour sources requires complex computation and processing task that complicates its development [15], [16]. Monochromatic light source is preferred in some applications with the advantages of a single wavelength implementation to reduce the complexity of processing and its design requirement. It is a good alternative due to its low power consumption as well as being portable [17]- [19]. The implementation of a monochromatic optical system has been reported in many light-emitting-diode (LED) based systems developed for various applications [20]- [23]. However, the system must be application driven and specific in terms of colour and parameter to be detected [24], [25]. To address this issue, one of its challenges is to identify which colour has the best performance in terms of detection signal as it contributes to the sensitivity of the performance. This work studied the performance of RGB colour to be specifically implemented in monochromatic pH measurement of solution with phenol red as its colorimetric reagent. The performance of RGB LED was evaluated based on several criteria such as linearity and error of voltage response and its absorbance. This work aimed to determine the best LED colour that has the best response for this specific application with respect to the tested range of pH level. Figure 1 shows the optical measurement setup of colorimetric sensing platform. In this setup, LED and photodiode were used as light source and light receiver and driven by an electronic circuit as shown in Figure 1(a). The test sample was placed inside a cuvette located in between the LEDs and photodetector. Figure 1(b) shows the schematic drawing of the circuit for three different LED colours. The circuit was initially constructed on a breadboard to test its functionality. Then, the circuit was transferred to the vero board that was used as the main board for this project. Optical components were mounted inside a black box to avoid any interference such as stray light from an external source. The black box was made from Perspex and was fabricated to accommodate specific sizes of optical components and cuvette to be fitted in the box. During the measurement process, transmission of the light signal was measured by the photodetector and then converted into voltage signal using a signal conditioning circuit that worked based on the voltage divider principle. With this type of arrangement, if lower light intensity was detected by the photodiode, the higher output voltage was produced and vice versa. In terms of absorbance behaviour, if the sample absorbed a higher amount of light, lower light intensity was detected at the photodiode. Therefore, the absorbance can be calculated from the voltage measured using (1).

Driving Circuit
Readout Circuitry where, V(l) is the voltage measured. V(0) is the voltage when no light is passed through (complete dark). V(Io) is the voltage of blank sample (no reagent added).
Vs is the voltage supply. Under this configuration, two voltage constants V(0) and V(Io) were measured at the beginning of experiments with voltage supply, Vs of 5V.

Experimental works
In this work, four samples of colourless solutions with different pH were prepared, namely vinegar, tap water, baking soda, and bleach. Then, several drops of phenol red were added to each solution. Phenol red water-soluble dye was used as a colorimetric reagent to produce a colour effect on the solution. A 10 mL of each sample solution was placed inside a test cuvette and measured using a standard spectrometer (HACH) to obtain their relative pH level. The samples were then labelled as in Figure 2 and used for testing with the proposed system. As expected, the colour of the solution turned yellowish for pH less than 6 and reddish for pH more than 6. The samples indicated the colorimetric effect upon the addition of the colorimetric reagent, which was the phenol red.
Once the samples were ready, the experimental setup was arranged for colorimetric testing as depicted in Figure 3. Figure 3(a) shows the actual picture of the built hardware. The reduction of light intensity was detected by the photodiode and observed. During testing, the signal voltage from the photodiode was fed into a PC and displayed in the form of a graphical user interface (GUI) as shown in Figure 3(b). The data acquisition was established using the NI USB 6008 DAQ device. By using LabView, graphical programming was utilized to process the signal from the photodiode and then to measure it using a built-in oscilloscope in LabView.

Data collection and analysis
Every pH sample was placed inside a cuvette and then the voltage was measured using the setup explained previously. The measurement was performed for each RGB colour to observe their performance in terms of the voltage generated. For each measurement, the process was repeated 5 times before taking the average as its final measurement for statistical purposes. As highlighted in the previous section, two initial voltage values, V(0) and V(Io) were measured as constants for absorbance calculation. The readings were tabulated in a table for analysis. The graph of pH and voltage for all measurements were then plotted to observe their relationship for different LED colours.
The correlation between pH and voltage was then obtained from the graph. Based on the curve fitting process, the best linear line was plotted to obtain the performance of several parameters such as the correlation coefficient, R 2 to identify the best colour option. The best linear curve also indicated the accuracy of the curve to be used as a calibration curve. The error between the measured and the best fitted line was then calculated to observe the tolerances of measurement for the tested pH values. Apart from that, the range of voltage for the tested pH range was also observed as it indicated the total amount of voltage change for the whole range of tested pH. This information is useful to estimate the specification of signal conditioning required for a more complex application. The slope of the graph represents the sensitivity in terms of how much voltage is changing with respect to a unit change of pH. To further investigate the performance of RGB LED, the absorbance of pH colorimetric solution was calculated based on (1) from the voltage measurement data. Then the correlation between pH and absorbance was analysed from the plot using the curve fitting technique. Table 1 shows the data of voltage measurement collected for samples with different pH values. In general, the increased of voltage was recorded with an increased pH level. Figure 4 shows the plot of voltage against pH level for each colour, red, green, and blue LED. The test aimed to observe behavior of the voltage detected at different pH levels.

Voltage measurement
Throughout the range of pH, all LEDs showed good correlations between the manipulated variable (pH level) and the observed variable (voltage). In general, as pH increases, the voltage detected will also increase. Under the colorimetric effect, the increase of pH will increase the absorption of the light. This is in turn produces less light detected by the photodiode, thus reduces the voltage across it. Therefore, under this configuration, the voltage across the output terminal produces an increase of voltage for a higher pH level. These effects were observed for all colour sources and the linear curves for the relationship were computed as shown in Figure 4(a) for red, Figure 4(b) for green and Figure 4(c) for blue. The blue LED showed the best correlation coefficient with R 2 =0.883, followed by red LED (R 2 =0.8759), and green LED (R 2 =0.8551). This indicated that the blue LED showed the best linearity to present the linear correlation between the pH and voltage.
From the linear equation of the trendlines plot, the slope indicated how much voltage change for every unit change of pH. This value is significant in estimating the sensitivity of detection and measurement tasks. In system development, it is required to have the voltage change as large as per the unit change of pH. Blue LED performed the best with 2.8 mV/pH, followed by green and red at 2.5 mV/pH and 1.6 mV/pH, respectively. In terms of linear line interception, all trendlines were set to intercept at 3.38 V. This value represented the voltage for the blank solution, which referred to the solution with no reagent. To determine the error of measurement, the deviation of each data was compared to the trendline plot. For this purpose, the absolute errors for all measurements were calculated. The result found that all LED colours produced small percentage errors, in which red LED produced the best consistency with a maximum percentage error of 1%, green LED with 1.5%, and blue LED with 2.4%. Overall, this configuration is suitable for the targeted colorimetric pH sensing application and the voltage signal is adequate as the sensing signal. Blue LED was found to be the best option due to its performance in terms of linearity and sensitivity. The finding also aligned with colour wheel selection where the colour was determined based on the colour of solution.

Absorbance
According to the Beers Law, absorbance is one of the suitable optical behaviors for sensing purposes including pH. Therefore, the correlation of pH and absorbance is worth to be observed. The absorbance was calculated based on the voltage response obtained through the previous measurements. Figure 5 shows the relationship between pH level and calculated absorbance for RGB colours. The plots indicated good absorbance behavior of colorimetric pH samples towards different colours of RGB LED, which supported its suitability as an optical sensing parameter.
The plots showed a similar trend as in the voltage measurement, in which all colours showed a linear relationship between the pH and absorbance. The correlation coefficient of R 2 for the red LED Figure 5(a), green LED Figure 5(b), and blue LED Figure 5(c) were 0.97, 0.9693, and 0.9803, respectively. Therefore, the use of absorbance correlation gives better accuracy in predicting the pH based on the absorbance as compared to the voltage, which makes it suitable to be used as a calibration standard curve for estimating the unknown pH sample. Again, the blue LED was the best option for pH measurement based on the colorimetric effect using phenol red as the reagent due to its linearity property. Thus, the absorbance plot can be used as a calibration curve for pH measurement and system development.

CONCLUSION
This work has been successfully carried out and achieved the main objectives. The performance of RGB LED for colorimetric sensing of pH level using phenol red as its reagent was successfully analyzed. Blue LED was found to have the best response in terms of voltage response as well as absorbance. The use of absorbance for calibration performed a better correlation over voltage measurement and aligned with the theoretical concept of sensing based on the Beers law. It also proved that this optical parameter is good to be treated as a sensing parameter for the targeted application. Voltage measurement indicated the suitability of this setup and signal response for the targeted application, as well as displayed a good result in terms of its measurement quality such as linearity and error performance. In the future, this work will be extended by increasing the number of samples to further verify its measurement quality. This approach is expected to reduce the error and improve the accuracy of the calibration curve. The calibration curve will further be implemented in a complete system and tested with real samples to observe the system performance.