Portable Multispectral Colorimeter for Metallic Ion Detection and Classification

This work deals with a portable device system applied to detect and classify different metallic ions as proposed and developed, aiming its application for hydrological monitoring systems such as rivers, lakes and groundwater. Considering the system features, a portable colorimetric system was developed by using a multispectral optoelectronic sensor. All the technology of quantification and classification of metallic ions using optoelectronic multispectral sensors was fully integrated in the embedded hardware FPGA ( Field Programmable Gate Array) technology and software based on virtual instrumentation (NI LabView®). The system draws on an indicative colorimeter by using the chromogen reagent of 1-(2-pyridylazo)-2-naphthol (PAN). The results obtained with the signal processing and pattern analysis using the method of the linear discriminant analysis, allows excellent results during detection and classification of Pb(II), Cd(II), Zn(II), Cu(II), Fe(III) and Ni(II) ions, with almost the same level of performance as for those obtained from the Ultravioled and visible (UV-VIS) spectrophotometers of high spectral resolution.


Introduction
Heavy metal ions have presented strong threats to human health as they have a lot of toxic bio-cumulative properties in the natural environment. Once these ions are thrown into rivers and lakes near cities, they can affect the vegetables and animals, unbalancing the whole food chain [1]. The main health problem caused by heavy metal ions and the threshold level in drinking water according to the World Health Organization (WHO) are summarized in Table 1. To this end, great effort has been made by the scientific community in order to develop devices and systems for metal ions detection. Electrochemical devices were initially offered, which have achieved high accuracy and, in some special cases, also high selectivity by using nanomaterials such as active electrodes [2][3][4]. However, these types of devices normally suffer interference from electromagnetic noise sources. In order to avoid this, many dye molecules or also bio-indicator molecules have been successfully used for signal detection of the absorption (colorimetric) and fluorescent emission spectra. For example, Anabas testudines were applied as a bio-indicator for Hg and Pb metal ions detection using an ion exchange chromatography spectrometer. The experimental setup of this assay needs complex procedures for the separation and

