Introduction

In recent years, there has been a growing interest in utilizing waste materials as sorbents in water purification processes, particularly for the removal of heavy metals1,2. Water contamination with heavy metals, such as cadmium, lead, mercury, arsenic, and zinc poses a serious threat to the natural environment and human health3. Once released into aquatic ecosystems, these metals can accumulate in living organisms, causing several health problems, including neurological disorders, kidney disease and even cancer4,5. In addition, their presence in the aquatic environment can significantly affect the quality of drinking water, which poses an urgent task for scientists and engineers to develop effective, economical, and ecological methods for their removal6.

Traditional technologies used in water purification, such as coagulation, chemical precipitation, ion exchange, reverse osmosis or membrane separation processes, are effective, but often expensive and require the use of large amounts of chemical reagents7,8,9. In addition, they often generate enormous amounts of secondary waste, which burdens the environment10. Furthermore, many of these methods, such as reverse osmosis or advanced oxidation processes, incur significant operational costs11. In response to these challenges, there is growing interest in using cheap, widely available waste materials that can be transformed into effective heavy metal sorbents12. This approach not only reduces the costs associated with water treatment but also contributes to waste management, which is important in the context of a circular economy13.

Adsorption processes commonly utilize materials such as activated carbon, zeolites, and metal oxides as adsorbents. These adsorbents are characterized by high specific surface area and the ability to absorb various substances, including heavy metals. Bentonite and chitosan are also among adsorbents with high purification efficiency. Chitosan, due to the presence of amine and hydroxyl groups in its structure, exhibits high complexing and ion exchange properties, enabling effective binding of ions such as Cu(II), Pb(II), and Cr(VI)14,15. However, chitosan has broader applications in medicine due to its antihemorrhagic and antibacterial properties. Bentonite, a clay rich in montmorillonite, is characterized by a sorption mechanism based primarily on cation exchange and surface adsorption. Its advantages include widespread availability, low cost, and stability over a wide pH range, making it an attractive material for large-scale applications16.

Waste materials such as ash, rice husks, wood chips, sawdust, sewage sludge, as well as agricultural waste such as straw, nutshells or fruit waste, are characterized by high sorption potential17. Their ability to bind metal ions results from their porous structure and the presence of functional groups such as hydroxyl, carboxyl, or amine, which can interact with metals through adsorption processes18. Moreover, these materials can be chemically and physically modified, which allows for further enhancement of their sorption properties19. For example, chemical activation using acids, bases, or salts, as well as heat treatment, can significantly improve the material’s ability to absorb specific contaminants20.

One of the key advantages of using waste materials as sorbents is their wide availability and low acquisition costs. In contrast to commercial sorbents such as activated carbon, zeolites, or polymers, waste materials are typically by-products of other various industrial or agricultural processes21. Their application in water purification processes not only contributes to waste reduction but also decreases reliance on costly purification technologies22. For example, fly ash, a by-product of coal combustion in power plants, has good sorption properties for hevy metals. Thus, use in water purification can be an effective and cheap solution to the pollution problem23. Coffee grounds, the leftover residue obtained after brewing coffee, have potential applications as adsorbents for removing pollutants from water due to their porous structure24. Hazelnut shells or compost, due to their low ash and moisture content and the presence of oxygen functional groups derived from the lignocellulosic complex, can become effective sorbents of pollutants, such as heavy metals, dyes, or different toxic gases25.

Sorption processes involving waste materials can be conducted in several ways, depending on the type of pollutants and operating conditions. In this process, contaminated water flows through a sorption bed, and metal ions are retained on the sorbent surface. However, the key challenge is to optimize the process to maximize the efficiency and selectivity of the sorbent for specific metals. In this context, research on the modification of waste materials and understanding the mechanisms of sorption are crucial for developing more advanced technological solutions1.

In addition to chemical and physical modifications, the proper preparation of sorbents is also of significant importance. For example, drying, grinding and even granulation of waste materials can significantly affect their sorption efficiency. Moreover, laboratory and experimental studies are often necessary to determine the optimal process conditions, such as pH, temperature, metal concentration, or contact time between water and sorbent26. It is also worth noting that some waste materials may exhibit different sorption properties depending on their origin, which require an individual approach to each of them.

