Introduction

Mercury (Hg) is regarded as the second most harmful pollution in the world (Broussard et al. 2022). According to the World Health Organization WHO, excessive consumption has major health consequences for people, including foetal development problems, brain, kidney, and lung damage, and neurological, immunological, and digestive system diseases (Campbell et al. 2003). According to WHO and USEPA guidelines, the permitted limits of mercury in drinking water are 30–10 nM (Piriya et al. 2017; Balasurya et al. 2020).

Hg can be detected using a variety of techniques, including atomic absorption/emission/fluorescence assays, HPLC combined with UV–Vis or fluorescence, ion selective electrode, flame photometry, inductive coupled plasma mass spectrometry, and so on (Deng et al. 2013). However, the aforementioned procedures have drawbacks in that they are more expensive, require additional equipment, pre-treatment activities, and are time-consuming. Therefore, a quick, easy, and practical mercury detection method needs to be created.

With the advancement of nanotechnology in recent years, numerous nanostructure sensors and gadgets with diverse sensing applications have become increasingly popular. Unique biosensors have been developed based on nanomaterials’ high surface-to-volume ratio and exceptional optical, physical, and chemical properties (Pilaquinga et al. 2020). Among the various nanomaterials, AgNPs have numerous uses in chemical, biological, and material science domains.

AgNPs-based sensors were found to be sensitive, specific, and quick in function analysis (Parikh et al. 2008). These have been widely used as colorimetric sensors to provide alternative solutions to standard sensing approaches for detecting Hg (Awwad and Salem 2012). Optoelectric and chemical characteristics of AgNPs of varied sizes, shapes, and surface changes have been reported to function very well (Zarlaida and Adlim 2017). Because of their outstanding optical properties, calorimetric sensors for detecting Hg have been described utilizing Ag and Au NPs, which show color change when reacting with Hg (Sulistiawaty et al. 2015; Ghosh et al. 2018; Prasad et al. 2018; Khani et al. 2022; Sebastian et al. 2018).

Sebastian et al. reported a calorimetric probe for detecting Hg ions using green synthesized AgNPs with a lower LOD of 2.1 × 10−6 M (Samuel and Rao 2023). In this study, we synthesized AgNPs in an aqueous medium utilizing PAH and CTAB as stabilizing agents. The AgNPs were produced at room temperature and employed as a nanosensor probe for colorimetric sensing of Hg ions. Our method could detect Hg at concentrations as low as 1 nM, and the detection process took only 2.5 min. Our approach is simple, rapid, profound, and discriminating for Hg ions, and it might be employed in real-time scenarios to improve environmental pollution monitoring.

Chemicals and methods

