1 Introduction

In recent years, significant progress has been made in producing diverse analytical techniques aimed at detecting crucial chemicals and biological substances, including drugs, biomolecules, and metal ions, with particular emphasis on identifying harmful metal ions [1, 2]. These metal ions are commonly found in various natural and environmental water sources, such as seawater, river and lake water, drinking water, and tap water [3, 4]. These metal ions can lead to numerous neurodegenerative disorders, including Parkinson’s, Prion, and Alzheimer’s diseases [5, 6]. As a result, there is a critical need to monitor metal ion concentrations in the environment with high sensitivity and selectivity. Various analytical methods are currently available for detecting metal ions, such as potentiometric sensors, electrochemical sensors, atomic fluorescence spectrometry, atomic absorption spectrometry (AAS), and inductively coupled plasma mass spectrometry (ICP-MS) [6,7,8]. Although these methods can detect metal ions with high sensitivity their applications are restricted due to high costs, time-consuming procedures, complex sample preparation, and unsuitability for real-time monitoring. In contrast, fluorescence assay methods have been employed for detecting various metals, offering several benefits such as high sensitivity, selectivity, simple sample preparation, speed, and minimal interferences [9, 10]. Recent research indicates that fluorescent materials, such as semiconductor quantum dots and organic dyes, have been utilised for metal detection [11,12,13]. However, these methods have limitations: (1) they require multiple synthesis and purification steps. (2) The nanomaterials are made from highly toxic precursors and costly chemicals like surface modifiers. Therefore, there is a significant need to develop a new, straightforward, rapid, cost-effective, and environmentally friendly method for producing biocompatible fluorescent nanomaterials.

Fluorescent carbon nanoparticles, a novel type of nanomaterial within the nano-carbon family, have garnered significant attention in recent studies due to their unique optical and chemical characteristics [14, 15]. In contrast to conventional organic dyes and semiconductor quantum dots, fluorescent carbon nanoparticles exhibit remarkable properties, including stable photoluminescence, excellent biocompatibility, and low toxicity [16,17,18,19,20]. In 2004, carbon dots (CDs) were accidentally discovered during the purification of single-walled carbon nanotubes. CDs are quasi-spherical particles with diameters of less than 10 nm, and have an amorphous or crystalline core composed mainly of sp2 carbon, along with an oxidized carbon surface featuring carboxyl groups [21]. This material has garnered significant interest in various fields, including biological labelling, photocatalysis [22], sensing [23, 24] and biomedicine [25].

CD synthesis methods can be broadly divided into top-down and bottom-up approaches [26,27,28]. The top-down approach produces CDs from larger carbon materials using techniques like laser ablation, arc discharge, chemical oxidation, and electrochemical synthesis. In contrast, the bottom-up approach synthesizes CDs from molecular precursors through procedures such as microwave treatment, hydrothermal/solvothermal treatment, and carbonization [29]. To date, CDs have been produced from various precursors using the approaches mentioned above. Unluckily, many of these previous methods require the use of costly and harmful chemicals and solvents [30, 31]. Consequently, there is a need to explore simple, economical, and environmentally friendly alternatives for the green synthesis of CDs.

The hybrid grapefruit (Citrus paradisi) contains relatively high concentrations of flavanones, narirutin, and naringin, as well as p-coumaric acids (hydroxyl cinnamic acids), ferulic acids, gallic and vanillic acids (hydroxybenzoic acids), limonoids, carotenoids, and furocoumarins. Citrus peels, one of the most underutilized and geographically diverse biowaste leftovers, account for 50% of industrial citrus waste. Managing these wastes, which pollute the land and cause odours, remains a significant issue in the food sector. In the field of nanoscience, using Citrus paradisi peels for nanoparticle production could be an environmentally friendly strategy to develop a non-food-based market for agricultural waste, benefiting various research areas.

In the current study, we describe a completely eco-friendly method for the synthesis of luminous carbon dots. Grapefruit peels were employed as a precursor and ethanol as a solvent in a one-step, environmentally friendly method. Carbon dots were applied to detect the metal ions and this application is based on the principle that the interaction between the CDs and metals decreases the fluorescence by quenching. The synthesized CDs were also used for the detection of DNA.

