PORTABLE COLORIMETRIC SENSOR FOR LOW-COST QUANTIFICATION OF SAFRANIN DYE IN AQUEOUS SOLUTIONS

. An android smartphone-based digital image colorimeter was proposed as a novel, fast, cheap, and portable colorimetric sensor for quantification of safranin in aqueous solutions via built-in-house light-boxes photography. Smartphone application known as RGB color detector app that uses an image-matching algorithm via using of take photo (TP) and live camera (LC) to analyze colorful solutions. The color values including red (R), green (G), and blue (B) parameters can be measured with the aid of the app and used for quantifying colorful solutions. The influence of various experimental factors has been optimized. Under optimal conditions, analytical curves were 1.0-10.0 and 2.0-30.0 µg/mL of safranin using G and B parameters, respectively. The obtained signal via the G channel also presented greater sensitivity and linearity, therefore preferred to be the best working channel. The obtained linear range, correlation coefficient, limit of detection, and limit of quantification were 1.00-10.00 µg/mL, 0.9889, 0.15 µg/mL, and 0.51 µg/mL via the GTP-25 method, and 1.00-10.00 µg/mL, 0.9961, 0.13 µg/mL, and 0.44 µg/mL via GLC-25 method, respectively. The proposed method was successfully applied for evaluation of the dye removal. Results were in good agreement with those recorded by UV-Visible spectrophotometer/reference method.