Experimental Procedures
The portable embedded system for the detection of different metallic ions by the colorimetric method used a photodetector optoelectronic chip, composed of 18 sets of photodiodes (3 × 6) encapsulated in a same enclosure, MMCS6CS type, manufactured by the MAZeT company (Jena, Germany). In this device, there were three groups of six photodiodes symmetrically distributed in a circular structure of 2 mm diameter. Each group of photodiodes had a spectral dielectric filter that selects the specific wavelength band so that the complete array of photodiodes covers the spectral region from 380 nm to 780 nm, where each group with specific filters is sensible to the band centered at 425, 475, 525, 625, 575 and 675 nm respectively. Additionally, there was one group of six photodiodes that did not have any filter, i.e., unfiltered array (PW). The photodiodes were connected directly to two integrated transimpedance amplifiers of MTI04CS type, which have four channels with programmable gains. The amplifiers chips were manufactured by MAZeT company (Jena, Germany). The gain selection was achieved by combining the three-bit binary entrance of the MTI04CS integrated circuit, allowing up to eight different stages of amplification levels. After the amplification step, the signals from the photodiodes are multiplexed and directed to a processing and signal acquisition module in order to get the electrical signal (V DC ) that corresponds to a light intensity that arrived at each groups of photodiode array of the multispectral sensor. As light source, a white light-emitting diode (LED) (P MAX = 120 mW, IF = 30 mA), manufactured by the company Laser Roithner Technik (B3B-440-JB) was used. This source was set up at the front side of the quartz cuvette that contains the sample solution. The LED was fed with constant current source. The acquisition, control and processing of the signals was performed based on Field Programmable Gate Array (FPGA) technology, which was developed based on virtual instrumentation software (NI LabView ® ), manufactured by National Instruments, NI model myRIO-1900 (Austin, TX, USA). Figure 1 shows a schematic diagram of the portable embedded system for the detection of the heavy metal ions (Cu(II), Zn(II), Ni(II), Cd(II), Pb(II), and Fe(III)) by the colorimetric method using a chromogen reagent and multispectral optical sensor. The solution with different metal ions was prepared with reagents of 99.9% purity. All reagents were acquired from the Sigma-Aldrich Chemistry (São Paulo, Brazil) and deionized (DI) water was purified with a Milli-Q system Gradient. Standard solutions for the different metals were prepared in water DI, with a suitable dilution of 250 ppm of salts of copper sulphate (CuSO4), zinc sulfate (ZnSO4), nickel chloride (NiCl2), cadmium chloride (CdCl2), lead nitrate (Pb(NO3)2), iron(III) nitrate (FeN3O9). The pH values of the ionic solutions were read by a pH meter, LUCA-210 model, manufacturer Lucadema and unmodified according to those values obtained after the process of the dilution of salts in the water, as is shown in Table 2. The chromogen reagent of 1-(2-pyridylazo)-2-naphthol (PAN) was diluted with methanol in order to get a concentration of 100 μM. Before each data acquisition, a volume of 2.5 mL of the prepared PAN solution was added into a quartz cuvette and then small additions of appropriate volumes of the metal ions Cu(II), Zn(II), Ni(II), Cd(II), Pb(II), Fe(III) were performed in order to get concentrations of 1 to 10 ppm, respectively. It is important to point out that all ion concentrations were authenticated by the EPA SW-846 Test Method 6010D: Inductively Coupled Plasma-Optical Emission Spectrometry using a standard of Pb-CGPB1-1 (1000 μg/mL) in 0.5% HNO3 (v/v) Inorganic  The solution with different metal ions was prepared with reagents of 99.9% purity. All reagents were acquired from the Sigma-Aldrich Chemistry (São Paulo, Brazil) and deionized (DI) water was purified with a Milli-Q system Gradient. Standard solutions for the different metals were prepared in water DI, with a suitable dilution of 250 ppm of salts of copper sulphate (CuSO 4 ), zinc sulfate (ZnSO 4 ), nickel chloride (NiCl 2 ), cadmium chloride (CdCl 2 ), lead nitrate (Pb(NO 3 ) 2 ), iron(III) nitrate (FeN 3 O 9 ). The pH values of the ionic solutions were read by a pH meter, LUCA-210 model, manufacturer Lucadema and unmodified according to those values obtained after the process of the dilution of salts in the water, as is shown in Table 2. The chromogen reagent of 1-(2-pyridylazo)-2-naphthol (PAN) was diluted with methanol in order to get a concentration of 100 µM. Before each data acquisition, a volume of 2.5 mL of the prepared PAN solution was added into a quartz cuvette and then small additions of appropriate volumes of the metal ions Cu(II), Zn(II), Ni(II), Cd(II), Pb(II), Fe(III) were performed in order to get concentrations of 1 to 10 ppm, respectively. It is important to point out that all ion concentrations were authenticated by the EPA SW-846 Test Method 6010D: Inductively Coupled Plasma-Optical Emission Spectrometry using a standard of Pb-CGPB1-1 (1000 µg/mL) in 0.5% HNO 3  The response of the multispectral sensor MMCS6CS in the presence of metal ions of Pb(II), Cd(II), Zn(II), Cu(II), Fe(III) and Ni(II) was based on spectral change measurement of the optical transmittance spectra of a PAN solution, due to the action of different ions. In this case, the light intensity transmitted and received by the array of photodiodes was converted by transimpedance amplifiers (MTI04CS) into V DC voltage values and stored by the acquisition, control and processing module (myRIO-1900). The transmittance was determined relative to the reference signal which corresponded to the response of each photodiode in different arrays to the transmitted white light through the solvent used in the preparation of the solution samples.
Before each signal reading, a volume of 2.5 mL of prepared PAN solution (100 µM) was added into a cuvette of quartz which has square shape of 10 mm each side. After this, a calibrated pipette, model P100 (20-100 µL), Gilson Pipetman, was used to add a small volume of metal ions diluted in water in order to get a concentration of ions in the range of 1 to 10 ppm. During the experiment, the ambient temperature was kept at 26 • C.

