1 Introduction

Clean and safe water is considered a fundamental resource for sustainable social and economic growth. Unfortunately, population growth, industrialization, urbanization, and widespread uncontrolled agricultural practices have a substantial impact on the quality of water resources. According to the report of Organization for Economic Co-operation and Development (OECD, 2017), the textile industry was reported to be one of the most water-intensive industries [1]. Moreover, a significant amount of harmful contaminants were observed being released simultaneously into the nearby lakes, ponds, and rivers together with these textile industrial effluents [2]. Wastewater being discharged from such companies has a significant negative impact on both humans and the ecosystem through the contamination of the surface water bodies, the groundwater, and the soil [3]. Water pollution can cause detrimental health issues for humans, where the root causes of numerous health issues, such as cancer, diarrhea, mutagenicity, and reproductive diseases, can result from exposure to these contaminants. Therefore, the treatment of polluted water to obtain healthy drinking water is a major issue that needs to be addressed [4, 5].

Although dyes are present in chemical wastes generated from the textile, food, pharmaceutical, paper, printing, leather, and cosmetic industries, the textile industry is mostly responsible for the majority of dye pollution due to the fact that 10–15% of the dyes used in the textile processing are being discharged into the environment [6]. This is mostly due to the weak bonding properties of the dye molecules onto fabric material. According to Nayeri and Mousavi’s study, the textile sector produces 637.3 million cubic meters of colored wastewater annually, which is discharged into receiving streams [7]. Dyes are colored molecules with a large proportion of organic matter and complex aromatic compounds, which makes them extremely resistant to biodegradation [8, 9]. Introducing colored wastewater into the ecosystem is a notable cause of eutrophication, esthetic pollution, and disruptions to aquatic life. In addition to this, thermal and photostability of dye in the environment resulted in absorption and reflection of sunlight which reduces photosynthesis process and interferences with the natural flow of food chain [4, 10,11,12]. Therefore, the inevitable impact of these pollutants necessitates treatment prior to discharge to the mainstream and causes environmental degradation.

Methylene blue (MB) is a cationic (basic) dye that is a green crystalline powder with the chemical formula of C16H18CIN3S and is easily soluble in water. It is the most widely used dye in the textile industries in the dyeing and finishing stage of processing paper, cotton, wool, silk, and leather, as well as for medicinal disinfectants. It is the most harmful, carcinogenic chemical that pollutes water and later has an impact on aquatic life and human ecology. In any case, it has been demonstrated that long-term exposure to MB increases the risk of cancer, heart attack, nausea, shock, skin sensitivity, and endocrine issues in people [13, 14]. MB-saturated wastewater has to be treated before it is discharged to water bodies since the treatment process is difficult once the receiving water body has become polluted [15]. However, the chemical stability and complexity of MB make it difficult to be effectively removed from industrial effluent by conventional wastewater treatment technologies such as preliminary, primary, secondary (or biological), and tertiary treatment methods [16]. Hence, the removal of contaminants of emerging concern (CECs), such as MB, from industrial effluents is becoming the subject of numerous studies.

Recently, advanced treatment methods like liquid extraction, reverse osmosis, electrocoagulation, membrane technology, chemical precipitation, photocatalytic degradation, and adsorption have been employed to remove dye molecules from industrial effluent [17, 18]. However, many advanced wastewater treatment techniques have downsides contrary to their remarkable dye decolorization capability. This includes producing lots of sludge, requiring a lot of power, costing a lot to operate and maintain, and leaving a lot of persistent chemicals after treatment. As a result, researchers are constantly exploring for low-cost, simple to use, and efficient wastewater treatment technologies to be used at an industrial scale [13, 15, 19]. Adsorption, a process in which liquid and gaseous pollutants adhered to the surface of a solid, stands out among advanced wastewater treatment technologies due to its low initial cost, long-term sustainability, adaptability, and simplicity of usage [10].

Commercial activated carbon is known for its remarkable adsorption capacity and removal efficiency. However, the sustainability, environmentally unfriendliness, and tedious preparation steps that followed in addition to being cost intensive limit its long-term application [20]. Nowadays, several locally available materials, like agricultural biomass wastes, which are generally thrown inappropriately, have recently come to light by a number of scholars as a potential alternatives for eliminating MB dye from industrial wastewater [21]. These biomass wastes include vermiculata plant [8], bamboo dust [22], pots Hydnocarpus pentandra fruit peel [23], atemoya peel [24], terrified rice husk [25], sugarcane bagasse [18], and Parthenium hysterophorus [14]. However, many of these biomass-based activated carbons have limitations including low removal efficiency and adsorption capacity in addition to demonstrating low adsorbent regeneration capacity. This necessitates a search for new locally and abundantly available biomass-derived precursor materials which are more economical, easily available, environmentally friendly, and highly effective. On the other hand, various researchers reported a maximum methylene blue adsorption capacity of 136.5 mg/g [26], 208.3 mg/g [27], 381.6 mg/g [28], 195.2 mg/g [29], and 200.7 mg/g [30]. In most of these studies, investigating the effects of adsorption parameters on the removal of methylene blue using the conventional “one parameter–at a time approach” has been tried. Although this approach is widely acceptable, it has a limitation in estimating the interaction effects between the factors and lacks a predictive capability [31]. Therefore, this paper reports the optimization of some significant methylene blue adsorption parameters using response surface methodology–Box-Behnken Design (RSM-BBD). This experimental design technique offers various advantages including a maximum amount of complex information [32], with minimum experimental time. In comparison with other statistical methods, such as full factorial design, it requires few numbers of runs which reduce cost [33]. Moreover, RSM-BBD avoids the analyses at their extreme combinations (such as at the highest and lowest levels) for which unsatisfactory results might occur [34].

Khat (Catha edulis), is a small evergreen, seedless, and drought-resistant plant that is grown mostly in the horn of Africa, particularly in Ethiopia. The leaf and young bud parts of khat are chewed daily by the adult population for its stimulation action. Once the leaf part is used on a targeted basis, the remaining khat stems are left as waste and disposed to the environment. This is most common in several areas in Ethiopia, predominantly around khat market areas, streets, and dumpsters. Accordingly, the khat wastes can be considered one of the major contributors to solid waste generation in the cities [35,36,37]. Utilizing these khat wastes as an adsorbent potential for the removal of dye from wastewater and the textile industrial effluent can be seen an environmentally sound and promising wastewater treatment technology [35]. Few studies are conducted so far on the preparation of the activated carbon from the khat waste like the one reported on the removal of fluoride from the groundwater with a maximum removal efficiency of 73% [35], for the removal of malachite green dye from aqueous solution with maximum removal of 98.8% [36], for garage wastewater treatment at maximum removal of 70% [37], and for removal of chromium from tanning wastewater with a maximum removal efficiency of 97.03% [38]. To the best of the authors’ knowledge, no study has been conducted on the removal of MB from aqueous solution or industrial wastewater utilizing khat stem–based activated carbon. Additionally, the regeneration and reusability of spent khat stem–derived activated carbon are unexplored. Therefore, this study involves the utilization of damped solid khat biowaste to develop an activated carbon using acid activation followed by the pyrolysis technique. Then, the developed adsorbent material was investigated for the removal of MB dye from both aqueous and textile industrial wastewaters. Furthermore, the regeneration and reusability of the adsorbent were also carried out to investigate the potential of khat stem based activated for MB decolorization.

2 Materials and methods

2.1 Textile wastewater sampling and characterization

A composite sampling method was used to take textile wastewater samples from Bole Lemi Industrial Park, which is located 17 km southwest of Addis Ababa city (latitude 9° 01′ 29″ and longitude 38° 44′ 48″). Polyethylene bottles were used to take an effluent sample from the factory’s outflow point as well as the point after treatment where it was discharged into the environment. The bottles were repeatedly cleaned with distilled water after being immersed in 10% HNO3. The wastewater samples were then taken to the laboratory of Addis Ababa Science and Technology University, where they were stored in a refrigerator at 4 °C until analysis studies for each physicochemical parameter were subsequently conducted. The characterization of physicochemical properties for the wastewater was conducted using the established procedures used for the study of water and wastewater after the equipment had been properly calibrated, as shown in Table 1. In every instance, triplicates of the analyses were run, and the outcomes were presented as average values [14, 39,40,41,42].

