Introduction

Water pollution caused by certain contaminants, such as synthetic dyes, poses a major challenge that must be overcome in order to preserve the environment [1]. Beside, these contaminants usually have a complex molecular, including aromatic, aliphatic and/or amino functional groups [2], making these toxic dyes more stable and difficult to be biodegraded [3]. Methylene blue (MB) is one of the most widely used dyes in several sectors and industries [4]. In counterpart, several depollution techniques have been developed. Traditional depollution methods such as biological processes give unsatisfactory results due to the discharges containing toxic materials and dyes which are hardly biodegradable [5, 6]. On the other hand, the physico-chemical processes which include coagulation-flocculation, oxidation, and membrane filtration have been widely studied and have revealed a high efficiency in decolorizing water [7]. These techniques are significantly different in terms of dye removal, operation, regeneration and financial cost, as well as lead to the generation of large amounts of sludge and/or the formation of derivatives [5, 8]. Adsorption remains among the most used techniques because of its simplicity to implement [9]. Many researchers reported a large variety of materials of natural or biological origin possessing the ability to fix large quantities of organic pollutants present in water [10, 11]. Currently, activated carbon (AC) is considered one of the most versatile adsorbents and many studies point out its effectiveness [12, 13]. However, commercial AC being expensive increase the treatment costs [13, 14]. Therefore, a shift to the use of agricultural waste for the synthesis of AC could be interesting especially if the precursor is low-cost (by-product), local, abundant in nature and accessible such as like the date seeds (DS) [15]. Moreover, exploiting DS would also make it possible to get rid of the enormous quantities of waste produced each year in Morocco. This would have a positive impact whether on the environment (recycling targets) or on the employment market of the deprived local population who would be able to take advantage of the opportunities generated from the valorization of DS as activated carbons (social targets). The potential uses of DS in their natural state, according to the varieties present in the different regions, are well below the possibilities offered by their various properties. Indeed, DS porosity strongly depends on the pyrolysis/activation conditions leading an interesting texture associated with very specific physico-chemical characteristics, explaining the huge capacity of particles exchanges into the adsorbent/adsorbate system. Nevertheless, the use of DS as decontaminant requires as first, an improvement and deep analyses of their mineralogical characteristics and secondly, a good understanding of the mechanism of elimination of these pollutants in order to achieve satisfactory results in terms of adsorption yield. This understanding would be more consolidated if we could analyze the adsorbing capacity of the precursors whenever we modulate their texture and composition or/and when we change the experimental conditions. The main purpose of the present study is to evaluate the performance of a local DS, thermally and chemically modified, for the adsorption of MB dye from aqueous medium. For this, various factors such as initial adsorbate concentration, adsorbent mass and temperature were modulated to investigate the optimal values for a maximum removal of MB dye. Furthermore, the sorption kinetics, and thermodynamics studies were also performed to understand the equilibrium properties and the mechanism of the sorption process.

Materials and methods

Raw materials

The DS were collected from farms near the city of Errachidia in the Drâa-Tafilalet region of Morocco (31° 56′ 08.0′′ N 4° 26′ 35.8′′ W). The chemicals used for the DS chemical activation process and for the adsorption evaluations included phosphoric acid (H3PO4), and MB dye (analytical grade, Solvachim, Morocco). All the chemicals were reagent grade.

Preparation of activated carbon