The reagents and chemicals utilized were all of analytical grade. The following chemicals were bought from Hi-Media (AR reagent, 99.0% Mumbai, India): sodium hydroxide (NaOH), sodium borohydride (NaBH4), and PAH Poly (allyl amine hydrochloride). CTAB (cetyl trimethyl ammonium bromide) were bought from Sigma-Aldrich (ACS reagent, 99%, MA, USA). All working and stock solutions were prepared using ultrapure water with 18.2 Ωm resistivity. The stock solutions 100 μM (for all compounds were created by dissolving the appropriate quantity of material in ultrapure water. Working formulations were made by diluting the stock standard solution accordingly.

Synthesis of silver nanoparticles in PAH medium

A 10 mL volume of a 2.0 × 10–3 M AgNO3 aqueous solution was added to a 50 mL Erlenmeyer flask. The pH was adjusted to 5 after adding 25 µL of PAH. With steady stirring at 650 rpm at room temperature, a freshly made 1 mM NaBH4 as a reducing agent was added to the aforesaid solution to produce a light yellow solution, indicating the formation of AgNPs. Following that, 100 µL of 1.0 × 10–3 M CTAB was added to the colloidal AgNPs solution to produce a deep dark brown color, indicating the development of PAH-capped AgNPs (PAH–AgNPs). The PAH–AgNPs were maintained at room temperature and showed no significant changes even after 1 month due to the desired characteristics.

Detection of mercury ions by colorimetry

The procedure for identifying mercuric ions utilizing PAH–AgNPs stabilized with CTAB using colorimetric analysis is graphically represented in Figs. 1, and 2. A 2 mL glass vial was filled with 0.5 mL aliquots of synthesized silver nano sols, with the pH of the sample solution maintained at 5.0. The volume of the solution mix was increased to 1.0 mL by including ultrapure water. The sample solution was then mixed with a series of increasing quantities of Hg ions, ranging from 0.001 to 2.5 μM, which were diluted from the stock solution of HgCl2 (100 mM) (Colorimetric sensors for rapid detection of various analytes-Science Direct 2022). For 5 min, the mixture in solution was left at room temperature. Using a UV–Vis spectrophotometer with a wavelength range of 200–800 nm, the color change and adsorption peak of the PAH–AgNPs added to the HgCl2 solution mixture were quantified.

Fig. 1
figure 1

a Pictorial representation of amalgam formation of PAH–Ag nanoparticles when reacted with Hg2+ ions. b Inset shows PAH–Ag in dispersed phase is yellow in color becomes colorless when mercury is added to it

Fig. 2
figure 2

a UV–Vis spectra of PAH–AgNPs After 30 min, 1,2,3 h, and 4 h of synthesis, with an inset exhibiting an optical microscopic image of AgNPs. b Peak shift of PAH–AgNPs from 420 to 280 nm when interacts with Hg. c UV absorption spectra of PAH–AgNPs with varying Hg2+ concentrations. d Relationship between Δ absorbance ratios with different Hg+ ion concentration

Spectroscopy (UV–Vis, FTIR)

A UV–Vis spectrometer (Marutek MAR-2020 fibre optic spectrometer) was used to measure the LSPR absorption peak intensity in the 200–800 nm range to determine PAH–AgNPs in samples and the peak shift caused when it chelates mercuric ion (Khalkho et al. 2020). The absorption peak is analyzed for different mercury concentrations to determine the threshold value, and the detection time for that value is calculated, which is also determined by the change in brownish yellow color to a colorless solution. It is further evaluated for mercury selectivity by enabling the PAH-capped AgNPs to react with other heavy metals such as Pb, Cr, Cu, Zn, Cd, etc. to observe color change and peak shift. The samples prepared for UV–Vis spectroscopy were used immediately for FTIR analysis. A 3 mL aliquot of each sample was deposited directly on the ATR crystal for FTIR measurements. The surface variation and structural classification of PAH–AgNPs and aggregated PAH–AgNPs with mercury were confirmed using an FTIR spectrometer (Cary 630 FTIR SYSTEM, Agilent Technologies).

XRD and SEM

The dimension and nature of PAH–AgNPs and aggregated PAH–AgNPs with mercury were recorded by SEM (TESCAN VEGA, Czech Republic). Crystal-like metallic silver nanoparticles were studied by powdered X-ray diffractometer MALVERN PANALYTICAL COMPANY, EMPYREAN RANGE, UK) a multipurpose diffractometer (Punnoose et al. 2021). All XRD data were collected under the similar experimental settings, in the angular range 20 ≤ 2θ ≤ 90. The size and the distribution of PAH–AgNPs were determined using image J and Origin pro software tools.

Results

Synthesis of silver nanoparticles

The CTAB-stabilized PAH–AgNPs were chosen for the selective detection of mercury ions in water experiments. Silver nitrate was reduced at room temperature by borohydride reduction, which was capped with PAH polymer and stabilized by CTAB to produce colloidal silver nanoparticles (AgNPs). The PAH–AgNPs stabilized with CTAB surfactant exhibited a prominent surface Plasmon resonance peak at 420 nm, confirming AgNPs. It can be employed as a sensor probe for detecting the presence of mercury in water samples (Lin et al. 2010) due to its stability and excellent optical features, which have a good molecular interaction with the mercury ion, resulting in a peak shift from 420 to 280 nm due to particle aggregation (Fig. 2b). This monodispersed Nano complex has a strong peak at 420 nm, which indicates the presence of silver nanoparticles. When Hg ions are added, the peak gradually lowers from 420 to 280 nm as the concentration of Hg grows over time. Peak shift causes a visual color change as well. The probe's selectivity is tested by reacting it with various heavy metals to ensure that there is no substantial color change or peak shift.

Colorimetric detection of mercury

