Introduction

Water is the essence of sustainability, as it is vital for socio-economic growth, healthy environments, and human life. United Nations-Water’s primary goal is securing sustainable water for all, which clearly focuses on the development aims of societies and fosters human goodness, leading to a healthy population, improved prosperity, and a protected environment. Climate change causes increasing water needs while declining water sources1. Nowadays, many regions in the world are experiencing increased demand for fresh water. It is a major challenge to get pure drinking water since the quality of fresh water is declining incessantly2,3. According to UNICEF, it’s predicted that half of the world’s residents will live in places suffering from water scarcity by 20254. This challenges water executives to satisfy the requirements of growing societies, sensitive environments, farmers, energy manufacturers, and industry.

Pollution of surface and groundwater sources is another reason for the decline of freshwater sources, which is considered one of the most critical problems that can impact humans, animals, plants, and aquatic organisms. Before 2015, approximately 20% of global wastewater was well-treated. Meanwhile, about 70% of industrial wastewater is released without appropriate eradication in developing countries4. Aquifers are exhausted worldwide and are polluted due to numerous complications of saltwater intrusion, soil attrition, insufficient cleanliness, pollution of ground and surface waters by algae, chemicals, detergents, fertilizers, pesticides, heavy metals, etc. The classical approaches for the elimination of organic contaminants and heavy metals from wastewater incorporate chemical precipitation, membrane processes, ion exchange, photocatalysis, and distillation, which are costly and not suitable for the removal of all contaminants5,6.

In the same vein, the adsorption technique is considered the most widely used method for water purification due to its prominent merits, including cost-efficiency, feasible scalability, and a wide range of adsorbents such as magnetic nanoparticles7, clay minerals8, synthesized polymers9,10,11, or carbonaceous adsorbent12,13. These adsorbents are currently utilized for the elimination of various pollutants like dangerous heavy metals like iron, lead, and mercury, dyes such as crystal violet and rhodamine B, and organic pollutants such as pesticides, antibiotics, and phenol.

In this context, activated carbon (AC) prepared from agricultural by-products and wastes are excellent substitute adsorbents for the elimination of organic contaminants and heavy metals from waste and groundwaters since they are cheap, sustainable sources with high carbon, low ash, and rational hardness. AC is a treated carbon material with a porous assembly and a high interior surface area. AC contains mostly carbon (87–97%), in addition to some elements like hydrogen, oxygen, sulfur, and nitrogen. It can adsorb numerous matters from both gas and liquid media2. The means of preparation of AC include physical activation at temperatures 800–1000 ºC and chemical activation that integrates carbonization and activation in a single-step process at a relatively lower temperature. Chemical activation is mostly done using ZnCl2, H3PO4, H2SO4, KOH, or NaOH. These chemicals act as both oxidizing and dehydrating reagents, allowing simultaneous carbonization and activation. The important advantages of chemical activation are the possibility of activation at relatively low temperatures and the great yield3.

Dyes are widely employed in many industries, like textiles, paints, paper products, and cosmetics. The textile industry is a chief source of water pollution14. Therefore, dyes are among the most abundant contaminants in wastewater15. Industrial wastewater discharge can contaminate rivers and other water assets since they are poisonous, mutagenic, and carcinogenic16. Furthermore, they can decrease the photosynthesis of marine flora, causing damage to the marine biota17. Among various dyes, methylene blue ([7-(dimethylamino) phenothiazin-3-ylidene] dimethylazanium chloride, MB), which is a synthetic cationic thiazine dye of an amorphous nature, is one of the most common dyes that should be eliminated from wastewater3.

In the same vein, heavy metals are hazardous, non-degradable water impurities that are biomagnified in the food chains. Their presence is damaging since they are stored in the bodies of humans or other organisms, leading to long-term health hazards and disorders18. Being small molecules with complex structures, they are challenging to remove. The primary origins of these metals include human activities like mining, fertilization, electroplating, and the car industry19. Lead, Pb (II), is a very dangerous metal that is ranked second in the record of dangerous substances by The Agency for Toxic Substances and Disease Registry20,21,22. The sources of lead-polluted water include industrial and wastewater discharges, pesticides, paints, water pipes, and leachate from lead-acid batteries20.

The present study focuses on the utility of AC prepared from peanut shells as an economical and widely accessible plant waste for the elimination of lead and MB from water solutions as models for water contaminants. Peanuts are cultivated in developing countries; more than 80 million tons of peanut shells are annually left as agricultural waste without any commercial use23. The fiber contains cellulose 35.7%, lignin 30.2%, hemicellulose 18.7%, and ash 5.9%24. Peanut shells are usually used as a low-value energy source, either burned in the field or discarded, which is harmful to the environment. The processing and transformation of peanut shells to AC with high adsorption capacity would lessen problems of disposal and management while producing a value-added product for groundwater and wastewater treatment to expand the AC market. The valorization of agricultural and industrial waste gained great attention from researchers since it is a cheap, non-toxic, and sustainable feedstock25,26,27,28. This approach supports the circular economy practice by decreasing material consumption, reusing agro-waste, and recycling materials.

Thus, the aim of this study is to utilize peanut shells to produce cheap AC that is effective for water purification as tested by adsorptive removal of Pb (II) and MB. The AC has been fully characterized, and the factors influencing the adsorption process and the adsorption mechanisms have been explored. The adsorption data have been compared with different kinetic and isotherm models. The prepared AC is proven as a versatile adsorbent that can be used for the elimination of contaminants of different natures and chemical properties. This is an extra advantage of the prepared AC since few ACs in the literature have succeeded in doing so. Additionally, it was found that non-treated leafy vegeables itself can adsorb heavy metals on its surface29. Furthermore, in contrary to the developed approach, many reported literature on water decontamination or metal capturing via adsorption are depending on adsorbants from synthetic origin such as (3-(3-(methoxycarbonyl)benzylidene) hydrazinyl)benzoic acid and 2-nitroso-1-naphthol anchord on silica30,31, N,N–bis(salicylidene)1,2–bis(2–aminophenylthio)ethane (BSBAE) embedded silica32, citric acid/reluctant33, Mg/Al-layered double hydroxide-Sodium hexametaphosphate composite34. This impart a significant merit to the developed approach regarding environmental safety and greenness. Consequently, the prepared AC has been successfully utilized to decontaminate real samples from wastewater and groundwater. The developed approach is eco-friendly, cost-efficient, and suitable for limited-resources communities.

