Introduction

Heavy metal ions provide considerable hazards owing to their elevated toxicity, bioaccumulation, and disruption of vital biological functions. Metals include lead (Pb2+), mercury (Hg2+), cadmium (Cd2+), and silver (Ag+) can impair enzyme function by attaching to sulfhydryl (–SH) groups in proteins, resulting in cellular dysfunction and oxidative stress1,2,3. The principal causes of heavy metal pollution in humans comprise industrial waste, mining operations, and agricultural runoff. Lead contamination frequently arises from antiquated plumbing systems, lead-based paints, and industrial discharges, whereas mercury pollution predominantly results from coal combustion, artisanal gold mining, and the consumption of seafood4,5,6,7,8. Cadmium exposure is associated with phosphate fertilizers, battery manufacturing, and cigarette smoke, while silver contamination may arise from medical items, photographic waste, and specific disinfectants. These metals infiltrate the human body by ingestion, inhalation, or skin absorption, resulting in extensive environmental and health issues9,10. Silver ions (Ag+), although antibacterial, may accumulate in tissues and lead to argyria, a disorder characterized by permanent skin coloring. These ions also simulate vital metals like as calcium and zinc, substituting them in metabolic pathways and disrupting neurological, renal, and cardiovascular processes. Prolonged exposure leads to DNA damage, carcinogenesis, and systemic toxicity, as heavy metals are inadequately eliminated and accumulate in the body, resulting in long-term health issues. exposure to Ag+/Ag2+ though rare can have devastating effects, particularly on the nervous system, liver, and kidneys11,12,13,14,15,16.

The detection of Ag+ in water samples relies on highly sensitive analytical techniques to ensure accurate monitoring of contamination levels. Inductively Coupled Plasma Mass Spectrometry (ICP-MS)17 and atomic absorption spectroscopy (AAS)18. Electrochemical methods such as anodic stripping voltammetry (ASV)19, surface-enhanced raman spectroscopy (SERS)20 enhances the detection of Ag+. These methods are crucial for monitoring industrial discharge, wastewater, and drinking water sources, ensuring compliance with environmental and health regulations to prevent toxic silver accumulation. Carbon dots (CDs) offer a cost-effective, highly sensitive, and environmentally friendly alternative for detecting Ag+ in water compared to traditional methods, which require expensive equipment and complex sample preparation. Their strong fluorescence, which is selectively quenched by silver ions, enables rapid, real-time detection with high specificity, making them ideal for on-site environmental monitoring21,22,23,24,25.

Carbon dots (CDs) are nanoscale carbon-based fluorescent materials with unique optical, chemical, and electronic properties, making them highly useful for sensing applications. Typically smaller than 10 nm, CDs exhibit excellent water solubility, strong photoluminescence, high biocompatibility, and chemical stability. Their fluorescence can be selectively quenched or enhanced by metal ions through electron transfer, coordination interactions, or aggregation-induced effects, allowing for sensitive and specific detection of heavy metals such as Ag+, Hg2+, Pb2+, and Cd2+26,27,28,29,30,31,32,33,34. Nitrogen doping in carbon dots (NCDs) is essential for enhancing their optical, electronic, and sensing properties, making them more effective for various applications, especially in heavy metal ion detection35,36,37,38,39,40. Nitrogen atoms introduce additional functional groups, such as amines and pyridinic nitrogen, which improve electron transfer, increase quantum yield, and enhance fluorescence stability. In heavy metal ion detection, NCDs function as fluorescence sensors, where the presence of toxic metals alters their emission intensity, providing a rapid, real-time monitoring tool41,42,43,44. They are widely applied in environmental water quality testing, food safety monitoring, and biomedical diagnostics. Compared to traditional methods, NCDs-based sensors offer advantages such as low cost, high sensitivity, portability, and eco-friendliness, making them a promising alternative for detecting toxic metal contaminants in various real-world applications45,46,47,48,49.