Despite the numerous advantages, there are also certain challenges to the wide implementation of such solutions on an industrial scale. One of them is the variability of the properties of waste materials, which may differ depending on the source of origin. Another challenge is the scalability of sorption processes involving waste materials, which requires further research on the optimization of the technology and understanding of sorption mechanisms on a macro scale. An important aspect is also the assessment of the impact of long-term use of waste sorbents on the environment, including the analysis of the possibilities of regenerating sorbents and their further use after the sorption process is complete.

The aim of the research presented in the article was to compare the effectiveness of removing selected heavy metals such as zinc, lead, cadmium, and copper (Zn, Pb, Cd, Cu) from solutions by sorbents of waste origin (coffee grounds, hazelnut shells, compost) and natural origin (chitosan, bentonite).

Materials and methods

Sorbents

The five types of sorbents were used in the study: two sorbents: bentonite (CETCO, Poland) and chitosan (ChitoClear 43,000-HQG10, Poland), and three sorbents derived from waste: coffee grounds (Robusta and Arabica mix, NovoDia cafés), ground walnut shells (Corylus avellana, Poland), and compost (ZPHU UMEX, Poland). The comparative evaluation included determining the removal efficiency of heavy metals (Zn, Cu, Cd, and Pb) from aqueous solutions by sorbents derived from waste compared to bentonite (control), as a primary raw material used as a pollutant sorbent, and chitosan, as an organic sorbent with high adsorption efficiency.

Sorbents characterization

Moisture content

The moisture content in the analyzed samples of sorbents was determined by the PN-EN ISO 18,134–2:2017–03 standard. To determine this parameter, 1 ± 0.1 g of the analyzed material was weighed into a ceramic vessel dried to a constant mass, and placed in a laboratory dryer heated to 105 ± 5 °C for 90 min. After the sample had cooled, the mass was measured.

Ash content

The PN-ISO 1171 standard method determined the ash content. The test consisted of weighing 1 ± 0.1 g of the analyzed material in a ceramic vessel, which was then placed in a muffle furnace at room temperature. The furnace was heated to a temperature of 815 ± 10 °C and the set temperature was maintained for 90 min. After the sample had cooled, the mass was measured.

pHpzc

The determination of the surface neutralization point was performed using the method presented by27. Approximately 1 ± 0.01 g of the tested sorbent was weighed into polypropylene containers and 20 cm3 of previously prepared CO2-free distilled water was poured in and stirred for 24 h at 140 rpm. After 24 h, the pH of the solution was measured using a pH meter, thereby determining the pHpzc value.

Elemental analysis of C, H, N, S

The analysis of elemental elements in the form of carbon, hydrogen, nitrogen, and sulfur of the sorbents was performed using a CHNS microanalyzer from Elementar Vario EL II, using the sample combustion method. Sorbent weights weighing 1.2–1.6 mg ± 0.001 mg were placed in tin capsules and analyzed by combustion in oxygen. In the case of determining the CHNS content level, sulfanilic acid was used as a standard. The content of the analyzed elements was determined after calculating the coefficients for the standard used. The analyses were performed twice for each sample, and below 0.3% of the content (detection limit of the device) the result was considered insignificant.

Physical adsorption

The porosity of the sorbents was assessed based on N2 adsorption isotherms (77 K) determined using the AUTOSORB IQ analyzer from Quantachrome. Before analysis, the samples were degassed under vacuum (10–7 bar) at 50 °C for 48 h. Based on the obtained data from the physisorption process, the specific surface area, volume, and average pore size, and the volume and surface area of pores were determined. The specific surface area was determined based on the multipoint Brunauer, Emmett, and Teller (MBET) method. The volume and average size of micropores were calculated based on the Quenched Solid Density Functional Theory (QSDFT). The Barrett-Joyner-Halenda (BJH) and Density Functional Theory (DFT) method was used to determine the size of micro- and mesopores and their capacity.

FTIR spectroscopy

A Jasco FTIR 6200 Fourier transform spectrometer was used to identify the type of functional groups that may be present in the analyzed sorbents. Infrared spectra were recorded by the ATR method with a diamond crystal using a Pike attachment. A TGS detector was used for spectral measurements in the spectral range of 4000–650 cm−1 at a resolution of 4 cm−1.

