Introduction

The global expansion of urbanization and industrialization has led to a substantial deterioration in water quality, resulting in a widespread scarcity of clean water sources [1, 2]. As a universal solvent, water can contaminate various hazardous substances, including heavy metal ions, pesticides, fertilizers, pharmaceuticals, dyes, and organic solvents [3,4,5]. Addressing the reduction of organic and inorganic pollutants in wastewater, especially in industrial effluents, has become a significant focus of the scientific community [2]. The primary threat to water safety arises from the unregulated discharge of these harmful substances into the local environment without proper pre-treatment [6]. Notably, the textile and dye sector ranks as the tenth most significant contributor to water pollution, accounting for approximately 17–20% of all industrial wastewater [3, 6, 7]. Annually, between 5,000 and 10,000 metric tons of dyes, including toxic pollutants with adverse consequences for biodiversity, find their way into water bodies [3, 8]. These dyes pose significant risks, including toxicity, mutagenicity, carcinogenicity, and teratogenicity, underscoring the urgent need for efficient technologies to degrade and detoxify complex dyes. Synthetic textile dyes, in particular, exhibit remarkable stability and resistance to physical, chemical, and biological processes [9]. These chemicals impart color to various surfaces and textiles and are extensively used in high-tech sectors such as plastic manufacturing, food processing, cosmetics, rubber production, printing, and dying [8]. Commercial dyes can be categorized based on their composition, color, and methods of use, often falling into cationic, anionic, or non-ionic substances, depending on their solubility in aqueous fluids and particle charge [8, 10]. Basic dyes, in particular, exhibit intense coloration even at deficient concentrations, and approximately 12% of annually produced cationic dyes, roughly 700,000 tons, end up in industrial wastewater, causing environmental harm [11, 12].

Malachite green (MG) is a green crystalline powder that serves as both an organic and a cationic dye with a metallic luster [13]. Its widespread applications encompass coloring and dyeing wool, cotton, silk, paper, and hair within the textile and dyeing industries [13, 14]. Furthermore, it is used as a disinfectant in aquaculture and as a colorant in various industries, along with applications in food additives, medicinal disinfectants, food colorants, and anthelmintics [15,16,17]. Its use can also reduce sunlight penetration, potentially harming aquatic life [17, 18]. Therefore, the removal of MG from wastewater before discharge into water bodies is of paramount importance.

Addressing the treatment of wastewater contaminated with MG has prompted the development of various approaches, highlighting the urgency of this environmental issue. These methods include nanofiltration, ozonation, flocculation, reverse osmosis, chemical oxidation, photocatalytic degradation, and adsorption [19,20,21]. Among these, adsorption is optimal for pollution removal and recovery [22, 23]. It has become the standard wastewater treatment approach because it is simple, straightforward, easy to scale up, and effective in removing trace water pollutants [24,25,26]. In recent years, hydrogel-based adsorbents have gained considerable attention due to their significant performance in removing a wide range of organic and inorganic pollutants from wastewater [23, 27]. The adsorption process rapidly infiltrates dye molecules into the porous hydrogel network suspended in the solution. Consequently, these dye molecules form bonds with hydrophilic functional groups in the hydrogel, such as -OH and -COOH. As a result, hydrogel-based adsorbents exhibit highly favorable adsorption properties, emphasizing their substantial potential for real-life applications in water purification [28,29,30].

In recent years, hydrogels derived from natural polysaccharide gums have found tremendous applications across various industries, including agriculture, medicine, and water purification. A notable study by Pandey et al. [31] utilized a hydrogel composed of locust-bean gum cross-linked with MBA for the adsorption of bright green dye, demonstrating an adsorption capacity of 142.85 mg/g. Additionally, Batouti et al. [32] developed a novel microwave-assisted GG-g-poly(AAm) hydrogel to eliminate red 8 dye from wastewater. Thombare et al. [33] synthesized a hydrogel based on guar gum crosslinked with borax to absorb aniline blue paint. Surprisingly, no studies currently focus on developing hydrogels based on a combination of these gums (guar gum and locust bean gum) that belong to the same botanical family in a 1:1 ratio for wastewater treatment. Both gums hail from the Leguminosae plant family. Guar gum, an economical and biodegradable natural polysaccharide derived from the embryos of the leguminous plant Cyamopsis tetragonoloba [34], consists of linear polymeric chains of (1 → 4)-linked β-D-mannopyranosyl units with (1 → 6)-linked α-D-galactopyranosyl. It contains 0.7% fat, 2.0% acidic insoluble ash, 5.0% protein, 12% water, and 80% galactomannan. The mannose-to-galactose unit ratio in guar gum is typically reported as 2:1 in the literature [35]. Locust bean gum, also known as Ceratonia siliqua L., exists as a white to creamy powder derived from grinding the seed endosperm of the fruit pod of the carob tree, which belongs to the legume family [36]. Consequently, these gums are emerging as promising precursors for synthesizing hydrogel-based adsorbents because of their non-ionic, film-forming, and high water solubility characteristics.

Building upon our previous research on synthesizing and characterizing natural polysaccharides for dye removal applications [37, 38], this study introduces a novel hydrogel prepared through free radical polymerization, utilizing a binary gum backbone. The primary objective behind this hydrogel’s development is removing MG dye from wastewater. We employed the response surface methodology (RSM) to fine-tune essential process parameters to optimize the swelling percentage. RSM offers the advantage of exploring the cumulative effects of multiple factors with fewer experimental runs, thus reducing costs. The utilization of second-order response surface models, generated via the central composite design (CCD), represents an enhancement over conventional techniques, which require numerous tests for result validation. Various advanced characterization techniques, such as XRD, FTIR, FE-SEM, TGA, wettability, and Zeta potential (ζ), were employed to confirm the formation of a crosslinked network. We systematically investigated the effect of adsorption parameters, such as contact time, adsorbent dosage, pH, and dye concentration. The adsorption capacity was determined using Langmuir, Freundlich, Dubinin-Radeshkovich, and Elovich isotherm models. Additionally, we assessed the adsorption rate and elucidated the mechanism of the adsorption process through kinetic and thermodynamic studies. The study conclusively demonstrates the effectiveness of GG/LBG-g-poly(AAm) as an adsorbent for removing MG dye from water-based solutions, showing superior performance in terms of increased swelling rates.

