Papaorn Siribunbandal1,2, Yong-Hoon Kim3, Tanakorn Osotchan4, Zhigang Zhu5, Rawat Jaisutti1,2. 1. Department of Physics, Faculty of Science and Technology, Thammasat University, Pathumthani 12121, Thailand. 2. Research Unit in Innovative Sensors and Nanoelectronic Devices, Thammasat University, Pathumthani 12121, Thailand. 3. School of Advanced Materials Science and Engineering, Sungkyunkwan University, Suwon 16419, Korea. 4. Department of Physics, Faculty of Science, Mahidol University, Bangkok 10400, Thailand. 5. School of Health Science and Engineering, University of Shanghai for Science and Technology, Shanghai 200093, China.
Abstract
Easy-to-use and on-site detection of dissolved ammonia are essential for managing aquatic ecosystems and aquaculture products since low levels of ammonia can cause serious health risks and harm aquatic life. This work demonstrates quantitative naked eye detection of dissolved ammonia based on polydiacetylene (PDA) sensors with machine learning classifiers. PDA vesicles were assembled from diacetylene monomers through a facile green chemical synthesis which exhibited a blue-to-red color transition upon exposure to dissolved ammonia and was detectable by the naked eye. The quantitative color change was studied by UV-vis spectroscopy, and it was found that the absorption peak at 640 nm gradually decreased, and the absorption peak at 540 nm increased with increasing ammonia concentration. The fabricated PDA sensor exhibited a detection limit of ammonia below 10 ppm with a response time of 20 min. Also, the PDA sensor could be stably operated for up to 60 days by storing in a refrigerator. Furthermore, the quantitative on-site monitoring of dissolved ammonia was investigated using colorimetric images with machine learning classifiers. Using a support vector machine for the machine learning model, the classification of ammonia concentration was possible with a high accuracy of 100 and 95.1% using color RGB images captured by a scanner and a smartphone, respectively. These results indicate that using the developed PDA sensor, a simple naked eye detection for dissolved ammonia is possible with higher accuracy and on-site detection enabled by the smartphone and machine learning processes.
Easy-to-use and on-site detection of dissolved ammonia are essential for managing aquatic ecosystems and aquaculture products since low levels of ammonia can cause serious health risks and harm aquatic life. This work demonstrates quantitative naked eye detection of dissolved ammonia based on polydiacetylene (PDA) sensors with machine learning classifiers. PDA vesicles were assembled from diacetylene monomers through a facile green chemical synthesis which exhibited a blue-to-red color transition upon exposure to dissolved ammonia and was detectable by the naked eye. The quantitative color change was studied by UV-vis spectroscopy, and it was found that the absorption peak at 640 nm gradually decreased, and the absorption peak at 540 nm increased with increasing ammonia concentration. The fabricated PDA sensor exhibited a detection limit of ammonia below 10 ppm with a response time of 20 min. Also, the PDA sensor could be stably operated for up to 60 days by storing in a refrigerator. Furthermore, the quantitative on-site monitoring of dissolved ammonia was investigated using colorimetric images with machine learning classifiers. Using a support vector machine for the machine learning model, the classification of ammonia concentration was possible with a high accuracy of 100 and 95.1% using color RGB images captured by a scanner and a smartphone, respectively. These results indicate that using the developed PDA sensor, a simple naked eye detection for dissolved ammonia is possible with higher accuracy and on-site detection enabled by the smartphone and machine learning processes.
Detection
of dissolved ammonia is significantly essential for managing
aquatic ecosystems and aquaculture products since excessive emission
of ammonia could deteriorate water quality and be harmful to many
species of aquatic life.[1] The ammonia contamination
in an aquatic environment may come from domestic, agricultural, and
industrial effluents owing to a rapid increase of urbanization and
industrialization. It has been reported that the production of greenhouse
gas—nitrous oxide—has been found in the oceans, which
occurs by ammonia-oxidizing archaea under hypoxic conditions.[2] In addition, oxidation of ammonia to cancerogenic
nitrate by nitrobacteria can cause health risks for longtime drinking
of ammonia-containing water.[3] It is recommended
that the final acute ambient water quality criterion for protecting
freshwater organisms from the potential effects of ammonia is 17 ppmv
total ammonia nitrogen.[4] Therefore, a simple
and low-cost ammonia detector is of great demand for rapid on-site
testing and continuous monitoring of water quality.Numerous
analytical techniques are available for the analytical
detection of ammonia in water, such as ion-selective electrodes,[5,6] electrochemical analyses,[7] and conductometric[8] and fluorescence spectroscopies.[9,10] These methods can precisely analyze ammonia quantitatively; however,
they are rather time-consuming and costly and require complex instrumentation.
Therefore, the development of a colorimetric sensor, which is easy-to-use
and of low cost and has a convenient readout with the naked eye, is
of great interest. Several studies have been carried out on colorimetric
detection of ammonia using different sensing materials, such as carbon
dots,[3] indophenol blue,[11] and bromothymol blue.[12] However,
most of the reported methods are based on spectrophotometry of Nessler’s[5,13] and Berthelot’s[14−16] reactions, which exhibit low
sensitivity and poor selectivity or use of a toxic reagent. Also,
some of the samples must be purified before determination of ammonia;
otherwise, some dissolved alkaline species can interfere with the
measurements.[11,17] In addition, commercially available
test methods are relatively expensive and can interfere with ions,
suspended solids, and colored compounds.[10,12]Polydiacetylenes (PDAs), conjugated polymers, are one of the
attractive
materials for various colorimetric sensing applications, including
organic solvents,[18] temperature,[19] pHs,[20,21] and biomarkers.[22,23] The color change of PDAs from blue to red upon exposure to stimuli
is due to the conformational transition of the PDA backbone from planar
to non-planar. One of the most critical features of PDAs is that their
building blocks can be locally functionalized and chemically modified,
making them possess tunable sensitivities to stimuli.[24] PDAs undergo a color change when exposed to ammonia. However,
none of these studies developed PDA hybrid films that detect ammonia
in the gas phase.[25−27] Based on our knowledge, there are still no reports
on PDA-based colorimetric sensors for dissolved ammonia detection.
Although the visible blue-to-red color change of PDA-based sensors
can be observed by the naked eye and easily understood by non-specialists,
however, there are deficiencies in quantification and precision. Therefore,
smartphone technologies[28,29] or scanner platforms[18] were used to extract the quantitative data from
color images. The color change of PDAs can be quantified using the
red–green–blue (RGB) (red, green, and blue) color space
of the taken images and applying a simple analytical model such as
the red chromatic shift (RCS)[18] and red-blue
ratios.[25]In order to convert colors
to analytical values, the methods mentioned
above use JPEG images to obtain a calibration curve. However, the
JPEG images are compressed files, and their quality depends on device
proprietary software, making the final analytical data not completely
reliable.[30,31] In addition, colorimetric analysis is susceptible
to ambient light conditions, smartphone brands, and camera optics.
Therefore, machine learning algorithms were proposed as intelligent
systems for the quantitative analysis process.[31−33] The pre-obtained
images were used to train the learning model and automatically perform
colorimetric tests as new data arrived. In particular, machine learning
is now widely used in sensor applications and automatic systems, owing
to its powerful utilities such as self-learning from the training
data and self-automated decisions from the learned database.[32] The flexibility and adaptability to new machine
learning platforms, such as smartphone-based systems[33,34] and embedded systems,[35,36] lead to a reliable
quantitative and qualitative evaluation of colorimetric analysis.In this work, easy-to-use detection of dissolved ammonia was developed
using the PDA vesicles which were assembled from a diacetylene monomer
through facile green chemical synthesis. Upon a fine control of the
synthesis process and polymerization conditions, the blue-to-red color
change of the PDA sensor was observed by the naked eye when exposed
to ammonia. Quantitative analysis of ammonia concentrations was performed
using UV–vis spectroscopy and digital colorimetric analysis
with machine learning classifiers. A support vector machine (SVM)
was used as the learning model for classifying the sample color images
obtained from a scanner and a smartphone under different ammonia concentrations.
The results showed that our colorimetric detection system possessed
excellent quantitative detection of dissolved ammonia with a detection
limit of 10 ppm. It indicates that the proposed PDA sensor-integrated
machine learning platform can be potentially utilized as a portable
intelligent system with high accuracy, convenient on-site detection,
and real-time ammonia monitoring.
Experimental
Section
Preparation of PDA Vesicles
Diacetylene
monomer 10,12-pentacosadiynoic acid (PCDA) (>97%) was purchased
from
Sigma-Aldrich. Ethanol was received from RCI Labscan Limited, Thailand.
Aqueous ammonia solution (25%) with an assay of 99.9% was purchased
from Merck. All chemicals used in this work were of analytical reagent
grade and used as received. The PDA vesicles were synthesized using
a facile green chemical process. Briefly, the diacetylene monomer
PCDA was dissolved in 10 mL of ethanol and filtered using a 0.45 μm
pore size nylon membrane to remove any contaminant. The ethanol solvent
was slowly evaporated under a controlled temperature of 80 °C
under continuous magnetic stirring. Then, deionized water was added
to yield a suspension concentration of 0.5 mM and continuously stirred
at 80 °C for 90 min to remove the residual ethanol. The resulting
translucent solution was cooled down to room temperature and stored
in a refrigerator at 4 °C for 18 h. After that, the self-assembled
PCDA was irradiated by a UV light (UV lamp OSRAM, PHILIPS, TOKIVA)
at a wavelength of 254 nm (light intensity 1.5 mW cm–2) for 5 min under magnetic stirring. Finally, a dark blue suspension
of PDA vesicles was obtained, which was used freshly as prepared or
after storing at 4 °C with light protection until use. To optimize
the sensing performance, the PDA sensors have been developed by adjusting
the concentrations of PCDA in the suspension as follows: 0.25, 0.5,
0.75, 1.0, and 1.5 mM.
Characterization of PDA
Vesicles
The PDA vesicles before and after ammonia exposure
were characterized
using Fourier transform infrared (FTIR) spectroscopy (Bruker model
Vertex 70) with an attenuated total reflection setup. The samples
were prepared by drop-casting onto a cellulose paper and drying at
room temperature. The morphology of the PDA vesicles in the dried
state was examined using scanning electron microscopy (SEM, JEOL JSM-6400).
Dynamic light scattering (DLS) analysis (Zetasizer nano ZS, Malvern
Instruments) was conducted to confirm the size distribution of the
PDA vesicles. DLS measurements were performed using samples without
dilution. In addition, the optical absorption spectra were measured
using a UV–vis spectrometer (Thermo Scientific, Genesys 10
Series).
Colorimetric Response Analysis of the PDA
Sensor
The colorimetric response (CR) of PDA sensors to different
ammonia concentrations was explored by adding the PDA vesicles into
ammonia-dissolved water. The mixed solution was then incubated at
room temperature, and its color change was monitored using optical
absorption spectroscopy and digital colorimetric analysis. Based on
the optical absorption analysis, a blue-to-red color transition of
PDA sensors was evaluated as a CR according to CR(%) = [(PB0 – PB)/PB0] × 100. PB0 and PB are
the relative ratios of blue and red elements in the absence and presence
of ammonia, respectively. PB can be calculated from Ablue/(Ablue + Ared), where Ablue and Ared are the absorbance of blue (λ = 640
nm) and red (λ = 540 nm) phases of the PDA sensor, respectively.For digital colorimetric analysis, a 96-well plate containing the
test solutions (300 μL) was scanned in the transmitted mode
using a flatbed scanner (Epson Perfection V370 Photo Scanner). The
scanner was set to produce 800 dots-per-inch (dpi) 24-bit color depth
RGB images (TIF format). In addition, digital colorimetric analysis
has also been done using images taken by a smartphone (iPhone SE)
located 30 cm away from the samples under scanner light illumination.
The smartphone camera was used in the manual mode with 1.8 focus level,
1/100 s shutter speed, 80 ISO level, and white balance kept constant
throughout the experiments.
Machine Learning Classifier
An SVM
was used to train and evaluate the ammonia concentration from the
colorimetric levels of different reagents to identify the correlation
between the color change and ammonia concentration. The data set consists
of 9 testing sets for the 9 distinct different ammonia concentrations
(0–200 ppm), and 12 selected areas were extracted for each
sample image. In addition, an average of R, G, and B color channels
and RCS values for each spot image were extracted and used as the
features to train the classifier in MATLAB (R2021a, Mathwork Inc,
USA).
Results and Discussion
PDA Sensing
Mechanism
PDA-based sensors
were synthesized using a facile green chemical process for colorimetric
detection of dissolved ammonia. In particular, polymerization of PDA
vesicles was induced by irradiating UV light to self-assembled PCDA
monomers, forming a visible blue color PDA solution as shown in Figure a. The corresponding
optical absorption spectra of the blue-phase PDA vesicles indicate
a typical peak at 640 nm with a broad shoulder at 590 nm (Figure b). Notably, a blue-to-red
color change occurs when the PDA sensor was exposed to dissolved ammonia.
This color change was confirmed spectroscopically as the absorption
signal at 640 nm decreased and the emergent absorption signal at 540
nm increased. With the blue-to-red color transition, the size and
morphology of PDA vesicles were obviously changed. According to DLS
analysis, the pristine PDA vesicles had an average diameter of ∼220
nm, and the particle size could not be detectable after the addition
of ammonia solution. The SEM images confirmed that the PDA vesicles
have a similar average particle size to the DLS data for the pristine
sample (Figure c),
and their morphology was changed to a line-like structure after the
addition of ammonia in the solution. This result can be attributed
to the aggregation of spherical PDA vesicles, forming larger size
PDA lines.[37,38]
Figure 1
(a) Schematic illustration of the preparation
of PDA vesicles from
PCDA and their sensing mechanism for ammonia detection. (b) UV–vis
absorption spectra and (c) SEM images of PDA before and after exposure
to 100 ppm ammonia.
(a) Schematic illustration of the preparation
of PDA vesicles from
PCDA and their sensing mechanism for ammonia detection. (b) UV–vis
absorption spectra and (c) SEM images of PDA before and after exposure
to 100 ppm ammonia.FTIR spectroscopy was
also used to study the blue-to-red colorimetric
transition of the PDA-based sensors (Figure S1). When ammonia was added into the PDA solution, a new peak was generated
at 1520 cm–1, and a broad absorption peak was observed
at around 1640 cm–1, which can be assigned to the
hydrogen-bonded carbonyl stretching of the carboxylate (−COOH)
groups of PDA.[39] The color change of PDA
in the presence of ammonia is mainly due to the interaction between
the −COOH groups of PDA and the amine groups of ammonia.[25,38] The electrostatic interaction between the carboxylate anion (COO–) and ammonium cation (NH4+)
causes a relaxation of PDA backbones, resulting in a color change
from blue to red.[38,40] The complete color change indicates
the absence of hydrogen bonding interactions.[25,39]To obtain high sensitivity and reliable sensing performance,
the
concentration of the PCDA monomer in the PDA sensor system was first
optimized. The CR of PDA sensors to dissolved ammonia (0–100
ppm) was analyzed, as shown in Figure a, with the PCDA concentration varied in the range
of 0.25–1.5 mM. In all PCDA monomer concentrations, the color
transitions from blue to purple and red could be observed with different
thresholds. In particular, when the PCDA monomer concentrations were
1.0 and 1.5 mM, the color transition occurred at relatively high ammonia
concentrations (≥60 ppm). In comparison, 0.25 mM PCDA exhibited
a color transition from blue to red at a lower ammonia concentration
of 5 ppm (inset of Figure a). In the case of 0.75 mM PCDA, a gradual blue to red color
change was clearly observed for the ammonia concentration higher than
40 ppm. Also, 0.5 mM PCDA exhibited a wider color transition range
from blue to red, as illustrated in the inset of Figure a. In the tested PCDA concentration
range, the percentage of CR to 100 ppm ammonia was highest with 0.5
mM PCDA. Therefore, the optimized concentration of our PDA sensors
for ammonia detection was set to 0.5 mM PCDA monomer.
Figure 2
CR of (a) PDA with different
PCDA concentrations and in the presence
of 100 ppm concentration of ammonia and (b) PDA (0.5 mM) sensing system
after the addition of various solvents with the concentration of 1000
ppm compared to 100 ppm ammonia. Insets are the corresponding photographs
of a PDA sensing system.
CR of (a) PDA with different
PCDA concentrations and in the presence
of 100 ppm concentration of ammonia and (b) PDA (0.5 mM) sensing system
after the addition of various solvents with the concentration of 1000
ppm compared to 100 ppm ammonia. Insets are the corresponding photographs
of a PDA sensing system.To examine the selectivity
of PDA sensors to ammonia, the CR to
other solutions, including methanol, ethanol, isopropanol, acetone,
acetic acid, sulfuric acid, and sodium hydroxide, was investigated.
The concentrations of such solutions were 10 times higher than that
of ammonia. As shown in Figure b, other solutions had limited effects on the color change
of PDA. In particular, the PDA sensor exhibited a CR of 78.83 ±
1.45% for 100 ppm of ammonia, almost 6 times higher than other test
solutions (Figure S2). These results clearly
show that the PDA sensors have a high selectivity to ammonia owing
to the strong interaction between the carboxylate ion of PDA and ammonia
cation. In the case of alcohol, the hydrogen bonding between their
polar −OH group and −COOH groups of PDA has weakened
inter-chain interactions, leading to a low level of color change.[25] The PDA sensor exhibits no color change for
testing with acidic solutions; however, the sensor has response to
the strong base solution, which may affect the performance of the
sensor.
Sensing Characteristics
Time-dependent
light absorption changes under ammonia exposure with a concentration
of 100 ppm are shown in Figure a, and its corresponding CR s are shown in Figure b. The blue to red color transition
occurred rapidly, and the response was saturated within a detection
time of ∼20 min. After saturation, the responses were maintained
at a nearly constant level for 2 h, which can be attributed to the
irreversible nature of the sensing reactions. Nonetheless, a detection
time of 20 min can be an acceptable timescale for on-site ammonia
detection of water samples. In addition, the sensing stability has
been investigated by keeping the PDA solution in a sealed dark bottle
and storing it at a relatively low temperature (4 °C) and ambient
environment (30–35 °C, 55–60% RH). It was found
that the PDA sensors could be stably stored for 60 days in a refrigerator
(4 °C) with good CR s as shown in Figure c. In contrast, the sensor showed degradation
in CR when it was stored in an ambient environment. The CR value of
the sensor decreased ∼5 and ∼33% after storing in a
refrigerator for 60 days and at an ambient environment, respectively.
Therefore, the PDA solutions should be sealed and stored at a relatively
low temperature to maximize the color rendering effect for an extended
shelf life.
Figure 3
Time-dependent (a) UV–vis absorption spectra and (b) corresponding
CR of PDA vesicles in the presence of 100 ppm ammonia concentration.
CR of PDA samples: (c) storage in a refrigerator and room temperature
for 60 days and (d) test under stimulating different temperatures.
The insets show the photographs of PDA solution under other stimuli.
Time-dependent (a) UV–vis absorption spectra and (b) corresponding
CR of PDA vesicles in the presence of 100 ppm ammonia concentration.
CR of PDA samples: (c) storage in a refrigerator and room temperature
for 60 days and (d) test under stimulating different temperatures.
The insets show the photographs of PDA solution under other stimuli.The PDA-based sensors were further characterized
by heating in
a hot water bath to study their thermochromic response. The optical
absorption spectra and photographs of the PDA sensors at temperatures
ranging from room temperature (27 °C) to 92 °C are shown
in Figures d and S3, respectively. The results show that the PDA
sensors first underwent a significant color change starting at around
40 °C with the CR increasing to 10%. Furthermore, when the heating
temperature was increased to 60 °C, the red color transition
was observed (Figure d). These results suggest that the PDA sensor for ammonia detection
should be carried out near room temperature to eliminate the influence
from the thermal-induced color transition. For the thermal-induced
color transition of PDA-based sensors, it is expected that the PDAs
gain sufficient energy for structural rearrangement and rotation around
the conjugated bonds, which alter the effective conjugation length
prompting an irreversible blue to red change.Next, the variation
of CR s of PDA sensors to different ammonia
concentrations was analyzed in the range of 5–200 ppm. Here,
solutions containing PDA vesicles and ammonia were incubated, and
their UV absorption was measured. As shown in Figure a, the absorption signal at 640 nm gradually
decreased with increasing ammonia concentration, accompanied by an
increase of a new absorption band at around 540 nm. The CR s show
an almost linear increase of ammonia concentration in the range of
5–80 ppm (y = 0.847x + 12.355, R2 = 0.9867) (Figure b). The CR was nearly unchanged once the
concentration was higher than 80 ppm. The limit of detection (LOD)
was calculated based on the standard deviation (σ) of the response
and the slope of the curve (S) according to 3.3σ/S. The LOD of a PDA sensor was estimated to be 10 ppm, which
is sufficient to detect the dissolved ammonia in a liquid environment.
Concerning the pH response of the PDA sensor, the ammonia solution
pH in the range of 5–200 ppm concentration was investigated
using a digital pH meter (Lab855 SI Analytics, Xylem). The pH of the
employed solution varies from ∼8.8 (5 ppm ammonia solution)
to ∼10.0 (200 ppm ammonia solution) as demonstrated in Figure S4. The sensor exhibits a color change
under base solution testing, while no color response was observed
for acid solution (Figure S5).
Figure 4
(a) Optical
absorption spectra and (b) CR of PDA sensing system
after incubation with different concentrations of ammonia in the range
of 5–200 ppm.
(a) Optical
absorption spectra and (b) CR of PDA sensing system
after incubation with different concentrations of ammonia in the range
of 5–200 ppm.From the observation
of the naked eye, the color of PDA vesicles
gradually changed from blue to red as the ammonia concentration increased.
The blue color indicates a controlled PDA sensor, dark violet indicates
an ammonia concentration of 5–20 ppm, light violet color for
40–60 ppm ammonia, and red color for ammonia concentrations
higher than 60 ppm (Figure a). The quantitative color change of the PDA sensors in the
presence of ammonia was investigated by digital colorimetric analysis
using RGB values from the scanner images, which are expressed in terms
of an RCS, RCS = [(rsample – r0)/(rmax – r0)] × 100. The red chromaticity (r) was obtained by r = R/(R + G + B),
where R, G, and B are the intensities of three primary color components:
red, green, and blue. In this experiment, the red chromaticity of
PDA in the blue phase (r0) and the PDA
sample of interest (rsample) are achieved
as the PDA sample before and after incubating in the presence of interested
ammonia concentration. rmax is the red-phase
PDA after PDA exposure to 200 ppm ammonia concentration for 2 h. The
RCS value exhibited an exponential increase with ammonia concentration
as shown in Figure b. However, the concentration-dependent color change was less distinguishable
at high ammonia levels. Therefore, a significant variance of CR values
for each ammonia concentration may affect the accuracy of the simply
predictive model. To address such an issue, machine learning for colorimetric
analysis is proposed.
Figure 5
CR of the PDA sensor in the presence of different ammonia
concentrations
in the range of 5–200 ppm: (a) scanner images, (b) red CR,
(c) PCA score plot of the first two PCs, and (d) confusion matrix
of an SVM classifier.
CR of the PDA sensor in the presence of different ammonia
concentrations
in the range of 5–200 ppm: (a) scanner images, (b) red CR,
(c) PCA score plot of the first two PCs, and (d) confusion matrix
of an SVM classifier.Here, an SVM and principal
component analysis (PCA) were used as
the machine learning classifier for training and assessing the performance
of colorimetric detection. Four extracted features, including the
mean value of red, green, and blue intensities and the RCS value of
sample spot images, were used as the input parameters for machine
learning classifiers. To investigate the color uniformity within the
border of the detection zone, 12 selected areas for each image were
used to test the performance of the machine learning model. Each ammonia
concentration is tested 3 times, and three sets of PDA sensors were
used to ensure the reliability of the data collection. The 108 samples
of each ammonia concentration are randomly split into two groups with
a ratio of 3:1 (81 training samples and 27 testing samples). PCA was
used to extract the features of the data set before classifying the
cluster by an SVM. The PCA score plot of the first two PCs of the
PDA sensor to different ammonia concentrations is shown in Figure c. The first two
PCs represented 99.11 and 0.74% of the variation, respectively. The
PCA score plot generated using these two PCs accounted for 99.85%
of variance explained in the measurements and showed an apparent data
clustering. As indicated in the result, we can discriminate between
the similar color change of ammonia detection in the range of 5–200
ppm, except for the testing condition of 40 and 60 ppm.To classify
the ammonia concentration using the colorimetric image
of the PDA sensor, the SVM with a Gaussian kernel function was utilized.
Following the feature extraction by the PCA process, the multiclass
SVM classifier extended from a binary class SVM classifier through
the one-to-one approach is used to classify a group of nine ammonia
concentrations. The performance of the SVM classifier was evaluated
in terms of the confusion matrix, which represented the correlation
between the actual (true) and predicted ammonia concentrations. The
SVM shows excellent performance on the classification of ammonia concentration
with 100% accuracy. As can be seen in Figure d, the misclassified pattern was not observed.
We also investigated the effect of scanner sensors and their optics’
effect on colorimetric analysis, including Epson V370 and Epson V600
photo scanners. As shown in Figure S6,
slight differences in color intensity and red chromatic response were
observed. However, by using eight features extracted from RGB intensity
and RCS values of both scanner models, the SVM classifier showed an
excellent accuracy of 100% for classifying the ammonia concentration.
These results indicate that our PDA-based colorimetric sensor with
a machine learning classifier can be a perfect tool for identifying
ammonia levels in the range of 5–200 ppm.In practical
applications, immediate on-site detection of ammonia
concentration using mobile colorimetric sensors is important. Hence,
we applied our sensor and classifier model to the images captured
by a smartphone. Figure a shows the colorimetric images acquired by the PDA sensor in the
presence of ammonia with the concentration ranging from 5 to 200 ppm.
A blue to dark purple and red transition was observed as the ammonia
concentration increased. The red chromatic responses can identify
the low content of ammonia in water below 60 ppm (Figure b). However, some errors might
occur for ammonia concentrations between 10 and 20 ppm and for concentrations
higher than 60 ppm. Therefore, to enhance the detectability, four
extracted features of 144 samples (12 selected areas x 3 testing times
x 4 sensor sets) of each ammonia concentration are randomly split
into two groups at a ratio of 3:1 (108 training samples and 36 testing
samples). The PCA score plot generated using two PCs accounted for
98.47% of variance, as shown in Figure S7. A large distribution of images was observed for each class of ammonia
concentration owing to the poor uniformity of RGB intensities of the
test samples captured by the smartphone. In addition, the overlapping
area was observed for the ammonia concentration between 10 and 20
ppm and for concentrations higher than 40 ppm. However, the SVM with
a Gaussian kernel and the feature extraction process by PCA performed
well in determining the nine classes of ammonia concentration with
95.1% accuracy. The confusion matrix showed 5.6 and 2.8% missed classification
for 10 and 20 ppm (Figure c), respectively. The most missed prediction was found for
80 ppm ammonia with an actual positive rate of 80.6% due to colorimetric
intensity from its nearest classes. The results demonstrate the potential
of the PDA sensors and machine learning model to obtain a high accuracy
of dissolved ammonia concentration. However, the classification accuracy
rate strongly depends on image source quality, such as the file format,
camera sensor, and optics. Further studies will improve the machine
learning classifier by taking the images using different camera sensors
and under various illumination conditions. The image processing algorithms
can also detect signal noising or select features before transfer
to the classifier. Moreover, the training data sets can be transferred
to a smartphone app for on-site and real-time monitoring of dissolved
ammonia in a water environment.
Figure 6
Digital CR of PDA sensors when exposed
to different ammonia concentrations
using (a) images captured by iPhone SE and their corresponding (b)
red chromatic response and (c) SVM confusion matrix.
Digital CR of PDA sensors when exposed
to different ammonia concentrations
using (a) images captured by iPhone SE and their corresponding (b)
red chromatic response and (c) SVM confusion matrix.
Conclusions
Here, colorimetric dissolved
ammonia sensors were developed using
a green chemical synthesized PDA vesicle. It was found that the morphology
and the light absorption properties of PDA vesicles were changed once
exposed to ammonia. Also, the CR of the PDA sensor increased when
the ammonia concentration increased, showing a detection limit of
10 ppm and a response time of 20 min. In addition, the PDA sensor
exhibited high stability at room temperature. Furthermore, we proposed
the machine learning model that can automatically classify the ammonia
concentration using the images captured by a scanner and a smartphone.
By using the SVM classifier, a high dissolved ammonia concentration
was possible, demonstrating that the proposed platform can be potentially
utilized as a portable intelligent system with high accuracy, timely
on-site detection, and real-time ammonia monitoring.
Authors: Derya Akkaynak; Tali Treibitz; Bei Xiao; Umut A Gürkan; Justine J Allen; Utkan Demirci; Roger T Hanlon Journal: J Opt Soc Am A Opt Image Sci Vis Date: 2014-02-01 Impact factor: 2.129
Authors: Ali Y Mutlu; Volkan Kılıç; Gizem Kocakuşak Özdemir; Abdullah Bayram; Nesrin Horzum; Mehmet E Solmaz Journal: Analyst Date: 2017-06-09 Impact factor: 4.616