Results and Discussion
In order to compare the performance of our proposed portable colorimeter first, the transmittance spectra (T) was obtained of PAN (sensitive molecule) and of the solutions of this molecule in environments containing metal ions of Pb(II), Cd(II), Zn(II), Cu(II), Fe(III) and Ni(II), respectively. The spectra were obtained by a UV-VIS spectrometer Cary 50 model, Varian and are presented in Figures A1a, A2a, A3a, A4a, A5a and A6a, which can be seen in the supplementary information (Appendix A).
Then, the portable colorimeter which was built with the multispectral sensor MMCS6CS was used to obtain the transmittance spectra of the PAN solution containing the different metallic ions so that the solutions had the same condition as the ones used with the UV-VIS spectrometer. The transmitted light signals were detected with the six photodetector output terminals (MAZeT) that correspond to the responses of the array of photodiodes with band pass optical filters centered at 425, 475, 525, 575, 625 and 675 nm, respectively. These signals were conditioned using the digital LOCK-IN amplification process. The transmittance spectra were determined comparing the signal from the PAN solution relative to the signal corresponding to the solvent (methanol) used for the PAN solution preparation. Equation (1) gives the transmittance relation that was obtained using the detected signals on the photodiode array.
where I sample (λ) is the current generated by the photodiode array with an optical filter centered at the wavelength λ when the samples were the PAN solution without or with metal ions, respectively. I solvent is the current generated by the photodiode array with an optical filter centered at the wavelength λ when the sample only corresponds to a solvent (methanol). The transmittance spectra for different metal ions and at different concentrations obtained this way are depicted in the Figures A1b, A2b, A3b, A4b, A5b and A6b in the supplementary information (Appendix A).
The spectra results with the UV-VIS spectrometer and portable system clearly show that the presence of metal ions in the solutions of the PAN molecules changes the profile of the transmittance bands and these changes are related to the change in color of the original solution (PAN solution free of ions). The color change mechanism could be explained as follows: the PAN molecule is composed of two aromatic groups, the pyridyl group and naphthol group, joined by azonitrogen. The aromatic groups act as an optical antenna in the UV-VIS region. The interaction of the PAN molecule and the Sensors 2017, 17, 1730 6 of 14 metallic ion in a solution promoted a reaction such that the PAN acts as a tridentate ligand complexing with metal ions through the ortho-hydroxyl group of naphthol rings and the azonitrogen approach hetrocyclic nitrogen atom. This reaction promotes changes in the electronic orbital of pyridyl and naphthol groups which are responsible for the absorption spectrum of the PAN molecule in the UV-VIS region. Thus, the PAN molecule chelation with metal ions changes its spectral band absorption shape and these band changes are used as indicators to identify different types of metallic ions [18,19].
The spectra, obtained with the multispectral sensor MMCS6CS, certainly have lower quality than the spectra obtained with the conventional UV-VIS spectrometer, since the multispectral sensor system has a discrete number of spectral points (six filtered sensors). However, it can be observed in the Figures A1b, A2b, A3b, A4b, A5b and A6b that the profiles of the discrete spectra follow the same trend in the change of spectra that were obtained with the UV-VIS spectrophotometer. It is important to point out that the spectral range of the set of six filtered sensors was limited to a range between 380 and 780 nm. In this sense, in order to obtain a more accurate comparison, the region of the wavelength bands in the ultraviolet region (275-375 nm), seen in the spectra with the UV-VIS spectrometer, were suppressed for the quantitative analyses.
Before the colorimetric analyses, the sensitivity response of our proposed system was compared with that obtained with conventional spectrometers. For this proposal, the transmittance coefficient was analyzed at 525 nm, which is a sensible spectral point that changes significantly with metal ion concentrations. Thus, we define a response function at this point to both the spectrometer and the multispectral MMCS6CS system, using the following Equation (2).
where T 0 and T are the transmittance coefficients of the PAN solution without and with metallic ions, respectively. The spectra, obtained with the multispectral sensor MMCS6CS, certainly have lower quality than the spectra obtained with the conventional UV-VIS spectrometer, since the multispectral sensor system has a discrete number of spectral points (six filtered sensors). However, it can be observed in the Figures A1b-A6b that the profiles of the discrete spectra follow the same trend in the change of spectra that were obtained with the UV-VIS spectrophotometer. It is important to point out that the spectral range of the set of six filtered sensors was limited to a range between 380 and 780 nm. In this sense, in order to obtain a more accurate comparison, the region of the wavelength bands in the ultraviolet region (275-375 nm), seen in the spectra with the UV-VIS spectrometer, were suppressed for the quantitative analyses.
Before the colorimetric analyses, the sensitivity response of our proposed system was compared with that obtained with conventional spectrometers. For this proposal, the transmittance coefficient was analyzed at 525 nm, which is a sensible spectral point that changes significantly with metal ion concentrations. Thus, we define a response function at this point to both the spectrometer and the multispectral MMCS6CS system, using the following Equation (2).
where T0 and T are the transmittance coefficients of the PAN solution without and with metallic ions, respectively.    On the other hand, Figures 2 and 3 show that the response curves saturate early, showing the high sensitivity of PAN molecules to detecting the metal ions studied in this work, except for Pb and Cd ions. Considering that the response error in our proposed system (MMCS6CS) was about 1.7% (in the worst case), the limit of detection of our system was estimated by using the slope of the linear part of the response curves ( Figure 3) in Equation (3) [20]. These limits of detection for all the ions studied in this work are showed in the Table 3.
where: S is the slope of response curves (linear region) and σ is the imprecision of the detection system (error). The limit of detection for the Pb(II) ion is really close to the limit level for drinking water (Table  1). However, the limit of detection of the Cd(II) ion is greater in one order of magnitude than to the limit level for drinking water. The limit of detection for the Fe(III), Z(II), Cu(II) and Ni(II) ions are much smaller than the limit levels of these ions in drinking water (Table 1). These results showed that the multispectral portable system proposed in this work could be used successfully to control the water quality.
The most relevant results reported in this work are related to the classification power of different metallic ions achieved with the proposed portable colorimeter system. The classification procedure was achieved by using the Fisher linear discriminant analysis. For this procedure we used a set of 20 data for each type of ion, of which ten data were used for the training process and the other ten data On the other hand, Figures 2 and 3 show that the response curves saturate early, showing the high sensitivity of PAN molecules to detecting the metal ions studied in this work, except for Pb and Cd ions. Considering that the response error in our proposed system (MMCS6CS) was about 1.7% (in the worst case), the limit of detection of our system was estimated by using the slope of the linear part of the response curves ( Figure 3) in Equation (3) [20]. These limits of detection for all the ions studied in this work are showed in the Table 3.
where: S is the slope of response curves (linear region) and σ is the imprecision of the detection system (error). The limit of detection for the Pb(II) ion is really close to the limit level for drinking water (Table 1). However, the limit of detection of the Cd(II) ion is greater in one order of magnitude than to the limit level for drinking water. The limit of detection for the Fe(III), Z(II), Cu(II) and Ni(II) ions are much smaller than the limit levels of these ions in drinking water (Table 1). These results showed that the multispectral portable system proposed in this work could be used successfully to control the water quality.
The most relevant results reported in this work are related to the classification power of different metallic ions achieved with the proposed portable colorimeter system. The classification procedure was achieved by using the Fisher linear discriminant analysis. For this procedure we used a set of 20 data for each type of ion, of which ten data were used for the training process and the other ten data were used for the testing process. In the case of the spectra from the UV-VIS spectrometer, first the transmittance curves were fitted with seven harmonic functions (Equation (4)).
where λ is the wavelength of excited light; and K is the fundamental frequency of the harmonic series. The sixteen parameters K, A j and B j (j = 1, 2, . . . , 7) were used as the input data for the linear discriminant analyses (training and testing process). It is important to point out that different authors proposed a classification process using the colorimetric technique by using the spectral point where the significant variation of the transmittance (or absorbance) coefficient happened [9]. This strategy certainly loses the profile change of all the transmittance bands. In this regard, the fitting process proposed in this work preserved the intensity and shape variation of the spectral bands on the classification process.
In the case of the multispectral MMCS6CS portable colorimeter, we have the six spectral points for the transmittance spectra, so these six transmittance coefficients were directly used as the input data for the linear discriminant analyses.
The canonical score plots for the training and testing process are depicted in the Figures 4  and 5, respectively. Figure 4 shows that the training process achieved an excellent classification for the spectra data obtained with the UV-VIS spectrometer, since the different classes were clearly separated between them by hyperplanes. This figure also shows that the testing results and the error rates for all metallic ion recognition were 0%, as is shown in Table 4. were used for the testing process. In the case of the spectra from the UV-VIS spectrometer, first the transmittance curves were fitted with seven harmonic functions (Equation (4)).
where λ is the wavelength of excited light; and K is the fundamental frequency of the harmonic series. The sixteen parameters K, Aj and Bj (j = 1, 2, …, 7) were used as the input data for the linear discriminant analyses (training and testing process). It is important to point out that different authors proposed a classification process using the colorimetric technique by using the spectral point where the significant variation of the transmittance (or absorbance) coefficient happened [9]. This strategy certainly loses the profile change of all the transmittance bands. In this regard, the fitting process proposed in this work preserved the intensity and shape variation of the spectral bands on the classification process.
In the case of the multispectral MMCS6CS portable colorimeter, we have the six spectral points for the transmittance spectra, so these six transmittance coefficients were directly used as the input data for the linear discriminant analyses.
The canonical score plots for the training and testing process are depicted in the Figures 4 and 5, respectively.  The canonical score plots for the training and testing processes built from the set of spectra data which were obtained with a portable colorimetric system based in multispectral sensors. The classification procedure was obtained by using linear discriminant analyses. Figure 4 shows that the training process achieved an excellent classification for the spectra data obtained with the UV-VIS spectrometer, since the different classes were clearly separated between them by hyperplanes. This figure also shows that the testing results and the error rates for all metallic ion recognition were 0%, as is shown in Table 4. Table 4. Classification counts and error rates of different metallic ions obtained after processing and analyzing the fitted parameter of transmittance spectra (obtained with UV-VIS spectrometer) by the linear discriminant analysis method.  Figure 5. The canonical score plots for the training and testing processes built from the set of spectra data which were obtained with a portable colorimetric system based in multispectral sensors. The classification procedure was obtained by using linear discriminant analyses. Table 4. Classification counts and error rates of different metallic ions obtained after processing and analyzing the fitted parameter of transmittance spectra (obtained with UV-VIS spectrometer) by the linear discriminant analysis method. The score plot of the training and testing process, which were obtained from the proposed portable colorimeter, is depicted in Figure 5. The clusters of different classes were almost totally separated by hyperplanes, except for the clusters corresponding to Cu(II) and Pb(II) ions, where it was not possible to draw a hyperplane which could separate these clusters. The testing process also shows an error rate for Cu(II) ion recognition of 10%, as can be seen in Table 3-i.e., 10% of Cu(II) ion samples were misunderstood as Pb(II) ions. Even though it was not possible to understand the samples for Cu(II) and Pb(II) ions, all the other metallic ions used in this work were successfully classified with an error rate of 0% (Table 5). The classification results obtained with the portable multispectral colorimetric system almost showed equivalent performance with those obtained with the conventional UV-VIS spectrometer, the 10% of misunderstood Cu(II) and Pb(II) ions must be due to discrete spectral points of the multispectral detector of our system, which loses fine details of band shape changes. Table 5. Classification counts and error rates of different metallic ions obtained after processing and analyzing the output signal from the multispectral sensor by the linear discriminant analysis method.