This study presents a new fluorescence sensor for the specific detection of Ag+ in drinking water. The sensor is made by combining carbon dots from Clerodendrum wallichii flower petals with L-Histidine using a simple, eco-friendly, and affordable hydrothermal method. Despite limited analytical data on NCDs for Ag+ detection, the optical properties of NCDs show excellent selectivity and stability for detecting Ag+. The study also explored the effects of solution pH, masking agents, and interfering ions. The method was applied to measure Ag+ concentrations in real water samples. The comparison this study with previous has been shows in the (Table 1).

Table 1 Comparison previous study of detection Ag+ by using carbon dots.

Materials and methods

Materials

All chemicals used in this study were of analytical grade. L-Histidine was purchased from Sigma-Aldrich, USA, and Clerodendrum wallichii petals were collected from the flower park at Khon Kaen University (SC01, 16.47588505226751, 102.82407457384166).

Instruments

The principal device utilized for this research was a Shimadzu RF-5301PC Spectrofluorophotometer. The UV-visible spectrophotometer employed in this study was the Agilent 8453 type. The experiment employed many instruments: the pH meter UB-10 UltraBasic, the analytical balance Model LX 220 A, a quartz chamber with a 1 cm path length from Fisher Scientific, and the Ultrasonic Cleaner Model VGT-2300. The research utilized transmission electron microscopy (TEM) equipped with a Schottky field emission electron gun. The EDX spectra were obtained with an HITACHI S-3000 N scanning electron microscope (SEM). The CHNS method use the Thermo Scientific Flash 2000 N/Protein analyzer.

Synthesis of CDs and NCDs

The petals of Clerodendrum wallichii were collected and thoroughly cleaned with deionized water, then dried in an oven at 75 °C for 24 h. Upon desiccation, the petals of Clerodendrum wallichii are pulverized into a powder. The production of carbon dots (CDs) involved the addition of 5 g of Clerodendrum wallichii petals into a Teflon cup for hydrothermal treatment, accompanied by 50 mL of deionized water. The hydrothermal tank was then placed in an oven set to various temperatures (120, 140, 160, and 180 °C) for different durations (1, 2, 3, and 4 h). Following the synthesis method, centrifugation was conducted at 12,000 rpm for 10 min. Upon achieving the ideal conditions for carbon dots, By following the methods suggested by Nugroho et al.26,27 1 gram of L-Histidine has been integrated into 50 mL of CDs within the hydrothermal tank and subjected to an oven temperature of 180 °C for a duration of 4 h. Subsequently, the NCDs underwent centrifugation at 12,000 rpm for 10 min, after which they were filtered through a 0.22 μm filter. The resultant liquid must be dehydrated in an oven for 24 h to provide a powder, which will be stored for subsequent research.

Selectivity of detection various metal ions and optimization conditions

Fluorescence analysis using nitrogen-doped carbon dots (NCDs) was conducted in a Britton–Robinson buffer solution at pH 12. In later experiments, a solution of NCD with an estimated concentration of 100 mg L−1 was accurately prepared in a 10 mL volumetric flask. Following this, different concentrations of metal ions, spanning from nanomolar (nM) to millimolar (mM), were added to aliquots of the NCDs solution, ensuring a final volume of 10 mL at room temperature. A variety of metal ions, such as Cr2+, Ag+, Zn, Fe2+, Cr6+, Co, Mn, and Pb, were evaluated under uniform experimental conditions. The fluorescence quenching reaction of each solution containing NCDs was swiftly assessed at the excitation/emission wavelengths of λex/λem = 351/440 nm, with slit widths configured to 5/5. This study investigated the selective optimization for detecting Silver (Ag+) through various experiments, including reaction time, temperature, the influence of interfering ions on Ag+ with different NaCl concentrations, the impact of pH levels, and the effect of EDTA concentration. The process of oxidizing Ag+ to Ag2+ with hydrogen peroxide (H2O2) was examined in samples that included the Ag+ species.

Method validation and detection of Ag+ in real water sample