Table 1 Wastewater physicochemical parameters and their testing method

2.2 Preparation of adsorbent

Khat (Catha edulis) stem waste samples were collected from the dumping site at the large market of Addis Ababa called Merkato, which is locally named “Khat terra.” The collected sample was taken to Addis Ababa Science and Technology University for the subsequent development of the adsorbent material at the Laboratory of Environmental Engineering Department. The preparation of activated carbon was carried out according to [35,36,37], where the sample was washed multiple times with distilled water to remove any soluble impurities and other dust particles that adhere to the sample, which then was kept in an oven (model BOV-T50F, BIOBASE, China) at 105 °C for 24 h until it is completely dried to remove the moisture. After drying, the waste stems were cut down into small pieces, by a mechanical granulator (Hummer mill-008, STEDMAN, USA) to reduce size around 2–5 mm. Both chemical and thermal activation methods were employed during the activation process, where the chemical activation was carried out by using concentrated phosphoric acid (H3PO4, 85%) at an impregnation ratio of 1:1 (mass ratio of activating agent to dried khat stem) for 48 h in order to enhance the carbon structure and generate large specific surface area. The soaked sample was dried completely at 105 °C in an oven for 24 h until it was ready for thermal activation. Thermal activation of the sample was conducted by burning the khat stem at a temperature of 600 ℃ at a heat rate of 25 ℃/min for 1 h in a muffle furnace (Model Nabertherm F 330, Cole Parmer, Canada) in the absence of oxygen [2]. Then, after cooling to room temperature, the activated carbon was washed with distilled water several times to remove excess H3PO4 until the pH reaches neutral. Thereafter, the washed adsorbent was dried for 24 h in an oven at 105 \(^\circ{\rm C}\). Finally, the activated carbon was ground and sieved to a 125-µm particle size and kept in a polyethylene bag until it was used for adsorbent study and adsorption of MB dye from both real and synthetic textile wastewaters. Figure 1 shows images of the different stages employed during the development of the precursor material such as raw khat waste (I), reduced khat stem (II), grounded khat stem (III), phosphoric acid impregnated khat stem (IV), pyrolyzed khat stem (V), washing stage of khat adsorbent to remove H3PO4 (VI), and ready-made adsorbent (VII) [35,36,37].

Fig. 1
figure 1

The different development stages for the preparation of khat adsorbent

2.3 Characterization of adsorbent

2.3.1 Proximate analysis

The proximate analysis was implemented using methodologies developed by the American Society for Testing and Materials (ASTM), which have been used in various adsorption examinations. Therefore, the determination of the ash content, moisture content, volatile matter, and fixed carbon of khat stem adsorbent was computed by the thermal drying method using the proximate analysis [38, 43, 44]. Moisture content was determined by using 1 g of khat activated carbon which was weighed in to the crucible dish. Thereafter, the sample was placed in the oven at 105 °C for 24 h. Afterwards, it was allowed to cool in a desiccator at room temperature. Finally, the difference between the initial and final weight was used to calculate the moisture content from Eq. (1).

$${{\varvec{M}}}_{\mathbf{C}}(\mathbf{\%})=\frac{{{\varvec{W}}}_{1}-{{\varvec{W}}}_{2}}{{{\varvec{W}}}_{2}}\times 100$$
(1)

where W1 refers to the weight of the crucible plus khat activated carbon before drying, W2 indicates the weight of the crucible plus khat activated carbon after drying, and MC is the moisture content of the khat activated carbon.

On the other hand, the volatile matter of the adsorbent material was determined by weighing 1 g of the khat activated carbon into the crucible dish after which it was burnt in the muffle furnace at 900 °C for 7 min in the absence of atmospheric air. After cooling in the desiccator, the volatile matter of the khat activated carbon was calculated using Eq. (2).

$${{\varvec{V}}}_{\mathbf{M}}\left(\mathbf{\%}\right)=\frac{{{\varvec{W}}}_{1}-{{\varvec{W}}}_{2}}{{{\varvec{W}}}_{1}}\times 100$$
(2)

where VM (%) is the volatile matter of the khat activated carbon in percentage, W1 (g) is the weight of the khat activated carbon before heating the sample, and W2 (g) is the weight of khat activated carbon after heating.

The ash content of the prepared khat activated carbon was determined using ignition method, in which 1 g of khat activated carbon was weighed in a crucible dish and heated to 500 \(^\circ{\rm C}\) for 4 h in a muffle furnace. The sample was then put in the desiccator to prevent contamination and moisture absorption. Finally, the ash content was estimated by using the standard test method (ASTM D3175) and calculated using Eq. (3).

$${{\varvec{A}}}_{\mathbf{C}}\left(\mathbf{\%}\right)=\frac{{{\varvec{W}}}_{2}}{{{\varvec{W}}}_{1}}\times 100$$
(3)

where AC (%) is the ash content of the khat activated carbon in percentage, W1 (g) is the weight of the khat activated carbon before the heating process, and W2 (g) is the weight of the ash after the ignition process. Finally, the fixed carbon (FC) content of the khat activated carbon was calculated using Eq. (4) [14, 45].

$${{\varvec{F}}}_{\mathbf{C}}\left(\mathbf{\%}\right)=100-({{\varvec{M}}}_{\mathbf{C}}\mathbf{\%}+{{\varvec{V}}}_{\mathbf{M}}\mathbf{\%}+{{\varvec{A}}}_{\mathbf{C}}\mathbf{\%})$$
(4)

2.3.2 pH points of zero charge

The surface charge of the adsorbent becomes neutral when its pH reaches its pH point of zero charges (pHpzc). It is one of the most significant parameters used to describe variable-charge surfaces of the adsorbent [46]. pHpzc of the khat activated carbon was determined by the solid salt addition method described by a procedure similar to that reported elsewhere [47,48,49]. Accordingly, 0.5 g of khat stem–based activated carbon was mixed with 0.1 M NaCl in six 50-mL conical flasks. The pH value of the NaCl was adjusted using a pH meter from 2 to 12 (2, 4, 6, 8, 10, and 12) with the help of dilute 0.1 M NaOH or 0.1 M HCl solutions. The mixture was kept in orbital shaker for 48 h with 125 rpm shaking frequency for interaction at ambient temperature. Then, the solutions were filtered off and the adsorbent was separated and the final pH values of all solutions were measured. The pHpzc value was determined from a graph obtained by plotting the final pH as a function of initial pH where the pH final and pH initial curves overlapped [36, 50, 51]. When the pH of the solution is below the pHpzc, the surface of the khat activated carbon was positively charged and when the solution pH is greater than pHpzc, the surface of the khat activated carbon has become negatively charged [44].

2.3.3 Scanning electron microscope (SEM)

Scanning electron microscopy was used to examine the surface morphology of the prepared khat activated carbon at different resolutions. The SEM analysis was done for raw khat sample, adsorbent material before adsorption, and for the pollutant-loaded activated carbon after the process of adsorption to evaluate the surface topography of the adsorbent by using SEM machine (JCM-6000PLUS BENCHTOP SEM, JOEL, Japan). The investigation was carried out with a 20 µm resolution and a guaranteed capacity of 10 kV. The adsorbent sample was placed on the carbon tape and the machine was run at an 8-mm working distance. The SEM was operated at a probe current of 10 A and operating energy of 10 kV with a magnification of 1000 times [14, 48, 52].

2.3.4 Fourier transform infrared (FTIR)

Functional groups present in the adsorbent were identified using Fourier transform infrared (FTIR) (FT-IR spectroscopy, Perkin Elmer, USA). In this process, the adsorbent was mixed thoroughly with dry KBr at the ratio of 2:200 respectively. Formerly, the mixture of adsorbent and dry KBr was crushed in a mortar to yield a homogenous powder combination. Then, the powder was injected into a molder to produce a very fine plate. Finally, the adsorbent spectra were observed from 4000 to 400 cm−1 wavelength and FTIR data graphs were presented using OriginPro version 22 [16, 53].

2.3.5 Brunauer–Emmett–Teller (BET)