Conclusions
In the present work, a portable device system applied in the detection of different metallic ions was proposed and developed, aiming at its application in the monitoring of hydrological systems like rivers, lakes and groundwater. A portable colorimetric system was designed and developed, embedded in the board acquisition of National Instruments. The system functioned as a colorimeter by using the chromogen reagent of 1-(2-pyridylazo)-2-naphthol (PAN) as an indicator, along with signal processing and pattern analysis using the linear discriminant analysis method, allowing us to obtain excellent results in the detection and classification of Pb(II), Cd(II), Zn(II), Cu(II), Fe(III) and Ni(II) ions, with almost the same level of performance as those obtained from UV-VIS spectrometers with high spectral resolution. All the technology for the quantification and classification of metallic ions using optoelectronic multispectral sensors was fully integrated into the embedded hardware FPGA technology and software based on virtual instrumentation (NI LabView ® ).
The portable system developed in this work suggests its application for environmental control in situ and in real time, in such a way that it can be integrated into a network of sensors that can provide data continuously and receive commands to control environmental monitoring centers. In addition, the proposed system can be applied for the detection of various types of gases simultaneously, since the different dye molecules sensitive to different types of gas and with different spectral responses could be integrated into the active area of multispectral sensors. In this case it will be used for the absorption or photoluminescence spectra of dye molecules since our portable system provided an easy process for switching the source of a white-light-emitting diode (used for absorption spectra obtention) by an emitting laser diode at a specific wavelength, which can be used as a source to excite the dye molecules for photoluminescence emission.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
be used for the absorption or photoluminescence spectra of dye molecules since our portable system provided an easy process for switching the source of a white-light-emitting diode (used for absorption spectra obtention) by an emitting laser diode at a specific wavelength, which can be used as a source to excite the dye molecules for photoluminescence emission.  be used for the absorption or photoluminescence spectra of dye molecules since our portable system provided an easy process for switching the source of a white-light-emitting diode (used for absorption spectra obtention) by an emitting laser diode at a specific wavelength, which can be used as a source to excite the dye molecules for photoluminescence emission.