Materials and methods

Materials

Guar and locust bean gum were procured from Max Adhesives Private Limited, India, and served as the hydrogel’s constituents. Ammonium persulfate (APS) with a purity of 98%, acrylamide (98.5% purity), and N, N-Methylene-bis-acrylamide (99% purity) were purchased from Qualigens Pvt. Limited, India. Malachite green (MG) was procured from Otto-Kemi Private Limited (India). Hydrochloric acid (purity 36%) and sodium hydroxide (purity 98%) were supplied by CDH, New Delhi.

Preparation of GG/LBG-g-poly(AAm)-based hydrogel

We synthesized a hydrogel through free radical polymerization based on the graft copolymerization of guar gum and locust bean gum with acrylamide. For hydrogel preparation, guar gum and locust bean gum were dissolved in 23 mL of distilled water in a 100 mL beaker, using a 1:1 weight/volume ratio for the two gums. APS (0.105 g) was added as the initiator, followed by acrylamide (1.1 g) as the monomer. Continuous stirring was maintained while adding the cross-linker, MBA (0.023 g), to ensure uniformity in the reaction mixture. The resulting solution was irradiated with microwave irradiation in a standard household microwave oven using a constant time and power setting of 100%. Finally, the product, GG/LBG-g-poly(AAm), was dried in a hot air oven at 60 °C. The synthesis process is shown in Scheme 1.

Scheme 1
scheme 1

General steps in synthesizing GG/LBG-poly(AAm) hydrogel

Characterizations

The chemical composition and crosslinking of the GG/LBG-g-poly(AAm) hydrogel were analyzed using Fourier transform infrared spectroscopy (FTIR) with a Shimadzu spectrophotometer (IR Spirit FTIR). Field Emission Scanning Electron Microscopy (FE-SEM) was utilized to investigate the surface morphology of the prepared hydrogel, with samples being coated with gold before analysis. X-ray diffractometer (XRD) patterns of the backbones and the synthesized hydrogel were recorded using a Cu-Kα radiation source equipped with an XRD (Rigaku-smart). The instrument operated at a voltage of 40 kV and a current of 40 mA, with the diffraction angle (2θ) ranging from 10 to 60°. Thermogravimetric analysis (TGA) of the sample was performed using a Shimadzu DTG-60 instrument under a nitrogen atmosphere. The temperature range was 50–700 °C, with a heating rate of 10 °C/min. pH optimization was conducted using a Mettler Toledo pH meter, and shaking was performed using an IKON incubator shaker (orbital shaker IK-184). Dye removal investigations were conducted using a UV–Vis spectrometer (Shimadzu UV-1800, Japan). Zeta potential (ζ) studies were performed using the LitesizerTM 500 particle size analyzer to assess the stability and selectivity of the hydrogel.

Swelling study of hydrogel

The dried hydrogel was dipped in deionized water at pH 7 and ambient temperature to ascertain the samples' equilibrium swelling ratio (SR). After reaching equilibrium, it was weighed after being filtered through blotting filter paper and left for 8 h. Equation 1 was employed to compute the equilibrium swelling ratio (SR) [39, 40].

$$\mathrm{SR }\left(\frac{{\text{g}}}{{\text{g}}}\right)= \frac{{{\text{W}}}_{{\text{e}}}-{W}_{d}}{{{\text{W}}}_{{\text{d}}}}$$
(1)

where We (g) is the swelled hydrogel's weight, Wd (g) is related to the dried sample.

Experimental design using response surface methodology-central composite design approach (RSM-CCD)

RSM was employed to examine parameter interactions and optimize variables with a limited number of tests. The RSM-CCD is particularly useful for quadratic surface fitting and evaluating the effects of variables on the response. The RSM-CCD is particularly useful for quadratic surface fitting and assessing the impact of variables on the response [39, 40]. Four independent variables, namely initiator, monomer, crosslinker, and solvent, were selected for the experimental design. Conducting 30 randomized trials of 24 factorials and six central runs is recommended for four-parameter designs. The empirical second-order polynomial equation, represented as Eq. (2), quantifies the impact of factors and their interactions on the response.where Y is the predicted response, βo stands for intercept, βi, βj, and βii are the regression coefficients and are the process variables' coded values, and ε stands for random error. ANOVA was utilized to evaluate the importance of the variables and their interactions.

$${\text{Y}}= {\beta }_{0}+\sum_{i=1}^{n}{\beta }_{i}{X}_{i} +\sum_{i=1}^{n}{\beta }_{ii}{X}_{i}^{2 } +\sum_{i<j}^{n}\sum_{j}^{n}{\beta }_{ij}{X}_{i}{X}_{j } +\varepsilon$$
(2)

The variables were studied at the -1, 0, + 1, and + coded levels. The obtained results are presented in Table 1. The experimental Table 2 was generated by the design program, incorporating the data from randomized experiments with optimized results.

Table 1 Independent parameters and levels used in CCD
Table 2 Experimental design matrix with responses

Adsorption experiments