Figure 2 depicts the UV–Vis absorption spectrum of PAH–AgNPs at various time intervals. All spectra acquired at different time intervals reveal an absorption wavelength peak at around 420 nm, which is attributed to the surface Plasmon resonance (SPR) type of spherical AgNPs (Fig. 2b). The SPR peak is determined by the dielectric characteristics, dimension, and form of the AgNPs, as well as the preparation medium and resonance drive. In comparison with the mean Ag intensity, AgNPs measured after 2 h displayed high intensity peaks and absorbance at 420 nm (Fig. 2a). Over 30 min, NPs with an absorbance peak at 410 nm and decreasing intensity were produced. Its absorbance has been red shifted. A color change is produced by the colorimetric sensor. The colorimetric sensor changes color based on the charge of the synthesized AgNPs (Kataria et al. 2019). In comparison with conventional approaches, this detection method is a straightforward commercial procedure. The synthesized AgNPs likewise did not exhibit any noticeable color changes or alterations in the UV–Vis absorption spectra. As a result, the stability of the AgNPs demonstrated that they are suited for Hg colorimetric analysis (Iftikhar et al. 2020). HgCl2 solution was introduced to unmodified AgNPs at varied concentrations (0.001–2.5 µM) to evaluate the interaction between PAH–AgNPs and Hg ions while maintaining the colloidal silver solution constant (Fig. 2c). The absorbance spectrum falls from 420 to 280 nm as the concentration of Hg2+ions increases. The acquired spectra demonstrated an interaction between AgNPs and Hg2+ ions, resulting in aggregated AgNPs with a visible color change from yellow to colorless solution.The capacity of silver nanoparticles to form aggregates led the SPR (Surface Plasmon Resonance) to expand and shift to a longer wavelength (Sulistiawaty et al. 2015). Linear Relationship between Δ absorbance ratios with different Hg+ ion concentrations with R2 value of 0.9967 shows that our model is reliable (Fig. 2d).

Silver nanoparticles (AgNPs) exhibit a higher coefficient of existence and distance-relevant color change than similarly sized gold nanoparticles (AuNPs), indicating that they are appropriate color-informative elements for colorimetric sensor devices. The results showed that the 2.5 µM Hg2+ solution showed complete loss of LSPR at maximum intensity.

SEM analysis

The AgNPs were synthesized in ultra-pure water and used for scanning electron microscope analysis by placing a drop of solution onto a clean silicon chip and air drying it. The nanoparticles are functionalized with PAH, a strong cationic polymer, resulting in positively charged evenly dispersed silver nanoparticles with a size of 55–65 nm. The SEM image analysis clearly shows the size and shape of the silver nanoparticles (Fig. 3a) that aggregate after reacting with mercury ions (Fig. 3c, andd) The SEM picture of silver nanoparticles revealed spherical and rather evenly sized nanoparticle production with diameters ranging from 55 to 65 nm determined by particle size distribution graph (Fig. 3b). When Hg2+ is added to PAH–AgNPs, they agglomerate and larger silver particles are formed (Fig. 3c, and d).

Fig. 3
figure 3

a SEM images of evenly sized discrete PAH–AgNPs prior to Hg addition. b Particle size distribution chart of PAH–AgNPs. c, d SEM images of aggregated PAH–AgNPs after the addition Hg ion

X ray diffraction studies

The PAH–AgNPs produced in our experiments were within the range of nano crystals, as demonstrated by the peaks at 2θ values of 38.09°, 44.278°, and 64.411°, and 77.357° related to (111), (200), (220), and (311) planes, Braxton Bragg reflections of silver (Lee and Jun 2019). There were also a few peaks of minor intensity indicated by the symbol *. These might be caused by some precursors acting as stabilizing agents during the process. Our XRD spectrum (Fig. 4) showed similarity with the standard (Zhao et al. 2010). The silver nanoparticles generated by the reduction of AgNO3 by borohydride were crystal-like, as shown by the X-ray diffraction measurements. The average size of silver NPs was determined from XRD data and calculated using the Debye–Scherer equation to be 30.21 ± 6.5 nm. The fact that there were structural peaks in the XRD patterns and that the average crystal size was around 30 nm shows emphatically that the AgNPs that were synthesized were Nano crystalline. Figure 4 displays the synthesized PAH–AgNPs' XRD pattern. Using the Debye–Scherrer equation given below, the average particle size of the silver nanoparticles produced by this approach was determined (Lee and Jun 2019):

$${\text{DP }} = \, K\lambda /\beta {\text{ cos }}\theta$$
(1)