Sorption experiments

A specific mass of the selected sorbent (chitosan, bentonite, soil, coffee beans, hazelnut shells, only one at time) was introduced into a 200 ml conical flask. 50 ml of an aqueous solution containing a single selected heavy metal (Zn, Cd, Cu, Pb) of known concentration was introduced. The initial metal concentration in the solution was 10 mg/L, except for cadmium, which was 1 mg/L (pH about 5–6 from different metal ions solutions). Different sorbent masses were used: 5, 3, 1, 0.5, 0.25, and 0.1 g. The sample was shaken on a shaker at room temperature for 24 h at 100 rpm to establish sorption equilibrium. The sample was filtered through a filter to remove the remaining sorbent. Then the samples were subjected to determination of the heavy metal content in the filtrate. The experiments were conducted separately for each sorbent and each metal. Each experiment was performed in triplicate, and the results are presented as the average value of three measurements.

Measurement of heavy metal content

Heavy metals (Cd, Cu, Pb and Zn) concentrations were measured in the filtered extracts after sorption using a flame atomic absorption spectrometry (FAAS PinAAcle 900F PerkinElmer, Waltham, Massachusetts, USA). Detection limits were 0.01 mg/L for Cd; 0.03 mg/L for Cu and Pb; and 0.02 mg/L for Zn.

Results and discussion

Sorbents characterization

As part of the research, selected samples of natural sorbents were analyzed for moisture content, ash content, and elemental analysis (Table 1). In all analyzed samples, the moisture content did not exceed 10%. The highest ash content was observed in bentonite and compost—33.15% and 19.70%, respectively.

Table 1 Moisture content, ash content, and elemental analysis on a dry basis (with ± SD value from three repetitions).

Elemental analysis includes the determination of basic elements present in sorbents. The content of individual elements was calculated considering moisture. The oxygen content in the tested samples, taking into account ash, was determined using the differential method. The lowest carbon content was found in bentonite, amounting to slightly over 1%. In the elemental composition of bentonite, compared to other sorbents, the presence of sulfur was identified at a level of approximately 4%. The high oxygen and ash content (58.34% and 33.15%, respectively) in bentonite is characteristic of this type of material28. The high carbon content in coffee (50.48%) and hazelnut shells (46.66%) is related to their structure and significant content of organic compounds, such as cellulose, hemicellulose, lignin, polysaccharides, which is confirmed by other studies29,30. Similarly, in the case of chitosan, which is a derivative of chitin, consisting of β-(1- > 4) – D-glucosamine molecules,– the carbon content is 44.37%, hydrogen 13.43%, nitrogen 8.08%, and oxygen 33.59%15,31. Compost is characterized by high oxygen and carbon content (45.79% and 27.57%, respectively) and hydrogen and nitrogen content below 5%. Considering the ash content determined in the compost, it can be stated that this sorbent contains a significant amount of organic matter32.

A crucial factor influencing the rate and efficiency of adsorption is pH, which affects the nature of the adsorbent surface. It also affects the degree of ionization and speciation of metal ions in the solution (Kołodyńska et al., 2012). According to accepted assumptions, if the solution pH is lower than pHzpc, the adsorbent surface will be positively charged, while if the solution pH is higher than pHzpc, the surface will be negatively charged (Pennanen et al., 2020). The analyzed sorbents differ in their pHpzc value (Table 1). Natural sorbents, i.e., coffee, compost and hazelnut shells, show a pHzpc value in the range of 6–7, while chitosan above 8. For bentonite, its pHzpc was determined to be below 4.

Structural properties

The porosity of the materials and the determination of their specific surface area were assessed based on N2 adsorption isotherms (77 K). The IUPAC classification was used to determine the type of isotherm (Fig. 1a.)., a. Bentonite samples exhibit a type IVa isotherm with visible H2 hysteresis, characteristic of adsorbents with narrow conical and cylindrical mesopores, which are closed at the conical end. Sorbents such as chitosan, compost, and hazelnut shells exhibit a type V isotherm, very similar to the type III isotherm, which can be attributed to relatively weak adsorbent-adsorbate interactions. Only at a higher p/p0 ratio does pore filling occur after molecular aggregation. For coffee, a type VI isotherm was obtained, representative of layer-by-layer adsorption on a very uniform, non-porous surface. All sorbents used are characterized by a predominance of mesopores in the range from 3 to 50 nm (Fig. 1b).