The BET method was used to calculate the specific surface area of raw khat sample and the activated carbon before adsorption and after adsorption. 0.5 g of the adsorbent sample was weighed and kept in three sample tubes, which was degassed for 1 h under vacuum at 200 °C. A surface area analyzer was used to compute the surface area based on the isotherms of adsorption and desorption of nitrogen gas at 700-mm atmospheric pressure. The adsorption of N2 gas on the surface of the adsorbent was improved by using liquid nitrogen at − 196.5 °C. The BET specific surface area of the adsorbent was then calculated using the partial pressure to saturated vapor pressure ( \(\frac{P}{{P}_{{\text{O}}}})\) ratio of the gas molecules at the same temperature [50, 54].

2.3.6 X-ray diffraction (XRD)

The crystalline structure of the khat activated carbon was determined by using X-ray diffraction (XRD). Specifically, XRD-X-ray tube cu40kv, 44 mA, Rigaku Ultima IV, was used for crystalline structure analysis of the prepared adsorbent. This instrument is a powerful non-destructive technique that identifies the existence of crystalline minerals in a given sample of the raw, before, and after adsorption adsorbent. The analysis was done under the following operating conditions: initialization power of 15 kV, 5 mA, and a fixed wavelength of 1.541 nm. Lastly, the crystalline structure of the adsorbent was determined based on the observed peaks [55].

2.4 Batch adsorption experiment

A 1 g of MB dye was dissolved in 1 L of distilled water to prepare a stock solution of 1000 mg/L. Then, appropriate dilutions have been made to this aqueous solution to get the desired concentrations of 50, 100, and 150 mg/L MB dye [14, 16, 52]. During the batch adsorption experiment, contact time, adsorbent dose, initial MB concentration, and pH of the solution with three levels were used as independent variables, whereas the MB dye removal was the response or dependent variable. The experimental factor values were assigned based on previous experimental investigations [35, 36, 40]. All the batch adsorption experiments were conducted preparing 100 mL of solution in a 250-mL conical flask at room temperature, where the pH of the solutions was adjusted to desired values using dilute 0.1 M HCl or 0.1 M NaOH. Finally, the mixture was stirred at 125 rpm in an orbital shaker for the desired period of time and the residual MB concentration was analyzed by UV–Vis spectroscopy (JASCO V-770, JASCO, Oceania) at the maximum 668 nm wavelength. For determination of the final MB dye concentration, the calibration curve was drawn using the concentration of 1, 5, 10, 20, 30, 60, 90, 120, and 150 mg/L of MB dye. Then, the Beer-Lambert equation was used to determine the residual dye concentration after adsorption [14, 40]. The linear regression model and response surface methodology were used to investigate the highest expected MB dye removal. The adsorption factors and levels are depicted in Table 2.

Table 2 Experimental design and the factors used in the adsorption process with their levels

The experimental design included four parameters with three levels and full factorial methods as presented in Table 2. There were 81 experimental runs combining upper, middle, and lower limits. However, by using response surface methodology of design expert (RSM), the number of experiments was set to 30 runs by the Box-Behnken Design (BBD) approach. The removal efficiency of MB dye from the aqueous solution and real textile wastewater was calculated using Eq. (5):

$${\varvec{R}}\left(\boldsymbol{\%}\right)=\left(\frac{{{\varvec{C}}}_{\mathbf{i}}-{{\varvec{C}}}_{\mathbf{f}}}{{{\varvec{C}}}_{\mathbf{i}}}\right)\boldsymbol{*}100$$
(5)

where R (%) represents the percentage removal of MB dye; Ci is the initial MB dye concentration (mg/L), and Cf is the final MB concentration (mg/L) after treatment. The amount of MB dye adsorbed on the khat activated carbon or the adsorption capacity (qe) of the adsorbent was also calculated by using the mass balance expression as (6)

$${{\varvec{q}}}_{\mathbf{e}}=\left(\frac{{{\varvec{C}}}_{\mathbf{i}}-{{\varvec{C}}}_{\mathbf{e}}}{{\varvec{m}}}\right)\boldsymbol{*}{\varvec{V}}$$
(6)

The equilibrium MB concentration is Ce (mg/L), the equilibrium adsorption capacity is qe (mg/g), the volume of solution is V (L), and the mass of the adsorbent utilized is m (g).

2.5 Adsorption kinetic studies

Adsorption kinetics primarily studies the adsorption rate between adsorbent and adsorbate and also the factors affecting the reaction rate. Adsorption kinetic study was carried out to ascertain the mechanism of adsorption processes; either they are physical or chemical processes. Kinetic curves provide information about the adsorption kinetic rate parameters [18, 56, 57]. In order to examine the adsorption mechanism of MB on khat adsorbent and to choose the best model, many models were anticipated to represent the experimental data of adsorption. However, the adsorption kinetic parameters were evaluated frequently using the pseudo-first-order and pseudo-second-order model. In the current study, the adsorption kinetics was done by varying the exposure time and keeping the other process parameter at optimum condition. Accordingly, the study was carried out at 15, 30, 45, 60, 75, and 90 min and the initial concentration of MB was 150 mg/L, pH of the solution was adjusted to 6, and an adsorbent dose of 0.2 g/100 mL was put into a 100-mL conical flask. The linear form of the pseudo-first-order and pseudo-second-order model is expressed by Eqs. (7) and (8) respectively [18, 25]:

$${\text{ln}}\left({q}_{{\text{e}}-}{q}_{t}\right)={\text{ln}}{q}_{{\text{e}} }-{k}_{1 }t$$
(7)
$$\frac{t}{{q}_{t}}=\frac{1}{{k}_{2}{q}_{{\text{e}}}^{2}}+\frac{t}{{q}_{{\text{e}}}}$$
(8)

where qt is the quantity of MB dye adsorbed per adsorbent mass (mg/g) at any time t (min), qe is the quantity of MB dye adsorbed per adsorbent mass (mg/g) at equilibrium, K1 is the pseudo-first-order rate constant (1/min), and K2 is the second-order adsorption rate constant (g/(mg min)). The kinetic rate constant, k, and qe for each model were calculated by plotting graph log (qe − qt) versus t for pseudo-first-order and t/qt versus t for pseudo-second-order models.

2.6 Adsorption isotherms

Adsorption isotherms were carried out to afford a basis for revealing adsorption behavior, for possible adsorption mechanism, and for estimating adsorption capacity and to describe how the adsorbate interacts with the adsorbent by providing a comprehensive understanding of the nature of the interaction [58]. To determine adsorption isothermal behavior, several models have been published in the literature; the most commonly employed models are Langmuir model and the Freundlich model. They are helpful to determine the maximum adsorption capacity of adsorbent for the given adsorbate. They differ in the basic assumptions and behavior of the adsorbent surface [59]. To evaluate the adsorption of MB dyes on the khat activated carbon, batch equilibrium approach was employed. The study of adsorption isotherm was evaluated using Langmuir and Freundlich models at initial MB concentrations of 50, 70, 90, 110, 130, and 150 mg/L at room temperature. Other parameters were kept at optimum condition; accordingly, 0.2 g of adsorbent dose was added distinctly to different concentrations of dye solutions in 100-mL conical flasks. The solutions were stirred at 125 rpm for an equilibrium time of 90 min and the solution was adjusted to pH of 6. The linearized form of the Langmuir isotherm was presented by Eq. (9) as follows:

$$\frac{1}{{{\varvec{q}}}_{\mathbf{e}}}=\frac{1}{{{\varvec{K}}}_{\mathbf{L}}\times {{\varvec{q}}}_{\mathbf{m}}}\times \frac{1}{{{\varvec{C}}}_{\mathbf{e}}}+\frac{1}{{{\varvec{q}}}_{\mathbf{m}}}$$
(9)

In Eq. (9), KL (L/mg) refers to Langmuir constant related to the affinity of binding sites and adsorption energy. Additionally, the dimensionless factor (RL) is used to estimate the Langmuir isothermal feasibility. This constant can be calculated using Eq. (10). Normally, the RL value for favorable adsorption should be between 0 and 1; for unfavorable adsorption, RL \(>\) 1. On the other hand, RL value of 1 and 0 suggests linear and irreversible adsorption processes respectively.