The evaluation of an analytical method depends on factors such as its suitability for the intended application, recovery efficiency, need for standardization, sensitivity, analyte stability, user-friendliness, required skill, and time and cost considerations. It is essential to systematically assess the method’s reliability for its intended use. Key validation parameters in analytical chemistry include the limit of detection (LOD), limit of quantification (LOQ), and percentage recovery (%Recovery). LOD is calculated using the formula LOD = 3SD/S, and LOQ is determined as LOQ = 10SD/S, where SD is the standard deviation of blank readings and S is the slope of the linear regression curve. The percentage recovery is given by %Recovery = (Cfound / Cadded) × 100, where Cfound is the analyte concentration after spiking, and Cadded is the known added concentration In this study, the performance of a fluorescence sensor based on NCDs for detecting Ag+ was tested using actual water samples from various sources: lake water from Plastic Lake at Khon Kaen University (16°28’24.0"N 102°49’09.7"E), drinking water from Science Square at Khon Kaen University (16°28’24.0"N 102°49’09.7"E), and untreated tap water from the Khon Kaen district. For the experiment, 1 mL of each water sample was mixed with 1 mL of a 100 mg/L NCDs solution in a 10 mL volumetric flask. The mixtures were then spiked with Ag⁺ standard solutions at concentrations of 25, 50, and 75 nM for recovery analysis before fluorescence measurements were performed.

Results and discussion

Characterization of various composite CDs and NCDs

X-ray photoelectron spectroscopy (XPS) was used to analyze the elemental composition, carbon bonding, and oxygen bonding in the produced NCDs. Figure 1a shows the survey spectrum, with peaks around 284.05, 399.81, and 533.01 eV corresponding to carbon (C1s), nitrogen (N1s), and oxygen (O1s) binding energies. The O1s spectrum (Fig. 1b) reveals C-O, C = O, and C-OH groups, with binding energies at 531.7, 533.1, and 534.3 eV. The C1s spectrum (Fig. 1c) shows carbon functional groups, indicating complete hydrothermal synthesis of NCDs. Additional peaks at 284.8, 286.4, 287.8, and 289.3 eV correspond to C = C, C-O, C-N, and C= O bonds. The N1s spectrum (Fig. 1d) shows in the peaks at 399.0, 400.1 and 401.3 eV indicate nitrogen doping in the form of C-N, C = N and N-H bonds. XPS analysis shows that the NCDs contain 69.39% carbon, 4.48% nitrogen, and 31.06% oxygen. CHNS analysis reveals that the NCDs have 77.13% carbon, 20.39% hydrogen, and 9.72% nitrogen (Table 2).

Fig. 1
figure 1

Spectroscopy characteristics of NCDs by (a) XPS spectra (b) O1s (c) C1s and (d) N1s.

Table 2 CHN comparison of CDs and NCDs samples.

Optical properties of the NCDs

Figure 2 shows the fluorescence spectra of carbon dots (CDs) and nitrogen-doped carbon dots (NCDs). The synthesis of CDs from Clerodendrum wallichii was optimized under different conditions. Figure 2a shows that the best temperature for synthesis is 180 °C, which produces a blue emission under UV light. Figure 2b highlights that a synthesis time of 4 h yields the best results. Figure 2c demonstrates that NCDs, made with L-Histidine as a nitrogen source, show stronger fluorescence than CDs. Both CDs and NCDs have maximum emission and excitation wavelengths at λex/λem = 351/440 nm under uniform instrument conditions. Figure 2d illustrates the UV-Vis absorption spectra of CDs produced at varying reaction durations. All samples demonstrate significant absorption in the UV region, featuring notable peaks below 300 nm, which are generally ascribed to π–π* transitions of C = C bonds. A feature observed around 320–350 nm, particularly evident in the 4-hour sample, is associated with n–π* transitions of C = O or surface trap states. The rising intensity alongside reaction time indicates a more pronounced formation of aromatic structures and improved surface functionalization. The UV-Vis spectra for CDs synthesized at different temperatures are presented in (Fig. 2e). With rising temperature, there is a corresponding increase in absorbance intensity, suggesting a more effective conjugation and the development of sp2 hybridized carbon networks. The subtle variations in peak position suggest alterations in structure and composition resulting from thermal influences during the synthesis process. The data correspond closely with the PL trends, underscoring the significance of temperature in enhancing CD optical properties. Figure 2f presents a comparison of the UV-Vis absorbance spectra for CDs and NCDs. In a surprising finding, NCDs exhibit a greater absorbance intensity compared to CDs, especially in the UV spectrum under 300 nm. This indicates that NCDs may have a greater abundance of or more intensely absorbing chromophores, likely owing to the existence of natural organic moieties that enhance π–π* transitions. The quantum yields (QY) of CDs and NCDs were measured at 13 and 19%, respectively, by comparing their fluorescence intensities and absorbance values to quinine sulfate. Table 3 summarizes the QYs for different doping materials, The quantum yield of CDs and NCDs was determined using the equation provided by a|e - UV-Vis-IR Spectral Software54. L-histidine-derived CDs demonstrate elevated fluorescence quantum yields attributed to various inherent characteristics of L-histidine and the resulting structural attributes of the CDs. L-histidine contains a high concentration of nitrogen-rich functional groups, which promote efficient nitrogen doping in the synthesis of CDs. The aromatic structure of the imidazole ring in L-histidine facilitates the formation of conjugated π-systems within the carbon core, which are crucial for robust fluorescence emission55,56,57.