Fig. 1
figure 1

Comparison of the characterization of textural properties of a: a) Adsorption–desorption isotherms N2 in 77 K and b Pore size distribution for analyzed adsorbents.

Table 2 presents a summary of the basic parameters, i.e., specific surface area (SBET), pore size (Dm), and pore capacity (Vt) for all five sorbents. For four of the five analyzed sorbents, the specific surface area value and pore distribution were determined. The highest specific surface area was obtained for bentonite (40.04 m2/g), which was characterized by a mesoporous structure with an average pore size of 3.427 nm and a capacity of 0.072 cm3/g. For coffee, the exact specific surface area could not be identified, as the obtained isotherms indicated a surface area below the detection limit of the apparatus.

Table 2 Surface area and pore distribution.

Analysis of the literature indicates a variety of bentonite surface sizes, depending on the place of origin, and chemical composition. Materials with a surface area ranging from 30.35 to even 869 m2/g can be found using appropriate activation methods, with different porous structures and pore capacities33,34,35. For chitosan, the specific surface area was determined at the level of 12.27 m2/g, which, similarly to bentonite, was characterized by a predominance of mesopores with an average size of 3.848 nm and a capacity of 0.015 cm3/g. The obtained results of the analyses are confirmed by the other researchers, where the specific surface area was obtained in the range of 1.16 to 74.6 m2/g with a predominance of mesopores with a small capacity36. Hazelnut shells were characterized by a specific surface area of 11.05 m2/g, a mesoporous structure with an average pore size of 3.066 nm, and a capacity of 0.044 cm3/g. For compost, the specific surface area was determined at the level of 3.93 m2/g with larger mesopores than in the other sorbents, with an average pore size of over 4 nm and a capacity of 0.007 cm3/g. The obtained SBET surface area values and the distribution and pore capacity, both for hazelnut shells and compost, are comparable to the literature data37,38.

The adsorbents used in the study were characterized in terms of the presence of functional groups using FTIR spectroscopy (Fig. 2). For all the analyzed sorbents, the occurrence of peaks of stretching vibrations of –OH groups originating from inter- and intramolecular hydrogen bonds of polymer compounds and water in the range of 3200–3700 cm-1 with different intensity was determined. The occurrence of these vibrations in such a wide range indicates the presence of both free and bound -OH groups39,40,41.

Fig. 2
figure 2

FTIR spectra of the: a Waste origin sorbents and b Natural origin sorbents.

For coffee, bands originating from the vibrations of the bonded N–H group of N-monosubstituted amides, as well as polypeptides and proteins (3069 cm−1), were identified (Table 3)42. The bands appearing at wavelengths of 2921 and 1737 cm−1 are derived from the stretching vibrations of the carbonyl group C = O and the asymmetric C–H stretching vibrations originating from the -CH2 group of lipid compounds43. Peaks attributed to caffeine were observed at 2856 and 1648 cm−1, corresponding to the vibrations of the C = O group and the deformation vibrations of -NH and C-N occurring in primary amides44,45. Bands associated with chlorogenic acid, formed as a result of esterification between quinic acid and caffeic acid, were visible at wavelengths in the range of 1154–1450 cm-1 and are related to the C-H deformation plane vibrations in the -C = C-H group42. The intense broad band at 1021 cm-1 and the band at 875 cm-1 are associated with the secondary and primary bonds of C = O, C–O–C, R-O-R, and R-OH groups present in polysaccharides and hemicellulose complex42.

Table 3 Functional groups identified in the analyzed sorbents.

The peaks corresponding to the vibrations of the methyl and methyl groups occurring in polysaccharides visible in the chitosan spectrum are observed at wavelengths of 2923 and 2864 cm-1 (Table 3)40. The peaks at 1645 and 1315 cm-1 correspond to the stretching vibrations of C = O and C-N, occurring in amides and OH groups from phenolic derivatives46,41. The peaks originating from the bending vibrations of the N–H bonds of the primary amine were located at 1585 cm-1. Additionally, the presence of C-H bonds resulting from the symmetric deformations of the CH2 and CH3 groups (1422 and 1372 cm-1) was identified47 and the stretching vibrations of the C-O bond of the C–O–C group (1146, 1061, and 1024 cm-1) were determined48.