$${{\varvec{R}}}_{\mathbf{L}}=\frac{1}{1+{{\varvec{K}}}_{\mathbf{L}\times }{{\varvec{C}}}_{\mathbf{e}}}$$
(10)

The Freundlich isotherm linear mathematical equation is shown in Eq. (11).

$$\mathbf{log\;}{{\varvec{q}}}_{\mathbf{e}}=\mathbf{log\;}{{\varvec{k}}}_{\mathbf{f}}+\frac{1}{{\varvec{n}}}\mathbf{l}\mathbf{o}\mathbf{g\;}{{\varvec{C}}}_{\mathbf{e}}$$
(11)

where \({C}_{{\text{e}}}\) and \({q}_{{\text{e}}}\) are the MB concentration in the solution at equilibrium (mg/L) and the amount of MB compounds adsorbed per gram of khat activated carbon at equilibrium (mg/g). Additionally, \({q}_{{\text{m}}}\) (mg/g) is the maximum adsorption capacity of the adsorbent. Moreover, n indicates how favorable the adsorption process is, and KF (mg/g) (L/mg)1/n is the adsorption capacity of the adsorbent and represents the quantity of dye adsorbed onto activated carbon adsorbent for a unit equilibrium concentration.

2.7 Adsorption thermodynamic studies

The thermodynamic adsorption of MB upon khat activated carbon was analyzed from the viewpoint of energy. In any adsorption process, both energy and entropy considerations must be considered to determine whether the adsorption process will be spontaneous or not. The optimum MB adsorption conditions obtained in the BBD were employed to carry out the thermodynamic study. Thus, the thermodynamic study was conducted using 25, 35, 45, 55, and 65 \(^\circ{\rm C}\) at a shaking speed of 200 rpm. There are three essential parameters for thermodynamic study, namely, Gibbs free energy change (ΔG°), enthalpy change (ΔH°), and entropy change (ΔS°). ΔG° can be evaluated by applying van’t Hoff equation from Eq. (12). The other essential thermodynamic parameters are determined from Eqs. (13) to (15). By these parameters, the nature and the way of occurrence of the adsorption can be obtained [18, 25, 60].

$$\Delta {\varvec{G}}=-{\varvec{R}}{\varvec{T}}\mathbf{l}\mathbf{n}{{\varvec{k}}}_{\mathbf{c}}$$
(12)
$${{\varvec{K}}}_{\mathbf{C}}=\frac{{{\varvec{q}}}_{\mathbf{e}}}{{{\varvec{C}}}_{\mathbf{e}}}$$
(13)
$$\mathbf{ln\;}{{\varvec{k}}}_{\mathbf{c}}=\frac{\Delta {\varvec{S}}}{{\varvec{R}}}-\frac{\Delta {\varvec{H}}}{{\varvec{R}}{\varvec{T}}}$$
(14)
$$\Delta {\varvec{G}}=\Delta {\varvec{H}}-{\varvec{T}}\Delta {\varvec{S}}$$
(15)

where KC is the thermodynamic constant, R is the universal gas constant (8.314 J/mol∙K), and T is the absolute temperature (K). qe is the amount of dye adsorbed on the adsorbent at equilibrium (mg/L); Ce is the amount of MB dye concentration at equilibrium. The \(\Delta\) G is the Gibbs free energy change (kJ/mol); \(\Delta\) S is the entropy change (kJ/mol∙K), and \(\Delta\) H is the enthalpy change (kJ/mol). From the plot between ln kc and 1/T, the value of ΔH and ΔS was calculated from the slope and intercept obtained.

2.8 Regeneration and reusability

Currently, various regeneration techniques have been investigated, such as thermal regeneration, chemical methods, electrochemical, microbiological regeneration, and microwave-assisted regeneration. The two most commonly and frequently used adsorbent regeneration techniques are thermal and chemical regeneration [61, 62]. In thermal regeneration, the heat is applied to the saturated adsorbent to provide sufficient energy to repel the adsorbates. However, thermal regeneration of spent adsorbent usually results in a lower carbon yield and ash generation. This in turn leads to a negative effect of adsorbent regeneration. Ashes are generated during the thermal treatment which usually blocks the pores and covers the carbon surface [63]. On the other hand, chemical regeneration utilizes reagents like a solvent, supercritical, NaOH, electrochemical, and oxidative to recover the adsorbents [61, 63, 64]. Therefore, in this study, a chemical regeneration method was used to overcome the limitations of thermal regeneration. The spent adsorbent from the adsorption treatment of MB from textile wastewater was regenerated by NaOH chemical activation. In this process, the spent adsorbent was placed in NaOH 0.1 M solution and shaken for 2 h to achieve complete desorption. Then, the adsorbent was added to 100 mL of MB solution with a concentration of 150 mg/L. The reusability of the khat adsorbent for MB dye removal was studied similarly to the batch adsorption studies. After the experiment, the solutions were decanted. The adsorbents were filtered, washed with distilled water, and then dried in an oven for 3 h at 100 °C. This was carried out up to five cycles [65, 66]. The percentage of MB removal was determined using Eq. (5).

2.9 Data analysis

The analysis was used for the assessment of physicochemical parameters of the textile wastewater as well as for proximate analysis of the developed adsorbent. The adsorbent was analyzed using engineering materials like XRD, SEM, and FTIR and the experimental data graphs were presented using OriginPro version 22 and by response surface methodology (RSM) design expert software version 13.

3 Results and discussion

3.1 Textile wastewater characteristics

The results of the wastewater parameter characterization are as shown in Fig. 3. The values for the analysis result for the most parameters show that the textile wastewater contains a significant level of contaminant load. Uncontrolled discharge without treatment of such polluted wastewater poses risk both to human and the environment. The average temperature of the effluent was found to be 24.50 \(^\circ{\rm C}\), which is far below the guideline limit of Ethiopian textile effluent, 40 \(^\circ{\rm C}\) [48]. From the temperature perspective, the effluent is out of harm’s way to be drained into the receiving water bodies without any treatment (Table 3).

Table 3 Physicochemical characterization of textile wastewater

Basically, the increase in temperature of industrial effluent will reduce the solubility of oxygen in water and magnify the odor formation as a result of anaerobic reactions [67]. The temperature also affects chemical and biological reactions in water [68]. An average pH value of the effluent was found to be 9 which shows that the wastewater was typically alkaline possibly because of the dyeing and printing process and is far beyond the permissible discharge limit of Ethiopian textile effluents. This basic feature of wastewater has an influence on the biological activities as well as chemical reactions in water bodies. Effluents from other textile and dye industry of around the same pH values, which were alkaline in nature, were reported by [69].

The raw textile wastewater from Bole Lemi Industrial Park was analyzed for its BOD5 and COD to have the average values of 200 and 360 mg/L, respectively, where such BOD5 and COD levels were above the Ethiopian industrial acceptable discharge limits of 60 and 250 mg/L, respectively. The remarkable increase in COD levels compared with BOD5 also suggests the presence of toxic contaminants like dyes which are highly resistant to biological degradation [14, 48]. Over and above, the ratio values of BOD5 to COD of textile effluent were determined to be 0.54, which indicates that the biological treatment of the effluent is not feasible. Therefore, it is evident that another treatment technology has to be required rather than biological treatment [48]. In addition, the effluent contains a total solid matter of 328.74 mg/L, which is far too high to be discharged into the environment without treatment and can cause turbidity and reduce transparency in water bodies, disturbing natural aquatic ecosystems. Furthermore, such high total solid concentrations have a considerable contribution on depletion of dissolved oxygen.

In the present study, the conductivity of the textile effluent was analyzed to be 24.7 mS/cm, which is far above the standard limit set by the WHO, 12 mS/cm, indicating that such a significantly high conductivity generates unfavorable environment conditions for the aquatic biota (WHO 2012). Electrical conductivity helps to determine the salinity, ionic strength, and major solute concentration of water or wastewater. Water with high electrical conductivity affects the soil structure, its permeability, and suitability for irrigation [70, 71].