where D = Average Crystallite size of the nanoparticles, λ = X-ray wavelength (0.1541 nm) utilized in XRD (copper K∞ radiation), β = the total breadth at ½ maximum of the diffraction peak. FWHM (full width at half maximum), K = Scherrer constant (0.9 to 1), θ = Bragg’s angle.

Fig. 4
figure 4

XRD pattern of PAH–AgNPs showing peaks at 2θ

FTIR analysis

Figure 5 depicts the FTIR spectra of PAH and PAH–AgNPs. The stretching pulsation at 3400 to 3600 cm−1 revealed the N–H stretching of the material (Lin et al. 2010). Stretching at 2948.3 cm−1 revealed the presence of C–H stretching in PAH, which is missing in PAH–Ag. The elongation at 1643.8 cm−1 was caused by asymmetric N–H stretching pulsation of the NH3+ group caused by the amine group in PAH (Lee and Jun 2019). Peak at 1454.3 cm−1 in PAH denotes bending vibration of N–H of primary amine and is involved in functionalizing AgNPs, while peak at 1017 cm−1 implies CH2–NH3 bond (Ashrafi et al. 2018). The FTIR analysis confirmed the functionalization of AgNPs with PAH. When Hg ions are added, the peak at 3306 (O–H bond) and 1636 (N–H amine group) gradually shrinks and shifts to the left side as the concentration of Hg grows over time. The FTIR results revealed that AgNPs are functionalized with PAH, as evidenced by the desorption of the Amine group and CH3–NH2 in the PAH–Ag spectra.

Fig. 5
figure 5

FTIR Spectra of CTAB, PAH and PAH–AgNPs and PAH–Ag–Hg amalgam. (bottom to top)

UV–visible spectroscopic analysis for sensitivity and selectivity

UV–visible spectroscopy tests were carried out to explore the sensitivity and selectivity of PAH–AgNPs towards Hg. The probe's detection effectiveness was evaluated by incubating the PAH–Ag nanoconjugate with various dilutions of Hg2+ ions (1 nM/0.001 µM to 2.5 µM). The results showed that the UV–Vis absorption spectra dropped consistently with the continuous increase in Hg2+ ion concentration, with a linear relationship of R value 0.996, confirming it to be a successful probe (Fig. 2c). To increase selectivity, several heavy metal salt solutions were applied to AgNPs individually. With the addition of Hg2+ solution, the yellow color faded, whereas other metal ions showed no noticeable color change in the mixed solution (Zhao et al. 2010). The picture and UV–visible absorption spectra of the probe created with different metal salt solutions are shown in Fig. 6b. Only in the tube to which the Hg2+ ion was injected did the absorption spectra entirely vanish at this point. Interacting with mercuric ions has a significant impact on the color of AgNPs, as they change from their original color to colorless. This change is due to the decrease in the surface plasmon resonance (SPR) of nanoparticles, which makes optical sensing an easy process. The decrease in SPR can be attributed to the variance in the oxidation–reduction standard potentials of Ag0 and Hg2+. The interaction between these two elements results in a chemical reaction, i.e., Amalgamation, that alters the properties of AgNPs. This phenomenon can be used for various applications, such as detecting mercury ions in environmental samples or monitoring water quality. In addition, this method can be used to develop new types of sensors that are highly sensitive and selective towards specific target molecules. Overall, this interaction provides a unique opportunity for researchers to explore new avenues in nanotechnology and develop innovative solutions for real-world problems. When interacting with PAH–AgNPs, Pb displayed a color change as well as a small peak shift. Further investigation was carried to better understand the sensitivity to various metal ions, and it was found that PAH-coated AgNPs were not sensitive to the detection of Zn, Cu, Cd, Cr, and other metal ions. The results demonstrated that the produced AgNPs were capable of selectively recognizing mercury (Awwad and Salem 2012).

Fig. 6
figure 6

a, b UV Absorption spectra of PAH functionalized AgNPs with different heavy metals. The inset shows the respective Absorbance of the solutions at 420 nm

PAH-coated AgNPs, which were mono dispersed yellow colored in aqueous medium, became colorless after the addition of mercury alone. Whereas, no color change is observed with the addition of other heavy metals, such as lead, chromium, cadmium, copper, zinc etc.

RGB value prediction