Experimental

Instrumentation

A spectrophotometer from Chrom Tech. Co., Ltd. (USA) was utilized for absorbance measurement. An atomic absorption spectrophotometer (JBT 932 EA SP) was used for the measurement of lead concentration. Measuring the BET surface area (SBET) of the prepared carbons was done via nitrogen adsorption at 77 K using Surface Area and Size Analyzer, NOVA 2000 Series, from Quantachrome (Germany). A scanning electron microscope from JEOL, Japan, was applied to examine the surface of the carbons. Fourier transform infrared spectroscopy (FT-IR) spectra were scanned using the Jasco instrument (Model 6100, Japan). A Hi 931401 HANNA pH meter (Portugal) was utilized.

Materials and reagents

Peanut shells were purchased from Egyptian markets. Methylene blue, ZnCl2, NaOH, and HCl were obtained from Sigma-Aldrich. Lead nitrate and NaCl were supplied by BDH (UK). MB stock solution was prepared in distilled water.

Synthesis of activated carbon from peanut shells

Method I

Peanut shells were finely ground and rinsed with HCl (0.5%) to eliminate all dust. The produced matrix was allowed to dry overnight in a furnace at 105 °C, then pulverized and sifted with a mesh (1–4 mm). The produced powder was transferred to a tabular furnace (600 °C) for 2 h to be carbonized. The obtained carbonized matrix (CM) was immersed in NaOH solution for 24 h in two immersion ratios (w/w): CM: NaOH of 1:1 (w/w) (CNa,1:1) and 1:3 (w/w) (CNa, 1:3). Afterwards, the two mixtures were transferred into an oven 105 °C) to eliminate moisture overnight. Then, the activation was carried out at 750 °C for 2 h and then left at room temperature to cool. The produced AC was constantly rinsed with distilled water till the pH of the filtrate became within the range of 7.0–8.0. This was followed by overnight drying at 105 °C.

Method II

The ZnCl2-AC samples were synthesized by impregnation of CM in ZnCl2 in two immersion ratios: CM: ZnCl2 of 2:1, w/w (CZn, 2:1) and 1:2, w/w (CZn,1:2). The two mixtures were dehydrated by transferring to an oven (105 °C) to dry overnight then activated at 600 °C for 2 h. The AC was repetitively rinsed with distilled water. When the filtrate becomes free from chloride, it is allowed to dry overnight at 105 °C.

Method III

Activation of the CM with the steam flow (150 mL min−1) at variable times to get burn-off of AC samples of 20% and 48% (CSt, 20% and CSt, 48%).

MB Adsorption experiments

Adsorption experimentations were done by mixing the synthesized AC with 50 ml aqueous solution of methylene blue (MB) as a model pollutant in 250 mL flasks and transferring it to a temperature-controlled shaking water bath at a stable shaking rate of 125 rpm. The experiments were performed at varied pHs (2–12), different dosages of AC, and different starting concentrations of MB.

The quantities of MB eliminated by AC (qe) were estimated using Eq. (1), and the % removed (R %) was estimated by Eq. (2)35.

$$q_{e} = \frac{C0 - Ce}{m} \times \, V$$
(1)
$$\% R \, = \frac{C0 - Ce}{{Ce}} \times \, 100$$
(2)

where qe = the adsorbed quantity of MB (mg g−1), C0 and Ce are the starting and equilibrium liquid-phase concentrations of MB (mg g−1), respectively, V is the volume of the solution (L), and m is the weight of the sorbent used (g).

Lead adsorption experiments

Pb (II) adsorption by AC was also investigated by the addition of 0.05 g AC to 50 ml of Pb (II) solution (50 ppm) within the pH range (1.5–7.0). The mixtures were shaken at room temperature at 150 rpm for 24 h, and samples were withdrawn for determination of metal concentration using an atomic absorption spectrophotometer. Furthermore, varied adsorbent concentrations from 0.05 to 0.25 g/25 mL have been tested. The quantities of Pb (II) eliminated by AC (qe) and % removed (R %) were calculated by Eq. (1) and (2), respectively.

Regeneration and reusability experiment of the prepared AC

All the regeneration studies were performed with 0.1 g AC (CZn21, CNa11, and CSt20) mixed with 50 ml solution of 50 ppm MB and shaken for two h to achieve equilibrium at room temperature. The AC samples with adsorbed MB were filtered, washed, dried at 80 °C, regenerated using 0.2 M NaCl, and shaken at 25 °C for 2 h for regeneration. Then, the regenerated ACs were again placed in the flask for adsorption according to the procedures described earlier, with the adsorption-–regeneration process occurring in four cycles.

Results and discussion

Description of AC prepared from peanut shells.

Surface area analysis of AC

The surface area and porous assembly of carbonaceous materials are significant aspects in controlling their adsorption competencies. The adsorption/desorption of N2 on the prepared AC was studied at 77 K (Fig. S1, supplementary material) and analyzed by the BET equation36. The isotherms for carbon C are basically type I as per the BDDT categorization, exhibiting no hysteresis loop. The isotherms of the prepared AC (CSt20, CSt48, CZn21, CZn12, CNa11, and CNa13) demonstrate mixed features of types I and IV being less steep with closed hysteresis loops37.