Fig. 2
figure 2

The fluorescence spectra CDs of various (a) Temperature, (b) Hours, (c) Comparison CDs and NCDs, The Uv-vis spectra CDs of various (d) Temperature, (e) Hours, and (f) Comparison CDs and NCDs.

Table 3 Calculation of quantum yields CDs and NCDs.

The morphological and structural examination of the synthesized nitrogen-doped carbon dots (NCDs) in comparison to undoped carbon dots (CDs) has illustrated in the (Fig. 3). The transmission electron microscopy (TEM) image (Fig. 3a) demonstrates that the NCDs are uniformly dispersed and primarily spherical, with no significant aggregation. The size distribution histogram (Fig. 3b) indicates that particle sizes vary from approximately 5 nm to 12 nm, with an average diameter of 8.1 nm. This comparatively limited size distribution signifies a uniform synthesis process and effective size regulation. Raman spectroscopy was performed to examine the structural distinctions between the NCDs and CDs (Fig. 3c). The spectra exhibit two distinct bands: the D-band at approximately 1355 cm⁻¹, linked to disordered carbon or sp2 defects, and the G-band at roughly 1595 cm−1, pertaining to graphitic (sp2) carbon structures, however the NCDs demonstrate a markedly greater intensity, particularly in the D-band area. This boost indicates an increased level of structural disorder, probably resulting from nitrogen doping, which adds defects and functional groups into the carbon lattice. The elevated D/G intensity ratio in NCDs verifies effective nitrogen incorporation and the formation of defect-laden structures, advantageous for catalysis and sensing applications. The structural attributes, along with the nanoscale dimensions, augment the surface reactivity and electron transfer efficiency of the NCDs. The XRD patterns of CDs and NCDs show a broad (002) diffraction peak at approximately 22°, suggesting an amorphous carbon structure with graphitic domains. The presence of nitrogen doping results in a slight shift and broadening of the peak, attributed to lattice distortion and the introduction of defects (Fig. 3d).

Fig. 3
figure 3

Characteristics test of (a) TEM NCDs (b) Histogram particle distribution of NCDs, (c) Comparison raman spectra of CDs and NCDs, and (d) XRD comparison of CDs and NCDs.

Detection of Ag+ by fluorescence quenching effect by CDs and NCDs