A batch adsorption method was employed to study MG dye adsorption in aqueous solutions, focusing on varying the sample mass and solution pH to investigate adsorption efficiency [39]. Several parameters, including temperature (25 °C), pH (3.0–9.0), adsorbent dose (0.04–0.1 g), and dye concentration (20–100 mg/L), were systematically adjusted to optimize MG dye adsorption, and a UV–visible spectrophotometer was utilized for monitoring the adsorption experiments. A stock solution with a concentration of 1000 mg/L was prepared by dissolving 100 mg of MG dye in 100 mL of distilled water. Subsequently, experiments were conducted by introducing GG/LBG-g-poly(AAm) into MG solutions (volume = 100 mL) with an initial 50 mg/L concentration. At regular intervals, typically every half-hour, the absorbance of the solutions was measured at the maximum absorption wavelength for MG (λmax = 616 nm) using the UV–Vis spectrophotometer. To quantify the absorbed dye, it was converted into concentration units by referencing the calibration curve for MG. The equilibrium dye absorption rate (qe, mg/g) and the percentage of dye removal (R%) for the synthesized hydrogel were determined using formulas from previous studies [39, 40]. All experiments in this work were conducted in triplicate, and the results are presented as the mean values along with their respective standard deviations.

Results and discussion

Synthesis mechanism of GG/LBG-g-poly(AAm)

A viable technique for grafting acrylamide onto a backbone through free radical polymerization is presented in Scheme 2.

Scheme 2
scheme 2

a Chain initiation step b Chain propagation step c Chain termination step

Initiation reaction

Ammonium persulfate (APS) is generally employed as a reagent to initiate free radical graft copolymerization. APS molecules comprise two NH4+ ions and (S2O8)2− ions [3]. The SO4− ion accepts an electron from the -OH group, forming a bond with the sulfur atom and oxygen in the APS molecule. Under microwave heating, SO4− free radicals are generated, interacting with water molecules and producing -OH radicals [40]. Since the backbone contains the hydroxyl group, it becomes favorable for grafting. Consequently, the interaction between the hydroxyl radicals generated by the initiator, the hybrid backbone, and the poly(AAm) chains leads to the formation of free radicals on both the backbone and the monomer chains [41].

Propagation reaction

Grafting occurs between the backbone's free radicals and the acrylamide radicals, forming a graft copolymer through the propagation reaction [42].

Termination reaction

The graft copolymers formed from the propagation reaction are crosslinked using a crosslinking agent. The reaction is terminated by joining two radicals, creating a complex product called GG/LBG-poly(AAm) hydrogel.

ANOVA analysis

An analysis of variance (ANOVA) was employed in this work to carefully analyze the relevance of the obtained outputs and the precision of the regression model equation. In the ANOVA analysis, Fisher's statistical test (F-test) outcomes were used to establish the relevance of each process parameter individually [40]. A parameter is supposed to be significant if its p-value is less than 0.05, signifying a noticeable effect on the outcome. The resulting model, with an F-value of 67.04, is statistically significant. Despite the potential influence of noise on large F-values, the calculated probability of this occurrence is only 0.001%, indicating that the observed F-value is not a result of noise. Both model terms have an F-value of less than 0.05, indicating the significance of these terms. The terms A, B, D, AB, BC, BD, CE, A2, B2, C2, and D2 were essential in this model. The significance of the model is reinforced by a P-value of 0.001, where a P-value higher than 0.10 would suggest that the model conditions are not significant [43, 44]. The computed polynomial for response Y has a model coefficient of 0.9843, suggesting a good fit. The adjusted fitted R2 value of 0.9696 aligns well with the predicted R2 value of 0.9094, indicating the model's reliability. The model is highly predictable when the two values differ under 0.2. Additionally, adequate precision, defined as a signal-to-noise ratio, should always be higher than 4 for a model to be deemed appropriate. This study's appropriate precision value of 23.9026 confirmed that the model's resolution was more than adequate [44,45,46]. Lastly, the test accuracy and reliability are highlighted by the comparatively low coefficient of variation (CV = 3.11%), demonstrating the uniformity and precision of the experimental results. These statistical findings are provided in Tables S1 and S2 (supplementary information). Table S1 implies that the present work used a four-factor CCD to determine the correlations between various parameters and the related responses over four phases. RSM quadratic models fit our experimental design well. The actual response equation (Y) derived from the quadratic model is given below:

$$\begin {aligned}Y=&+1050+20\ast A+31.75\ast B+4.58333\ast C+25.6667\ast D+29\ast AB\\&+4.25\ast AC+9.625\ast AD+36.5\ast BC-10.875\ast BD-9.625\ast CD\\&-87.1042\ast A^2-69.9792\ast B^2-90.4792\ast C^2-67.4792\ast D^2 \end {aligned}$$
(3)

The coded factors A, B, C, and D relate to the concentrations of the initiator, monomer, solvent, and cross-linker. These coded factors are employed to standardize and streamline the representation of variables, making it easier to examine the impact of these variables on the response variable. Positive coefficients in this expression typically suggest a favorable correlation between the main constituents, indicating that an increase in the variables has a favorable effect on the response [45, 46]. Conversely, components with negative coefficients exhibit an inverse relationship with the response. When two positive interacting parameters are present, they collectively influence the variation of the examined components, while two negative interactional coefficients imply conflicting influences [47]. Analyzing the experimental data requires fitting the generated model. Figure 1(a) shows the normal probability and residual curves for the hydrogel's swelling rate, indicating good normality and no significant deviation in the response. Figure 1(b) shows the connection between the residuals and the expected swelling rate, demonstrating that the variance due to the initial observation is constant for all response values, indicating no need to alter these variables. Figure 1(c) shows a graph of expected versus actual values, with most data points closely aligning with the straight line, indicating a significant correlation between the experimental and expected values [31, 48, 49].

Fig. 1
figure 1