2 Materials and methods

2.1 Materials

Fresh grapefruit was bought from a neighbourhood store in Charsadda, Pakistan. Ethanol and metals ion and anion solutions with high degree purity were bought from Sigma Aldrich. Sodium hydroxide and hydrochloric acid were also purchased from Sigma Aldrich. Potassium chloride (KCl) was utilized to alter the ionic strength for the ionic strength resistance experiments. A syringe filter (25 mm) having a pore size of 0.22 m was used during experiments. All glassware was cleansed with deionized water followed by drying in the oven.

2.2 Preparation of CDs

The carbon dots (CDs) were synthesized using a one-step solvothermal method. Initially, grape peels were carefully removed from the fruits and subjected to ultrasonic cleaning twice using deionized water to ensure the removal of any impurities. After cleaning, the grape peels were dried at a low temperature (60 °C) for 12 h in an oven. Once dried, the peels were ground into a fine powder using a mortar and pestle. Subsequently, 0.4 g of the grape peel powder was mixed with 20 millilitres of ethanol and the mixture was sonicated for 5 min to ensure thorough mixing. This mixture was then transferred into a 50-milliliter Teflon-lined steel autoclave. The autoclave was sealed and heated in an oven at 170 °C for 6 h. Upon completion of the heating process, the autoclave was allowed to cool to room temperature, resulting in a dark brown product. To purify the product, the suspensions were first filtered through Whatman 1-grade filter paper to remove larger particles. Further purification was achieved by filtering the filtrate with a syringe filter and then centrifuging it at 5000 rpm for 5 min. The supernatant, containing the CDs, was collected, and the solvent was evaporated under vacuum at room temperature to obtain the final product [32].

2.3 Characterization of CDs

The size, crystal structure, elemental content, and a number of other physical characteristics of CDs were determined using a wide range of analytical techniques and equipment. Fluorescence spectrophotometers (Perkin Elmer LS 45 spectrofluorimeter) were used to test the optical characteristics of the CDs, and a UV-Vis spectrophotometer was used to record the absorbance of the CDs between 200 nm and 800 nm. For the functional group identification of the synthesized CDs, a Fourier transform infrared (FTIR) spectrometer was used with a wavelength range of 500 to 4000 cm-1. Transmission electron microscopy (TEM) images were captured using TEM (JEM-2100 F) at King Fahad University of Petroleum and Minerals Dhahran Saudi Arabia. A digital pH meter was used for all pH readings.

2.4 Carbon dots Stability

To assist the stability of carbon dots under various conditions different experiments were conducted. Initially, the carbon dots were subjected to different pH levels to evaluate their stability across a range of acidic and basic environments for this hydrochloric acid (HCl) and sodium hydroxide (NaOH) was used to adjust the pH at 3, 5, 7, and 9 of the CDs solution. To examine the impact of ionic strength, potassium chloride KCl solutions with different concentrations in the range of 0.5 M to 1.0 M were introduced. Long-term stability tests were conducted by monitoring the carbon dots over an extended period of one week, one month, two months and four months. Additionally, the stability was evaluated by varying the temperature from 25 °C to 75 °C. For each experiment, 3 mL of CD solution was introduced individually, and after 10 min, Using the PL spectrum at 500 nm of emission the sample’s fluorescence intensity was evaluated. The results demonstrated that CDs’ have possessed excellent stability over a wide range of harsh conditions.

2.5 Detection of Metals ions

Different metal stock solutions were prepared and diluted to 20 ppm using a dilution formula. Metal solutions including light metals i.e. Aluminum (III) and Lithium (I) and heavy metals including Copper (II), Lead (II), Arsenic (III), Cobalt (II), Mercury (II), Iron (II), Mercury (II), Copper (II), Chromium (VI), and Gold (III). Nickel (II), Platinum (II), Silicon (II), Antimony (III), Cadmium (II), and Tungsten (VI) were prepared. Following that, 3 mL of 0.01 gL− 1 of CDs solution and different amounts of a 20 ppm metals solution were added. For 10 min at room temperature, these were allowed to react. In all metal solutions using the PL spectrum upon emission at 500 nm, the quenching performance of CDs was measured. The findings indicated that the intensity decreased with an increase in the amount of metal solution added. Based on PL quenching to calculate the quenching efficiency, the standard intensity of the PL (FLs) before the addition of CDs was compared to the reduced intensity of the PL (FLre) after the addition of CDs using the following relation:

Quenching Efficiency (%) =\(\:\frac{\text{F}\text{l}\text{s}-\text{F}\text{l}\text{r}\text{e}}{\text{F}\text{l}\text{s}}\times\:100\)

2.6 Detection of DNA

The synthesized CDs were utilized to identify DNA based on changes in the system’s relative fluorescence when DNA was introduced to the CD solution. About 20 ppm of DNA solution was made at first, and then it was diluted into different concentrations using the above dilution formula to 5, 10 and 15 ppm. Before measuring fluorescence, 1 mL of DNA solution and 3 mL of 0.01gL-1 CDs solution were completely mixed at room temperature for 10 min. At an emission wavelength of 500 nm, the relative fluorescence quenching Fo/F (where Fo and F are the relative fluorescence of the CDs solution without and with DNA, respectively) was determined.

3 Results and Discussion

3.1 Characterization

3.1.1 Surface Morphology and Optical Properties

The TEM image given in Fig. 1a of the synthesized CDs showed that particles are spherical objects with an average mean particle size of 10 nm with an average diameter of 6 nm Fig. 1b. The optical properties of as-prepared CDs can be evaluated by UV-visible spectroscopy. UV absorption spectra show (Fig. 1c) a distinct absorption peak at 284 nm. In the UV-Vis spectrum, shoulders may also be observed at a wavelength of about 250 nm. The n-p* transition of C = O is responsible for the main absorption band of the synthesized CDs. The low-intensity band that appears as a shoulder around 220 nm is due to the p-p* transition of C = C in aromatic structure. The given absorption spectra have similarities to those of other published research [33,34,35]. With an excitation wavelength of 420 nm, the synthesized CDs showed their highest emission at 500 nm Fig. 1d.

Fig. 1
figure 1

(a) TEM image of the C-dots derived from grape peels. The average size of the bare C-dots is about 10 nm. (b) Particle size distribution (c) UV-visible spectrum (d) Fluorescence intensity with Maximum λex and λem

3.1.2 FTIR and XRD Spectra

FTIR spectrum was recorded to characterize the surface groups of the synthesized CDs. Flavanoids and organic acids alcoholic O-H stretching showed strong absorption at 3337 cm− 1. And the formation of intra and intermolecular hydrogen bonds is indicated by its broad breadth (Fig. 2a). The bands at 2974 and 2887 cm− 1 show C-H stretching vibrations of methoxy groups [36, 37]. Aldehydic/ketonic derivative C = O stretching was attributed to the peaks at 1650 cm− 1. The aromatic rings and amide groups C = C, C-C, and C-O stretching vibrations are represented by the weak bands at 1380, 1326, and 1274 cm− 1. Strong peaks at 1045 cm− 1 and 1086 cm− 1, respectively, show the existence of C-O-C stretching of the ether and ester groups [38]. The XRD patterns of this sample in Fig. 2b demonstrate a prominent broad peak that is clearly discernible around 22.4° (with a corresponding d-spacing of 0.396 nm) in the pattern. This observation strongly suggests the presence of extensively disordered carbon atoms as well as a graphitic arrangement within the CDs. No additional peaks are evident in Fig. 2b, signifying the exclusive amorphous nature of the prepared CDs sample.

Fig. 2
figure 2

(a) FTIR spectra (b) XRD pattern of the as-prepared CDs

3.2 Experiment of Metal ions Detection