INTRODUCTION
Freshwater is necessary for our planet, and crucial for human health and survival. It is known that there is not enough freshwater available to one-sixth (1/6) of the world population [1]. Geological and anthropogenic factors are known and classified as the main direct or indirect sources of water contamination over the world [2]. Several studies established that some food and water sources have been recently contaminated by various chemicals due to developing technology and industrial growth around the world [1,[3][4][5][6]. Industrial effluents, paints, batteries, detergents, disinfectants, synthetic oils, medicines, gasoline, and diesel fuel are essentially classified as the main sources of human-made chemical pollutants. [7]. Dyes are also known as a common type of contaminant in water sources [8,9].
Nowadays, many analytical methods have been developed to assess colorful compounds in different environmental samples [10,11]. To date, a variety of analytical methods for the quantitative assessment of safranin have been reported in the literature. The instrumental techniques applied to determine safranin dye in environmental and biological samples include UV-Visible spectrophotometry [12], fluorescence spectrophotometry [13], and ultra-performance liquid chromatography-tandem mass spectrometry [14]. However, some of these methods to quantify the dye are limited in their time-consuming, typically laboratory-based, laborious, expensive, require trained analysts, sample preparation, extraction, more electric power and, expert knowledge for effective results [12][13][14]. For these reasons, the development of simple, inexpensive, fast, direct, and portable analytical procedures for safranin quantification in aqueous solution is extremely supported and encouraged in developing countries and for future in remote areas.
In the last years, digital image processing-based colorimetry (DIC or DIP-colorimetry) is wellknown and directly or indirectly applied as a novel, simple, portable, fast, low-cost, friendly, and effective analytical tool for the quantification of various chemical compounds such as dyes [15,16], metals [17,18], medicines [19,20], gases [21], and many other organic compounds [22][23][24]. In the last decade, colorful compounds have been effectively quantified in numerous samples due to applying the DIP-colorimetry method [23].
In this sense, the DIP-colorimetry (DIC) offers an inexpensive analytical tool for the application of colorimetric methods based on the relation between red (R), green (G), and blue (B) color values (RGB) and the analyte concentration. After capturing the image, the colors of the analyzed image are the most important characteristics and include the basic information of an image stored in the pixels. Colors can be represented as digital data including CYMK, RGB, and HSI. The reflected or transmitted light from a colored sample passes through the RGB filter supporting the image to be decomposed into three components. These components signify different wavelength ranges of the visible electromagnetic spectrum, which are distinguished by the image sensor in the applied device. Moreover, the recorded RGB value can be utilized to provide calibration equations for the direct assessment of colored compounds [23,26,28]. The DIP-colorimetry is maintained on the trichromatic theory of color vision or three-component theory [16,23].
Based on the creativity and necessity of analysts, the smartphone can be utilized as a detector device including a spectrophotometer [30], colorimeter [20], voltammeter [31], and fluorometer [32]. The use of the smartphone as a powerful analytical instrument by chemists for a wide variety of applications is recently increasing in various fields including the environment [17,18,21], medicine [31,33], food [20], fuel [27], veterinary [16], etc.
Safranin is an industrial synthetic alkali/organic dye, a type of stain, known as a food additive that could be utilized in various dying manufactories and biological fields [12,34]. To the best of our knowledge, this work is aiming to propose a novel, fast, low-cost, and portable analytical method for safranin quantification in aqueous solutions applying smartphone as a detector.

Preparation of standard and working solutions
A stock solution of safranin dye (1000 µg/mL) was prepared by weighing an accurate amount of the solid dye and dissolving it in distilled water. Then, 100 µg/mL of safranin solution was prepared from the stock solution using distilled water. After that, working solutions were prepared by diluting the last solution to get series of solutions in the concentration range of 1.00 to 30.0 µg/mL of the safranin.

Instrumentation
In this study, an android smartphone which is called HUAWEI Y7p (ART-L29 Model, 1560 × 720 Resolution, 48 MP Triple Camera) was fixed with proposed light-boxes photography and applied as a capture device for taking images and measuring the absorption of safranin solution. An energetic strip LED light (LIGHTING Brand, 240 V, 0.06 A, 0.9 PF, 13 W for 1 meter) and white plastic ice cube tray, WPICT (Limon, Kitchen Ware, ISO 9001, 2008) were also utilized with the proposed box as a white lighting source and instead of the quartz sample cell, respectively.
For spectrophotometric measurements, the absorbance was performed utilizing a double beam UV-Visible Spectrophotometer (AELAB, AE-S90 Model, China) with a fixed 1 nm bandwidth and quartz cuvette (10 mm). The instrument was connected to the computer supported with data acquisition software (MetaSpec Pro Analysis Software) for recording the measured absorbance and used as a reference method.

System setup
In the proposed method, the applied system which is light-boxes photography was simply constructed using available tools like plywood and built-in-house analytical devices (Table 1 and Figure 1). The constructed box was sprayed using matte black paint which is a low-in-brightness paint that provides non-shiny or reflective color and an unsaturated shade of black. An android smartphone was then fixed from outside of the constructed light-box system via the drill hole. The fixed smartphone was applied as a capture device for the quantitative of the dye. This app can be simply applied to detect and pick colors due to using the camera to take a photo.
Thus, different color formats and conversions can be achieved via the app. The RGB parameters can be obtained due to applying this App. All the recorded data can be then stored in a local database of the device and individually used in multiple projects.

Capture conditions
Various factors influencing the constructed photography light-box were investigated for achieving optimum conditions. Different factors, such as the used volume of the dye, types of the sample cell, active working channels, and focusing detection radius (FDR) by the app were well studied to obtain the most suitable capture condition for the correct color of the safranin solutions and record their real RGB value.

Learning/testing
The learning module calibrates the software with a set of images that were taken by the smartphone (Figure 2). The RGB color detector app can be seen as a good software program to detect and pick a million colors from images. Various services are available via the use of this app including color detector, analyze color, color lists, and color picker. Different color formats and conversions including the RGB values can be obtained by using the camera (color detector) to take a photo or the gallery to load an image and detect the colors inside with high precision. The process of quantifying/testing samples is similar to the process of learning. In this study, serious safranin standard solutions were individually filled in the successive WPICT sample cells, and photographed by the capture device. The used capture device was fixed in parallel and located against the sample cell to obtain the individual RGB parameters for each of the examined solutions. The user will manually press a button in the app to take the photo. Images were taken in triplicate for assessing the colorimetric measurements' repeatability. The color of each safranin solution was examined to red (R), green (G) and blue (B) values from 0 to 255 utilizing this program. During the analysis, distilled water was also used as a blank solution and its RGB parameters were also recorded. The obtained data is then kept in a local database and used for the quantitative assessment. detectors option, and c) reading RGB data.

Figures of merit
An analytical signal (S) which is shown in Eq. (1) was calculated using each R, G, or B parameter. In this equation, the I term means to R, G, or B value of the studied dye, and the Io term also means to R, G, or B value of the used blank solution. The obtained S was used to construct a calibration curve of the analyzed dye in an aqueous solution [33,35,36]. To detect the best channel for obtaining greater analytical sensitivity, univariate calibration curves were constructed from the calculated signals of R, G, or B values. Characterization, verification, and analytical performance of the proposed method were obtained due to applying the following figures of merit: linear range (LR), the limit of detection (LOD), the limit of quantification (LOQ), sensitivity, accuracy, and precision. In this study, the UV-Visible spectrophotometer (520 nm) was also applied as a reference method for the assessment of the obtained results through the proposed methods.

Application of the proposed method
The proposed method was applied to evaluate the removal percentage of the dye in an aqueous solution due to using olive leaves powder (OLP) as an adsorbent [34,37].

Adsorbents preparation
The used adsorbent was olive leaves, collected from Erbil city, Kurdistan Region, Iraq. The olive leaves were washed with distilled water, dried in an oven at 105 ºC for about 3 h., and then powdered using a blender [34]. The obtained adsorbent was finally sieved through a standard sieve (125 µm size fractions) and stored until further analysis.

Removal experiments
The removal experiments were carried out in an optimum condition [34]. A series of 50 mL Erlenmeyer conical flasks including the dye (5 ml of 20 µg/mL safranin) solution, and 0.0100 g of the OLP adsorbent were shaken (150 rpm) at 25 °C. After the adsorption process including 1, 3, 6, 8, 10, and 15 min shaking, the adsorbents were separated from the solutions using a centrifuge (200 rpm for 1 min), respectively. The removal percentage (%R) of the dye by the adsorbent was finally assessed due to utilizing the proposed method and UV-Visible spectrophotometer (520 nm) as a reference method [37]. The removal percentage was calculated according to the following equation (Equation 2): where, Co and Ce denote the initial and final contents of the dye in µg/mL, respectively.

Data treatment and statistical analysis
Recorded data via the app were subjected, treated, and analyzed utilizing the software electronic spreadsheets of Microsoft Excel (2016). Linear regression was applied to find the standard curve of the proposed methods. GraphPad Prism 6 program was also applied for statistical analysis. Statistical analysis was conducted utilizing Paired Student's t-test to compare the obtained levels of the dye via the proposed and the reference methods. The significance level was set to 0.05.

Optimization condition
The optimization condition of the proposed method is an important step for obtaining real safranin color and offering reproducible and comparable color measurements. For these reasons, the effects of various experimental factors were well studied and have been optimized below for providing the most suitable capture conditions and recording the correct RGB parameters value by the app.

Study the effect of the active working parameter and samples volume
Recorded results showed that the active and preferable parameters are G and B channels for the quantitative assessment of the dye in aqueous solution (Figure 3a). These channels are significantly affected and responded by changing the dyes concentration at constant volume.
Obtained results also confirmed that the recorded values of the RGB parameters are significantly affected by changing the used volume of the analyzed dye at constant concentration (Figure 3b). Increasing the used volume of the colorful sample (8 µg/mL of safranin) can cause to decrease in the recorded RGB parameters and thus increase the obtained signals of the analyzed samples as the path length of the sample cell was increased (Figure 3c). For this reason, the used volume must be stable and selected during the entire of experiments. Thus, the use of three milliliters of the sample is preferable as the cell's path length would be about 1 cm (Figure 3c).

Study the effect of the plastic sample cell
The WPICT which includes eight successive cubic cells was suggested and used instead of the quartz sample cell and sample cell holder at the same time. The RGB values for 10 µg/mL of safranin solution were recorded in each of the proposed successive cells. Thus, the obtained results of the RGB parameters were different and not equal for the same solution due to using different cells position (Figure 4a). For this reason, the use of individual blanks for each of the successive cells can cause to provide a uniform RGB signal value for the same examined solution (Figure  4b-c).

Study the effect of the apps focusing detection radius (FDR)
To take a photo and record RGB values, the apps FDR is not fixed and ranged between 1 and 50. For this reason, three FDR degrees such as 1, 25, and 50 were selected and investigated ( Figure  5a). Thus, recorded results showed that the obtained G and B parameters are significantly affected by changing the apps FDR for serious solutions including 2, 4, 6, and 8 µg/mL of safranin. Decreasing the FDR by the app can cause to decrease in the recorded G and B values and thus increase the obtained signals of the analyzed samples (Figures 5b-c). For this reason, the apps FDR must be stable and fixed during the entire experiment. However, the stability of the GB values for 1 FDR is not constant when compared with the obtained results via 25 and 50 degrees of the FDR.

Analytical figures of merit
For the proposed method, the optimum condition that stated before was applied to serious solutions of the safranin dye (1-30 µg/mL) for recording each the G and B parameters and obtaining calibration curves. Characterization, verification, and analytical performance of the proposed methods were obtained via the following figures of merit: the LR, LOD, LOQ, sensitivity, accuracy, and precision. The figures of merits achieved for the proposed methods were also compared with those recorded via the use of UV-Visible spectrophotometry as a reference method.

Analytical curves, linearity, and performance
After applying the optimized factors stated before and the best condition of the constructed box, single and more suitable channels were mainly introduced as analytical signals. Thus, univariate calibration curves for the utilized dye were separately constructed for the responses sourced by the G and B channels. In the offered method, an analytical curve for safranin solutions was separately achieved within the concentration ranges of 1-10 µg/mL and 2-30 µg/mL by monitoring the G and B channels, respectively. The attained analytical curves via the use of G and B signals are shown in Figure 6. The linearity of the response was determined by linear regression applied to the analytical curves. The obtained slopes for all of the analytical curves ( Figure 6) were compared with each other as a measurement of the sensitivity of the channel: the steeper the slope, the more sensitive that channel is to change in concentration. According to Figure 6, both G and B channels (signals) responded to changes in concentrations. However, the G channel presented greater sensitivity and linearity, consequently selected and preferred to be the best working channel for the assessment of the safranin in aqueous solution.
In this study, the UV-Visible spectrophotometer was also applied as a reference method (at 520 nm) for the assessment of the obtained results through the proposed methods. The calibration graph for safranin solutions was linear over the range of 0.5-30 µg/mL with a good correlation coefficient (R 2 = 0.9992).
According to recorded results (Table 2), good linear ranges with high sensitivity and correlation coefficients can be obtained due to utilizing the proposed methods via FDR-1 and FDR-25. However, the use of TP-25 and LC-25 is more stable and preferable than the use of TP-1 and LC-1 methods (Figure 5a-b). In addition, the recorded results through GTP-25 and GLC-25 proposed methods are in good agreement with those obtained by the reference method in terms of linearity and sensitivity (Table 2).  TP that were separately constructed for the responses sourced by the G and B channels.

Limits of detection and quantification
The LOD and LOQ were calculated for both the proposed and reference methods applying the obtained data of the analytical curves. The use of TP-25 and LC-25 methods were preferred for the calculation of the LOD and LOQ using both G and B channels. They were calculated utilizing LOD = 3 SDblank/m, n = 5 and LOQ = 10 SDblank/m, n = 5, where m is the obtained slope of the analytical curve and SD is the standard deviation of five blank measurements [38,39].
Recorded results via the G channel showed that the LOD and LOQ were 0.15 and 0.51 µg/mL for GTP-25 method, 0.13 and 0.44 µg/mL for GLC-25 method, respectively. However, the obtained LOD and LOQ via the B parameter were high and equal to 0.80 and 2.66 µg/mL for BTP-25 method, 0.68 and 2.27 µg/mL for BLC-25 method, respectively. The LOD and LOQ via the reference method were equal to 0.03, and 0.10 µg/mL, respectively.
As can be seen that the values of the LOD and LOQ via the use of the G signal provided satisfactory quantification limit for the working range considered (1 to 10 µg/mL), while the use of B parameter resulted in high LOQ and low sensitivity. However, the recorded LOD via the reference method is five times smaller than this value obtained through the proposed method due to high sensitivity (slope = 0.0476) of the reference method (Table 2).

Accuracy and precision
The accuracy and precision were also calculated for each of the proposed and reference methods. The accuracy was calculated by measuring the safranin contents at three different levels (1, 5, and 10 µg/mL) within limits of linearity. It was represented as an error percentage (%E). The precision was also assessed by calculating the standard deviation (SD) and relative standard deviation (%RSD) of replicate measurements (n = 3) of the same solutions of the safranin at different levels.
The obtained results verified that the accuracy and precision of the proposed and reference methods were in a good range and shown as %E and %RSD, respectively (Table 3). Recorded results showed that the %RSD, and %E values via the use of GTP-25 were 3.09% and 5.96% (n = 3, c = 5.00 µg/mL), respectively. The %RSD, and %E values via the use of GLC-25 were also in a satisfactory range and equal to 1.85% and 2.12% (n = 3, c = 5.00 µg/mL), respectively.

Methods application and comparison
The proposed method was well applied to assess the removal level of the dye by the OLP adsorbent and the recorded results were successfully compared with those recorded with the reference method. It has been observed that the removal levels of the dye measured by the proposed methods were in a satisfactory range and highly agreed with those determined by the reference method [34].
After removal application, paired t-test was performed to compare recorded levels of the dye that were determined by the reference and proposed methods. At the 95% confidence level, obtained results (Figure 7) confirmed that there was no significant difference between the reference and GTP-25 proposed methods concerning accuracy (t = 1.420, p > 0.05, p = 0.2147) because the p-value is higher than 0.05. However, a statistically significant difference was identified between the reference and GLC-25 proposed methods (t = 5.292, p < 0.05, p = 0.0032) as the p-value is less than 0.05.
In comparison with the spectrophotometric method, many significant advantages can be obtained by applying the presently proposed DIC method. In the present work, novel, simple, lowcost, straightforward, semi-automated, and easy-handled devices are described for the construction of the proposed light-box photography. Experimentally, the proposed method also provides a quicker analysis than the reference method as it lets eight samples be run successively in a single step for about two minutes. Thus, increasing in analytical frequency is easily obtained. The utilization of smartphones as detector devices also reduces the cost of analyses by avoiding expensive instrumentation and requires a suitable amount of the sample (3 mL per determination) for analysis when compared to the reference method.
The proposed method is accepted as it needs low-cost devices, requires suitable sample volume, is extremely fast, and provides a high degree of accuracy and precision. The developed application on an android smartphone can provide a fast, very simple, and inexpensive analytical procedure for the assessment of colorful compounds for a wide variety of applications. Thus, recorded results verify that the proposed method can be easily utilized as an alternative to the spectrophotometric method for the evaluation of dyes in aqueous solutions. It can also be applied as an easy-in-performance and categorized as an environmentally friendly approach for the assessment of dyes in an aqueous solution. Therefore, other colorful compounds which have a special color like dyes or any compound which can form a special color complex solution can be quantitatively assessed by the proposed method.
These findings also make possible the additional application of the proposed method not only for environmental analysis but also for educational purposes, biological assay, and pharmaceutical applications because the dye is widely utilized as the biological stain in histology and cytology [40][41][42]. In addition, the proposed method is extremely supported for dyes monitoring and other applications for the future in isolated zones and developing countries.

CONCLUSION
A simple, semi-automated, and straightforward analytical procedure for the quantification of safranin dye in aqueous solutions was obtained by applying a smartphone app as a portable colorimetric sensor. The proposed method also provided great attention due to its inexpensive devices, novelty, portability, simplicity, rapidity, practicality, and applicability. The calibration graph was linear over the range 1-10 µg/mL with a good correlation coefficient and high sensitivity utilizing G signal. Removal application results recorded via the proposed method were in a satisfactory range and compared with those obtained via the referenced method. The present work is offered a system setup and a reliable analytical method alternative to the professional and expensive device such as UV-Visible spectrophotometer in terms of dyes assessment. It can be easily applied everywhere without the necessity for expensive devices for the analysis of colorful compounds in various fields.

ACKNOWLEDGMENTS
I would like to express my high gratitude to someone who supported and encouraged me during working.