The raw textile wastewater sample was analyzed for its dye concentration (MB dye concentration) and it was found to have a dye concentration of 90 mg/L. Based on EPA, color is a measure of the dissolved coloring compounds in water. The color of water is attributed to the presence of organic and inorganic materials. Thus, the effluent was highly colored indicating high content of different dyes. From the findings, it can be concluded that all the parameters are of higher value compared to the standards prescribed by Ethiopian industrial acceptable discharge limits. Therefore, the textile industrial wastewater has to be intensively treated before it is discharged into the receiving water bodies.

3.2 Adsorbent characterization

3.2.1 Proximate analysis

The moisture content of the adsorbent, ash content, volatile matter, and fixed carbon content were examined, and the results are presented in Table 4 as mean values.

Table 4 Proximate analysis result of khat adsorbent after treatment with phosphoric acid

It can be seen that the proximal value was low, proving that the inorganic content was little and the fixed carbon content was high. Non-volatile carbon is referred to as fixed carbon in this study, whereas the ash content mostly provides information about inorganic components connected to the adsorbent [14, 48]. The high ash content is not favorable for activated carbon development, which resulted in low carbon content lowering the adsorption capacity and efficiency. Hence, adsorbent development with low ash content is one of the critical concerns of scientists and researchers working on water and wastewater purification processes through adsorption treatment technology [46, 48]. The analyzed fixed carbon content for the developed khat activated carbon (59.60%) was observed to be greater than the ones reported by Fito et al. (2019) (47.15%) [35] and Bayisa et al. (56.53%) [38]. Low volatile matter content indicates the existence of methane, hydrocarbons, hydrogen, carbon monoxide, and incombustible gases like carbon dioxide and nitrogen in the adsorbent [14]. In this specific study, the moisture content was obtained to be in agreement with the one reported by Sime et al. (2023) [52]. According to many scholars, adsorbents with high fixed carbon, low moisture, low volatile matter, and low ash content are recommended for adsorption activities [15, 52, 70].

3.2.2 pH point of zero charge (pHpzc)

As indicated in Fig. 2, pHpzc of the developed adsorbent was found to be 4.80. When the pH of the adsorbent equals to its pHpzc, there is an equal amount of positively and negatively charged surface. A nearly similar result was reported for various activated carbons synthesized from different raw materials. For instance, the pHpzc of commercial AC powders (ACS25) is 5.00 [72], the pHpzc of Rumex abyssinicus is 5.03 [48], and the pHpzc of granular activated carbon is 4.89 [73]. The pHpzc finding indicates that the majority of the surface of the khat stem–based activated carbon is negatively charged since the adsorbent surface above pH of 4.80 is dominated by negative charge. This condition creates a huge opportunity for the adsorption of cationic dyes like MB which are effectively adsorbed at negatively charged adsorbent surfaces. Moreover, the maximum MB removal efficiency of 99.86% recorded at pH 9 supports the pHpzc concept which states the suitability of negatively charged surfaces for adsorption of cationic pollutants.

Fig. 2
figure 2

pH point of zero charge for khat-based adsorbent

3.2.3 FTIR analysis

The developed khat-based adsorbent was found to have several functional groups participating during the adsorption of MB from textile wastewater. It can be seen from Fig. 3 that six clear peaks were observed in raw khat sample and before adsorption. However, the number of peaks was reduced to four clear peaks for the pollutant-loaded adsorbent after the process of adsorption. The spectra of broad bands at the wavelength of 3664 and 3423 cm−−1 shows the presence of hydroxyl functional groups (-OH), stretching vibration of cellulose hemicellulose and lignin, and a less broad amine groups (NH and NH2) on the adsorbent surface [46]. The C–H asymmetric stretching of the methyl group (–CH2) and (–CH3) resulted in the peak at the wavelength of 2919 cm−1. The peaks found around 1723.6 and 1640 cm−1 wavelength are typically represented by a very strong stretching of ketones, aldehydes, lactones, or carbonyl groups (C = O). On the other hand, the aliphatic functional groups and the C–O single bond of the ester and acid group on the khat adsorbent are shown at a bands of (1429.4 and 1172.8) cm−1 due to bending vibration, and the peak band around (692 and 529) cm−1 is attributed to the carbon–carbon double bond aromatic group like alkene, which are stretching vibrations [52]. Finally, 524 cm−1 reveals the stretch function of H3PO4 [74], confirming H3PO4 impregnation on the surface of biochar. Figure 3 reveals the assigned wavenumber of khat adsorbent after adsorption treatment, which is different from the one for the raw khat sample and for the precursor material before the adsorption process. Many of the spectra peaks had been shifted after adsorption; that indicates MB is loaded on the surface of khat adsorbent which is due to multiple functional groups on the surface of activated carbon. Overall, the FTIR analysis indicated shifting, diminishing, and formation of various functional groups. These FTIR characteristics are an indication of the formation and breaking of bonds during pyrolysis, chemical activation and after adsorbent was loaded by MB.

Fig. 3
figure 3

FTIR analysis result for khat activated carbon of raw khat sample, khat based-adsorbent, and MB-loaded adsorbent after adsorptive treatment

3.2.4 Surface morphology analysis

The surface morphology of the developed khat adsorbent was determined using a scanning electron microscope (JSM-6380A JEOL Japan). The images of the SEM analysis of raw material, the developed khat-based adsorbent, and pollutant-loaded adsorbent after the processes of adsorption are depicted in Fig. 4A, B, and C respectively. The scanning of the surface of the developed khat-based adsorbent was conducted at a resolution of 20 μm and magnification of 1500 times. The surface of the developed khat-based adsorbent was observed in the micrograph with a lot of cracks, cavities, holes, and voids and highly heterogeneous that was dispersed irregularly throughout the whole surface. Furthermore, chemical activation by H3PO4 and thermal activation at high temperature (600 \(^\circ{\rm C}\)) results in escaping of volatile matter inside the microstructure of the particles. This process creates voids on the surface of the adsorbent that eventually become pores. These characteristics can create a huge opportunity to enhance the active sites that facilitate the penetration of the MB adsorption onto the external and internal structure of the adsorbent [14]. Compared to the raw khat stem micrograph, the activated carbon derived from khat stem waste was found to be porous and irregular in shape. This is due to the thermal and chemical activation carried out to increase the porosity and specific surface area of the adsorbent thereby enhancing the adsorption of MB. On the other hand, the MB-loaded adsorbent material becomes less porous and more regular compared to the activated carbon before adsorption. This is mainly due to the attachment of the MB molecules onto the porous and holes of the activated carbon, indicating successful adsorption of the intended pollutant. Previously conducted studies showed similar findings [16, 46, 75].

Fig. 4
figure 4

SEM image of khat-based activated carbon, khat raw sample (A), before (B), and after (C) adsorption treatment

3.2.5 Crystalline structure analysis

The crystalline structure of khat-based adsorbent analysis was investigated to determine whether the structure of the adsorbent surface is crystalline or amorphous by using the X-ray diffraction system. Figure 5 shows the findings of the X-ray diffraction pattern of khat adsorbent. The XRD spectrum ranges over a 2θ angle from 10 to 80°. The pattern shows that the general part of the material (raw, activated, and after adsorption) structure is amorphous. However, there is a place where a significant peak was observed at scattering angle of 22.12, 23.96, and 24.06 for raw khat sample, khat-based activated carbon, and pollutant-loaded adsorbent after the adsorption process, respectively. These peaks imply the presence of NaCl. The presence of single peaks in an amorphous material was attributed to the naturally assimilated NaCl solution by the plant and mainly attributed to NaOH and HCl solutions that produce NaCl due to neutralization reactions during the pH adjustment. These peaks showed slight increase from raw to after adsorption indicating the rising concentration of NaCl along the phase. These outcomes are quite similar to those observed by Fito et al., in which peaks of Mn‑Ni ferrite nanocomposite material emerged at 24.5° and 44.5° [76]. From this result, it can be generalized that the khat stem material is suitable for the preparation of adsorbents.

Fig. 5
figure 5

The XRD spectrum of khat-based adsorbent for raw, before, and after adsorption

3.2.6 Surface area analysis