A graphical representation depicting a Externally Studentized residuals against the normal probability for swelling, b Predicted versus Studentized residuals curves, and c a plot comparing the actual and predicted swelling response of hydrogels

In this study, we employed a four-factor CCD to optimize various parameters. The key factors considered in this study were initiator dosage (A: 0.09–0.012 gm), monomer concentration (B: 0.9–1.3 gm), solvent (C: 20–26 ml), and cross-linker (D: 0.020–0.026 gm). As indicated in Fig. 2, the design equation highlights a significant and dominant influence of the relationship between solvent and monomer on the swelling percentage. The swelling percentage benefits from the positive interaction between the initiator and monomer. Similar positive results are observed in the interactions between the initiator, crosslinker, and the initiator and solvent. Conversely, the interactions between the monomer and crosslinker and the solvent and crosslinker exhibit negative responses, indicating a lesser influence on the swelling percentage. Hence, the highest swelling percentage (1050%) is achieved with the initiator (0.105 gm), monomer (1.1 gm), solvent (23 ml), and cross-linker (0.023 gm). The three-dimensional graphical plots depicting these factors with the swelling percentage are individually presented in Fig. 2.

Fig. 2
figure 2

a A three-dimensional surface curve delineating the influence of monomer and initiator concentration. b The effect of solvent and initiator concentration on swelling percentage. c The impact of crosslinker and initiator concentration on swelling. d The effects of the solvent and monomer on swelling percentage. e The impact of crosslinker and monomer concentration on swelling percentage. f The effect of crosslinker and solvent on swelling percentage

Characterization analysis of hydrogel structure

Figure 3 presents the FTIR spectra of Guar gum, Locust bean gum, GG/LBG, and GG/LBG-g-poly(AAm) hydrogel before and after dye adsorption. In the GG spectrum, a broad peak at 3310 cm−1 signifies the OH stretching vibration in the gum polysaccharide [50]. The peak at 2987 cm−1 corresponds to C-H stretching modes, while the peak at 1640 cm−1 relates to the stretching vibration of the carbonyl group (-C = O). Additionally, a minor peak at 1193 cm−1 represents C-O stretching, and the peak at 1008 cm−1 indicates C–O–C vibration [50, 51]. Also, the LBG spectrum peaks around 3300 cm−1, signifying primary and secondary -OH vibrations. The peak at 2976 cm−1 specifies C-H stretching, and the peak at 1635 cm−1 indicates stretching between the galactose and mannose rings, representing C = O stretching. The 1187 cm−1 and 1015 cm−1 peaks correspond to stretching connections between glycosidic bonds C-O and C–O–C [1, 49]. In the case of the GG/LBG mixture, the peaks at 3274 cm−1 indicate OH stretching vibration peaks, while the peak at 2976 cm−1 displays C-H stretching modes. The peaks at 1634 cm−1 designate C = O stretching due to the presence of galactose and mannose rings in both backbones. The 1190 cm−1 and 1003 cm−1 peaks correlated to the C-O and C–O–C stretching.

Fig. 3
figure 3

FTIR spectra of A Guar gum, B Locust Bean Gum, C GG/LBG, D GG/LBG-g-poly(AAm), E GG/LBG-g-poly(AAm)-MG

The peak at 3190 cm−1 in GG/LBG-g-poly(AAm) shows N–H stretching due to the amide group, and the peak at 2970 cm−1 represents C-H stretching [51]. The peak at 1652 cm−1 is assigned to the stretching vibration of the carbonyl group, while the peaks at 1170 cm−1 and 1026 cm−1 correspond to C-O and C–O–C stretching, respectively. The generation of a new peak at 1488 cm−1 indicates C-N stretching, reflecting the formation of the graft copolymer [52]. After the dye adsorption on the synthesized hydrogel, the shift of the broad peak at 1652 cm−1 (C = O) to 1623 cm−1 indicates that the hydrogel absorbed the dye molecules.

The XRD patterns of backbones, crosslinked hydrogel, and dye-adsorbed hydrogel are shown in Fig. 4. The XRD pattern of GG reveals a diffraction peak at 2θ = 21.2°. This peak signifies that the hydroxyl groups inside the GG polysaccharide units have formed intermolecular hydrogen bonds. It displays the sequential sequence of these polysaccharide units [50, 51]. Similarly, the XRD pattern of the LBG displays a broad hump at 19.27° [1]. Additionally, the distinctive peak of the GG/LBG polysaccharide appears as a broad hump at 2θ = 20.11°, similar to the polysaccharides of guar and locust bean gum [53]. The grafted hydrogel exhibits a broad peak at 2θ = 20.540, demonstrating its amorphous nature. The peak value shifts noticeably from 20.54 to 21.01 degrees after the absorption. The adsorption of dye molecules onto the GG/LBG-g-poly(AAm) hydrogel caused this change, which denotes structural disorderliness. The interaction between the hydrogel and the dye molecules causes the peak location to shift, indicating a structural change brought on by the adsorption process [42].

Fig. 4
figure 4

XRD patterns of A Guar gum, B Locust Bean Gum, C GG/LBG, D GG/LBG-g-poly(AAm), E GG/LBG-g-poly(AAm)-MG

The surface morphology of guar gum, locust bean gum, GG/LBG, crosslinked hydrogel, and dye-absorbed hydrogel was studied using FE-SEM images (Fig. 5). Pure guar gum exhibits a smooth surface with small dots on its surface. The surface of locust bean gum is smooth and fibrous [44, 47]. Similarly, the surface appears smooth with dense globules in the mixture of polysaccharides (GG and LBG). However, in GG/LBG-g-poly(AAm), after crosslinking and network development, the smooth surfaces of native gums transform into coarse and rough surfaces due to graft copolymerization and crosslinking. After cross-linking, the structural morphology changes into rough, agglomerated surfaces. The dye adsorption procedure significantly affects the GG/LBG-poly(AAm) hydrogel's surface shape. Following this procedure, the hydrogel's surface's structure and appearance undergo noticeable changes. In particular, the pores in these samples become impregnated with dye molecules, resulting in a noticeable change from the original, more even surface to one that is smoother and more uniform in texture.