The surface area of the AC samples was measured from the linear BET plots of N2 adsorption at 77 K (Fig. 1). The surface area of non-activated carbon (non-AC) is very low relative to AC. This is attributed to the high degree of microporosity of AC36. The SBET of CNa13 and CZn12 are significantly greater than C. Meanwhile, the NaOH-AC sample (CNa13) has the highest surface area value among all prepared AC. Furthermore, the activation of carbon with steam significantly increased the surface area. Furthermore, the total pore volume of non-activated samples is very low relative to AC. The pore radius ranged between 0.4 and 0.5 nm for the activated samples.

Figure 1
figure 1

Surface area analysis of (a) non-activated carbon, (b) NaOH-activated carbons at ratios of 1:1 and 1:3 (Carbon: NaOH), (c) ZnCl2-activated carbons at ratios of 2:1 and 1:2 (Carbon: ZnCl2), and (d) steam-activated carbons (20% and 48% burn-off).

Surface pH and point of zero charge of AC

The pH at the point of zero charge (pHpzc) is the pH at which the surface functional groups do not contribute to the pH of the solution38,39. The pHpzc of the slurries of CSt20, CSt48, CZn12, CZn21, CNa11, and CNa13 were found to be 8.20, 8.30, 6.57, 6.66, 8.77, and 8.90, respectively. This indicates that the base functional groups slightly predominate on the surface of CNa11, CNa13, CSt20, and CSt48, while the pH of slurries of CZn12 and CZn21 were found to be neutral.

FTIR analysis of surface chemistry

The spectra from FTIR analysis of the prepared AC have been examined (Fig. 2). The FTIR spectra of CZn21, CNa11, and CSt20 showed a broad band at 3414–3446 cm−1 allocated to O–H stretching. In addition, the peaks that appeared at 1034–1116 cm−1 are ascribed to the C–O stretching in alcoholic groups, and the bands detected at 610–875 cm−1 are ascribed to in and out plane ring deformation in benzene rings40. These findings suggest that the AC shows surface-OH groups.

Figure 2
figure 2

FTIR spectra of (a) CZn21, (b) CNa11, and (c) CSt20 before and after the adsorption of MB.

Scanning electron microscopy (SEM) for morphological and pore structure characterization

Scanning electron microscopy (SEM) offers data about the morphological features of the AC (Fig. 3). It is evident that activations result in significant surface alterations of the particles since the activation with NaOH or ZnCl2 leads to greater pores (dark areas) and lesser carbon matrix (pale gray area).

Figure 3
figure 3

SEM images of (a) carbonaceous precursor, (b) activated carbon with NaOH, and (c) activated carbon with ZnCl2.

Results of adsorption experiments of MB by the prepared AC

FTIR for AC after adsorption of MB

The FTIR spectra of AC exhibited the following significant alterations following the adsorption of MB (Fig. 2):

  1. 1.

    For CZn21-MB: The manifestation of a band at 1424 cm−1 is referred to as C–H groups of alkanes (Fig. 2a).

  2. 2.

    For CNa11-MB: The bands at 3418, 2920, and 2250 cm−1, which are referred to as the O–H group, C–H group, and C–C stretching of aromatic moieties, respectively, disappeared, indicating the involvement of these groups in the CNa11-MB interaction. The manifestation of peaks at 1710 cm−1 and 1510 cm−1 (Fig. 2b) indicated the appearance of the C=N group and aromatic C═C of MB, respectively. This confirms the adsorption process.

  3. 3.

    For CSt20-MB, the absence of the bands at 3430 cm−1, 2929 cm−1, and 2190 cm−1 implied the absence of O–H, C–H bonds, and C–C bonds, respectively. The new peaks that figured at 1749 and 1508 cm−1 (Fig. 2c) are allocated to the C=N group and aromatic C═C of MB, respectively.

Effect of initial pH on the adsorption of MB by AC

Figure 4 demonstrates the impact of pH on the adsorption of MB on the AC. Increasing the original pH of the dye solution over the range of 2–12 leads to a stepwise increase of the adsorption (Fig. 4). The solution pH influences both the charge of the AC surface and the extent of dissociation of the adsorbates. Yet, the adsorption may also be affected by hydrogen bonds or π–π interaction41.

Figure 4
figure 4

Effect of pH on the adsorption of MB on different AC.

The weaker adsorption of MB at low pH is possibly attributed to the competing of H+ ions with the cationic site of the dye for adsorption spots of AC. Besides, at acidic pH, the –OH groups on the AC surface are non-dissociated; thus, electrostatic interaction between AC and MB is minimal. On the other hand, increasing the pH is associated with a corresponding increase in the quantity of MB adsorbed on the AC surface. This is attributed to the deprotonation of the surface –OH groups of AC and subsequent enhancement of the electrostatic interaction of the positively charged nitrogen of the cationic dye and the surface negative groups (–O) of the AC.

The effect of the initial concentration of MB on the adsorption capacity of AC

The equilibrium isotherm depicted in Fig. 5 showed that the adsorption capacity for AC improved by increasing the original MB concentration because of the rise in the key force of the concentration gradient by increasing MB's original concentration from 20 to 600 mg L−1. This reveals that the adsorption depends on the starting concentration of MB. At low concentrations, the ratio of (the initial number of MB dye molecules: the available surface area) is low. Thus, the adsorption did not depend on the original MB concentration. Yet, at high concentrations, the free adsorption sites are limited, and the adsorption % of MB dye is dependent upon its original concentration. Equilibrium has been established at two temperatures (28 and 50 °C) for all AC.

Figure 5
figure 5

Effect of initial concentration of MB on the adsorption capacity of AC at (a) 28 and (b) 50 °C.

Effect of contact time of MB with AC

A series of experiments have been performed to optimize the adsorption time at initial concentrations of 500 ppm by CNa13, CSt48, and CZn21 samples for n = 3 (Fig. 6). The adsorption of MB by ACs increased with the increase of contact time. The contact time needed to achieve equilibrium was about 10–15 min for all AC samples; the capacity uptake of MB at equilibrium on the CNa13, CSt48, and CZn21 are 350 ± 2.76, 150 ± 4.02, and 50 ± 3.71 mg g−1, respectively. This indicates the effectiveness of the ACs in removing MB from water.