The DS were washed with distilled water and dried in an oven at 80 °C for 12 h, crushed, and sieved to obtain particle size less than 1 mm. Subsequently, the dried powdered DS (10 g approximately) were carbonized in a horizontal furnace under a continuous inert atmosphere (N2, 99.995%, flow rate of 300 mL/min) at 400 and 500 °C using a rate of 10 °C/min and kept at this temperature for 1 h. Hereafter, this powder is denoted DSC-400 and DSC-500 corresponding to carbonization temperature of 400 and 500 °C. AC was prepared through a one-step procedure. First, the dried powdered DS were activated using a phosphoric acid-medium. Two different mass ratios of DS:H3PO4 were employed, 1:1 (i.e. 2 g/2 g) and 1:2 (i.e. 2 g/4 g). Initially, a wet impregnation was performed by dispersing the chosen quantity of DS in a concentrated aqueous solution of H3PO4 (85% w/w, i.e. 8.67 mol/L) and stirring for 2 h. After this, the H3PO4 impregnated DS powder was dried in an oven at 85 °C for 4 h. The activation process was carried out in a horizontal furnace at 500 °C for 1 h with a heating rate of 10 °C/min under an inert atmosphere of N2 at flow of 150 mL/min. The resulting AC was washed with deionized water to neutralize the pH. Finally, the acid-AC was dried in a vacuum oven at 100 °C for 12 h. Hereafter, these samples are denoted DSAC-P1 and DSAC-P2 corresponding to the relative mass ratio of “DS:H3PO4” 1:1 and 1:2. It should be noted here that the choice of calcination and activation conditions was based on an extensive bibliographic study keeping in mind the environmental aspect as well as the need to obtain the best results.

Adsorption experiments

The adsorption tests were performed in a close reactor by mixing a fixed amount of studied sample with 100 mL of aqueous MB solution. The effect of contact time and amounts of adsorbents on the adsorption process were investigated simultaneously by varying the reaction time between 0 and 180 min and adsorbents mass from 0 to 0.4 mg using 100 mL of 100 mg/L MB concentration. The initial concentration of the adsorbate (100 to 500 mg/L) was also studied. For this, a stock solution of MB dye was prepared by dissolving 1 g of solid MB per 1 L of distilled water. This was followed by subsequent dilutions to prepare the appropriate concentrations as required. The influence of temperature on the adsorption was analyzed, at 4 different temperatures ranged from 25 to 55 °C, to evaluate the thermodynamic nature of the adsorption process. At the end of the adsorption test, the solution was centrifuged at 2600 rpm for 5 min. Thereafter, the MB absorbance in the supernatant solution was measured by using a UV–vis spectrophotometer (Perkin Elmer, lambda 1050+) at a maximum absorbance of 665 nm. Then, the concentration of residual dye was determined using the calibration curve performed with a range of known concentrations of MB. The adsorption capacity (Q) of MB adsorbed per gram by sample and efficiency of adsorbent (R %) of MB dye at equilibrium were calculated using the following equations:

$$Q_{{\left( {{\text{mg/g}}} \right)}} = \frac{{\left( {C_{0} - C_{e} } \right)}}{m}V$$
(1)
$$R\% = \frac{{\left( {C_{0} - C_{e} } \right)}}{{C_{0} }} \times 100$$
(2)

here C0 (mg/L) and Ce (mg/L) are the initial and equilibrium MB concentrations, V (L) is the volume of the dye solution, and m (g) is the adsorbent mass. For isotherm calculations, different initial concentrations of MB dye solutions (100, 200, 250, 300, 350, 400, 450 and 500 mg/L) were used. For kinetic calculations, experiment conditions were determined as 0.06 g of DSAC and a reaction time of 120 min.

Characterizations

The properties of the DSAC samples were examined by different characterization techniques. Changes in functional groups of adsorbents were identified by FTIR spectroscopy using a Bruker spectrometer (Vertex 70) in the range of 4000–400 cm−1. The textural properties of adsorbents were determined by N2 adsorption isotherms at 77 K using ASAP 2420 Micromeritics instruments. The samples were degassed at 250 °C for 6 h before the adsorption test. The specific surface area (SBET) was estimated by BET method. The total pore volume was estimated to be the liquid volumes of N2 at relative high pressure (P/Po = 0.99). Thermogravimetric analyses TGA/DTG were performed using a thermogravimetric analyzer (TGA Discovery, TA Instruments). The samples were heated, under air atmosphere with a flow rate of 100 mL/min, at room temperature (RT) up to 900 °C with a speed of 10 °C/min. Surface morphology and composition analyses of the prepared DSAC samples were achieved by using a SEM–EDS (Quattro S-200).

Results and discussion

Characterization of the adsorbent

Characterization of functional groups