The digital images obtained through higher-end model smart phones are used to get histograms of various test solutions (PAH–Ag with heavy metals) using Image J software. When PAH–Ag NPs react with Hg, the yellow color of the solution becomes colorless. Hence, the result shows that when PAH–Ag NPs combine with Hg, the color values move more towards 255, which is the value for whiteness, and all the values (RED, GREEN, and BLUE) superimpose on each other, which is the precise indication of whiteness (i.e., the presence of Hg). This color value prediction can be made more advanced by applying a machine learning algorithm to develop a smart sensor (digital images) to sense mercury in real water samples (Shabil Sha et al. 2022). The following equation can be used to create a smart Hg sensor:

$$V=(R+G+B)/3$$

The input parameters can be obtained from the digital images. These parameters include color values, intensity values, and texture features. By training the machine learning algorithm with a large data set of water samples containing different levels of Hg, the sensor can learn to predict the Hg concentration accurately. The smart Hg sensor can be integrated into a monitoring system that continuously monitors water quality in real time. This system can be used to detect and alert authorities about any potential contamination events before they become widespread. The development of smart sensors for water quality monitoring is an essential step towards ensuring safe and sustainable water resources for future generations (Carvalho et al. 2022). With advancements in technology and machine learning algorithms, it is possible to create more sophisticated sensors that can detect multiple contaminants simultaneously. Such sensors will play a crucial role in protecting our environment and public health (Fig. 7).

Fig. 7
figure 7

Pictorial representation of histogram of control and various test samples (PAH–Ag reaction with heavy metal) using image J software

Kinetics

A UV–Vis spectrophotometer with a wavelength range of 200 to 800 nm was used to determine the formation and robustness of PAH–AgNPs in ultrapure water (Demirkol et al. 2004). The UV–Vis spectra were recorded with a 20-s break until the solution color faded to explore the effect of time (Fig. 8b). Figure 8a shows how the addition of the Hg2+ ion lowered the peak at 420 nm as the reaction time increased. The creation and continual expansion of the peak at 280 nm over time reveals aggregation caused by mercury interaction with PAH–AgNPs, which lose size and shape as well as their LSPR resonance (Lirtsman et al. 2017). In contrast to mercury, no substantial effects were observed when other known heavy metals were added. A linear function with an R value of 0.969 is derived after a kinetics investigation of the reaction time. As illustrated in Fig. 8b, upon interaction with mercury ion, color change was obtained within 2.5 min of reaction time, achieving the goal of a faster approach for the qualitative detection of mercury. Once the Hg2+ solution was mixed with an aqueous complex solution of silver ions, the reduction of pure Ag+ ions to Ag0 was examined by measuring the UV–Vis spectrum of the working solution of reaction medium at regular intervals. UV–Vis spectra were note down to determine the response time, Fig. 8a. We observe that the absorption spectra at 420 nm decreases with increasing reaction time. It is found that the silver ion complex completely loses its LSPR effect after 2.5 min, leading to the complete disappearance of the peak indicating the depletion of silver ions due to the aggregation of Ag–Hg ions (Lee and Jun 2019). As a result, it could be a perfect probe for mercury detection in aqueous model.

Fig. 8
figure 8

a Time dependent kinetics study of reaction of Ag and Hg interaction. b Δ Absorbance has linear relationship with the increase in reaction time. The inset shows the respective color change in the reaction mixture

Mechanism of detection

The detecting system for the probe used to test mercury levels is shown in Fig. 1. Surface interactions were observed between AgNPs and PAH as a result of the significant surface energy difference. CTAB stabilizes the interaction of PAH with AgNPs. Experiments with different dilutions of Hg2+ ions demonstrate that the UV–Vis absorption spectra of PAH–AgNPs lowers, which could be due to Ag–Hg amalgamation, that reduces the LSPR characteristics of silver (Ashrafi et al. 2018). When metal nanoparticles effectively interact with mercuric ions, the color of AgNPs changes to colorless, this is consistent with the decrease in the surface plasmon resonance (SPR) of nanoparticles, making optical sensing easy to recognize (Punnoose et al. 2021). The effect can be due to the variance in the oxidation–reduction standard potentials of Ag0 and Hg2+ (Demirkol et al. 2004). Redox activities taking place at the surface of the AgNPs can be used to explain the potential mechanism for the selective recognition of Hg2+ due to the difference between the standard potentials of 0.85 V (Hg2+/Hg) and 0.8 V (Ag + /Ag). When Hg2+ is added to the colloidal AgNPs suspension, the PAH acting as a capping agent on the surface of the AgNPs increases the electrostatic-ionic attraction between the AgNPs and the metal ions (Broussard et al. 2022). Due to the difference between the standard potentials of 0.85 V (Hg2+/Hg) and 0.8 V (Ag+/Ag), a spontaneous redox reaction can occur between Hg2+ and Ag+. In this reaction, Hg2+ is reduced to Hg, while Ag+ is oxidized to Ag. The overall reaction can be represented as follows:

$${\text{Hg}}^{{{2} + }} \left( {{\text{aq}}} \right) \, + {\text{ 2Ag}}\left( {\text{s}} \right) \, = {\text{ 2Ag}}^{ + } \left( {{\text{aq}}} \right) \, + {\text{ Hg }}\left( {\text{l}} \right)$$

For example, this method can be applied to detect mercury species in contaminated water. The AgNPs are synthesized and added to the water sample containing Hg2+ ions, causing a color change in the solution due to the reduction of Hg2+ to elemental mercury and its subsequent deposition on the surface of the AgNPs. The concentration of Hg2+ can be quantified by measuring the intensity of the color change using UV–Vis spectroscopy. The difference in standard potentials between different redox couples plays a crucial role in determining the feasibility of redox reactions and can be utilized in various applications, such as in the detection and removal of pollutants in environmental samples. By generating an Ag/Hg amalgam after reducing the heavy metal mercury species to elemental mercury coupled with silver atoms, our proposed technique detects Hg2+. In our suggested method, the heavy metal mercury species are reduced to elemental mercury, which is coupled with silver atoms, which are mercury atom acceptors, to achieve the detection of Hg2+ (Lirtsman et al. 2017). Next, we propose that the direct interaction between Ag atoms and Hg2+ atoms will weaken the bond between Ag (I) and PAH, suggesting that Hg (0) deposited on the surface of AgNPs (ref. Fig. 8b) is likely to result in color fading in the system as a result of the diminishing LSPR effect (Sulistiawaty et al. 2015). Sebastian et al. proved that AgNP–AB/PE possesses excellent electro catalytic ability towards the sensing of Hg2+ (Sebastian et al. 2018).

Analysis of real samples

To show the efficiency of this colorimetric probe, the concentrations of Hg2+ were determined in various water samples. The samples were spiked with known concentration of Hg2+ prior to analysis to obtain similar concentrations of the matrix compounds in all samples. The obtained results are summarized in Table 1.

Table 1 Analysis of various water samples using PAH–AgNPs Colorimetric probe for detecting Hg ion

Khani et al., has developed a colorimetric sensor, where hydrazine reduced methylene blue (MB) to leucomethylene blue (LMB), and citrate-capped Au nanoparticles served as the catalyst (AuNPs). The catalytic activity of AuNPs may be diminished by Hg2+ ions, resulting in a prolonged reaction time (Deng et al. 2013). It is discovered that our PAH–Ag probe can be applied to detect low concentration of mercury in 2.5 min, which is found to be highly efficient and sensitive when compared with the other reported calorimetric mercury sensors given in Table 2.

Table 2 Reported colorimetric probe used for detecting Hg ion

Conclusions

The future of detection relies on simplicity and low-cost, fast detection sensor technology. A groundbreaking innovation involving positively charged AgNPs and Hg ions has revolutionized the field of detection by offering a cost-effective and efficient solution. This technology, integrated with a real-time colorimeter, provides accurate and rapid detection capabilities, eliminating the need for complex and expensive labeling processes. This low-cost detection sensor technology holds great promise for widespread implementation in industries, such as healthcare, environmental monitoring, and food safety. The in situ measurement technology allows for monitoring of the last steps of experiments and interactions as well as the analysis of interactions with exceptional time precision. The ability to accurately detect low levels of mercury in drinking water samples highlights the importance of continuous monitoring and analysis for maintaining public health. Smart sensing technology, developed using digital images and machine learning algorithms, offers a convenient and efficient solution for detecting and analyzing mercury levels in drinking water, ensuring water safety and compliance with regulatory standards. The colorimetric PAH–AgNPs probe is excellent for real-time mercury detection in samples with a low LOD of 1 nM/0.001 M in 2.5 min, making it a highly efficient and sensitive tool. By harnessing the power of smart sensing technology, we can continue to protect communities from harmful pollutants and maintain the highest standards of public health.