Figure 6
figure 6

Effect of contact time on the adsorption of MB on CNa13, CSt48, and CZn21 samples.

Effect of adsorbent dosage

The impact of AC dose on the adsorption of MB is presented in Fig. 7. Increasing the AC dose enhanced the adsorption % of MB due to the escalation in the accessible adsorption sites and surface area of AC.

Figure 7
figure 7

Effect of adsorbent dosage on the adsorption of MB on (a) CNa13, (b) CSt48, and (c) CZn21 samples.

Effect of foreign ions

Certain species commonly exist in natural water, like anions and cations, which may influence the adsorption of dyes on the AC. Therefore, the adsorption of MB by AC was assessed using some matrix ions such as F, Cl, Na+, K+, oxalate, and acetate. The inspection of the results (Table 1) shows that these ions had no negative influence on the adsorption of MB from water, where the %adsorption was in the range of 99.43–99.97%. This indicates the effectiveness of the AC for the eradication of MB from water, even in the presence of diverse foreign ions.

Table 1 Effect of different foreign ions on the % removal of MB (30 ppm) by CNa13, CSt48, and CZn12.

Adsorption isotherm

The adsorption equilibrium isotherm is significant in the investigation of adsorption systems. Different isotherms like Langmuir and Freundlich isotherms42 may describe the adsorption of AC. Langmuir and Freundlich isotherm models have been applied to explore the best fit to describe MB adsorption on AC. The linear form of Langmuir isotherm is shown in Eq. (3):

$$\frac{{{\varvec{C}}_{{\varvec{e}}} }}{{{\varvec{q}}_{{\varvec{e}}} }} = \frac{1}{{{\varvec{bq}}_{{\varvec{m}}} }} + \frac{1}{{{\varvec{q}}_{{\varvec{m}}} }}{\varvec{C}}_{{\varvec{e}}}$$
(3)

where b is the Langmuir equilibrium constant (L mg−1), and qm (mg g−1) is the monolayer adsorption capacity. Both b and qm are calculated from a curve of Ce/qe versus Ce (Fig. 8).

Figure 8
figure 8

Langmuir plots at (a) 28 °C and (b) at 50 °C.

Langmuir isotherm is estimated by the separation factor, RL, which is outlined as follows:

$$R_{L} = \frac{1}{{1 + {\varvec{bC}}_{{\varvec{o}}} }}$$
(4)

where Co is the original solute concentration.

The RL value signifies the kind of isotherm and describes the adsorption process. The adsorption is considered unfavorable for RL > 1, favorable if 0 < RL < 1, or irreversible if RL = 043. In this investigation, the RL values were within the range of (0–1) (Table 2). This proved that all AC exhibited favorable adsorption for MB. The favorability of the adsorption process followed the order of CNa13 > CSt48 > CZn12 > CNa11 > CZn21 > P > CH > CSt20 according to the calculated RL values.

Table 2 Langmuir and Freundlich isotherms constants for adsorption of MB on AC at 28 and 50 °C.

Freundlich linear isotherm44 equation is shown below:

$${\mathbf{Ln}} \, {\mathbf{q}}_{{\mathbf{e}}} = \, {\mathbf{Ln}} \, {\mathbf{K}}_{{\mathbf{f}}} + \frac{1}{{\varvec{n}}}\user2{ }{\mathbf{lnC}}_{{\mathbf{e}}}$$
(5)

where Kf (L g−1) is the Freundlich constant, and n is the Freundlich exponent. These factors are calculated from a graph of log qe against log Ce (Fig. 9).

Figure 9
figure 9

Freundlich plots at (a) 28 °C and (b) 50 °C.

Table 2 shows the parameters for Langmuir’s and Freundlich isotherms at 28 and 50 °C. Inspection of the obtained results depicts:

  1. 1.

    Both Freundlich and Langmuir models are appropriate to express the adsorption of MB on the AC as indicated by the high values of correlation coefficient (R2) that lie in the range of (0.977–0.999). The model that better fits the adsorption of MB on all ACs is the Langmuir adsorption model, as revealed by the higher R2.

  2. 2.

    Increasing the temperature is associated with a corresponding increase in the adsorption capacity, indicating the endothermic character of MB adsorption on the AC.

  3. 3.

    The increase of the activating agent, ZnCl2 or NaOH, leads to an improvement in the adsorption ability of the AC.

The Dubinin–Radushkevich (D-R) isotherm model has been applied to assess the adsorption from an energy perspective and assumes that it occurs on the porous surface45. The D-R model states that the pore structure of the surface where adsorption occurs affects the adsorption potential. For small pores with extremely high adsorption power, the adsorption potential is considerable. As a result, the D-R isotherm indicates that the pores are filled in order of smallest to largest. The energy value derived from the D-R isotherm model provides details on the adsorption mechanism. Which chemical or physical adsorption mechanism is most successful throughout the adsorption process is indicated by the E (kJ/mol) value. If the magnitude of the E value is between 8 and 16 kJ mol−1, it refers to the chemical adsorption mechanism. On the other hand, if it is smaller than 8.0 kJ mol−1, the physical adsorption mechanism exhibits. For this study, all AC samples exhibit low free energy values of less than 8.0 kJ mol−1, indicating that the adsorption of MB is mostly a physisorption process. The mean free energy E of adsorption per molecule of the adsorbate when it is transferred from the solution to the solid surface is proportional to the constant β, as shown in Table 3.

Table 3 Results for Dubinin-Radushkevich (D-R) isotherm for adsorption of MB on ACs at 28 and 50 °C.

Adsorption kinetics modeling

Kinetic modeling of adsorption data has been evaluated to validate the application of the adsorptive removal model in real industries46. Pseudo-first-order and pseudo-second-order models have been studied to explain the kinetics of the adsorption of MB on AC.