The FTIR spectra for DSAC samples are shown in Fig. 1. Table 1 shows the main bands detected with corresponding functional groups taking into account that the shape and actual location of bands depend on the compounds nature [16]. At first sight, it would appear from FTIR results that DSC-400 and DSC-500 have qualitatively similar functional groups. Both spectra show bands ascribed to functional groups including Allenes, hydroxide, carboxylic acid, etc. However, samples treated at 500 °C showed a reduction in the intensity of many peaks (at 1588 and 1155 cm−1) and others have even disappeared (at 2918, 2853, 1435 and at 1375 cm−1). This could suppose that a higher temperature carbonization leads to a more functional groups removal [17]. On the other hand, DSAC-P1 and DSAC-P2 (Fig. 1c and d) show the presence of the principal adsorption bands with the same gaits, no change in the functional groups has been detected. It seems that H3PO4 activation, whether at 1/1 or 1/2 ratios, leads to similar composition. Nevertheless, substantial changes can be observed if we compare FTIR bands of pyrolyzed and H3PO4-activated samples. Chemical activation seems affect the composition more than heat treatment [18]. FTIR spectra of DSAC samples were compared before and after MB adsorption (again Fig. 1). No changes in the absorption peaks have been detected for samples DSC-400 and DSC-500. Though, different pattern was observed for DSAC-P1 and DSAC-P2. We notice the reduction in the intensity of peaks (more visible in the case of DSAC-P1) at 880 cm−1, between 1500–1575 cm−1 and 1650–1720 cm−1. The decrease in the intensity at these peaks occurs, as stated by many auteurs, because of the electrostatic interaction between the MB molecules and the adsorbent, which possibly formed new bonds overlapping the initial bands [19].

Fig. 1
figure 1

FTIR transmission spectra of studied samples showing the adsorption bands before and after the adsorption of the MB dye

Table 1 Principal FTIR bands of the studied samples with their corresponding functional groups

This could be a synonymous of a successful MB adsorption. Noteworthy, no bands were observed at 3360, 1400, 1048, 738 cm−1 corresponding to hydroxyls, alkanes, esters and aromatic [27], meaning no impurities bands were detected for all studied samples. The thermal and/or activation process allowed the decomposition of organic matter by removing volatile substances on the material surface [28].

Morphological and compositional analyses

SEM–EDS characterization was performed to identify the surface morphology and the distribution of chemical elements following the treatment undergone. As can be shown in Fig. 2a, b, there is major differences between the DSC-400/500 and DSAC-P1/P2.

Fig. 2
figure 2

SEM micrographs showing the surface morphology of the samples a DSC-500, b DSAC-P2 before MB dye adsorption, (experimental conditions are displayed at the bottom of the images)

Pyrolyzed samples exhibited irregular features with more heterogeneous surfaces while the acid-activated samples showed fairly smooth surfaces. We notice the presence, for all studied samples, of aggregates much consolidated with each other as consequence of sintering at the used temperatures which leads to relatively dense structures [29]. What is even more important to note is that the heat treatment did not destroy the porous character of our samples. Given, all DSAC samples showed a porous top-surface with the presence of pores/cavities of different sizes and shapes. The porosity is even well-developed in the case of activated samples DSAC-P1 and DSAC-P2. This could already be a synonym of a large surface area as confirmed below. This surface morphology, with porous structural features, is ideal for the adsorption of aqueous pollutants [30]. EDS microanalysis (Table 2) indicated that the DSAC samples were successfully prepared from DS, proof of this; (i) The presence of carbon as the major element for all samples due to the elimination of non-carbon elements [31]. In fact, during thermal treatments reactions of de-polymerization, dehydration, and condensation take place, resulting in higher carbon yields [18]. (ii) The presence of phosphor, belonging to H3PO4 activating agent molecules, uniquely in the case of DSAC-P1 and DSAC-P2. It should be noted here that no morphological changes have been observed, in all studied samples, after the MB adsorption process. However, the presence of MB dye is demonstrated by EDX analyses due the fact that nitrogen, mainly engendered from MB dye, from now on is more detectable after the adsorption test.

Table 2 List of studied samples with EDX-SEM results before and after MB adsorption (concentrations are in atomic %)

Characterization of textural properties