Fig. 5
figure 5

SEM images of A Guar gum, B Locust Bean Gum, C GG/LBG, D GG/LBG-g-poly(AAm), E GG/LBG-g-poly(AAm)-MG

Thermogravimetric analysis (TGA) of GG, LBG, GG/LBG, and GG/LBG-g-poly (AAm) is presented in Fig. 6. The grafting of acrylamide has altered the thermal behavior of these gums. In pure guar gum, a three-stage decomposition is observed. Initially, there is a 12.09% weight loss up to 150 °C. The maximum weight loss (55.06%) occurs between 150 and 337 °C, attributed to the degradation of the backbone polymer. Additionally, a weight loss of 11.81% is observed in the 340–560 °C temperature range, indicating complete combustion [50]. Similarly, for locust bean gum, weight loss occurs in three stages. In the initial stage, there is a 12.72% weight loss in the 21–150 °C. The maximum weight loss (33.03%) occurs between 138 and 330 °C due to the degradation of the backbone polymer [31]. Likewise, for GG/LBG, the decomposition is observed in three stages. In the initial stage, there is an 11.83% weight loss in the 20–164 °C. In the second stage, the maximum weight loss (54.6%) occurs in the range of 150–345 °C due to the degradation of the backbone polymers. In the third stage, the weight loss is only 13.26% in the 345–564 °C range, indicating combustion. A four-stage weight loss is observed in the grafted polymer GG/LBG-g-poly (AAm). In the first stage, only 6.04% weight loss is observed up to 164 °C. In the second stage, a weight loss of 28.13% occurs in the range of 164–305 °C due to water loss. The third stage exhibits the maximum weight loss (41.27%) between 305 and 439 °C, attributed to the breakdown of the crosslinked polymer chain. Due to combustion, further weight loss (7.33%) occurs in the 439–600 °C range [37]. The summarized results are presented in Table 3.

Fig. 6
figure 6

TGA curves of Guar gum, Locust Bean Gum, GG/LBG, and GG/LBG-g-poly(AAm)

Table 3 A comparative TGA analysis with the temperature range and weight loss

Wettability test

To assess the influence of water absorbance on the wettability of the hydrogel surface, a 4 µL water droplet was initially dropped on the surface of the hydrogel. The droplet's contact angle variations were observed every 20 s. Starting at ~ 80°, the contact angle steadily decreased until it reached a plateau at around 28°. The process of water absorption into the hydrogel’s near-surface area is accountable for this behavior. The osmotic pressure difference between the hydrogel and the water droplet mainly drives this process. This implies that the hydrogel has a strong affinity for water molecules, making it appropriate for applications where enhanced water absorption or wettability is preferred [52]. The surface energy of the sample was calculated through contact angle measurements, using the method proposed by Good-Girifalco [37]. It has been observed that the surface energy gradually increases, leading to quick dispersion of the water droplet and a decrease in the contact angle, as shown in Fig. 7. In simpler terms, this phenomenon improves the wettability of the developed hydrogel.

Fig. 7
figure 7

The contact angle of GG/LBG-g-poly(AAm) was measured at different time points after the surface came into contact with a water droplet a time versus contact angle, b time versus surface energy, c plot between the surface energy and contact time versus time, and d contact angle images at various stages

Zeta potential (ζ)

Firstly, the synthesized hydrogel was finely ground into a powder. The powdered gel was mixed with deionized water at various pH levels to determine the zeta potential. Zeta potential represents the magnitude of repulsion between neighboring particles, liked-charged and unlike-charged, within a dispersion [53]. The dispersion often exhibits stable behavior when the zeta potential is within the range of ± 30 mV, indicating either a slight positive or negative charge. In contrast, the system becomes unstable at shallow pH values due to positive zeta potential values [54]. Figure 8 demonstrates that the zeta potential is positive when the pH is below the hydrogel's isoelectric point. This positivity arises from the repulsive interactions among the numerous positively charged -NH3+ groups on the GG/LBG-g-poly(AAm) hydrogel chains. The zeta potential values are also negative when the pH exceeds the isoelectric point. This signifies a significant increase in ionization of the -COO groups at the interface of the hydrogel's dispersed particles [55]. The consistently negative zeta potential values across the pH range of 3.0–9.0 confirm that the synthesized hydrogel carries anionic properties when dissolved in water [56]. Consequently, the zeta potential analysis provides valuable insights into the hydrogel's stability and selectivity relative to its surroundings' pH [55].

Fig. 8
figure 8

Graph between Zeta potential (ζ) v/s various pH in aqueous medium

Effect of various parameters on the removal efficiency of GG/LBG-poly(AAm)

Effect of pH

The initial pH level of the MG solution plays a pivotal role in the adsorption process due to its influence on the activation sites on the hydrogel surface and the ionization process [57, 58]. To examine the impact of pH on the adsorption of MG dye using GG/LBG-poly(AAm) adsorbents, a dye solution with a concentration of 50 mg/l and an adsorbent dose of 0.1 g was prepared. The pH was adjusted within the range of 3.0 to 9.0 using hydrochloric acid and sodium hydroxide. Figure 9 illustrates the effect of solution pH on dye adsorption by the GG/LBG-g-poly(AAm) hydrogel.

Fig. 9
figure 9