The selectivity test of the carbon dots (CDs) for various metal ions (Cr2+, Ag+, Zn, Fe2+, Cr6+, Co, Mn, and Pb) is shown in (Fig. 4a). The CDs derived from Clerodendrum wallichii petals showed strong selectivity for Ag+ and Fe2+, with their fluorescence intensities being quite similar. Ag+ in particular showed a strong affinity for the CDs, making it highly selective. Figure 4b presents the results of metal ion detection using nitrogen-doped carbon dots (NCDs), showing that only Ag+ caused a quenching effect. The quenching effect was calculated as F0− F, where F0 and F represent the fluorescence intensities of the blank and the samples with different metal ion concentrations. Fluorescence quenching tests with various heavy metal ions (0.5 M concentration) revealed that Ag+ ions caused a significant reduction of approximately 50% in the fluorescence emission of nitrogen-doped carbon dots (NCDs). This suggests a strong and specific interaction between Ag+ and the NCDs, driven primarily by surface coordination and electron transfer processes. The quenching mechanism is best explained by a static quenching model, wherein Ag+ ions form non-fluorescent complexes with the electron-rich functional groups such as amine (–NH2) and amide (–CONH–) on the NCD surface. These nitrogen containing sites facilitate the chelation and coordination of Ag+, which in turn promotes photoinduced electron transfer (PET) from the NCDs to the metal ions. This electron transfer interrupts radiative recombination pathways, leading to a marked reduction in fluorescence intensity without significant spectral shift, consistent with static quenching behavior. Additionally, the NCDs’ selectivity for Ag+ over other metal ions may arise from the high affinity of Ag+ for nitrogen-donor atoms and its strong Lewis acidity. The extent of quenching can be further quantified using the Stern Volmer equation, which helps differentiate static from dynamic quenching based on fluorescence lifetime measurements. Collectively, these features highlight the potential of NCDs as sensitive and selective fluorescent probes for Ag+ detection in analytical applications58,59,60. This suppression of fluorescence by Ag+ is due to the formation of hydrogen bonds between Ag+ and the NCDs, which prevents fluorescence emission, resulting in a lower intensity as illustrate in the (Fig. 4c).

Fig. 4
figure 4

Comparison the quenching effect of the fluorescent intensities (Fo–F) of various metal ions by using (a) CDs, (b) NCDs and (c) schematic diagram of detection Ag by NCDs.

Various condition for detection of Ag+ by NCDs

To evaluate EDTA as a masking agent for detecting heavy metal ions in water, various concentrations of EDTA (0.01, 0.1, 0.25, 0.5, and 1 M) were added to a solution with 100 µL of nitrogen-doped carbon dots (NCDs) and 10 µL of 0.5 M Ag+. The mixture was then brought to a final volume of 10 mL, and fluorescence measurements were taken. The results, shown in (Fig. 5a), indicated that EDTA had little effect on the reaction between Ag+ and NCDs. The impact of pH on fluorescence quenching was also tested using different pH values (3 to 13) with 0.5 M Ag+. Figure 5b shows that the optimal pH for detecting Cr6+ was 9, which was used for further experiments.

Fig. 5
figure 5

Effect of various concentrations for Ag+ detection (a) EDTA (b) pH.

The reaction between NCDs and 0.5 nM Ag+ was examined over time and at different temperatures, as shown in (Fig. 6a). No significant changes in intensity were observed between 1 and 17 min of reaction time, whether sonication was used or not. However, the temperature had a notable effect, especially at 45 °C, where fluorescence intensity was higher (Fig. 6b). The influence of sodium chloride (NaCl) on the interaction between Ag+ and NCDs was tested with concentrations ranging from 0.1 to 5 M NaCl. As seen in (Fig. 6c), high NaCl concentrations (5 M) reduced the detection of Ag+ by changing the ionic strength, which weakened the interaction and lowered fluorescence. This is due to Cl⁻ ions forming AgCl precipitates, which decrease free Ag+ levels and reduce detection sensitivity. The oxidation effect of Ag+ was studied by varying the amount of H2O2. As shown in (Fig. 7b), the optimal condition for H2O2 was around 10% when combined with 0.5 M Ag+, The presence of hydrogen peroxide promotes the production of reactive oxygen species (ROS) that engage with NCDs, resulting in non-radiative electron transfer processes and the creation of Ag+ NCD complexes, which in turn improves quenching efficiency. ​Finally, the effect 10% H2O2 on the detection of Ag+ was also investigated using the fluorescence quenching sensor. Ag+ was prepared at various concentrations of 0.5 µM, 0.5 mM, and 0.5 M were tested with NCDs (Fig. 7a). There was no significant difference in selectivity between Ag+ and the mixture of Ag+ and 10% H2O2.