The presence of pores is an interesting property for a suitable adsorption of adsorbate molecules. SEM images just provided qualitative data on the existence (or not) of porosity located on shallow surface. With the aim of pushing further into the textural analysis we resorted to BET analysis as a way to have an idea closer to reality on the real proportion and extent of the internal and superficial pores. The textural properties of the prepared samples are given in Table 3. The results showed that DSC-400 and DSC-500 exhibited a negligible porosity [32]. Increasing carbonization temperatures, under these circumstances, seems to have no effect on the textural properties since comparable values were noted for both chars. Opposite side, DSAC-P1 and DSAC-P2 achieved the highest surface areas.

Table 3 Textural properties of the prepared samples

The pore size distributions of DSAC with the maximum pores size up to 10 nm was examined. Two distinct patterns have been observed for both pyrolysis and acid-activated samples. The curves profile for DSC-400 and DSC-500 (S3 of the SI) was qualitatively very similar being DSC-500, the sample with the largest pore volume.

Both samples showed well defined peaks centered in the micro/mesopores regions. The curves allure in this case suggest that only pores with certain diameter are preponderant. No significant N2 adsorption was measured for pores with diameters beyond 10 nm for both samples. On the other side, DSAC-P1/P2 curves (S4 of the SI) were shifted to narrower diameter pores. Indeed, the smaller pores diameter was, the greater was its proportion, being the diameter of the majority of pores less than 4 nm, i.e. the microporous region. The heterogeneous structures of porous materials are highly related to their pore size distributions. Based on these results, DSAC-P1/P2 should have more homogeneous pores compared to the DSC-400/500 samples. Pyrolysis and activation conditions have significant effect on the shape, pore size and surface morphology of DSAC [33, 34], as has been verified from the SEM analyses. Chemical activation led to an increase in the surface area which demonstrates the important effect of H3PO4 in porosity generation. In fact, H3PO4 attack combined to heat treatment promote bond cleavage, hydrolysis, dehydration, condensation and inhibit collapse of grains. This generates spaces and holes serving as pores incrementing the total surface area structure, with a consequential increase in the carbon yield (see Tables 2 and 3). Increasing the acid ratio seems to have an inverse effect since sample DSAC-P1 reached the maximum surface value of 917 m2/g using the minimal acid dose. This result can be explained in terms of porous accessibility of N2 and difference in the surface chemistry of DSAC-P1 and DSAC-P2 samples. The adsorbate size and the pore geometry have to be taken into considerations [35]. Indeed, as stated by Laine et al. additional acid probably forms an insulating layer covering the particles and thus reducing the activation process as well as the formation of area-responsible micropores [36, 37]. No proportionality between the specific surface area and the pore volume was found for DSAC-P1 and DSAC-P2 samples [38]. Zuo et al. reported that H3PO4 may function as a template because the volume occupied by phosphoric acid in the interior of the activated precursor is coincident with the micropore volume of the obtained activated carbon [39]. This explain why the total pores volume in case of DSAC-P2 was higher than DSAC-P1. Besides, the SEM analyses are in agreement with what we obtained in BET, there is no doubt about the existence of a more pronounced favorable porosity in the case of DSAC-P1/P2, compared to DSC-400/500 samples, since these samples exhibited the highest values of the specific surface and pore volume.

Thermal behavior analysis