To investigate the potential of CDs for metal ion sensing, CDs with maximum fluorescence intensity were employed without any modification. The produced CDs were used to create a highly sensitive and selective fluorescence sensor for metallic ions [39]. When excited at 420 nm, the fluorescence intensity of the CDs was quenched in the presence of various light and heavy metal ions due to an effective charge and energy transfer process and decreased linearly as the concentration of metal ions increased between 10 µL and 130 µL, demonstrating the sensitivity of the CDs to metal ions. The quenching effect was investigated for light metal ions such as Al (III) and Li (I), and heavy metal ions such as Fe (II), Hg (II), Cu (II), Cr (VI), Pb (II), As (III), Ag (I), Au (III), Mn (II), Cd (II), Sb (III), Ni (II), Pt (II), Si (II), and W (VI). Different degrees of quenching were observed as shown in Fig. 3a and b. When metal ions come into close contact with the CD surface, they cause varying levels of disruption to the CDs’ fluorescence mechanism, depending on their interaction and electronic configuration [40, 41]. Metal ions interact with carboxylic functional groups to form coordination bonds, leading to notable quenching when electrons from the functional groups on the CD surface transfer to the metal ions [42]. Fig. 3c and 3d reveals that highest quenching in CD intensity caused by heavy metals was observed with Cu²⁺, while the highest quenching by light metals was observed with Al³⁺ ions. The relative intensity (F/F₀), where F is the maximum fluorescence intensity of the CD solution before adding metal ions and F₀ is the fluorescence intensity after adding the metal ions, showed excellent linearity with a correlation coefficient of R² = 0.9998 for Cu²⁺ and 0.9898 for Al³⁺, as shown in Fig. 3e. The data fit well with the linear Stern-Volmer equation, indicating a single reaction (static quenching) [43]. The limit of detection (LOD) for Cu²⁺ and Al³⁺ was calculated to be 0.5 ppm, using the formula 3s/k, where s is the standard deviation of the blank solution, and k is the slope of the linear equation. The quenching efficiency of Cu²⁺ and Al³⁺ ions increased from 16 to 66% and 14–65%, respectively, as the initial ion concentration increased from 10 µL to 130 µL (Fig. 3f). These findings suggest that the synthesized CDs have excellent potential for detecting and removing metallic ions in aqueous solutions. The order of quenching efficiency for heavy metal ions was: Cu²⁺ > Fe²⁺ > Cd²⁺ > Ni²⁺ > Pb²⁺ > Mn²⁺ > Sb³⁺ > Au³⁺ > Hg²⁺ > Pt²⁺ > Si²⁺ > Ag⁺ > Cr⁶⁺ > W⁶⁺ > As³⁺, and for light metal ions: Al³⁺ > Li⁺.

Fig. 3
figure 3

(a) Fluorescence quenching of heavy metal ion Cu2+ (b) Fluorescence quenching of light metal ion Al3+ (c) Relative intensity of heavy metals (d) Relative intensity of light metals (e) Linearity graph for the detection of Cu+ 2 and Al+ 3 (f) Quenching efficiency (%) of the ions on CDs.

3.2.1 Real Sample Analysis for Cu+ 2 and Al+ 3

To assess the feasibility of the proposed method, it was employed to determine Cu+ 2 and Al+ 3 in river water samples. These samples were collected from a local river and were prepared by centrifuging at 8000 rpm, followed by filtration through Whatman 1-grade filter paper prior to analysis. A standard addition recovery experiment was conducted as part of this study. The findings, presented in Table 1, revealed recoveries ranging from 97.33 to 102% of Cu+ 2 and 93 100.81% of Al+ 3. These outcomes demonstrate that the proposed method is highly accurate and precise, indicating its strong potential for reliable Cu+ 2 and Al+ 3detection in river water samples.

Table 1 Detection of Cu+ 2 and Al+ 3 in river water samples

3.3 Experiment of DNA Determination

Fluorescence spectroscopy was used to study the interactions of CDs and DNA by investigating the fluorescence intensities of CDs with varying DNA concentrations. The fluorescence intensity of the CDs decreased as DNA concentration increased as shown in Fig. 4a and b with a strong emission at 500 nm when excited at 420 nm. In Fig. 4c a linear relationship between DNA concentration and fluorescence quenching (F0/F) was observed in the range of 5 to 20 ppm, with a linear regression equation (R² = 0.9764) and a detection limit of 0.4 ppm. These findings revealed that the mechanism was static quenching, and that both electrostatic force and hydrophobic interactions were significantly contributors to the binding reaction [44, 45], with a quenching efficiency of 25%.

Fig. 4
figure 4