a pH (7.0) curve versus removal percentage (98%) with Error Bar, b Initial dye concentration (50 PPM) versus percentage removal

When the initial pH of the dye solution was raised above 5, it was found that the adsorption of MG was reduced in the pH range of 3.0–5.0 (acidic medium) while the removal percentage increased. This effect can be explained by the hydrogel's surface functional groups, which produce positive charges and repel dyes with positive charges like MG. The APS sulfonate group imparts a high hydrophilicity and anionic behavior to the monomer across a broad range of pH values. When the pH of the solution exceeds 3.0, the dissociation of SO3H with the amine group increases, leading to a rise in the charges on the polymeric chains. This results in strong electrostatic interactions between the adsorbent surface and the cationic MG dye, thereby increasing the adsorption efficiency. However, at pH values greater than 7, the efficacy of the hydrogel decreases significantly. In an alkaline medium (pH > 7), the presence of Na+ ions screens the ionic interactions, causing the hydrogel to behave as if it were uncharged [57,58,59]. The results demonstrate that the synthesized hydrogel can be an effective adsorbent for MG dye over a wide pH range. The findings showed that the prepared hydrogel network exhibits good adsorption behavior for MG across a pH range. The prepared hydrogel achieved a high dye removal percentage of 98% at pH 7, which can be ascribed to the electrostatic interaction between the MG dye molecules and the acidic groups present in the synthesized hydrogel [40, 60].

Effect of initial dye concentration

To determine the maximum adsorption capacity of the synthesized GG/LBG-g-poly(AAm) hydrogel, adsorption experiments were conducted at various dye concentrations ranging from 20 to 100 ppm. These experiments aimed to investigate the influence of initial dye concentration on MG dye removal using the synthesized adsorbents. Each experiment utilized 0.08 g of adsorbent in a 100-mL dye solution with varying concentrations (20, 40, 50, 70, and 100 mg/L). Figure 9(b) illustrates that approximately 98% of the dye was removed. The adsorption capacity initially increased with higher dye concentrations, up to 50 ppm, as the mass transfer driving force improved with higher dye concentrations, enhancing MG adsorption. However, as the MG concentration continued to rise, an excess of dye molecules led to prolonged contact time between the active sites on the hydrogel and the MG dye. This saturation eventually results in a decrease in adsorption capacity [3].

Effect of dose

The impact of the adsorbent dose on MG dye was investigated by altering the mass of the GG/LBG-g-poly(AAm) hydrogel at room temperature, ranging from 0.04 to 0.1 g. An adsorbent dosage of 0.08 g was identified as yielding the highest adsorption capacity. Increasing the adsorbent dose from 0.04 g to 0.1 g resulted in an enhancement of adsorption capacity. This improvement can be explained by the larger available surface area and more accessible sorption sites on the GG/LBG-g-poly(AAm) hydrogel. As the dose of the adsorbent increased, particle accumulation took place and affected the total surface area. At high adsorbent dosages, the saturation of the adsorbent active sites led to a reduction in adsorption capacity [13]. Hence, Fig. 10(a) illustrates the significant decline in adsorption capacity that occurred above dose concentrations of 0.08 g, indicating inadequate utilization of the active sites.

Fig. 10
figure 10

Optimisation of several MG dye removal parameters, including a Adsorbent dose (0.08 g) and b Contact time (330 min.)

Adsorption contact time

The influence of contact time on adsorption efficiency was examined at pH 7 over a duration spanning from 30 to 330 min. The initial dye concentration was 50 mg/L, and the adsorbent dosage was 0.08 g. As the contact time increased, there was a noticeable upward trend in the adsorption effectiveness of MG dye onto the adsorbents. However, after 300 min, the hydrogel's adsorption capacity reached a plateau and remained constant. The initially rapid MG dye adsorption by high-speed adsorbents can be attributed to active sites and a sufficient surface area for MG dye binding. Therefore, as shown in Fig. 10(b), increasing the contact duration did not impact the adsorption capacity [37].

Isotherm study

Isotherms define the physical or chemical relationship between the amount of an adsorbent present on an adsorbent surface at a specific temperature and its concentration in solution. In this method, the adsorbent's equilibrium adsorption capacity is estimated using certain constants that describe both the surface properties and the adsorbent's tendency to absorb contaminants [60]. Adsorption isotherms mainly determine an adsorbent's maximal adsorption capacity. The MG dye's adhesion to the GG/LBG-poly(AAm) hydrogel was examined in the present work using a variety of adsorption isotherm models, including the Langmuir, Freundlich, Temkin, Dubinin-Radeshkovich (D-R), models. Monolayer sorption is often described using the Langmuir isotherm model on a uniform surface with known sorption sites. On the other hand, the Freundlich model is suited for sorption across a heterogeneous surface. This relationship is described by the equation below.

Langmuir Isotherm

$$\frac{{C}_{e}}{{q}_{e}}= \frac{{C}_{e}}{{q}_{m}}+ \frac{1}{{K}_{L}\times {q}_{m}}{R}_{L}= \frac{1}{1+{K}_{L}{C}_{i}}$$
(4)

Freundlich isotherm

$${\text{ln}}{(q}_{e})={\text{ln}}{(K}_{F})+\frac{1}{n}{\text{ln}}{(C}_{e})$$
(5)

Temkin Isotherm

$${q}_{e}=B \;Ln\; \left({K}_{T}\right)+B\; Ln\;\left({C}_{e}\right)B=\frac{RT}{b}$$
(6)

where, \({q}_{m}\) is the highest adsorption capacity, \({K}_{L}\)(mg/L) represents the Langmuir constant, \({K}_{F}\) (mg/g.(L/mg)1/n) and n are Freundlich constants, \({K}_{T}\)(L/g) represents the Temkin equilibrium binding constant, and B is a constant related to the heat of sorption [39, 53].