The TGA/DTG analyses were performed to understand the decomposition and stability behavior of studied samples during the heat treatment. Thermal curves (see S5–8 of SI) for DSAC can be divided into several stages. At temperatures below 100 °C, we observe an initial weight loss (⋍ 5–10% by weight) corresponding to an endothermic loss and could be attributed to the loss of the water humidity confined in the samples. No weight losses were detected, for DSAC-P1/P2, between 100 and 150 °C, above 150 °C, from 150 to 360 °C and between 360 and 460 °C corresponding, in principle, to the elimination of organic matter, thermal decomposition of the main elements of DSAC, the beginning of hemicellulose degradation and to the cellulose decomposition [40]. However, DSC-400 and DSC-500 (S5 and S6) Samples started losing non-negligible masses from ⋍ 280 and ⋍ 340 °C. An unexpected result since these samples have undergone a heat treatment of 400–500 °C. After this, all studied samples showed decomposition mass beyond 460 °C corresponding to the lignin decomposition [40] at different speeds until reaching a total vanishing demonstrating the ash-free nature of our samples. The ash content has a significant effect on the quality of activated carbon and may affect the adsorption process [41]. Mention here that DSAC-P1 and DSAC-P2 showed a high thermal stability, manifested by a blue-shift degradation, due to the presence of more stable macromolecular structures [42]. In fact, the biomass is essentially constituted by cellulose and hemicellulose having polymeric bonds which have already been broken, in this case, by the used acid [43, 44]. It is worth remembering that the BET results for DSC-400/500 appeared lower when compared with other studies [45]. We believe that this situation was caused by the applied carbonization method. Temperature change and carbonization time, among others, create differences in the surface properties of the obtained AC [46]. It was thought that a slower heating ramp and/or the hold time should be reconsidered, if acids are not combined, to make the loss of mass disappear below 400 °C and 500 °C for DSC-400/500 samples.

Adsorption experiments

The MB adsorption capacity of prepared DSAC samples was evaluated under different conditions by varying, separately, the experimental parameters.

Effect of contact time

A closely study of the MB adsorption on DSAC samples involved the determination of the reaction time corresponding to the equilibrium state of saturation relative to the adsorbent by the adsorbate. As illustrated in the S9 of SI, a similar trend of MB adsorption was observed for all studied samples, although with different adsorption capacities. A rapid increase in the adsorption capacity is noted during the first 20 min and then a very slight increase to reach an optimum efficiency remaining approximately constant. The maximum quantity adsorbed of MB dye onto DSC-400 and DSC-500 samples has reached ⋍ 13 mg/g and, ⋍ 14 mg/g, while DSAC-P1 and DSAC-P2 showed higher values (⋍ 130 mg/g and ⋍ 120 mg/g) at equilibrium time of 120 min. The higher rates of sorption capacity at the beginning may be attributed to the presence of large number of accessible sites on the surface of all adsorbents. However, over time, the remaining available sites, first of all representing a small number, (i) are difficult to be occupied due a reduced ionic gradient between the liquid and solid phase (ii) the formation of repulsive forces between the MB molecules on the surface and those in the aqueous phase. As consequence, a decrease in the driving force for the transfer of dye molecules to the adsorbent and a plateau parallel to the t-axis is observed corresponding to the equilibrium state where the adsorption rate is equal to the desorption rate [47]. The MB dye adsorption capacities showed good correlation with the textural characteristics identified in SEM analyses and are in agreement with BET results.

Effect of adsorbent dose

The most efficient amount of adsorbent achieving a satisficing adsorption of a determined amount of MB was determined. The graph of S10 (SI) plots the evolution of the removal efficiency of MB as a function of the adsorbent mass for each sample. As can be seen, a similar pattern of MB adsorption behavior is observed for the acid-activated samples represented in two parts. An initial and gradual increase subsequently a saturation of the adsorption efficiency at rates depending on the sample nature. The graph relative to the calcined samples appears truncated. Samples DSC-400/500 did not reach the stage of total elimination due to their modest adsorption capacities. R% for DSC-400 and DSC-500 increases from ⋍ 7–8 to ⋍ 52–55% with an increase of the adsorbent mass from 0.05 to 0.4 g. In the other side, DSAC-P1 and DSAC-P2 showed higher adsorption capacities since it was only necessary 0.1 g to achieve a removal efficient of 100% indicating the saturation phenomenon [48]. Generally, the surfaces of most carbon-rich biochars are negatively charged and have a great capacity to adsorb cationic dyes [49]. The increase in the MB removal efficiency as a function of the mass of the adsorbent is due to the availability of more exposed free-surfaces and free adsorption sites of the adsorbents [50]. Beyond a critical mass, the number of accessible free sites becomes stable due to the lack of MB molecules. What's more, increasing the adsorbent dose could have negative impact since others authors stated a decrease in the equilibrium concentration. This could be attributed to the blocking of certain active sites on the adsorbent surface as consequence of a partial aggregation of the adsorbent particles at high concentrations [51]. Thus, this would reduce, in our case, the available surface area for MB adsorption. The chemically activated samples, with the higher adsorption capacities, were used in further characterizations to study the effect of the activation parameters as follows.