The specific surface area of the adsorbent was analyzed with nitrogen adsorption–desorption at 76.8K using a Horiba surface area analyzer with model number SA9603 (USA). The samples were degassed at 300 \(^\circ{\rm C}\) for 1 h before analysis. Accordingly, the specific surface areas of the khat adsorbent, before and after the adsorption process, were 1323.3 and 812.9 m2/g respectively. The BET analysis shows that the specific surface area of the khat stem before activation was zero. However, after chemical activation by using H3PO4 and thermal activation, the surface area of the material increased from zero to 1323.3 m2/g. This raise in specific surface area is attributed to the removal of volatile matter and the moisture content from the waste material and the formation of more pore openings in the adsorbent surface. After the treatment process, the MB molecules adsorbed onto the adsorbent; hence, the surface area of the adsorbent decreased to 812.9 m2/g. This might be due to the occupation of the active sites by the MB. The outcome of this surface area was high which makes the adsorbent material applicable for the treatment of water and wastewater in large-scale industry. The surface area of this khat stem material is approximately 2.035 times activated carbon developed from corn cobs [52], 1.890 times compared to the leave of Cordia Africana [74], 1.66 times activated carbon derived from Eichhornia crassipes [77], and 1.142 times chemically modified biochar derived from bamboo sawdust [46]. This surface area is, therefore, greater than that of many carbon-based adsorbents reviewed in this paper, agreeing with the adsorption of different pollutants from wastewater or aqueous solutions, whereas the surface area of the khat adsorbent decreased by 1.783 times compared to activated carbon developed from the Rumex abyssinicus plant [16].

3.3 Optimization of MB adsorption

The BBD of the response surface methodology was used to study the removal of MB dye from synthetic textile effluent, and the results of the batch adsorption experiments are tabulated as shown in Table 5. The highest percentage of removal was determined to be 99.86% at the optimum adsorption conditions of initial MB concentration of 150 mg/L, pH 6, adsorbent dose of 0.2 g/100 mL, and contact time of 90 min in aqueous solution. The batch removal experiment with thirty runs under different reaction conditions proved that the percentage removal efficiency for MB ranged from 87.32 to 99.86% and the highest percentage of removal was determined to be 99.86% at the optimum adsorption conditions of initial MB concentration of 150 mg/L, pH 6, adsorbent dose of 0.2 g/100 mL, and contact time of 90 min in aqueous solution.

Table 5 Results of batch adsorption experiment

The maximum removal efficiency achieved was discovered to be significantly higher than the 73% reported by [35], who used khat adsorbent to remove fluoride from ground water at the optimal conditions of 1.5 g in 100 mL, 60 min of contact time, and pH 2. The other study conducted by [40] used the same adsorbent to remove chromium, but it was less effective than this study with the maximum removal efficiency of 90% at the optimum parameter of pH 2, contact time 90 min, adsorbent dose was 90 g/L, and initial chromium concentration of 100 mg/L.

The adsorption performance decreased from 94.02 to 87.32% when the pH was changed from the alkaline pH (9), at the upper level, to the acidic pH (3), at the lower level at constant optimum values of the other parameters. On the other hand, the concentration of MB in real wastewater, which was determined to be 90 mg/L and is nearly equal to the middle level (100 mg/L) of the pollutant concentration in the synthetic wastewater, was taken into consideration when the upper and lower levels (50 mg/L and 150 mg/L) of contaminants in the synthetic wastewater were determined. The removal of the contaminant MB from the two types of wastewaters was determined to be 99.86% and 89.13% at the optimum adsorption parameters. Such a decrease in removal efficiency when dealing with real wastewater was mostly caused by competition between various ions for the adsorbent’s active site. As analyzed from the tabulated experimental data, the overall MB removal efficiency decreased from 99.62 to 95.03% when the initial concentration of MB was raised from 50 mg/L to 150 mg/L while keeping the other variables constant (pH = 9, contact period of 90 min, and adsorbent dosage of 0.2 g/100 mL). This shows that removal efficiency decreases at constant adsorbent dose and specific surface area when the pollutant concentration exceeds ability of the adsorbent to remove it. This is because a given amount of adsorbent has a finite capacity to remove pollutants. On the other hand, a change in the adsorbent dosage from 0.2 to 0.1 g/100 mL when the other three parameters were kept at their optimum values resulted in a drop of removal efficiency by 3.98%. More importantly, this suggests that a number of active sites for pollutant adsorption are directly proportional with adsorbent dose. Finally, pollutant removal efficiency increases directly with adsorbent dosage, pH, and contact time. However, increasing the initial MB concentration and further increase of adsorbent dose decrease removal efficiency due to the excessiveness of the pollutant beyond the capacity of the adsorbent and excessive application of adsorbent beyond the optimum required dosage, respectively.

3.4 Analysis of variance (ANOVA) and fit summary

The analysis of the variance (ANOVA) depicted in Table 6 presents the significant interactive model contribution at p-value < 0.05 and the analysis was done by Fisher’s F-test. The model F-value of 542.91 implies the model is significant for MB dye removal and there is only a 0.01% chance that a model F-value of this large could occur due to noise. The probability of model F statistic value was < 0.0001 indicating that the model suggested by the software was highly significant. In this study, pH (A), initial dye concentration (B), adsorbent dose (C), contact time (D), the interaction between pH and initial dye concentration (AB), the interaction between pH and adsorbent dose (AC), interaction between pH and contact time (AD), the interaction between initial dye concentration and adsorbent dose (BC), the interaction between initial dye concentration and contact time (BD), and interaction between adsorbent dose and time (CD) are significant model terms. However, model terms with p-values \(>\) 0.1000 are considered to be not significant, where, in this specific study, all the model terms were found to be significant. The non-significant value of lack of fit (F-value of 32.79) for the model showed that the developed model is valid.

Table 6 Analysis of variance (ANOVA) for MB removal

3.5 Development of mathematical model

The response surface methodology coupled with the Box-Behnken approach was used to develop the mathematical model which in turn used to make prediction about the response variable as well as identify the relative impact of the factors by comparing the factor coefficients. Consecutively, the interactive model is found to express the experimental data better compared to linear and quadratic regression models. Moreover, the discrepancy between adjusted R2 (0.9945) and predicted R2 (0.9916) is insignificant inferring the suitability of the model to represent the removal efficiency of MB from textile industrial wastewater. On the other hand, variables whose coefficients are positive are found to have encouraging effect on the dye removal efficiency whereas those having negative coefficients negatively affect the removal efficiency. Consecutively, pH, adsorbent dosage, contact time, linear interaction of pH and MB dye concentration, linear interaction of initial MB dye concentration and adsorbent dosage, and linear interaction of MB concentration and contact time were found to have positive impact on the removal efficiency. On the other hand, pH, linear interaction of pH and adsorbent dosage, and linear interaction of pH and contact time were those factors negatively affecting the treatment. In this particular study, all the quadratic terms are found insignificant showing those factors are not used to build the model equation that represents the treatment efficiency hence excluded from the coded model. The relative impact of the significant factors on the MB removal efficiency can be expressed as B > BD > D > C > AC > AB > CD > AD > BC > A as shown in Eq. (16).

$$\mathrm R\mathrm e\mathrm m\mathrm o\mathrm v\mathrm a\mathrm l\;\mathrm e\mathrm f\mathrm f\mathrm i\mathrm c\mathrm i\mathrm e\mathrm n\mathrm c\mathrm y\;(\%)=96.73+0.8503\;\mathrm A-2.14\;\mathrm B+1.66\;\mathrm C+1.82\;\mathrm D+1.35\;\mathrm{AB}-1.38\;\mathrm{AC}-1.11\;\mathrm{AD}+1.10\;\mathrm{BC}+1.95\;\mathrm{BD}-1.23\;\mathrm{CD}$$
(16)

3.6 Interaction effects on the MB removal efficiencies

3.6.1 Adsorbent dosage and pH