Analysis of FTIR spectra for bentonite allows us the identification of characteristic bands for this type of material. The peaks appearing at wavelengths of 3447, 1631, 793, and 662 cm-1 are caused by vibrations of Si–O, Al-O, and Ca bonds33. The occurrence of these peaks indicates the presence of amorphous silica, and their appearance is due to the stretching and bending vibrations of the tetrahedra of SiO42-49. A very strong band in the region of 1100–1000 cm-1 is related to the vibrations of the Si–O bond33. The bands originating from the bending vibrations of the Al -Al -OH bonds were identified at a wavelength of 916 cm-150.

For compost, several bands were identified, indicating the diversity of possible functional groups. In addition to the peak’s characteristic of water, the band at a 3284 cm-1 indicates the occurrence of stretching vibrations from the bound N–H group of amides, present in N-monosubstituted amides, polypeptides, and proteins51. The presence of nitrogen compounds is also evidenced by the bands appearing in the range of 1610–1590 cm-1 and 809 and 713 cm-1 (amide band III from tertiary amides) (Baes and Bloom,1989,52,53. The peaks at 2963 and 2895 cm-1 are due to symmetric and asymmetric C-H stretching vibrations in the methyl and methylene groups51. The C = O stretching vibrations originating from the COOH group of carboxylic acids, ketones, aldehydes, and esters were identified at a wavelength of 1705 cm-154. A broad and intense band centered at 1027 cm-1 indicates the presence of polysaccharides and clay minerals (Si–O bond vibrations)55,56.

Analysis of the FTIR spectrum of the hazelnut shells sorbent indicates the presence of methylene group, confirmed by the band caused by vibrations of the C-H bond at 2879 cm-157. The vibrations of the C = O group of acetylene and esters in hemicellulose, and the ester bond of the -COOH group of hydroxycinnamic acid linking lignin to hemicellulose, were identified at a wavelength of 1728 cm-1. The stretching vibrations of C = O and C = C from the aromatic skeleton of hemicellulose and lignin were located at 1610, 1505 and 1450 cm-158,59,60. The peak at 1370 cm-1 is caused by the bending vibrations of the C-H bond in the plane of the methoxy groups of lignin37. The vibrations of the -C = O, C–O–C, and -O–H groups originating from esters, carboxylic acids, phenols, and their derivatives, were identified at 1239 and 1146 cm-159. The secondary and primary bonds characteristic of lignin, hemicellulose, and polysaccharides (-C = O, C–O–C, R-O-R, R-O–H) are evidenced by a broad band centered at 1034 cm-161. At a wavelength of 890 cm-1, stretching vibrations from the glycosidic bond of C–O–C appear57.

Characterization of the physicochemical and structural properties of sorbents of waste and natural origin showed significant differences that may affect the sorption properties of heavy metals. Analysis of the elemental composition and pHpzc values ​​of the tested sorbents indicated differences resulting from their origin and chemical structure. Organic sorbents, i.e., coffee grounds, hazelnut shell, compost, and chitosan, are characterized by significant carbon and oxygen content, reflecting the presence of lignocellulosic fractions and other polysaccharides. Furthermore, these sorbents are rich in oxygen functional groups (-OH, -COO, -CO) and nitrogen (-NH2), which may significantly impact heavy metal binding efficiency despite their low specific surface areas. Bentonite, as an inorganic sorbent, contains a significant mineral fraction and is characterized by a low pHpzc, which in turn may negatively impact adsorption efficiency despite its high surface area.

Heavy metals removal

Adsorption processes are among of the most effective methods of removing pollutants from aqueous solutions; however, the high cost of producing adsorbents limits their use62. Recently, new sorbents in the form of so-called biosorbents have been sought. Various materials, such as fish scales, animal waste, plant waste, zeolites, clay, and bentonite with their modifications (e.g., thermochemical or magnetic), are analyzed in the context of the ability to sorb of various pollutants, including primarily heavy metals63,64,65.

All tested sorbents in our research demonstrated high efficiency in the removal of heavy metals from aqueous solutions. This trend was consistent across all types of sorbents used and for all analyzed metals. However, there was significant variation in the effectiveness of sorbents as well as in the removal efficiency of individual metals. Increasing the sorbent dosage significantly enhanced metal removal, reducing metal concentrations in residual aqueous phase to below the detection limit. Only when the lowest sorbent doses were applied did trace amounts of metals remain in the solution. These results indicate that sorbent dosage is a critical factor influencing the effectiveness of metal removal. Figure 3 shows the efficiency of various adsorbents in removing heavy metals.

Fig. 3
figure 3

Effectiveness of heavy metal removal by a Coffee, b Chitosan, c Bentonite, d Compost, e hazelnut shells depending on the mass of adsorbent used.

The effectiveness of Zn removal, using all sorbents, except bentonite, was very high and similar. Even at the smallest dose, more than 90% reduction was achieved, while the fastest complete removal (at 0.5 g) was observed for hazelnut shells and coffee. Bentonite showed considerably lower performance. At the lowest dose, only 61% of zinc was removed, but efficiency improved with increasing sorbent amounts. Ultimately, a dose of 5 g enabled complete removal of the metal from the solution. The Cu removal efficiency was the highest among all tested metals (Fig. 3). In the case of all sorbents, except bentonite, even the minimum dose caused practically 100% removal. The most effective was chitosan, even the smallest dose caused complete elimination of Cu, and coffee and hazelnuts allowed for the removal of 99% of the metal. Bentonite was characterized by low removal efficiency, even lower than for Zn, amounting to 37%. Increasing the sorbent dose increased the removal efficiency. The largest 5 g dose allowed for complete removal of Cu.

The behavior of cadmium during the sorption process was different than in the case of the rest of the metals. Most sorbents at the smallest dose (0.1 g) allowed to remove 50–60% of the metals, except for the most effective hazelnuts, which removed 72%. Increasing the sorbent doses allowed for more effective removal. Finally, regardless of the sorbent, 3 g allowed to remove all cadmium each time.

In the case of lead, all sorbents allowed for similar metal removal efficiency. Even the smallest dose allowed for removal of over 95% of the metal each time, and increasing the dose allowed for increased removal efficiency.

Increasing the adsorbent dose increased the efficiency of sorption of the analyzed heavy metals. The higher the adsorbent dose, the greater the number of active binding sites for metals. In the study by66, bentonite was used for sorption of divalent ions (nickel and manganese) and the effect of the adsorbent dose on the efficiency of the process was determined. The researchers found that the level of metal removal increased with the increase in the bentonite dose. A similar observation was made by Bellache et al.67, who found that in the case of bentonite, increasing the dose caused an increase in the level of sorption of Zn(II) ions, due to the increase in the number of active sites, thus facilitating the penetration of metal ions into the sorption sites. In another study68, it was found that increasing the dose of biosorbent in the form of biochar from pig and cow manure caused an immediate increase in the sorption of Cu(II) ions.

The low capacity of bentonite, despite the largest specific surface area among the tested biosorbents and the presence of functional groups, may also result from the way the sorption process proceeds. For example, in the studies by Sen and Gomez69, it was found that the adsorption of Zn(II) ions on bentonite is a two-stage process: first of all a very fast adsorption of the metallic zinc ion on the external surface take placed, and then the process slows down and can occur by intramolecular diffusion inside the adsorbent, which was confirmed by the intramolecular diffusion model. In the case of the remaining ions (Cu, Cd, Pb) analyzed in this study, it was also observed that an increase in the adsorbent dose, regardless of its type, increases the efficiency of the sorption process. The calculated Pearson correlation coefficients (analysis performed using the function available in MS Excel) indicated that the correlation between the adsorbent mass and the adsorption of heavy metal ions is positively significant, especially in the case of compost (Pb p = 0.88, Zn p = 0.76, Cu p = 0.56, Cd p = 0.55), then bentonite (Cu p = 0.85,Zn p = 0.83; Pb p = 0.83, Cd p = 0.67), chitosan (Pb p = 0.85, Zn p = 0.71, Cd p = 0.58, Cu p = 0), coffee waste (Cu p = 0.84, Pb p = 0.83, Cd p = 0.71, Zn p = 0.51) and hazelnut shells (Pb p = 0.77, Cd p = 0.76, Zn p = 0.45, Cu p = 0.38). Analysis of the p -values ​​also allows us to conclude that the mass of the adsorbent is significant primarily in relation to the type of metal being retained. For example, the mass of chitosan has no significant effect on the binding of Cu ions (p = 0), while the binding of the same ions by bentonite is determined by the mass of the adsorbent used (p = 0.85).

In the conducted experiment, the sorption efficiency series according to the sorbent used is as follows: hazelnut shells > chitosan > compost > coffee > bentonite. Organic sorbents showed a greater adsorption capacity of the analyzed ions than bentonite. This can probably be attributed to a greater share of oxygen functional groups in these materials. All analyzed sorbents, except bentonite, are characterized by the presence of groups such as C = O, COO-, C–O–C, O–H, N–H2. Many studies by other authors have confirmed that organic sorbents in the form of coffee husk, hazel nut shell, chitosan are characterized by high adsorption capacity of heavy metals, i.e. Pb, Cd, Cu or Zn due to diverse negatively charged functional groups70,71,72,73. In the study by Xiao and Huang74, the ability of organic sorbents (camellia leaves, pine sawdust, primary sludge from a municipal sewage treatment plant) and inorganic sorbents (Na-montmorillonite, goethite powders and fly ash) on the sorption capacity of Cu(II) ions was compared. Furthermore, the effective removal of Cu by chitosan is likely due to the presence of numerous amine groups, which are easily protonated and can form strong coordination bonds with metal ions75. The waste sorbents (coffee, shells, compost) act more like physicochemical sorbents with a limited number of weaker active sites, therefore their effectiveness towards Cu ions is much lower15,25,76. Other research has shown that the presence of functional groups derived from cellulose and proteins contained in plant cells contributes to the increase in the sorption capacity of organic sorbents in relation to inorganic sorbents. The presence of carboxyl, phenolic or amine groups on the surfaces of sorbents supports the binding of metal ions, especially those that have a greater affinity for a given functional group. In the case of organic sorbents rich in the above-mentioned functional groups, the sorption process usually has the character of cation exchange or the formation of relatively stable and durable complexes77,78.

For comparative purposes, a series of metal affinities for the surfaces of organic and inorganic sorbents for the lowest dose used (Table 4) was presented. Sorbents such as hazelnut shell, coffee and compost have the strongest affinity for copper, then lead, zinc and cadmium. In the case of bentonite, the series of sorbent surface affinities for the retained metal is different and is as follows: the strongest for lead, then zinc, cadmium, and copper. Such a course of the sorption process can probably be attributed to stronger interactions of carboxyl, amine, or phenolic groups. The sorption of copper ions, which are prone to form strong bonds with electron pair donor groups, resulting in complex formation, is distinctive in this case79. In addition, the copper ion is smaller than, for example, the zinc ion, which can also have a more beneficial effect on the retention efficiency80.

Table 4 Metal affinity depending on the type of sorbent for a dose of 0.1 g.

Adsorption of heavy metals on the surface of the analyzed natural sorbents was much more effective than natural ones (chitosan and bentonite). A significant parameter that influences sorption efficiency is the pH of the solution containing heavy metals. Lower ion sorption efficiency is also observed at lower pH values ​​of the solutions in which they are present. This is due to the predominance of H+ ions, which in turn compete with positively charged metal ions for available binding sites on the adsorbent surface81. Metals such as Zn, Cu, Cd and Pb dissolve at low pH, while at high pH they form hydroxides and begin to precipitate. Precipitation of Cu occurs at pH > 6, Pb at pH > 9.6, and Zn and Cd at pH > 982,83,84. As shown earlier, when the pH of the ion solution is higher than the pHpzc of the sorbent surface, its surface is negatively charged, and therefore, the cation adsorption process should occur faster via ion exchange. Figure 4 shows the pH value for each sorbent used after sorption of individual ions. Adsorption on bentonite, despite the lower pHpzc (3.74) than the pH of the metal ion solution, is much less effective than the other analyzed sorbents. This is probably because that sorption on bentonites takes place in two stages, which has been shown, among others, in studies85,86. As can be observed (Fig. 4), for such sorbents as coffee, chitosan, compost and nuts, the ΔpH value (ΔpH = pHe—pHinit) determines that the sorption of metals on the surface of these adsorbents probably proceeded based on ion exchange and complexation87,88.

Fig. 4
figure 4

The pH value of the analyzed heavy metal solutions after the adsorption process using waste and natural adsorbents.

Economical aspects

Using waste materials as sorbents contributes to the implementation of circular economy principles by valorizing waste streams generated by industry and agriculture. Sorbents such as coffee grounds, hazelnut shells, or compost, which are the subject of this article, have a high potential for large-scale water treatment. This is both from an environmental and economic perspective. This stems from the fact that these waste materials are inexpensive (or even free), do not compete with food, and are widely available89. Large-scale implementation of waste-based sorbents requires extensive research, including long-term studies, to confirm their effectiveness. Mukherjee et al.24 conducted techno-economic analyses of using nutshells to produce activated carbon in three different scenarios. The authors estimated that processing 31.25 tons of nutshells per day could yield 6.6 tons of activated carbon, and annual production could represent a net present value (NPV) of USD 2.8 billion with an internal rate of return of 21%. Furthermore, regardless of the chosen scenario, the price per kg of the resulting adsorbent from nutshells was lower than for activated carbon obtained traditionally24. However, the success of this project depends on the appropriate scale and stable raw material supplies.

Research conducted on the use of coffee grounds primarily involves analyses focused on the physicochemical properties of this raw material. As is well known, coffee beans are rich in various compounds with antioxidants and anti-inflammatory properties and can be a rich source of fiber in forage90. According to literature data, over 500 billion cups of coffee are consumed worldwide, and 1 ton of coffee produces approximately 650 kg of coffee grounds91. In a study by Silva et al.92, the economic viability of using biosorbents, including coffee grounds with commercially available zeolites, was analyzed to remove fluoxetine from water. The researchers found that commercial adsorbents were characterized by higher costs per gram of substance removed (up to €6.85/g) than coffee grounds (€0.16/g). These results demonstrate that waste alone, without prior mechanical or chemical treatment, can be an economically viable adsorbent on a large scale92.

This is also confirmed by the results presented in this paper, but also in other studies, that waste sorbents such as coffee grounds, hazelnut shells or compost can be effective adsorbents of heavy metals from water, without the need for additional heat treatment or the use of chemical agents. However, the transition from laboratory-scale feasibility to industrial applications is fraught with challenges, including the heterogeneity of waste feedstocks, supply chain logistics, pre-processing requirements (drying, grinding, chemical activation), and limited operational cost data. These challenges are significant, making it difficult to assess the feasibility of large-scale sorbent use93.

Conclusion

The consistent performance across different sorbents (bentonite, chitosan, hazelnut shells, coffee grounds, compost) suggests their broad applicability in treating water contaminated with heavy metals. The selected sorbents were thoroughly characterized, including elemental composition, identification of functional groups, determination of BET surface area, and pore distribution. It has been demonstrated that sorbents such as. Hazelnut shells, coffee grounds, compost or chitosan, exhibit a large diversity of functional groups, mainly including oxygen groups (COO, OH, CO). The study showed that waste-derived sorbents such as coffee grounds, hazelnut shells, and compost can effectively remove heavy metals (Zn, Pb, Cd, Cu) from aqueous solutions, often showing comparable or even superior performance to natural origin sorbents like chitosan and bentonite. The best sorption efficiency for three of the four analyzed metals was achieved by hazelnut shell, which, at a mass of 0.1 g, removed over 90% of Zn, Cu and Pb. Furthermore, this sorbent also removed over 70% of Cd for a mass of 0.1 g. Despite bentonite exhibiting the highest specific surface area, it was the least effective sorbent, while copper proved to be the most challenging metal to remove using this material (only 37% for 0.1 g mass of used sorbent). Bentonite showed the highest degree of metal removal from aqueous solutions only in relation to Pb (95%) at the lowest sorbent dose (0.1 g). The high removal efficiency of heavy metals highlights the potential of the tested materials for practical environmental remediation. Waste-derived sorbents, due to their availability, low cost, and effectiveness, represent a promising and sustainable solution for water purification and environmental protection.