The linear fitting of the isotherm models is depicted in Fig. 11, and the corresponding fitting data are summarized in Table 4. The dye adsorption onto GG/LBG-g-poly(AAm) demonstrated commendable Langmuir isotherm behavior, as shown in the table, confirmed by the high correlation coefficient value (R2 = 0.98432), which is very close to unity. The separation factor (RL) was determined to gauge the suitability of the adsorption process such that RL values larger than 1, between 0 and 1, and equal to 0, respectively, indicate unfavorable, favorable, irreversible, and linear adsorption processes [37, 39]. The RL value (0.028382) in the table, which is within the range of 0–1, indicates that the adsorption procedure for the hydrogel is favorable. Further, the adsorption intensity, or value of n, was determined to be (R2 = 0.99196) for the Freundlich isotherm model and (R2 = 0.9441) for the Temkin model. The heterogeneity factor value of 1/n for a perfect heterogeneous surface is near zero. As a result, the hydrogel has heterogeneity, as the predicted value of 1/n in the Freundlich isotherm is 0.634. As an outcome, the Freundlich isotherm model is the most appropriate and best-fit model based on the goodness-of-fit study.

Fig. 11
figure 11

Plot of a Langmuir isotherm, b Freundlich isotherm and c Temkin isotherm d D-R Isotherm

Table 4 Calculated values of constants for MG adsorption from different isotherm models

Dubinin-Radeshkovich (D-R) isotherm

The Dubinin-Radushkevich (D-R) model is an empirical equation used to describe the adsorption behavior of molecules onto porous materials. It is beneficial for analyzing adsorption isotherms where the adsorbate forms a monolayer on the surface of the adsorbent [61]. The D-R equation is presented as follows:

$$ln\;q_e=\ln\;q_m-K\in^2$$
(7)

where qe is the equilibrium adsorption capacity (mg/g), qm is the maximum capacity (mg/g), K is the activity coefficient related to the mean free energy of adsorption (mol2 kJ−2), and ϵ is the Polanyi potential (kJ mol−1). The Polanyi potential is calculated as:

$$\in=RT\;\ln\;(1+\frac1{c_e})$$
(8)

where R is the universal gas constant (8.314 J mol−1 K−1), T is the temperature in Kelvin (K), and Ce is the equilibrium aqueous-phase concentration of the adsorbate (mg L−1). The D-R model is primarily used to estimate the average free energy of adsorption (kJ mol−1):

$${\varvec{E}}=\frac{1}{\sqrt{2{\varvec{K}}}}$$
(9)

If E < 8, the adsorption is physisorption and if it is more than 8 then it is chemisorption. The calculated values of E and qm are listed in the Table 4. The values of E are more than 8, indicating that the type of adsorption involved in this study is chemisorption [61, 62].

Kinetic study

We used linear equations to describe the pseudo-first-order, pseudo-second-order, and intra-particle diffusion models to analyze the adsorption process and fit the kinetic data to them. The following equations are given for these models:

$$\mathrm{Pseudo}-\mathrm{First}\;\mathrm{order}\;Ln\left(q_e-q_t\right)=Lnq_{e,cal,}-k_1t$$
(10)
$$Pseudo-Second\;order\;\frac t{q_t}=\frac t{q_e}+\frac1{k_2q_e^2}$$
(11)
$$\mathrm{Intra}-\mathrm{particle}\;\mathrm{diffusion}\;q_t=k_{i,d}t^{0.5}+C_i$$
(12)

In these equations, \({{\text{q}}}_{{\text{e}}}\) and \({{\text{q}}}_{{\text{e}},{\text{cal}}}\) (mg/g) represent the volumes of dyes adsorbed at equilibrium adsorption capacities, respectively. \({{\text{k}}}_{1}\) (min−1) and \({{\text{k}}}_{2}\)(g/mg.min) indicate the rate constant of pseudo-first-order and pseudo-second-order models, respectively. \({{\text{k}}}_{{\text{i}},{\text{d}}}\)(mg/g.min) represents the intra-particle diffusion rate constant, while \({{\text{C}}}_{{\text{i}}}\) (mg/g) denotes the intercept of \({{\text{q}}}_{{\text{t}}}\) versus t plot, which illustrates the boundary layer effect.

Based on the highest correlation constant value (R2 = 0.98144), the kinetic data exhibited an excellent fit with the pseudo-second-order model compared to the other models. The computed values derived from the pseudo-second-order model closely resemble the observed values, highlighting the model's efficacy in predicting experimental results for the sample. This alignment suggests that the active sites on the adsorbents' surface predominately govern the adsorption rate. We further evaluated dye migration throughout the adsorption phase using the intra-particle diffusion model. Exploration was done on the dye molecules' ability to diffuse through pores and reach the active areas. Since the fitting curve's intercept does not pass through the origin, it can be deduced that boundary layer diffusion also significantly affects the rate of dye adsorption in addition to intra-particle diffusion as a rate-controlling step [12]. The fitted plots for the pseudo-first-order and second-order models, as well as intra-particle diffusion, are shown in Fig. 12(a), (b), and (c). The computed values for the constants are shown in Table 5.

Fig. 12
figure 12

Plot of a Langmuir isotherm, b Freundlich isotherm, c Temkin isotherm, and d Elovich kinetic model for dye adsorption

Table 5 Calculated values for the MG adsorption constants from several kinetic models

The Elovich Model is another widely used empirical equation for describing chemisorption. It is often used to describe the kinetic of adsorption on heterogeneous surfaces, where the adsorbate molecules interact with different types of active sites on the adsorbent surface [61,62,63,64]. The Elovich equation is given as:

$${\mathbf{q}}_{\mathbf{t} = \frac{1}{{\varvec{\upbeta}}}\mathbf{ln}\left({\varvec{\upalpha}}{\varvec{\upbeta}}\right)+ \frac{1}{{\varvec{\upbeta}}}\mathbf{ln}\mathbf{t}}$$
(13)

where \(\alpha\) (mg/g min) denotes the initial adsorption rate and \(\beta\) (mg/g) denotes the amount of surface exposure and the activation energy for chemisorption. Hence, the results show a good fit at 50 (mg/l) with a R2 of 0.97606 that means that it follows chemisorption (Fig. 12d and Table 6).

Table 6 Calculated values of thermodynamic parameters

Thermodynamic adsorption study

In our work, we systematically investigated the effect of temperature on the removal of MG dye, as shown in Fig. 13. Temperature is a crucial component influencing the adsorption process. The associated thermodynamic parameters were investigated using the equilibrium constant (\(K={q}_{e}/{C}_{e}\)) [12]. The Eqs. (14, 15, 16) provided below were utilized to determine the enthalpy change (\(\Delta S^\circ\), J mol−1 K−1), the entropy change (\(\Delta H^\circ\), KJ mol−1), and the standard free energy change (\(\Delta G^\circ ,\) KJ mol−1), which serves as the primary criterion for assessing spontaneity. To evaluate the removal efficiency of MG dye using these thermodynamic constants, we conducted experiments within a temperature range of 25 °C to 55 °C, with a dye concentration of 50 mg L−1, and at a pH of 7.

Fig. 13
figure 13

Graph between 1/T versus ln (K) for thermodynamics study

$$\Delta G^\circ = -RT\,{\ln}\,K$$
(14)
$${\ln}\,K=\frac{\Delta S^\circ }{R}-\frac{\Delta H}{RT}$$
(15)
$$\Delta G^\circ = \Delta H^\circ -T\Delta S^\circ$$
(16)

In these equations, “R” represents the universal gas constant (8.314 J/mol. K), and “K” stands for the equilibrium constant.

The value of “K” was determined using experimental data by calculating the average temperature-dependent value. Negative values of the \(\Delta G^\circ\) generally describe the spontaneity of the adsorption process, which is highly supported at high temperatures [41]. The standard enthalpy (\(\Delta {\text{H}}^\circ )\) value is positive (61.23 kJ/mol), indicating that the behavior of the adsorption process is endothermic. Despite the exothermic adsorption process, the interaction between MG dye ions and the hydrogel surface causes the MG dye ions to lose their water molecules, requiring a significant amount of energy. If the energy needed for dehydration exceeds the enthalpy of MG adsorption to the surface, the ΔHo value becomes positive. Additionally, the standard entropy (ΔSo) value (239.80 J/mol. K) is positive, confirming an increase in the randomness of the adsorption process and indicating an increase in disorder at the interface between the MG solution and the adsorbent [63]. The results are presented in Table 6 and Fig. 13.

Malachite adsorption mechanism

Removal of MG dye at different concentrations is shown in Fig. 14, and the process of MG dye adsorption onto the GG/LBG-poly(AAm) surface involves various mechanisms that govern the interactions between the adsorbate and the adsorbent [40] (Scheme 3). Cationic dyes are attracted to insulating adsorbent surfaces, resulting in potential interactions attributed to –COOH and –OH groups within the hydrogel structure [50, 64]. Furthermore, the binding interaction between the adsorbent and adsorbate is influenced by various factors, including dye structures, surface properties, pH, and functional groups. This interaction is a combination of electrostatic forces and weak bonds. Initially, dye molecules adhere through mechanisms like pore diffusion, with additional contributions from forces like dipole–dipole and π-π interactions. Research confirms the electrostatic attraction between negatively charged adsorbents and cationic MG dye. Table 7 provides a comparative analysis of the adsorption capacities of various dyes with various adsorbents.

Fig. 14
figure 14

Removal of MG dye at different concentrations

Scheme 3
scheme 3

Plausible mechanism of MG dye adsorption on the prepared hydrogel

Table 7 Comparison of MG adsorption using natural polysaccharide-based hydrogels

Conclusion

In conclusion, our study has focused on assessing the effectiveness of the GG/LBG-g-poly(AAm) hydrogel as an adsorbent for MG dye removal from aqueous solutions. We successfully synthesized the GG/LBG-g-poly(AAm) through free radical polymerization, incorporating dual backbones for enhanced performance. We achieved a notable swelling capacity by meticulously optimizing four key parameters using a full factorial rotatable CCD-RSM. The synthesized hydrogel underwent comprehensive characterization through various techniques, including FESEM, FTIR, XRD, zeta potential, and TGA, providing insights into its physical and chemical properties. Furthermore, our investigation encompassed the exploration of crucial factors such as pH (7.0), contact duration (300 min.), and adsorbent dosage (0.08 g), allowing us to unravel the hydrogel’s capabilities. Our findings revealed that the synthesized hydrogel exhibited remarkable efficiency in MG adsorption, particularly under neutral conditions, with a maximum adsorption capacity of 52.96 mg g−1. The adsorption data fitting best to the pseudo-second-order kinetic model and Freundlich adsorption isotherm (R2 = 0.99196) signifies its robust potential for MG dye adsorption. Also, the D-R isotherm and Elovich model perfectly show the adsorption’s chemisorption nature. The thermodynamic studies also indicated favorable spontaneity, supported by ΔHo of 61.23 kJ/mol and ΔSo of 239.80 J/mol.K. In summary, the novel GG/LBG-g-poly(AAm) hydrogel has exhibited remarkable efficacy in removing harmful dyes from wastewater. This study highlights its promise as an effective adsorbent material with significant potential for practical applications in environmental remediation.