The pseudo-first-order kinetic model is stated by Eq. (6):

$${\mathbf{log}}\left( {{\mathbf{q}}_{{\mathbf{e}}} - {\mathbf{q}}_{{\mathbf{t}}} } \right) = {\mathbf{logq}}_{{\mathbf{e}}} - \frac{{{\varvec{k}}_{1} }}{2.303}{\mathbf{t}}$$
(6)

where qe and qt (mg g−1) are the quantities of MB adsorbed at equilibrium and at time t, respectively. k1 is the equilibrium constant (min−1) calculated from the slope of the plot of Ln (qe−qt) against t in Fig. 10a.

Figure 10
figure 10

Investigation of the adsorption of MB on AC by (a) pseudo-first-order kinetic model, (b) pseudo-second-order kinetic model, (c) intraparticle diffusion, and (d) Boyd model.

The pseudo-second-order kinetic model is expressed by Eq. (7):

$$\frac{{\varvec{t}}}{{{\varvec{q}}_{{\varvec{t}}} }} = \frac{1}{{{\varvec{k}}_{2} {\varvec{q}}_{{\varvec{e}}}^{2} }} + \frac{1}{{{\varvec{q}}_{{\varvec{e}}} }}{\varvec{t}}$$
(7)

where K2 (g mg−1 min) is the equilibrium rate constant for the pseudo-second-order adsorption, and qe can be calculated from the plot of t/qt against t (Fig. 10b)47.

The obtained results are demonstrated in Table 4. For all investigated AC (CNa13, CSt48, and CZn21), the correlation coefficient R2 of pseudo-second-order plots was very close to 1 and much greater than R2 of the pseudo-first-order plots. Furthermore, the hypothetical q2e value calculated from the pseudo-second-order plot was very approximate to the experimental value of qexp (Table 4), while the hypothetical q1e value assessed from the pseudo-first-order kinetic gave values very different from the experimental values (qexp). This indicates that the pseudo-second-order model is the applicable model to explain MB adsorption on the AC.

Table 4 Kinetic parameters for MB adsorption applying different kinetic models.

Investigation of the rate-limiting step for MB adsorption on AC

In most adsorption systems, the surface step is relatively fast, and the rate-controlling step is diffusion, either film or intraparticle diffusion. Thus, for the determination of the adsorption rate controlling step, the intraparticle diffusion and Boyd models were investigated.

The intraparticle diffusion model48 was tested by applying Eq. (8):

$$q_{t} = k_{int} t^{0.5} + \, C$$
(8)

Where kint (mg g−1 min−1/2) is the adsorption constant, and C is the intercept of a plot of qt against t1/2 (Fig. 10c)48.

The results were also inspected by the Boyd model (Eq. 9)48 to investigate whether the adsorption takes place via an external diffusion or intraparticle diffusion.

$${\mathbf{F}}\left( {\mathbf{t}} \right) = 1 - \frac{6}{{{{\varvec{\uppi}}}^{2} }}\mathop \sum \limits_{{{\mathbf{n}} = 1}}^{\infty } \frac{1}{{{\mathbf{n}}^{2} }}\exp \left( { - {\mathbf{n}}^{2} {\mathbf{Bt}}} \right)$$
(9)

where F is the fractional equilibrium at time t and is obtained by Eq. (10).

$$F \, = \frac{{{\varvec{q}}_{{\varvec{t}}} }}{{{\varvec{q}}_{{\varvec{e}}} }}$$
(10)

B (t) is the mathematical function of F, and n is the infinite series solution.

The results obtained (Fig. 10c) show that the graph of qt versus t0.5 of CNa13 for MB has two linear parts referring to two phases that come about throughout the adsorption. Furthermore, since the linear part of the line did not cross the coordinate origin, it is anticipated that two steps will govern the entire adsorption process. The first sharp linear segment is referred to as fast film diffusion, which involves the transfer of MB molecules from the solution to the AC exterior surface via diffusion across the boundary layer. The second linear segment of the plot represents slower MB molecule diffusion from the outer surface of AC into the pores35,49.

Boyd kinetic model (Fig. 10d) was also applied, and the calculated results demonstrated that the linear graph of B (t) versus (t) of CNa13 for MB doesn’t cross the coordinate origin, signifying that the process of adsorption is governed by film diffusion48.

Thus, it is concluded that both film and intraparticle diffusion are the rate-determining steps for the adsorption process. The sorbates move from the bulk solution to the boundary layer on the AC surface. This step is followed by film diffusion, where the sorbates cross the boundary layer, reach the adsorption sites on the AC surface, and interact via molecular interactions. Furthermore, sorbates diffuse into the pores of the adsorbent, including the mesopores and micropores50.

Thermodynamic studies

The impact of temperature on MB adsorption by AC has been investigated at 298 and 320 K. The thermodynamic factors, comprising Gibbs free energy change (ΔG°, kJ mol−1), enthalpy (ΔH°, kJ mol−1), and entropy (ΔS°, kJ (mol·K)−1) were estimated51.

The free energy change (ΔGo) of the adsorption was calculated from Eq. (11), standard enthalpy change (ΔHo) was calculated from Eq. (13), and standard entropy change (ΔSo) was also calculated from Eq. (14)52,53.

$${{\varvec{\Delta}}}G^{o} = - {\mathbf{RTlnK}}_{{\mathbf{c}}}$$
(11)

Here, the ideal gas constant, R is 8.314 J mol−1 K−1. T and Kc are the temperature in K, and the thermodynamic equilibrium constant, respectively. Kc was measured using Eq. (12)

$${\mathbf{Kc}} \, = \, {\mathbf{M}}_{{\mathbf{W}}} \times {\mathbf{55}}.{\mathbf{5}} \times {\mathbf{1000}} \times {\mathbf{b}}$$
(12)

where, Mw is the methylene blue molecular weight (g mol−1), the number of moles of water per liter is 55.5, and the Langmuir constant, b (L mg−1).