The interaction effect of pH and adsorbent dosage on MB removal was studied at the different levels of solution pH from 3 to 9 and adsorbent dose of 0.1 to 0.2 g/100 mL as shown in Fig. 6 in a 3D graph plot. The interaction effect of the adsorbent dose and pH was observed to have a positive interaction effect on the removal efficiency of MB. At constant initial dye concentration of 100 mg/L and a contact time of 60 min, the removal efficiency ranged from 90.5 to 99% with the interaction of adsorbent dose and pH being considered between their upper and lower levels. The maximum MB removal efficiency of 99% was attained at the optimum interaction parameters of pH of 6 and an adsorbent dose of 0.2 g/100 mL. Generally, from the graphical illustration, it is obvious that MB removal efficiency was enhanced with the increase of pH and adsorbent dosage. An increase of removal efficiency together with adsorbent dose was observed which is due to high availability of active sites of the adsorbent. On the other hand, a further increase in the adsorbent dose above the optimal level, however, will result in a drop in removal efficiency and will not be cost-effective. This result is in good agreement with the result reported by Fito et al. where the interaction effects of adsorbent dosage and pH of the solution were found to have positive effect on MB removal using Rumex abyssinicus plant [16].

Fig. 6
figure 6

Interaction effect of pH and adsorbent dosage on MB removal

3.6.2 Dye concentration and pH

Figure 7 depicts the 3D response surface plot at constant adsorbent dosage of 0.15 g/100 mL and contact time of 60 min in which the interaction between the solution pH and the initial dye concentration was investigated. The interaction of the two parameters shows that maximum removal efficiency of 99% was recorded at the optimum interaction parameters of initial concentration of 50 mg/L and the solution pH of 6 and the interaction effect was observed to have a negative impact on the removal efficiency of MB. This becomes evident by the fact that adsorbents have a set number of active sites that are saturated at a specific concentration [48]. It was depicted on the 3D model that an increase in pH from 3.0 to 9.0 was accompanied with an increase in removal efficiency even at the highest initial dye concentration. The findings of same trend were also reported by Sime et al. [52].

Fig. 7
figure 7

Interaction effect of initial dye concentration and the solution pH on MB removal

3.6.3 Dye concentration and contact time

The interaction effect of dye concentration and contact time was found to have negative impact on the percentage removal efficiency of MB as demonstrated in Fig. 8. According to the 3D model, an increase in contact time was seen to have a positive impact on dye removal efficiency even at the highest level of the initial dye concentration. In contrast, the initial MB dye concentration was observed to have a negative impact on removal efficiency. The maximum MB removal efficiency of 99% was recorded by the interaction effect of dye concentration and pH at the optimum interaction parameters of contact time, 90 min, and an initial dye concentration of 50 mg/L. Additionally, it was demonstrated on the 3D model that a longer contact time favors MB’s percentage removal efficiency at a given initial dye concentration that is fixed. Overall, it was determined that the results of this investigation were in good accord with those published by Fito et al. who employed Parthenium hysterophorus–based activated carbon as an adsorbent material [14].

Fig. 8
figure 8

Interaction effect of contact time and initial dye concentration on MB removal

3.6.4 Initial dye concentration and adsorbent dose

At constant pH 6 and contact time of 60 min, the interaction effect of adsorbent dosage and initial dye concentration on the removal efficiency was as presented in Fig. 9 in the form of 3D model. It was demonstrated that the interaction effect of initial dye concentration and the adsorbent dose was positively significant and additionally, it was demonstrated that, when the initial dye concentration was increased from 50 to 150 mg/L, the MB removal efficiency decreased from 99 to 42.8%, which might be due to the lack of the required number of active sites for MB adsorption. Similarly, with the increase in the adsorbent dosage from 0.1 g/100 mL to 0.2 g/100 mL, the dye removal efficiency also increases from 87.1 to 99.8% while keeping the original dye concentration at 50 mg/L. The enhanced removal of MB at the higher adsorbent dose was due to higher active sites for MB adsorption. However, such higher removal efficiency by using excessive adsorbent does not necessarily imply that the adsorption capacity is at its maximum capacity. Finally, the interaction effects of the initial dye concentration and adsorbent dosage on the removal efficiency were also reported by Fito et al. in a similar manner [78].

Fig. 9
figure 9

Interaction effect of adsorbent dosage and initial dye concentration on the MB removal efficiency

3.6.5 Adsorbent dose and contact time

The common effect of the adsorbent dose and contact time on the removal of MB is explored, and the sketch of interaction is shown in Fig. 10. On the 3D view of the response surface plot, it was seen that the interaction between adsorbent dose and contact time had positive effect on the removal efficiency. Throughout this interaction assessment at a contact initial dye concentration of 100 mg/L and a solution pH of 6, the maximum MB removal of 99.5% was determined and according to this investigation, the removal of MB was observed to increase with contact time and adsorbent dose. This is may be due to the availability of more active sites with adsorbent dose increment and enough time for better contact between adsorbent and adsorbate, However, further increase in adsorbent dose beyond the optimum will not be economical [16].

Fig. 10
figure 10

Interaction effect of adsorbent dose and contact time on MB removal

3.6.6 Contact time and pH

The 3D view of the response surface in Fig. 11 shows the interaction effect among contact time and solution pH on the removal efficiency. The response surface depicts that the percentage removal efficiency increases with contact time. The interaction was assessed keeping initial dye concentration and adsorbent dosage at 100 mg/L and 1.5 g, respectively. The 3D view demonstrates that removal efficiency was highly favored with an increase of both the solution pH and contact time. Thus, the removal efficiency was positively influenced by contact time and solution pH. The maximum removal efficiency under the interaction effect of the two parameters was found to be 98% at a contact time of 90 min and solution pH = 6, which was supported by the interactive regression model. In addition to this, the p-value for these two interacting parameters was recorded to be less than 0.05. It shows that the interaction was statistically significant (i.e., p < 0.05). It can be analyzed from the 3D model that a change in solution pH from 3 to 9 with a simultaneous drop-in contact time from 90 to 30 min negatively affects the removal efficiency making it drop from 98 to 86%. In a similar manner, an increase in pH from pH 9 to 3 with a simultaneous decrease in contact time end up with drop of removal efficiency, which shows the superiority of pH in influencing the removal efficiency.

Fig. 11
figure 11

Interaction effect of contact time and pH on MB removal

3.7 Adsorption isotherm

Langmuir and Freundlich models, which are the most often used isotherm models to describe the adsorption mechanism, were employed to study the distribution of pollutant MB molecules on the surfaces of the khat adsorbent. These two models were used to determine the homogeneity or heterogeneity of the adsorbent’s surface [79]. Furthermore, the adsorption constants for the Langmuir and Freundlich isotherm models were determined using the method of linear regression. In this particular investigation, the isothermal experiment was carried out using the optimum process parameters of adsorbent dose 0.2 g/100 mL, pH 6, contact time 90 min, and initial MB dye concentrations 50, 70, 90, 110, 130, and 150 mg/L at room temperature. The plot is presented in Fig. 12A and B. In Table 7, more isotherm data are presented. The dimensionless equilibrium parameter (RL) value was 0.020 for the ideal initial MB concentration of 150 mg/L. Consequently, the RL value was between 0 and 1 (0 < RL < 1). This demonstrates that the method is effective [48]. The Langmuir and Freundlich isotherm models have correlation coefficients (R2) of 0.992 and 0.95, respectively.

Fig. 12
figure 12

Freundlich (A) and Langmuir (B) isotherm models

Table 7 Parameters of the Langmuir and Freundlich isotherm models for MB dye adsorption on khat adsorbent

As a result, predictions of Langmuir isotherm model for the adsorption showed a good level of agreement with the experimental data (R2 = 0.992), which was quite close to one, indicating that the adsorption process was monolayer-based and the attachment was presumed to be chemisorption. The slope (1/qmax) of the linearized Langmuir equation was used to calculate the maximum adsorption capacity of the adsorbent (qmax) from the plot of 1/qe vs 1/Ce. Thus, the qmax value of 97.84 was discovered. Similar to this, the intercept of the graph (1/(qmax KL)) was used to compute the Langmuir constant (binding energy constant, KL), and 0.320 was the resulting value. The intercept of the Freundlich equation was used to compute the value of Kf, and a result of 26.33 was obtained. Similar to this, the n value was determined from the slope of the linearized equation, providing an n value of 2.046. The linearized form of the Freundlich isotherm had an R2 value of 0.95. Based on the results of this investigation, the Freundlich model predicts a lower value (R2 = 0.95), whereas the Langmuir model predicts a high value (R2 = 0.992) for the adsorption of MB on khat adsorbent.