Effect of temperature

Various industrial dye effluents are produced at relatively high temperatures [52]. In this regard the effect of temperature on the removal efficiency of MB dye into the considered samples was investigated. The results (S11 of the SI) reveal an improvement in R% (from 77 to 90% for DSAC-P1, and from 72 to 85% for DSAC-P2) with the increase of the temperature from 25 to 55 °C. This is an affirmation of the endothermic nature of adsorption-associated reactions [54]. This effect can be explained by the fact that increasing temperature enables more kinetic energy to the adsorbed molecules facilitating their diffusion to the internal pores of the adsorbent by decreasing the viscosity of the solution [53]. The increase in adsorption capacities of adsorbents at higher temperatures may also be attributed, as reported by Demirbas et al. to the pore size enlargement [54]. Similar behaviors were reported for different activated carbon originated from different precursor [55, 56]. In the other hand, the variation in adsorption capacity between samples could be related to the difference in the textural properties as confirmed above. Indeed, the chemical reactivity of functional groups at the surface must as well be considered in the preferential uptake for adsorbate molecules by adsorbent [57].

Adsorption kinetics

In order to achieve a deep understanding of the MB adsorption kinetics, the experimental data was described by pseudo-first order (PS1) [58] and pseudo-second order (PS2) [59] models using Eqs. 3 and 4:

$$Q_{t} = Q_{e} \left( {1 - \exp \left( { - k_{1} \times t} \right)} \right)$$
(3)

here k1 (min−1) is the PS1 rate constant.

And

$$Q_{t} = k_{2} Q_{e}^{2} t/\left( {1 + k_{2} Q_{e} t} \right)$$
(4)

here k2 (min−1) is the PS2 rate constant. The parameters were calculated using the nonlinear fitting.

Fig. 3 shows the MB uptake by H3PO4 activated samples according to the PS1 and PS2 models together with the experimental data.

Fig. 3
figure 3

PS1 (a) and PS2 (b) kinetic curves for MB adsorption on H3PO4 activated samples calculated using Eqs. 3 and 4. Adsorbate concentration: 100 mg/L. Adsorbent dose: 0.06 g. Tests were carried out at RT (25 °C)

The parameters of both kinetic models are shown in Table 4. According to experimental data, the PS2 model was more suitable to describe the adsorption mechanism of MB for both adsorbents. The correlation coefficient values (R2) of PS2 was higher than the R2 values of PS1 and the calculated values of the adsorption capacities (Qe,cal) evaluated from PS2 fitted well with the experimental (Qe,exp) values.

Table 4 Kinetic constants of the PS1 and PS2 models for MB adsorption on H3PO4 activated samples

Error function models were applied to evaluate the compatibility of a model equation with the experimental data. In this direction, the coefficient of determination R2 along with several statistical error functions have been employed to determinate the best fitting equation: Chi-square (χ2), Sum of error squares (SSE) and the standard error (SE) are calculated using the following equations [60].

Coefficient of determination (R2):

$$R^{2} = 1 - \frac{{\sum {\left( {Q_{e,\exp } - Q_{e,cal} } \right)}^{2} }}{{\sum {\left( {Q_{e,\exp } - Q_{e,mean} } \right)}^{2} }}$$
(5)

Chi-square (χ2):

$$\chi^{2} = \sum {\frac{{\left( {Q_{e,\exp } - Q_{e,cal} } \right)^{2} }}{{Q_{e,cal} }}}$$
(6)

Sum of error squares (SSE) and the standard error (SE):

$$SEE = \left( {Q_{e,cal} - Q_{e,\exp } } \right)^{2}$$
(7)
$$SE = \sqrt{\frac{SSE}{N}}$$
(8)

with N the degrees of freedom.

The equal variance test is also used to determinate the best fitting isotherm model.