$${\mathbf{\Delta H}}^{{\mathbf{O}}} = {\mathbf{R}}\left( {\frac{{{\mathbf{T}}_{1} {\mathbf{T}}_{2} }}{{{\mathbf{T}}_{2} - {\mathbf{T}}_{1} }}} \right)*2.303{\mathbf{log}}\left( {\frac{{{\mathbf{b}}_{2} }}{{{\mathbf{b}}_{1} }}} \right)$$
(13)
$${\mathbf{\Delta S}}^{{\mathbf{O}}} = \frac{{{\mathbf{\Delta H}}^{{\mathbf{O}}} - {\mathbf{\Delta G}}^{{\mathbf{O}}} }}{{\mathbf{T}}}$$
(14)

Table 5 demonstrates the calculated values for thermodynamic factors for the adsorption of MB by the AC. The positive ΔH° value signifies the endothermic character of MB adsorption by the AC. This explains the favorable adsorption of MB by the AC at elevated temperatures. In addition, the positive ΔS° proposes the augmented randomness at the solid/solution boundary throughout MB adsorption. The negative ΔG° implies the spontaneity of the adsorption. The value of ΔG° improved at higher temperatures suggesting enhanced adsorption35.

Table 5 Thermodynamic parameters for the adsorption of MB on AC.

Mechanism of MB Adsorption by the prepared AC

The adsorption of cationic dyes like MB onto AC is probably affected by diverse interaction forces like the π–π interaction, hydrogen bonds, or electrostatic interaction. The π-π interaction involves the aromatic moiety in MB and the aromatic core of the AC. Furthermore, H-bonding between electronegative atoms in the dye molecules (–N– and –S–) and H-bond acceptor in the AC (e.g. OH). Besides, electrostatic interaction takes place between the positive nitrogen of imine group in MB and the negative O of AC. Additionally, pore filling is mainly a key mechanism in the adsorption process due to the presence of mesopores and micropores in AC, enhancing their adsorption abilities for large adsorbate molecules like dye molecules54. Figure 11 illustrates the foremost ways for the adsorption of MB by the AC.

Figure 11
figure 11

Diagram demonstrating the synthesis route of AC, possible MB adsorption mechanisms (green dots denote H-bonding, red dots denote electrostatic interaction, and purple dotted arrow denotes π–π interaction), and possible Pb (II) adsorption mechanisms (the blue ball represents Pb(II)) by the agro-based AC. The inset shows the steps of pore diffusion.

Adsorption experiments of lead (II) by the prepared AC

FTIR and SEM for AC before/after adsorption of lead (II)

The FTIR spectra of CSt20 have been recorded before and after the adsorption of Pb (II) since the appearance/disappearance of peaks and shift of bands can be used as evidence for adsorption and to clarify the functional groups involved in the adsorption process. Observing Fig. 12a, one can see that the adsorption of Pb (II) on the surface of the AC leads to a change in positions and intensities of some peaks. Some changes in the wavenumber and intensities of the peaks are detected in the region from 500 to 1750 cm−1. Furthermore, the disappearance of the band at 3430 cm−1 suggests the involvement of the OH group of AC in its interaction with Pb (II) and the formation of a complex. In addition, a comparison of the SEM and EDX results obtained before and after Pb (II) adsorption by CSt20 (Fig. 12b and 5c) corroborates such results. The presence of a peak in the EDX spectrum belonging to lead clearly proves the accumulation of lead (II) ions onto CSt20. Figure 12a and b illustrate the SEM images of CSt20 before and after adsorption of Pb (II), respectively. It is obvious that the surface texture of CSt20 was entirely altered following the adsorption of Pb (II). The surface of the Pb (II)-loaded CSt20 demonstrated that the surface of the CSt20 was covered with Pb (II), and the pores were filled with the metal ions after the adsorption of Pb (II). This observation indicates that lead ions are bonded to the functional groups within the pores55.

Figure 12
figure 12

(a) FTIR spectra for activated carbon Cst20 before and after adsorption of Pb (II). Scanning electron microscopy images (SEM) and Elemental analysis (EDX) of AC (b) before and (c) after adsorption of Pb (II).

Effect of initial pH

pH affects both the chemistry of AC and the speciation of lead. According to the literature, at pH between 1 and 5, the predominant species of lead is Pb (II), the predominant species is Pb (II) and Pb(OH)2 at pH 6, while Pb(OH)3− and Pb(OH)42− are formed at pH between 7 and 1256. The preliminary pH of the medium was varied within the range of 1.6–7 to prevent precipitation of lead hydroxide. It is noted that the adsorption rate rapidly improved by increasing the pH from 2.0 to pH 4.5, then the rate slowly increased, and the adsorption reached its maximum level (Fig. 13a). The increase of the solution pH leads to ionization of the surface functional groups of AC (e.g., OH), and it becomes more negatively charged. This boosts the electrostatic attraction of Pb (II) with the AC surface and improves the adsorption. pH 4.5 was chosen as the best pH for this investigation. On the other hand, the weak adsorption of Pb (II) at acidic pH (2–3) is explained by the competition of Pb (II) with the H+ for the adsorption sites on the AC surface57,58.

Figure 13
figure 13

Effect of (a) pH, (b) initial Pb(II) concentration, (c) contact time, and (d) adsorbent dose on adsorption of Pb(II) on Cst20 sample.

Effect of initial Pb (II) concentrations

As demonstrated in Fig. 13b, the adsorption enhanced as the initial Pb (II) concentration increased. The increase of the metal ion’s original concentration boosts the dynamic force of the concentration gradient59. The number of replicates were 3, and the SD values range from (0.522 to 2.867).

Effect of contact time

The impact of contact time of Pb (II) and CSt20 was studied by changing the time over the range of 5 min to 24 h for n = 3. From Fig. 13c, the adsorption of Pb (II) ions is fast in the first hour due to the accessibility of plentiful adsorption sites on the surface of AC. After 1.5 h, equilibrium was reached, and constant adsorption was observed.