(a) Fluorescence quenching using DNA (b) Relative intensity at different concentration of DNA solution added (c) linear relation

3.4 Stability of Carbon Dots

From the above study, it is obvious that in several applications CDs are very advantageous. However, to investigate the stability of the synthesized CDs in terms of pH, KCl concentration, long-term stability and temperature several experimental experiments have been carried out. In a variety of practical applications that require varying salt concentrations, pH, and high temperature the produced CDs must be stable.

3.4.1 Ionic Strength

Figure 5a demonstrates the ionic strength effect on the PL intensity. It is evident that when the concentration of potassium chloride (KCl) was increased it caused a negligible 3% decline in FL emission of CDs compared to their behaviour in deionized water. Increasing the concentration even to 1.0 M of (KCl) no precipitation is observed. This indicates that there may not be any salt interaction with the CD solution. Different (KCl) ionic strengths may assist in preventing the CDs from aggregating. This indicates that grape peel-derived CDs have resistance to salt (KCl) and can be used in the biochemistry field [46, 47].

3.4.2 Effect of pH on CDs Stability

The stability of the luminous CDs at various pH levels was evaluated to confirm a response to changes in the pH. A spectrofluorometer was used to measure the fluorescence intensity of CDs at various pH values in the range of 3 to 11. The fluorescence intensity increases steadily from pH 3 to pH 7 owing to the ionization states of either acidic or alkaline solutions [48]. Significant variations in emission intensity were detected when the pH was changed (Fig. 5b). The decrease in PL intensity of CDs in acidic solutions can be attributed to hydrogen ions. Due to the formation of hydrogen bonds with the carboxyl groups on the surface of CDs, many particles aggregate together [49]. While the alkaline state likewise showed a declining tendency. At pH levels from 9 to 11, the decrease in fluorescence emission of CDs is due to the de-protonation of chemical bonds on the CD’s surface. The carboxyl groups (COO-) on the surface of the CDs acquire a negative charge that interferes with the fluorescence activity and thus the result is PL quenching [50]. These results indicated an interesting phenomenon, the pH-dependent PL characteristic, which suggests a possible application for CDs as pH sensors.

3.4.3 Long term Stability

The CD solution exhibited a long-lasting homogenous phase at room temperature without any noticed precipitation. After being stored for four months, the fluorescence intensity recorded after one week, one month, two months, and four months showed no noticeable changes. The results, as shown in Fig. 5c, showed that the FL maximum intensity for the four CD samples was almost identical [46].

3.4.4 Effect of Temperature on Stability

The impact of heating on PL intensity is illustrated in Fig. 5b. The carbon dots (CDs) showed a mere 7% decrease in PL emission at 45 °C. However, as the temperature increased to 75 °C, the PL intensity dropped by nearly 16%. This decline is likely attributed to the precipitation of the CDs at elevated temperatures. According to the outcome, the CDs that were produced are remarkably stable at high temperatures.

Fig. 5
figure 5

Stability of CDs under (a) Kcl (b) pH, (c) time Duration and (d) temperature

The comparison of CDs synthesized through green routes from various sources and their use for the detection of various metals is shown in Table 2.

Table 2 Comparison with different previously reported studies

4 Conclusion

This study demonstrates the successful green synthesis of fluorescent carbon dots (CDs) from grapefruit peels using an eco-friendly one-step solvothermal method. The CDs exhibit unique optical properties, stable photoluminescence, excellent biocompatibility, and low toxicity, making them a promising alternative to conventional semiconductor quantum dots and organic dyes. Characterization confirmed their spherical morphology with an average diameter of less than 10 nm and stability across various pH levels and ionic strengths. The CDs showed high sensitivity and selectivity in detecting metal ions, with significant fluorescence quenching observed for Cu²⁺ and Al³⁺ ions and detection limits of 0.5 ppm, as well as effective DNA detection with a detection limit of 0.4 ppm. The use of grapefruit peels, a readily available biowaste, provides a sustainable approach to managing agricultural waste while offering cost effective production methods. These findings highlight the potential of CDs for environmental monitoring, particularly for harmful metal ions, and extend their utility to DNA sensing, making them promising candidates for various applications in environmental and biochemical sensing.