Table 8 compares the performance of activated carbon obtained from different agricultural wastes to that of khat as an adsorbent. The qmax of the khat adsorbent used in this investigation for MB adsorption was found to be comparable to that of earlier studies. The maximal agricultural waste–based adsorbent adsorption capacity for MB was tested under a variety of operational parameter circumstances, including pH of the solution, exposure period, initial dye concentration, and adsorbent dose.

Table 8 Comparative study of adsorption capacity of khat adsorbent with other agricultural waste materials for adsorption of MB

3.8 Adsorption kinetics

Several models were anticipated to analyze the mechanisms of adsorption in order to examine the adsorption of MB on khat adsorbent and select the best model describing the experimental data. In this study, the pseudo-first-order and pseudo-second-order kinetics were employed to analyze the experimental data on MB adsorption. The effect of contact time on adsorption onto the adsorbent surface was evaluated using the kinetic adsorption study. The results of the kinetic parameters for the MB adsorption, including the computed kinetic constants (K1 and K2) of the two kinetic models and the calculated quantity of dye adsorbed at equilibrium (qe), along with R2 values and the kinetic models, are shown in Table 9 and Fig. 13 respectively. The linear correlation coefficient (R2) was used to determine which model fits the data the best. The anticipated equilibrium adsorption capacity, qe computed, differs from experimental data and has low correlation coefficients in pseudo-first-order kinetics, as shown in Table 9. This demonstrates that the pseudo-first-order kinetics is not appropriate for the MB adsorption onto the khat adsorbent. As a result, it cannot be applied as a model in this study. The maximum coefficient of determination (R2) value is provided by the pseudo-second order, which is close to 1. Additionally, there is a strong agreement between the calculated amount of MB adsorbed and the actual experimental data (qe). As a result, the pseudo-second-order model, which has an R2 value of 0.99, best fits the equilibrium data. These findings suggest that the covalent interaction between MB and the adsorbent, which involves the exchange of electrons, determines the rate of chemisorption. In the literature, similar findings have been published [16].

Table 9 Parameters of pseudo-first- and pseudo-second-order kinetics model for MB dye adsorption on khat adsorbent
Fig. 13
figure 13

Pseudo-first- and second-order kinetic model

3.9 Thermodynamic studies

The thermodynamic analysis was done to determine whether the MB dye’s adsorption onto the khat adsorbent was exothermic or endothermic, random, spontaneous, or neither. Thus, the thermodynamic parameters of enthalpy change (ΔH°), entropy change (ΔS°), and Gibbs free energy change (ΔG°) were used to assess the feasibility of the MB dyes’ adsorption process onto the khat adsorbent. The van’t Hoff equation was used to analyze the parameters from the batch adsorption process at various adsorption temperatures, and the results are shown in Table 10 between the temperature range of 25 and 65 °C. Figure 14 also shows the curve of \({\text{ln}}{K}_{{\text{L}}}\) versus 1/T for the MB dye.

Table 10 Thermodynamic parameters for the adsorption of MB onto khat adsorbent at different temperatures
Fig. 14
figure 14

Plot of ln (KL) against 1/T for the adsorption of MB dye onto khat adsorbent

According to the data presented in Table 10, the Gibbs free energy change (ΔG°) was discovered to be − 6.25kJ/mol at 298 K, indicating the viability of a spontaneous adsorption process. As the temperature rises, the negative value of (ΔG°) decreases. In other words, the findings showed that increasing the temperature increases the MB adsorption onto khat adsorbent. This suggests that higher temperatures are preferred for the adsorption process, and the fact that the adsorption capacity, qmax, rises with temperature supports this conclusion. Beside this, enthalpy change (ΔH°) and entropy change (ΔS°) values were also determined to be positive and the value of positive entropy change (ΔSo) in the temperature range of 298 to 338 K was found to be 113.2367 J/mol K, indicating that the MB would have an affinity for the khat adsorbent and that there would be randomization on surface of the adsorbent with the adsorbate. Additionally, the endothermic nature of adsorption process of MB is indicated by the positive value of enthalpy (ΔH° = 25.228 kJ/mol).

3.10 Regeneration and reusability of khat adsorbent

Regeneration and reuse of adsorbents are some of the most crucial elements of a good adsorbent due to economic considerations [46]. Throughout the regeneration investigation, the adsorbent was regenerated using a 1M NaOH solution as desorption agent as an eluent for MB dye desorption and the adsorbed pollutant molecules were removed from the khat adsorbent surface by continuously stirring the recycled adsorbent in a NaOH (1 M) desorption solution at 125 rpm for 1 h. As shown in Fig. 15, the adsorbent was then used five times in a row for adsorption–desorption cycles to remove the pollutant dye from the aqueous solution under the optimum conditions of (adsorbent dose = 0.2 g/100 mL, Ci = 150 mg/L, pH = 6, t = 90 min).

Fig. 15
figure 15

Regeneration cycle study

After five-consecutive adsorption–desorption cycles, the removal efficiency of the adsorbent material was observed to drop from 99.82 to 96.13% which is a change in the removal efficiency of 3.69%. Such drop in the removal efficiency may have been brought about by the incomplete desorption of MB from the adsorbent surface, which led to the loss of active sites [48]. The results of the reusability studies showed that 94.19% of the MB can be removed even in the fifth cycle, showing that the khat adsorbent’s adsorption performance remained within an acceptable range and potentially opening up a wide range of practical applications for the removal of MB.

3.11 Adsorption mechanism

Surface chemistry and specific surface area are among the factors mostly governing the adsorption properties of the pollutants onto carbonous materials. In this particular study, the surface of khat stem–based adsorbent was found to be porous with characteristics of a large specific surface area. Additionally, the effect of pH during adsorption of MB onto khat stem–based activated carbon was also found helpful in proposing the adsorption mechanism. The surface of the adsorbent material was found to be composed of various functional groups suggesting the involvement of more than one interaction during the adsorption. On the other hand, the pH effect could indicate that the occurrence of electrostatic interaction. This can be justified due to the fact that the adsorbent material contains negatively charged sites such as oxygen-containing functional groups and carbonyl which can readily form a bond with a cationic MB dye. Additionally, the formation of H bonding is expected between the free H of oxygen containing functional groups on the khat stem–based activated carbon and nitrogen present in MB dye. Generally, the adsorption of MB onto khat stem–based activated carbon can be due to H bonding, π-π interaction and electrostatic interaction. A similar trend was reported for the adsorption of MB on the surface of sugarcane bagasse waste–based activated carbon [26].

4 Conclusion

The textile industrial effluent was characterized and found to have an electro-conductivity of 24.73 mS/cm, pH 9, temperature of 24.5 \(^\circ{\rm C}\), MB dye concentration of 90 mg/L, BOD5 of 200 mg/L, COD of 360 mg/L, and total solids of 328.74 mg/L. Khat stem–based activated carbon was successfully developed using chemical activation followed by thermal pyrolysis. BET analysis results of the activated carbon and the recycled adsorbent were analyzed to have specific surface area of 1323.3 m2/g and 812.9 m2/g, respectively. The results from the FTIR analysis depicted the presence of multiple peaks with various functional which is an indication of its effectiveness to adsorb MB dye from industrial effluent. The highest removal efficiency of (99.86%) was attained at the optimum working conditions of contact time (90 min), MB dye concentration (150 mg L), and adsorbent dose (0.2 g/100 mL). However, the MB dye removal from real textile wastewater was analyzed to be 89.13%. The isotherm and kinetic study results proved Langmuir isotherm and pseudo-second-order kinetic models better fit the experimental data, with R2 values of 0.992 and 0.999, respectively. The Langmuir model determined the adsorbent to have a maximum adsorption capacity of 97.84 mg/g and the thermodynamic analysis resulted in the positive values of ΔH° and ΔS° and the negative values of ΔG° which confirmed the spontaneous, endothermic, and randomness nature of the dye adsorption on the surface of the adsorbent, respectively. In general, the research outcome showed a promising MB saturated wastewater treatment technique. However, further additional investigations such as the continuous method of filling the adsorbent in successive column and surface functionalization of the adsorbent materials using magnetic nanomaterials are recommended.