Effect of adsorbent dosage

The results of the adsorption of Pb (II) with varied dosages of AC are exhibited in Fig. 13d. Increasing the AC dose from 0.3 g to 2.75 g L−1 produced an improvement in the adsorption % of Pb (II) ions from 22.3 to 85%, respectively. This effect is credited to the increased available surface area and adsorption sites for the taking of Pb (II) ions.

Effect of foreign ions

Natural water may contain different anions and cations that probably influence the adsorption on the AC. Therefore, the adsorption % of Pb (II) by CSt20 was assessed in the presence of certain potential ions like F-, Cl-, oxalate, acetate, Na+, and K+ (Table 6). The obtained results indicate that these ions did not significantly affect the adsorption of Pb (II). It was observed that only Ca2+ shows a negative effect on the adsorption process at higher concentrations (200 ppm), whereas, for low concentrations of Ca2+ (10 ppm), the adsorption % reached 97.85%.

Table 6 Effect of potential foreign ions on the adsorption of Pb(II) by CSt20.

Pb (II) adsorption isotherm modeling

The equilibrium data for Pb (II) adsorption by CSt20 has been modeled using Langmuir, Freundlich, and Dubinin–Radushkevich isotherms. The obtained results for the three models are displayed in Table 7. The obtained results can be summarized in the following points:

  1. 1.

    Langmuir parameter (b) for Pb (II) (0.037) indicated favorable adsorption of Pb (II) on AC.

  2. 2.

    The Freundlich parameter (n) is greater than 1, indicating favorable adsorption of Pb (II) on AC.

  3. 3.

    Both Freundlich and Langmuir models are appropriate for expressing the adsorption of Pb (II) on the AC, as indicated by the high values of correlation coefficient (R2) (0.977 and 0.934, respectively). The model that better fits the adsorption of Pb (II) on CSt20 is the Langmuir adsorption model, as revealed by the higher R2.

  4. 4.

    The free energy calculated from Dubinin–Radushkevich isotherm is less than 8.0 kJ mol−1, indicating that the adsorption of Pb (II) is mostly a physisorption process.

Table 7 Langmuir, Freundlich, and Dubinin-Radushkevich (D-R) isotherms constants and Kinetic parameters for adsorption of Pb (II) by Cst20.

Pb (II) adsorption kinetic modeling and rate-controlling step

In order to describe the adsorption kinetics of Pb (II), the pseudo-first-, pseudo-second-order, intraparticle diffusion, and Boyd models were utilized. The obtained results are presented in Table 7. The obtained R2 value for the pseudo-first-order model is obviously lower than that of the pseudo-second-order model (0.544 and 0.999, respectively), suggesting that the pseudo-second-order kinetics model is appropriate to describe the Pb (II) removal.

The intraparticle diffusion model was utilized to study the mechanism of mass transport and to indicate the rate-limiting step during Pb (II) adsorption on the surface of CSt20. The obtained parameters are presented in Table 7. Since the intercept of the intraparticle diffusion curve is not equal to 0 (= 20.764), it is suggested that intraparticle diffusion is not the only step that controls the adsorption process, and there is another step allying with it.

Further, the Boyd kinetic model has been taken into consideration; the calculated results are presented in Table 7. The obtained data indicated that the intercept is not equal to 0 (= 0.968), which suggested that the adsorption is also governed by film diffusion48.

Mechanism of Pb (II) adsorption by the AC

Building on the obtained experiments and results, the underlying mechanisms of Pb (II) adsorption by AC are suggested to be physisorption processes, including electrostatic interaction, beside ion exchange (Fig. 11). The electrostatic attraction takes place between the positively charged lead ions and the negatively charged surface function groups of AC such as –O. Besides, the ion exchange of Pb (II) and protons from AC surface functions groups according to the following equation60:

$$\left( {{\text{AC}} - {\text{OH}}} \right)_{{2}} + {\text{ Pb }}\left( {{\text{II}}} \right) \to \left( {{\text{AC}} - {\text{O}}} \right)_{{2}} {\text{Pb }} + {\text{ 2H}}^{ + }$$

The synergetic combination of these mechanisms is responsible for the efficient adsorption of Pb (II) from water by the prepared agro-based AC. Furthermore, pore filling is a likely mechanism that contributes to the removal of Pb (II) from the aqueous medium, where Pb (II) penetrates the mesopores and micropores of AC that offers an extra capacity for uptake of Pb (II). Both intraparticle and film diffusion control the adsorption process60.

Real sample applications

Markedly, compared to other physiochemical treatment procedures, adsorption is competent in the elimination of different heavy metals from aqueous solutions35,49,61. For instance, mesoporous silica based adsorbents with different anchored ligands have been employed for the removal of various metals from contaminated water. Ni (II) has been eliminated from waste water by silica based composite adsorbents61. As well, Cd (II) has been successfully eliminated from contaminated water by 2,2′-biquinoline-4,4′-dicarboxylic acid-embedded mesoporous silica62. Similar approaches has been applied for recovery of Sm (III) utilizing 4-chlro-2-mercaptophenyl)carbamodithioate immobilization onto mesoporous silica63 and Pb (II) using 2,4,6-trichlorophenol-anchored mesoporous silica64. Rare-earth Yb(III) ions have been recovered from aqueous solution by 1E,1`E,1``E,1```E (tetrakis(3-carboxysalicylidene)) naphthalene-1,2,5,5-tetramine-bound mesoporous silica monoliths65. However, mesoporous silica exhibit some limitations as an adsorbent such as difficulty of synthesis, distributed particle size, and unstability of its aquesous suspension. Thus, it is needed to develop better adsorbing materials. In this context, activated carbon shows many merits such as cost-efficiency, simple preparation, durability, well-defined porous structure, and fast adsorption and desorption.