As can be seen in Table 5, kinetic error deviations correlated to the adsorption of MB dye on studied samples, exhibit higher Rm2 values and lower SEE, SE, X2 and F-values when the experimental data were modeled via the PS2 model proving the chemical reaction of dye adsorption [61].

Table 5 Kinetic error deviations according to the PS1 and PS2 models related to the MB dye adsorption on H3PO4 activated samples

Adsorption isotherms

The adsorption equilibrium data obtained for the MB adsorption onto DSAC were fitted with Langmuir and Freundlich isotherm models [62, 63]. The Langmuir equation is given in Eq. 9:

$$Q_{e} = \left( {Q_{m} K_{L} C_{e} } \right)/\left( {1 + K_{L} C_{e} } \right)$$
(9)

The Freundlich equation is given in Eq. 10:

$$Q_{e} = K_{F} C_{e}^{1/n}$$
(10)

here the values of maximum adsorption capacity Qmax (mg/g), Langmuir constant KL (L/mg), heterogeneity factor n and Freundlich constant KF (L/g) were calculated using the nonlinear regression [64].

Langmuir and Freundlich parameters are resumed in Table 6. The separation factor (RL), derived from the Langmuir model (Eq. 11), was employed to confirm whether the adsorption process is favorable (0 < RL < 1), reversible (RL = 1), unfavorable (RL > 1) or irreversible (RL = 0), where:

$$R_{L} = \frac{1}{{\left( {1 + K_{L} C_{0} } \right)}}$$
(11)

here C0 and KL have already been specified as the initial concentration of dye and the Langmuir adsorption constant. The calculated values of RL (Table 6), being between 0 and 1, demonstrate that the adsorption of MB onto H3PO4 activated samples is favorable. Also lower RL values mean that adsorption was more favorable at higher initial MB concentrations. On the other hand, the Freundlich constants KF and n are correlated to the intensity capacity and heterogeneity degree [63]. The obtained value of n (n > 1) would indicate a favorable adsorption conditions process. Nevertheless, we must not forget that the values of correlation coefficient (R2 = 0.927–0.934), in this case, are lower than the Langmuir isotherm values (R2 = 0.958–0.969).

Table 6 Langmuir and Freundlich adsorption parameters of MB dye on H3PO4 activated samples

Fig. 4 shows the MB uptake by H3PO4 activated samples according to the Langmuir and Freundlich models along with the experimental data. To evaluate the fit of isotherm equations to experimental data, the deviation error parameters (Table 7) were also determined. According to the results of Fig. 4, the Langmuir equation, rather than the Freundlich equation, provided a good mathematical model to describe the experimental adsorption equilibrium due to its relative higher correlation value (R2).

Fig. 4
figure 4

Langmuir (a) and Freundlich (b) adsorption isotherms of MB dye removal onto H3PO4 activated samples. Adsorbate concentration: 100–500 mg/L. Adsorbent dose: 0.06 g. Tests were carried out at RT

Table 7 Langmuir and Freundlich errors deviation associated to the adsorption of MB dye on H3PO4 activated samples

All the estimated error functions exhibit lower values for the whole range of experimental data. All results confirm that the Langmuir isotherm model provides a better fit to the measured data. According to this model, the surface is homogeneous, the adsorption is limited to a single molecular layer and the maximum amount of adsorption is reached at equilibrium [65]. Hence, the surface of our adsorbents must have a certain number of active sites with the same energy. Furthermore, the maximum adsorbed quantity of the adsorbent obtained by the Langmuir isotherm is slightly greater than that obtained experimentally (Table 6). It would mean that the considered adsorbents were not fully covered by dye and still has surface area for more adsorption.

Thermodynamics study of adsorption

Gibbs free energy change (ΔG), enthalpy change (ΔH) and entropy change (ΔS) thermodynamic parameters were employed to study the spontaneity of the MB adsorption process on H3PO4 activated samples under different temperatures. The slope and the y-intercept of lnKd versus 1/T graph (see S12 in the SI) give ΔH and ΔS values, taking into account the following equations [66]:

$$K_{d} = \frac{{Q_{e} }}{{C_{e} }}$$
(12)
$$\Delta G = - RT\ln K_{d}$$
(13)
$$\Delta G = \Delta H - T\Delta S$$
(14)

here Ce (mg/L), Qe (mg/g), Kd, R, and T are the liquid phase concentration at equilibrium, the adsorption capacity at equilibrium, the distribution coefficient, the gas constant and absolute temperature. As can be seen from Table 8, the negative values of ΔG (calculated from Eq. 13) mean a spontaneous adsorption process and reveal that an affinity between the adsorbent material and the dye could exist. In addition, the decrease of ΔG values means that the adsorption of MB is more feasible at higher temperatures as confirmed experimentally in the analysis above. ΔG values of DSAC-P1 sample, being lower than the DSAC-P2, demonstrate a highly suitable texture for the adsorption of more MB molecules when the mass ratio of “DS:H3PO4” 1:1 is used. In addition, the positive values of ΔH, being higher than 40 kJ/mol, suggest that the adsorption is a chemisorption process absorbing energy [67], while the positive values of ΔS reflect an increase in randomness at the adsorbent-adsorbate interface during adsorption. In fact, the molecules dyes, being in the liquid state, were in more ordered form than in the subsequent adsorbed state. As a result the energy distribution will increase with increasing adsorption resulting in a positive entropy value and an increased randomness [53]. The ability to retain dyes highly depends on the structure of AC, such as porous structure, crystalline structure, and chemical structure [68]. DSAC-P1/P2 presented a highly developed porosity (large surface area, pore volume) and a suitable surface chemistry allowing a high degree of reactivity for the adsorption compared to DSC-400/500.

Table 8 Thermodynamic parameters for the adsorption of MB on H3PO4 activated samples at different temperatures

The efficiency of DSAC-P1/P2 for the removal of MB dye is related to their large specific surface area which characterizes the chemically activated precursors samples [69]. These results have been corroborated by those presented in Table 3 and are in perfect harmony with the SEM analyses.

Comparison with others adsorbents

Table 9 compares the maximum MB adsorption capacities of various AC, derived from a variety of agricultural wastes reported in the literature, with our DSAC.

Table 9 Comparison of MB adsorption capacities of our H3PO4 activated samples with some literature adsorbents, from agricultural wastes

It should be noted here that the adsorbed quantities are obtained under different conditions (pH, T°, time holding; etc.) allowing the best adsorbance performances which are not necessarily identical, given the different nature of the precursors. The outcomes presented in this work places our acid-activated samples either at the same level or even higher than those of most natural adsorbents in matter of adsorbance performance. On the basis of the above studies, DSAC can be considered as highly suitable and effective adsorbents for practical applications in dye removal processes.

Conclusion

The aim of this study was to demonstrate the efficacy of using an agricultural waste as an adsorbent in removing MB dye from an aqueous solution. For this, date seeds were calcined and chemically activated using H3PO4 at different ratio/temperatures. Several experimental parameters such as adsorbent mass, reaction time, initial MB concentration, and temperature, were modulated to determine the optimum conditions and mechanism of MB adsorption on activated date seeds. The adsorption tests showed that the chemically activated samples possess higher adsorption capacity for MB compared to samples that were only subjected to thermal treatment. This improvement is mainly associated with a more adequate correction of the textural and compositional properties due to the chemical treatment suffered by the specific samples. In this sense, SEM images showed the presence of a well pronounced surface porosity. The EDS qualitative analysis indicated a compositional alteration of the adsorbents surface after the adsorption process explained by the presence of MB molecules. The experimental data showed that MB adsorption on activated date seeds samples followed the Langmuir isotherm and pseudo-second-order model, which fitted well to explain the associated equilibrium behavior. Furthermore, the values of thermodynamics parameters of MB adsorption indicated that adsorption-associated reactions are spontaneous, endothermic and more favorable at higher temperatures for all studied samples.

Therefore, activated date seeds have been proven to be eco-efficient and effective adsorbents for MB dye removal. Their adsorption capacity can be further improved through various surface modifications. Further research is needed to fully understand the mechanism of adsorption and to optimize the adsorption parameters for each specific sample.