Fig. 6
figure 6

Effect of various condition reaction Ag+ detection (a) Time (b) Temperature and (c) ionic effect by NaCl.

Fig. 7
figure 7

(a) Comparison of three concentration ranges of Ag+ with 10%v/v H2O2 (b) Oxidation effect of various concentration 10%v/v H2O2.

The analytical characteristics of the developed fluorescence sensing probe

A study on the linearity of the fluorescence intensity of NCDs in response to varying concentrations of Ag+ was performed. Figure 8 shows the fluorescence spectra of NCDs with different concentrations of Ag+, plus 10% H2O2. The results indicate that the fluorescence intensity decreases as the concentration of Ag+ increases, demonstrating high sensitivity. The quenching efficiency of Ag+ was determined using the equation (Fo− F). A quenching test at low Ag+ concentrations (5, 25, 50, 75, and 100 nM) showed a strong correlation with a regression line of y = 0.115x + 77.24 and an r2 value of 0.99 for Ag+, and y = 0.084x + 33.79 with an r2 of 0.99 for Ag+ plus H2O2. These results suggest that the NCDs composite can serve as a novel, selective, and sensitive sensor for detecting Ag+. To determine the limit of detection (LOD) and limit of quantification (LOQ), the following formulas were used: LOD = 3SD/S and LOQ = 10SD/S, where SD is the standard deviation of three blank readings, and S is the slope of the regression plot. Table 4 summarizes the LOD and LOQ calculations. The detection of Ag+ showed an LOD of 16.45 nM and an LOQ of 49.84 nM, while Ag+ plus H2O2 was detected in the range of 5 to 100 nM, with an LOD of 10.03 nM and an LOQ of 30.40 nM.

Fig. 8
figure 8

Linear calibration plots of Fo–F versus various concentrations (5-100 nM) of (a) Ag+ and Ag+ plus 10%H2O2.

Table 4 Calculation of LOD and LOQ for Ag+.

Detection of Ag+ in real water sample

The fluorescence quenching sensor was used to detect Ag+ ions in different water samples, including lake water, drinking water, and tap water, under optimal conditions. To assess the method’s accuracy, a recovery study was conducted using real water samples spiked with Ag+ at concentrations of 25, 50, and 75 nM. The recovery percentage was calculated using the formula:

$${\text{\% recovery = [Cfound / Cadded]}} \times {\text{100}}$$
(1)

where Cfound is the analyte concentration after spiking, and Cadded is the concentration of the added standard. The results in Table 5 show that the recovery percentage for drinking water samples ranged from 98.87 to 103.14%, for tap water it ranged from 99.56 to 111.69%, and for lake water, it ranged from 101.86 to 113.54%. Variations in recovery percentages and the presence of Ag+ in some samples may be due to the interference of other minerals, which can affect the NCDs’ performance in detecting Ag+.

Table 5 Detection Ag+ (X ± SD, n = 3) and its recoveries on the spiked samples.

Conclusion

This study successfully developed a fluorescence-based turn-off sensor using nitrogen-doped carbon dots (NCDs) synthesized from Clerodendrum wallichii petals for the detection of silver ions (Ag+) in water. The NCDs exhibited excellent selectivity and sensitivity toward Ag+, demonstrating a strong fluorescence quenching effect with a limit of detection (LOD) of 16.45 nM and a limit of quantification (LOQ) of 49.84 nM. The sensor’s performance was optimized by evaluating factors such as pH, interfering ions, and reaction conditions, confirming its robustness in real-world applications. The method was validated using real water samples, including lake water, drinking water, and tap water, achieving high recovery rates (98.87–113.54%), indicating the sensor’s reliability in environmental monitoring. Compared to conventional techniques, this fluorescence-based sensor offers a cost-effective, eco-friendly, and highly efficient alternative for Ag+ detection. The findings highlight the potential of green-synthesized NCDs as a promising tool for water quality assessment and heavy metal detection.