Lead may occur in drinking water because of the corrosion of lead-containing plumbing materials and pipes. By virtue of its high toxicity, harmful impact on human health, serious behavioral and physical influences on children and fetuses, and persistence in the human body, the United States Environmental Protection Agency (USEPA) settled the maximum allowed level of lead in drinking water to be zero. The USEPA assessed that about 20% of the individual’s exposure to lead is via drinking water. The USEPA regulations recommend continuous monitoring of the level of lead in water systems and suggest additional action if lead is detected in water. These facts imply the need for new, effective technology for removal of lead from water66,67.

The applicability of the prepared activated carbon CSt20 for adsorption of Pb (II) from discrete water samples, e.g., distilled water, tap water, wastewater, and underground water, was investigated utilizing three spiked concentrations (5, 10, and 15 ppm). The tests were done using 25 mL of filtered water samples after adapting their pH to 4.5, adding 0.05 g of the CSt20 sample, and stirring the mixture. The obtained results (Table 8) show that the recovery was excellent, ranging from 95.12 to 99.23%, with a relative standard deviation (RSD) ≤ 3.0. The results obtained reveal the excellent performance of the prepared agro-waste-derived AC for adsorption of Pb (II) and efficient water remediation.

Table 8 Recovery of Pb(II) from different water samples using CSt20 activated carbon (n = 5).

Regeneration and reuse of the prepared AC

The prepared AC was regenerated utilizing NaCl as the desorbing agent and reused for adsorption (Fig. 14). Following four adsorption/desorption cycles, the adsorption efficiency was found to decrease from 98 to 86% for Czn21, from 92 to 75% for CNa13, and from 87 to 66% for Cst20 at an initial pollutant concentration of 50 ppm at room temperature for 120 min of contact time. It was deduced that increasing the adsorbent regeneration cycles led to a decrease in both the adsorption and the desorption effectiveness (Fig. 14). These results indicated the feasibility of the adsorbent regeneration in multiple successive pollutant adsorption–desorption cycles using salt without the application of any organic solvent. The regenerated low-cost materials could be reused, and they have potential applications for intended purposes in water treatment. The developed approach corroborates the eco-design concept that aims to minimize the eco-impact of a product via integrating the environmental aspects into the product development process. Herein, the life cycle of peanut shells involves their conversion into a useful product that can be repeatedly utilized for water purification and removal of dye/metal pollutants68.

Figure 14
figure 14

Adsorption/desorption percentages cycles of (a) Czn21, (b) CNa13, and (c) Cst20.

Comparison of the developed agro-based AC adsorbent and existing adsorbents for MB and Pb (II)

Table 9 compared the developed peanut shells-derived activated carbon as an adsorbent for the removal of MB and Pb (II) and other reported adsorbent materials with respect to adsorption capacity, removal %, and conditions of adsorption64,69,70,71,72,73,74,75. Only cross-linked chitosan-zeolite composite69 has better adsorption capacity than the prepared AC; however, it requires a contact time of 24 h to achieve this adsorption capacity, while the developed AC accomplished 130.89 mg g−1 adsorption capacity within 50 min. Furthermore, its synthesis process is complicated, and it is not as environmentally friendly as the suggested AC. Besides, the AC fibers modified by L-cysteine70 have similar adsorption capacity to the prepared AC for Pb (II) adsorption, yet it needs seven times longer contact time (6 h), it achieved much lower removal % of Pb (II) (51.55%), and its synthesis is more complicated compared to the suggested AC. All other investigated adsorbents exhibit poorer adsorption capacity while requiring longer contact time. It is notable that most of the reported adsorbent work at pH ranged from 3.5 to 5.569,70,71,72,73, except dolomite-quartz@Fe3O474 and AC nanoparticle impregnated on lightweight expanded clay aggregate75 that require a basic pH of 8.5 and 6.0, respectively.

Table 9 An overview of the adsorbents and conditions used for the adsorption of lead and MB in the literature.

Regarding MB, only AC derived from Rumex abyssinicus plant76 showed similar adsorption capacity under adsorption conditions like the developed AC. All other investigated adsorbents have lower adsorption capacities77,78,79,80. Additionally, most of the reported literature requires longer contact time76,77,78,80.

These results suggest that the peanut shells sourced ACs are a very promising adsorbent for the purification of contaminated water, and it has a great potential to participate in achieving the 6th goal of the United Nations sustainable development goals “Clean Water and Sanitation”81.

Conclusions and future aspects

In this study, AC adsorbent was prepared from peanut shells and structurally confirmed by FTIR and SEM analysis. Both MB dye and Pb (II) have been adsorbed significantly from aqueous solutions on the AC sourced from peanut shells as a cost-efficient, green, and renewable carbon source. The highest adsorption of MB was achieved at basic pH within 1 h, while for Pb (II), the adsorption capacity was maximum at pH 4.5 within 1 h. The kinetics of MB adsorption obeyed the pseudo-second-order model, and the Langmuir adsorption model is the best-fit model for the adsorption isotherm of MB on all AC samples. The adsorption mechanisms involved in MB-AC interaction include electrostatic interaction, π–π interaction, and hydrogen bonding, while Pb (II) is anticipated to interact with AC via electrostatic interaction and ion exchange.

As per the correlation coefficient, the obtained kinetic results were best fit by the Langmuir isotherm with maximum adsorption capacity of 303.03 mg g−1 for MB and 130.89 mg g−1 for Pb (II). The AC successfully removed MB and Pb (II) from aqueous solutions with %removal exceeding 95%. Thus, AC has been applied for remediation of waste and groundwater with excellent %removal ranging from 95.12 to 99.0%. The removal efficiency revealed a potential application of the peanut shells-derived AC material for the elimination of dye and heavy metal from wastewater, which will be highly economical and convenient. The prepared AC showed adsorption capacity greater than many reported adsorbing materials within a shorter contact time. The prepared material is promising for future applications as an adsorbent for the removal of other dyes and heavy metals from industrial wastewater.