Introduction

Water is one of the most crucial needs for human life and the ecosystem as well. Over the past decades, notably, water pollution has resulted in the discharge of toxic effluents onto water surfaces because of fast-paced industrialization and a rising population. Thereby, it endangers the health of people and the ecosystem as well. Water pollution occurs as a result of the release of toxic chemical pollutants like synthetic organic dyes [31]. Synthetic organic dyes are utilized in many industrial areas, for example, textiles, which cause a large amount of contamination in our environment. Cationic dyes are the primary source of contaminated water. Several published reports mentioned that these dyes are non-biodegradable materials and do not degrade easily via conventional treatment techniques. As a result, they accumulate in living cells and cause fatal diseases. Widespread fabrics are dyed with cationic-charged substances, including methylene blue (MB), malachite green (MG), crystal violet (CV), methyl violet (MV), and others. Several adverse effects are associated with MB, which can cause blindness, skin irritation, respiratory difficulties, migraines, and dizziness [17, 41, 42].

To solve this environmental problem, various conventional techniques can be applied for the purification of dye-based contaminated water, including electrochemical [21], catalytic degradation [51], membrane separation [3], photo-degradation [16], and coagulation-flocculation [15]. Traditional purification strategies, on the other hand, have outstanding disadvantages: low dye separation, high energy and time consumption, high-cost techniques, and limited function. Recently, the adsorption approach has drawn intensive attention for heavy metals, pharmaceuticals, and dye-based wastewater [54] purification thanks to its advantages, such as high-selectivity and low-cost technique, as well as its straightforward operation [2, 46]. Recently, polysaccharide-based adsorbents have played a crucial role in wastewater treatment applications thanks to their remarkable features, such as being highly stable, inexpensive, nontoxic, biodegradable, widely available, and environmentally friendly [25, 25, 26, 26, 29, 29, 36, 46]. Various polysaccharide formulation-based adsorbents can be widely applied for the removal of toxic synthetic dyes from contaminated water. Included in the aforementioned studies are hydrogels [1]; [35, 50] and formulation of hydrogel nanocomposites [9, 34, 37].

Hydrogels are three-dimensional polymeric structures. They can absorb biological fluids and water and resemble biological tissues without dissolving their compositions; therefore, they are called smart materials [4, 25, 26, 29, 30]. Hydrogels are intensively used for removing various dyes due to their unique properties like fast kinetics, recyclability, good adsorption performance, and low cost [7, 57]. Several efforts have been made to develop hydrogels from natural polymers like polysaccharides to reduce the total cost of the adsorption materials [2, 7]. Hydrogel-based polysaccharides like locust bean gum (LBG have received potential interest in the last few years [5, 43]. For example, in 2020, Pandey et al. mentioned the synthesis of LBG hydrogel-based adsorbents for capturing brilliant green (BG) dye with a Qmax of 142.85 mg/g, fitted with the Langmuir model [40]. In a separate study, most recently, the LBG hydrogel nanocomposites were prepared via in-situ iron mineralization within hydrogel chains for capturing methyl violet and MB dyes. They reported that the prepared LBG hydrogel nanocomposites had outstanding adsorption efficiency as well as excellent regeneration ability [41, 42]. Recently, various scientific groups worldwide have shown great interest in designing hydrogel nanocomposites by incorporating different inorganic nanoparticles as nanofillers within polymeric hydrogel matrixes [18, 22]. Hydrogel nanocomposites are widely employed as adsorbents for water purification by adsorbing trace levels of metal ions, organic dyes, and other contaminants. Owing to their high adsorption capacity, swelling ability, recyclability, and good thermomechanical stability, which intensifies their usage for environmental remediation. In this direction, several researchers have integrated nanoparticles (e.g., Fe3O4, ZnO, and TiO2) into the polymeric hydrogel matrix to develop adsorbents with superior properties [27, 32, 45].

Among nanostructured metal oxides, TiO2 nanoparticles have attracted potential interest owing to their remarkable properties, including their accessibility, high specific surface area, tunable interlayer spacing, versatility, surface hydrophilicity, and photocatalytic activity [59, 38]. Nano-sized TiO2 nanoparticles can interact intact with functional groups of hydrogel networks and increase the centre of negative charge within the hydrogel network to improve their binding to positively charged dye molecules [23]. Moreover, many published studies have reported that the incorporation of TiO2 nanoparticles can enhance the physiochemical properties of hydrogels [55, 60]. Our prior study showed this phenomenon, which was well demonstrated by constructing hydrogel nanocomposites containing TiO2 nanoparticles and strengthening their mechanical elasticity; however, their swelling ability in water decreased [23]. According to the literature, it is expected that the addition of TiO2 nanoparticles within hydrogel chains will improve their adsorption performance, mechanical and thermal stabilities [23, 55].

With radical polymerization of LBG, acrylamide, and acrylic acid monomers and N,N'-methylenebisacrylamide as a crosslinker, without and with nano-sized TiO2, a LBG hydrogel and a hydrogel nanocomposites-based MB adsorbent were successfully synthesized. The analysis of the prepared samples was conducted using several techniques, including FTIR, XRD, SEM, and TEM, in order to examine both their chemical composition and surface morphology. The study examined the impact of several factors, such as solution pH, adsorbent dosage, equilibrium concentration, temperature, and contact time, on the sorption capacity of the LBG-cl-p(AA-co-AAm) hydrogel and its nanocomposites for MB dye. Additionally, investigations were conducted to investigate the adsorption kinetics, isotherms, and thermodynamics. A desorption-adsorption study was also performed to determine the recyclability of LBG-cl-p(AA-co-AAm) hydrogel and its nanocomposites-based adsorbents.

Experimental Section

Materials

The locust bean gum (LBG) from Ceratonia siliqua seeds, acrylic acid (AA, 99%), acrylamide (AAm, 99%), ammonium persulfate (≥ 98.0%; 248614), methylenebisacrylamide (MBA, 99%), MB dye, titanium isopropoxide (97%), nitric acid (65%), and propan-2-ol were obtained from Sigma-Aldrich. Acetone, sodium hydroxide (NaOH), and hydrochloric acid (HCl, 37%) were collected from Merck. Deionized water was used in all studies. Standard methylene blue (MB) dye solution was prepared by dissolving 1g of MB dye in 1L of deionized water, followed by subsequent dilution.

Preparation of TiO2 Nanoparticles (NPs)

TiO2 was synthesised according to our previous reported work in the literature [23] via a conventional sol–gel technique. Briefly, initially, titanium isopropoxide (10 ml) was dissolved with propan-2-ol (30 mL). Next, a turbid solution was obtained after 20 min of magnetic stirring, and deionized water (10 mL) was added. After that, nitric acid was slowly added to decrease the pH of the solution, and the mixture was left for 15 min. After 15 min, a yellow precipitate was formed by drying the mixture at 80 °C. The powder of TiO2 NPs was obtained by grinding the material to a fine consistency and then calcining it at 600 °C.

Preparation of LBG-cl-p(AA-co-AAm) Hydrogel

LBG-cl-p(AA-co-AAm) hydrogel was prepared according to the following method. In the beginning, 100 mg of LBG powder was dissolved in deionized water (10 mL). Next, 20 × 10–3 M of initiator (APS) was added to the LBG solution. Subsequently, the optimum amount of AA (10 × 10–4 M) was added to the above solution. While 60 × 10–3 M of AAm was first dissolved firstly using deionized water (3 mL) in a separate container and then added to the aforementioned reaction mixture, that was followed by 0.1 × 10–1 M of MBA addition. The reaction was kept at 30 mL under continuous magnetic stirring at 70 °C for 2 h. After 2 h, the resulting solution cooled at room temperature (− 25 °C). Then, the final hydrogel product was cut into smaller pieces, and then immersed in acetone for 120 min to withdraw all homopolymers. Finally, the purified modified LBG oven-dried at 60 °C, and pulverized into a fine powder for further investigation.

Preparation of LBG-cl-p(AA-co-AAm)/TiO2 Hydrogel Nanocomposites (HNCs)

In a typical process as depicted in Scheme 1, LBG hydrogel nanocomposites was synthesized with the same procedure that was described above with the addition of 0.1 g of TiO2 nanoparticles to the beaker holding the LBG, APS, AA, AAM, and MBA. For 20 min, the solution was agitated at 25 °C to provide a homogeneous mixture. Subsequently, the solution was left for 2 h at 70° C. After 2 h, the resulting solution cooled within 30 min at room temperature (− 25 °C). After that, the product cut into tiny pieces, and then immersed in acetone for 120 min to separate all homopolymers. Finally, the prepared adsorbent was oven-dried at 60 °C and pulverized into a fine powder using a mill ball for further investigation.

Scheme 1
scheme 1

Schematic illustration of the synthesis of LBG-cl-(AA-co-AAm)/TiO2 HNCs

Characterization Methods

Scanning electron microscopy (SEM) was used to look into the morphology of sample surface ((FESEM) SEM, JSM7500F, JOEL, Japan). The SEM was coupled with EDS (energy dispersive X-ray spectrometer). Fourier transform infrared (FTIR) spectra with a resolution of 4 cm−1 were acquired in the 400–4000 cm−1 wavenumber range. A PAnalytical Xpert PRO diffractometer (PAnalytical) was applied to acquire XRD. Evaluation of thermal stability performed with thermal gravimetric analysis ((TGA), Perkin-Elmer STA 6000) between 30 and 900 °C under in a N2 using 20 mL/min of flow rate. High-resolution transmission electron microscopy (HRTEM) (JEOL JEM-2100, Tokyo, Japan) was applied to investigate internal morphology of samples with integrated SAED (Selected Area Electron Diffraction). The mechanical stability of the materials was studied dynamically at temperature of 30 °C and a frequency band that ranges from 0.01 to 100 Hz, with a 0.05% of strain amplitude and 5 °C/min of ramp rate using the dynamic mechanical analysis ((DMA), 8000 Perkin-Elmer, USA). The remained concentration of MB dye was measured with LAMBDA 365 UV–Vis Spectrophotometer.

Swelling Ability

The degree of swelling ability for both LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-(AA-co-AAm)/TiO2 HNCs was studied using deionized water as follows: 0.1 g of modified LBG samples were typically soaked in 80 mL of various pH solutions ranging from pH 1.0 to pH 9.0. The pH was adjusted with HCl (0.1 M) and NaOH (0.1 M). The effect of inorganic salts (NaCl, CaCl2, and FeCl3) on the swelling behavior of the adsorbent was examined. After letting the adsorbent soak in the deionized water for 24 h, we weighed it again after wiping it off with filter paper in order to estimate its equilibrium swelling capacity. The formula for calculating the swelling capacity is as follows:

$$S\left( {g/g} \right) = \frac{{M_{s} - M_{d} }}{{M_{d} }}$$
(1)

where Ms is the swollen mass of modified LBG samples and Md is the dry sorbent mass.

Adsorption Studies

The MB dye adsorption was studied with the batch method. With the optimum amount of adsorbent (0.5 g/L), 20 mL of the dye standard solutions were poured into a 100 ml PE container. Then, we put it in a water bath with a thermostatic oscillator at 25 °C and set the speed to 170 rpm. Adsorption capacity was investigated at different pHs in the range of 4.0–12.0 and adsorbent dosages of 0.5–2.5 g/L. In addition, the effect of time on adsorption capacities at 25 °C was analyzed between 15 and 180 min throughout the adsorption process. The dosage of MB dye used in the adsorption isotherm experiments ranged from 100 to 700 mg/L. The aliquots of MB-loaded adsorbents were filtered after finishing the adsorption time directly, and the concentration was determined using a UV–Vis spectrophotometer (λmax = 664 nm). The adsorption capacities (qe) and (qt) were calculated using the following formula:

$$q_{e} = \left( {\frac{{C_{O} - C_{e} }}{m}} \right)V$$
(2)
$$q_{t} = \left( {\frac{{C_{O} - C_{e} }}{m}} \right) V$$
(3)

where, Co and Ce are the initial and equilibrium concentrations of MB (mg/L), respectively. V is the volume of the MB solution (L), and m is the adsorbent dose (g). The variables qe and qt denote the equilibrium capacity of MB and the quantity of MB adsorbed per unit mass of the adsorbent (mg/g) within a particular time (t), respectively.

Analysis of Error

The non-linear adsorption isotherm models were evaluated using the root mean square error (RMSE) values. A lower RMSE value implies a better fit of the model. The literature states that when the RMSE is < 0.1, < 0.2, < 0.3, and > 0.3, the accuracy of the model is exceptional, reasonable, fair, and poor, respectively [22]. The following formula was used to determine the RMSE:

$${\text{RMSE}} = \sqrt {\mathop \sum \limits_{i = 1}^{N} \frac{{\left( {q_{exp} - q_{cal} } \right)^{2} }}{N}}$$
(4)

where qexp is the experimental adsorption capacity, and qcal is the estimated adsorption capacity based on the isotherm equation model, and n is the total number of data points from the experiment.

Regeneration Studies

To perform regeneration tests, MB-loaded adsorbents were immersed in 60 mL of 0.1 M HCl under continuous stirring (140 rpm) for 2 h. The recovered materials were rinsed using water and oven-dried at 40 °C. Subsequently, they were pulverized into powder form and reapplied in the following adsorption cycle. Six adsorption–desorption cycles were carried out.

Determination of pH of Zero Charge

pH, which includes zero total electrical charge on the surface of examined adsorbent. is called pHpzc. The pHpzc of fabricated modified LBG adsorbents was measured by [27]. Modified LBG adsorbents (0.1 g) was soaked in deionized water (80 mL), and then the initial solution pH adjusted to a range of 2.0–10.0 (pHinitial), then shaken at 170 rpm for 48 h to determine the pHpzc. After 48 h, final pH (pHfinal) was measured. The pHpzc value was determined from the plotted graph between pHinitial and the difference between pHinitial and pHfinal (ΔpH) [8].

$$\Delta pH = pH_{final} - pH_{initial}$$
(5)

Results and Discussion

Material Characterization

FTIR is an efficient tool for determining the structural composition of the prepared modified LBG samples compared with native LBG. The chemical structure of LBG, TiO2 nanoparticles, LBG-cl-p(AA-co-AAm) hydrogel, and LBG-cl-p(AA-co-AAm)/TiO2 HNCs was confirmed by FTIR analysis, as shown in Fig. 1a. TiO2 nanoparticles revealed a variety of distinct peaks in their FTIR spectra, including an stretching vibration band at 3408 cm−1 referred to O–H groups. The peak found at 1623 cm−1 was attributed to the stretching vibration of Ti–OH bonds. Whereas the prominent peak observed at 521 cm−1 was related to the TiO2 bending band, which is a typical TiO2 peak [44]. In the LBG spectrum, the stretching vibration of − OH functional groups were represented by band from 3004 to 3682 cm-1, whereas the C–H functional groups CH and CH2 was represented by peaks at 2871 and 2920 cm−1. The galactose stretching and mannose rings appeared at 1648 cm−1. The peaks found at 1441 cm−1 and 1380 cm−1 were attributed to C–H bending or CH and CH2 deformation. The peaks detected at 950 and 1148 cm−1 established the linkage between C–O–C and C–O glycosidic bonds [40,41,42].

Fig. 1
figure 1

a FTIR spectra, b XRD pattern and c TGA of TiO2 nanoparticles, LBG, LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs

The LBG spectra exhibited a broad band ranging from 2328 to 3694 cm−1 after grafting with (AA-co-AAm). This spectral feature may be attributed to the stretching of − OH groups, which occurs due to intermolecular hydrogen bonding resulting from the chemical interaction between polyacrylic acid (pAA) and LBG. The intensity and the broadness of the galactose stretching and mannose rings appeared at 1648 cm−1 emanating from LGB due to the co-polymerization of AA and AAm monomers [41, 42]. Furthermore, the broad band from 1493 to 1771 cm−1 exhibits significant monomer structure characteristics, with the peaks induced by C=O (1710 cm−1), C–O (1680 cm−1), C–C (1620 cm−1), and asymmetric stretching of O–C–O at 1560 cm−1 overlapping to form a tuned spectral range, leaving only two peaks at 1710 and 1650 cm−1, indicating that the hydrogel and hydrogel nanocomposites were successfully prepared [39]. In the prepared hydrogel bands, the presence of an addition peak at 1161 cm−1 indicates that the monomers have been polymerized. Finally, the spectra of LBG-cl-(AA-co-AAm)/TiO2 HNCs exhibited a new peak at 500 cm−1 owing to the Ti–O vibration. The observed functional groups show that both the LBG-based hydrogel, and LBG/ TiO2-based HNCs were successfully synthesized.

The diffractograms of TiO2 nanoparticles, LBG, LBG-cl-p(AA-co-AAm) hydrogel, and LBG-cl-p(AA-co-AAm)/TiO2 HNCs are exhibited in Fig. 1b. The X-ray diffractograms of TiO2 nanoparticles showed clear peaks at 2θ = 27.44 (110), 36.06 (101), 41.22 (111), and 54.30 (211), matching the planes of rutile TiO2 (JCPDS Card No. 21–1276). Also, the TiO2 nanoparticles had a distinct peak at 2θ = 25.80 (101) that related to the anatase TiO2 plane (JCPDS Card No. 21–1272). These results indicate that both rutile and anatase phases of TiO2 nanoparticles [23]. In the XRD patterns of LBG, at 2θ = 18.70°, a typical amorphous structure appears with a broad band [40,41,42]. The diffraction intensity increased after grafting AA and AAm, and the diffraction peak for LBG-cl-p(AA-co-AAm) hydrogel shifted slightly (2θ = 20.40°). The single diffraction peak of AA is responsible for this slight shift, indicating no significant structural deformation [41, 42]. Xu et al. [58] discovered in a distinct investigation that pure AA exhibits a solitary diffraction peak at a 2θ value of 20.10°. The co-polymerization of LBG with AA and AAm formed the XRD peak of LBG-cl-p(AA-co-AAm) to exhibit a broadening effect.

On the other hand, the coexistence of crystalline and amorphous phases was noticed in the structure-effect of TiO2 nanoparticles on the LBG-cl-p(AA-co-AAm) hydrogel. Incorporation of TiO2 within LBG hydrogel altered its structure, as shown in the diffractogram of LBG-cl-p(AA-co-AAm)/TiO2. This material had a strong LBG-cl-p(AA-co-AAm) wide peak with crystalline TiO2 peaks, indicating that the structure of LBG-cl-p(AA-co-AAm)/TiO2 HNCs is semi-crystalline (Fig. 1b).

The thermal stability of the TiO2 nanoparticles, LBG, LBG-cl-p(AA-co-AAm) hydrogel, and LBG-cl-p(AA-co-AAm)/TiO2 HNCs was determined by the TGA, and data is illustrated in Fig. 1c. TiO2 nanoparticles were the most thermally stable in the studied range, with the least weight loss residue. LGB showed two decomposition stages. In the first, its weight loss was approximately 3.10% between 25 and 100 °C, because of the water evaporation from polysaccharide structure. In the second stage, the degradation of several monosaccharide units of the polysaccharide structure resulted in a higher rate of weight decomposition from 200 to 370 °C. 21.60% of the residue remained in LBG at 500 °C. The thermograms of LBG-cl-p(AA-co-AAm) hydrogel, and LBG-cl-p(AA-co-AAm)/TiO2 HNCs showed nearly identical behavior after three thermal events. In the first stage, minimal weight loss occurred between 25 and 200 °C due to the moisture content, whereas in the second stage, 27.00 and 19.00% of the weight loss from 200 to 350 °C for LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs, respectively. The disintegration of the backbone polymer chain is responsible for the third weight loss. The final residue amount in HNCs was higher (25.00%) than that in LBG-cl-p(AA-co-AAm) hydrogel (15.00%), indicating significant enhancement the thermal stability after the addition of TiO2 nanoparticles.

Morphological Characteristics

Figure 2 depicts the morphology and elemental analysis of TiO2 nanoparticles, LBG, LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs. The SEM micrograph of the LBG image appeared smooth (Fig. 2a). The image (Fig. 2b) also clearly shows that after hydrogel formation, the LBG-cl-p(AA-co-AAm) hydrogel has a rough, fragment-like surface. The rough-porous network structure of LBG-cl-p(AA-co-AAm)/TiO2 HNCs (Fig. 2c) with abundant spherical nanocrystal TiO2 ps on the polymer hydrogel networks shows successful TiO2 nanop incorporation, which is compatible with the XRD data. The SEM image in Fig. 3d demonstrated that the TiO2 NPs size was in the nanoscale range. The image also revealed that the NPs were spherical in shape and uniformly dispersed, and that the TiO2 nanoparticles had a homogenous structure with no unusual features on the surface. Variable distributions of O and Ti atoms of TiO2 were observed on the surface of HNCs in the EDS compositional mapping analysis (Fig. 2e). The Ti mapping (Fig. 2f) shows an element with a non-uniform distribution on the polymer surface, whereas the O mapping (Fig. 2g) shows a uniform distribution on the LBG-cl-(AA-co-AAm)/TiO2 HNCs surface. Addition of TiO2 nanoparticles in polymer matrix was further elucidated using EDS analysis (Fig. 2h). Furthermore, the EDS-SEM studies confirmed the quantity of titanium (Ti) in the LBG-cl-p(AA-co-AAm)/TiO2 HNCs, with a weight percentage of 2.79% (Table S1).

Fig. 2
figure 2

a SEM images of LBG, b LBG-cl-p(AA-co-AAm) hydrogel, c LBG-cl-p(AA-co-AAm)/TiO2 HNCs, d TiO2 nanoparticles, e EDS of LBG-cl-p(AA-co-AAm)/TiO2 HNCs, f Elemental map of Ti, g O elemental mapping, and h EDS analysis of LBG-cl-p(AA-co-AAm)/TiO2 HNCs, i HRTEM images of TiO2 nanoparticles, j SAED pattern of TiO2 nanoparticles, and (k) HRTEM image of lattice planes

Fig. 3
figure 3

Frequency dependence of a storage modulus, b tan of removal by LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs. The influence of c pH on swelling capacity, d pH on surface charge density, and e saline on swelling of removal by LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs

HRTEM was used to analyze the morphology of TiO2 NPs, as shown in Fig. 2. The TiO2 NPs in Fig. 2i appeared to be spherical, yet they were observed to be agglomerated. Moreover, TEM images of TiO2 NPs in various magnifications are shown in Fig. S1. The SAED pattern of the TiO2 NPs, which consists of several rings, is shown in Fig. 2j. These rings represent the polycrystalline behavior of TiO2 NPs. The size of the TiO2 NPs in the TEM image reflects the XRD data. The d-spacing of the TiO2 nanoparticles configuration was calculated using the fast Fourier transform (FFT) and inverse Fourier transform (IFFT) patterns, as shown in Fig. 2k. The lattice fringes had an average interlayer spacing of 0.358 nm, which is close to the interlayer spacing of 0.352 nm corresponding to the d-spacing of the (101) planes in anatase TiO2.

Dynamic Mechanical Analysis

Figure 3a depicts the storage modulus of the synthesized LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs as a function of frequency dependence. With increasing frequency, the storage modulus of hydrogel and its HNCs increased. The LBG-cl-p(AA-co-AAm)/TiO2 HNCs have a higher storage modulus than the corresponding hydrogel based on the storage modulus response to frequency (Fig. 3a). This finding implies that the crosslinking density of the HNCs is greater than that of their hydrogel counterparts due to the higher storage modulus [37]. This might be attributed to better physical interaction in the polymer matrix linkages via links with the inorganic TiO2 nanofiller [27]. Particularly since TiO2 nanoparticles are mechanically stable, the homogenous dispersion of TiO2 nanoparticles in the polymer chains may be responsible for the increased storage modulus [27]. The effect of the hydrogel and its hydrogel nanocomposites on the loss factors (tan δ) is depicted in Fig. 3b. The tan δ, which provides details on the properties of the material, is the ratio of viscous energy lost to elastic energy retained. Tan decreases as frequency increases for both LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs, indicating that the materials become more elastic.

The swelling behavior of a hydrogel must be determined to examine its usability in a variety of applications. Hydrogels were submerged in solutions ranging from pH 1.0 to 9.0 to investigate their water absorption capacity and reactivity to external pH environments. Figure 3(c) shows that the swelling degrees of LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs vary depending on the pHs tested, which are composition-dependent. Despite the fact that both materials exhibited the same swelling behavior across the pH range tested, the hydrogels exhibited a strong swelling tendency. Numerous studies have demonstrated that metal oxide nanoparticles, specifically TiO2, possess the ability to act as a crosslinking agent with notable crosslinking densities and limited swelling [23, 30]. At high pH, both materials showed significant swelling behavior. The swelling results showed that the LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs were pH-dependent. The solution pH in the swelling process is indeed a critical factor affecting the degree of hydrogel ionization. The pH of the solution was modified to induce distinct levels of ionisation in the hydrogel and its nanocomposites present in the initial solution. At low pH ranges, the solution exhibited a depressed swelling on the polymer networks. The elevation of pH resulted in a concomitant rise in the concentration of -COO- groups, leading to a heightened attraction force. The degree of swelling exhibited a positive correlation with the pH level, resulting in an increase in swelling as pH increased.

The textural characteristics of LBG-cl-p(AA-co-AAm)/TiO2 HNCs indicate the existence of functional groups on their structure, with carboxyl, hydroxyl, and C-O being the most dominant (Fig. 1a). The pH point of zero charge (pHpzc) of the LBG-cl-p(AA-co-AAm)/TiO2 HNCs was determined to be 4.4, which closely approximates the pKa of acrylic acid (4.25). The pH point of zero charge (pHpzc) exhibited by the prepared LBG-cl-p(AA-co-AAm)/TiO2 HNCs indicates a correlation between the pHpzc and the adsorption capacity of the adsorbent employed. It is noteworthy that the present study employed PAA as the primary monomer and AAm as the secondary monomer. It has been established that PAA exhibits ionisation of its carboxylic groups in a pH environment that exceeds its dissociation constant (pKa 4.25) [47]. PAA is an example of an anionic polyelectrolyte that undergoes deprotonation in basic environments. This process results in a significant increase in electrostatic repulsion between the chains, which in turn facilitates water molecule penetration and leads to a substantial swelling of the hydrogel. In an acidic environment, the acidic polymer undergoes protonation, leading to a reduction in charge density and subsequent collapse in polymer volume. On the other side, the introduction of a non-ionic hydrophilic group (-CONH2) into the LBG-cl-p(AA-co-AAm)/TiO2 HNCs network results in a low degree of ionisation of − CONH2 in a nearly neutral environment. The findings indicate that the adsorption of cations is likely to be advantageous when the pH values exceed the pHpzc.

One of the critical elements in determining the mechanism and favorability of the adsorption process is pHpzc. The pHpzc indicator indicates the surface charge on adsorbent surfaces. When the pH of the adsorbents is less than pHpzc, the surfaces gain a net positive charge, which promotes anionic adsorption. When pH exceeds pHpzc, the surface of adsorbents becomes negatively charged, resulting in advantageous cationic adsorption. This is because the adsorbent surface turns negative at higher pH levels (pH > pHpzc), which enhances the electrostatic interactions with cationic MB dye. pHpzc of TiO2 is usually given as 6.25 to 6.90. In an acidic solution, the surface of TiO2 nanoparticles appears positively charged (pHpzc > pH) and negatively charged in an alkaline solution (pH > pHpzc), as shown in Eqs. (6) and (7) [51].

$${\text{pH }} < {\text{ pHpzc}}:{\text{ TiOH }} + {\text{ H}}^{ + } \leftrightarrow {\text{ TiOH}}_{{2}}^{ + }$$
(6)
$${\text{pH }} > {\text{ pHpzc}}:{\text{ TiOH }} + {\text{ OH}}^{ - } \leftrightarrow {\text{TiO}}^{ - } + {\text{ H}}_{{2}} {\text{O}}$$
(7)

The pHpzc of the LBG-cl-p(AA-co-AAm) hydrogel and the pHpzc of the LBG-cl-p(AA-co-AAm)/TiO2 HNCs were 4.05 and 4.40, respectively (Fig. 3d).The swelling results showed that LBG-cl-p(AA-co-AAm) hydrogel and the LBG-cl-p(AA-co-AAm)/TiO2 HNCs were pH-dependent, which was confirmed by the pHpzc results.

In salt solutions with varying ionic valence values, the swelling behavior of both LBG-cl-p(AA-co-AAm) hydrogel and the pHpzc of the LBG-cl-p(AA-co-AAm)/TiO2 HNCs was investigated (Fig. 3e). As the ion concentration increased, the swelling of both adsorbents decreased. Ionic crosslinking points within the polymeric hydrogel network, caused by carboxylate and carboxyamide group complexation with multivalent cations, enhance the crosslink density in the hydrogel. The hydrogel matrix contracts as a result, and its ability to expand is reduced. The findings indicate that the swelling degree exhibited a decline as the ionic concentrations (Na+, Ca2+, and Fe3+) increased, suggesting that the ionic concentrations had an impact on the swelling degree. It is noteworthy that the extent of swelling in hydrogels decreased significantly as the ionic valence number increased. The deswelling of hydrogel and hydrogel nanocomposites led to a reduction in electrostatic repulsion between –COO − due to the chelation between –COO − and metal ions, particularly those with a higher valence number. In addition, the trend revealed a discernible pattern. The order of preference for the adsorbents was observed to be NaCl > CaCl2 > FeCl3.

Adsorption Studies

In adsorption process, there are different variables were all examined including:

Influence of Solution pH

The pH of adsorption solution is the most essential parameter for adsorbing contaminants from water, as it has the greatest impact on the process. To identify the ideal pH value for this process, the pH influence on removing MB dye was investigated (Fig. S2(a)). As a result, a series of adsorption methods were examined to investigate the MB adsorption efficiency of two adsorbents over a pH range of 4 to 12. When the adsorption solution pH was changed from 4 to 7, the LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs performed better in achieving the MB dye molecules. PAA-based hydrogels are classified as polyelectrolytes owing to the presence of ionizable carboxyl groups within their polymer structure. The PAA-based hydrogels (pKa = 4.25) exhibit reduced MB dye adsorption under low pH conditions due to the predominant nonionized state of the COOH groups within the adsorbent structure [47]. Both adsorbents' MB adsorption capacity reached equilibrium at pH = 7. The effectiveness of LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs in an alkaline (pH > 7) environment is demonstrated. The shift in the MB removal curves can be related to adsorption's electrical characteristics and the distribution of MB molecules on the surface. The predominance of carboxyl groups ionizes in an alkaline environment, and according to pHpzc data, the high adsorption efficiency is generated by electrostatic force interactions among MB dye and the adsorbent’s surface.

Adsorption behaviour is also affected by the adsorbent dose. The effect of adsorbent dosage was examined (Fig. S2(b)) by adjusting the dosage between 0.5 and 2.5 g/L at pH 7 in 130 mg/L (20 mL) of MB solution for 120 min. The adsorption capability of both adsorbents declined with increasing dosage, and maximal adsorption was attained at a lower (0.5 g/L) polymer concentration. In general, increasing the adsorbent dose reduces adsorption ability because more active sites are inaccessible to the adsorbate. This is because greater doses may promote adsorbent agglomeration and a reduction in active adsorption sites. As shown in the graph of dosage vs. adsorption capacity, the findings for LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs exhibited comparable behavior throughout the examined range.

The experiment on the adsorption kinetics of LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs is shown in Fig. S2(c). Adsorption process consists of two stages such as quick adsorption and gradual equilibrium. The first rapid adsorption stage was because of the distribution of active sites on the adsorbents, which are progressively occupied, and the adsorption equilibrium is established after 80 min. Fig. S2 depicts various kinetic models applied to study the rate of MB adsorption by both adsorbents. The dye concentration effect on the MB removal by both adsorbents was examined at a temperature of 25 °C, as shown in Fig. S2(d). It was found that both adsorbents had a sufficient number of active sites, which, due to an increase in MB concentration, enhanced their adsorption capacity. Moreover, the rise in MB concentration facilitated the transfer and interaction of adsorbate and adsorbents, resulting in increased adsorption capabilities. The data collected for MB adsorption by LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs was modelled and fit using the non-linear isotherm models; plots are illustrated in Fig. S3, while data is displayed in Table 1.

Table 1  The parameters for the MB adsorption kinetic and isotherm models in LBG-cl-p(AA-co-AAm)/TiO2 hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs (above). Non-linear Isotherm parameters for MB dye adsorption onto LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs (below)

Adsorption Kinetic Studies

The performance of MB adsorption in LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs was investigated using four adsorption kinetic models: pseudo-first order, pseudo-second order, the Elovich model, and intraparticle diffusion equations. To investigate the adsorption MB mechanism of the adsorption process, the pseudo-first order kinetic [19] and pseudo-second order kinetic [13, 14] models are often used, and their linear equation forms are given in Eqs. (8 and 9):

$$\ln (q_{e} - q_{t} ) = \ln q_{e} K_{1} - K_{1} t$$
(8)
$$\frac{t}{{q_{t} }} = \frac{1}{{k^{\prime}q_{e}^{2} }} + \frac{t}{{q_{e} }}$$
(9)

where qe (mg/g) is the equilibrium adsorption capacity of adsorbents; K1 (/min) and K’ (g/mg.min) represent pseudo-first orderʼs rate constant and pseudo-second order order’s rate constant. Equations (8) and (9) were used to linearly fit the experimental observations as shown in Figs. S2 (a) and 6(b). Table 1 shows the calculated isotherm parameters.

The Elovich isotherm model has been widely used to describe chemical adsorption processes in adsorption kinetics models [6]. The linear equation is given in Eq. (10).

$$q_{t} = \frac{1}{\alpha }\ln \left( {\alpha \beta } \right) + \frac{1}{\alpha }\ln \left( t \right)$$
(10)

where α is the initial adsorption rate (mg/g.min) and β is a constant proportional to surface coverage (g/mg). Table 1 shows the values of several Elovich constants. In Fig. S2 (c), plots of qt vs ln(t) with 1/m (slope) and the intercepts of C may be used to calculate α and β, respectively.

The intra-particle diffusion model [56] is relevant to molecular diffusion and validates the process of adsorption for MB elimination. Equation (11) depicts the intra-p diffusion model as follows:

$$q_{t} = K_{i} t^{{{1 \mathord{\left/ {\vphantom {1 2}} \right. \kern-0pt} 2}}} + C$$
(11)

where Ki indicates the intra-p diffusion rate constant (mg/g.min0.5) and C denotes the boundary layer influence. The value of C is not zero, as shown in Table 1, showing that diffusion within the ps did not constitute the key rate-determining stage and that the sorption process was fairly complicated because of the boundary layer. During the process, there were two diffusion phases, as illustrated in Fig. S2 (d). The external surface sorption of MB dye molecules from solution was followed by intrap diffusion. The correlation (R2) values for PSO were higher in the LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs than in the other kinetic models studied. According to the findings, the adsorption data agreed with the pseudo-second order model, implying its driven by the adsorption processes.

Adsorption Isotherm

The Langmuir adsorption model is the most widely used form of isotherm in the study of organic dye adsorption. The assumption of uniform adsorption on the adsorbent surface underpins this model. As a result, the Langmuir isotherm is applied to explain the monolayer adsorption process that occurs at identified active sites [20]. The following equation describes the non-linear form of this isotherm (12):

$${\text{qe}} = \frac{{{\text{qmKLCe}}}}{{1 + {\text{KLCe}}}}$$
(12)

where qm (mg/g) is the maximum adsorption capacity, and KL (L/mg). is the Langmuir constant.

The Freundlich isotherm model is used to describe heterogeneous surfaces. This model is used to describe multisite intermolecular interactions between ions that are adsorbed to active site neighbors, resulting in multilayer adsorption [10]. The Freundlich isotherm model's non-linear form is described by Eq. (13):

$$q{\text{e}} = K{\text{F }}C{\text{e1/n}}$$
(13)

where KF is the Freundlich constant for adsorption capacity in (mg/g) and n is the Freundlich constant for adsorption intensity.

The multi-layer chemisorption process is the basis of the Temkin model. The Temkin isotherm model accounts for the adsorbent-adsorbent interaction while ignoring extremely high and low concentration values. The Temkin isotherm is only valid for a narrow range of ion concentrations [53].

The nonlinear Temkin model equation is expressed as follows (14):

$$q{\text{e}} = \frac{RT}{b}\ln \left( {K{\text{T}}C{\text{e}}} \right)$$
(14)

where KT is the equilibrium binding constant of the Temkin isotherm (L/g), b is the heat of adsorption constant (J/mol), R is the universal gas constant (8.314 J/mol/K), and T is the equilibrium temperature (273.15 K).

The Sips model is an isotherm hybridizing both the Freundlich and Langmuir models and is widely used to study heterogeneous and homogeneous adsorption systems. This model implies that adsorption only takes place in heterogeneous systems [49]. The equation for the nonlinear Sips isotherm is as follows (15):

$${\text{qe}} = \frac{{{\text{qms}}a_{s} C_{e}^{\frac{1}{ns}} }}{{1 + a_{s} C_{e}^{\frac{1}{ns}} }}$$
(15)

where qms represents the maximum adsorption capacity (mg/m), as represents the Sips constant (L/mg), and ns represents the Sips isotherm model's exponent, commonly known as the heterogeneity factor. When 1/ns is one, heterogeneous adsorption occurs, but homogeneous adsorption occurs when 1/ns is less than one.

The experimental data from the adsorption processes were fitted to the non-linear isotherm models mentioned above and the results are shown in Fig. S4. The Sips isotherm model describes an appropriate fit to the MB-adsorption for both the LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs, as shown by higher R2 values, low chi-square test statistics (χ2), and low RMSE values. The exponent 1/n value of LBG-cl-p(AA-co-AAm)/TiO2 HNCs was lower than that of LBG-cl-p(AA-co-AAm) hydrogel. When R2, χ2, and RMSE for isotherms are analyzed, the MB adsorption data for LBG-cl-p(AA-co-AAm)/TiO2 HNCs is of the Freundlich type rather than the Langmuir type. The monolayer adsorption capacitance values for LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs were 1540.9 and 1273.4 mg/g, respectively, according to the Langmuir model (Table 2). Table 2 compares the maximum adsorption capabilities of the synthesized LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs in this work to many other adsorbent materials described in the literature for MB dye adsorption systems.

Table 2  A comparison of the qmax of prepared materials with that of existent adsorbents

Thermodynamics

Figure 4a depicts the temperature influence on MB removal with an adsorbent weight of 0.5 g/L, a pH of 7.0, and 400 mg/L of MB dye. Over a temperature range between 25 and 45 °C, the removal capacities of MB dye on LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs increased from 780.6 to 794.8 mg/g and 778.4 to 790.2 mg/g, respectively. It is generally believed that adsorption arises when solvent molecules are displaced at the liquid–solid interface and replaced by MB adsorbate molecules. As a result, an increase in temperature allows additional energy absorption, leading to a weakening of the contact between the liquid surface and the MB molecules. In addition, MB molecule mobility is enhanced, which improves MB adsorption. This is consistent with the observation that the adsorption processes are endothermic.

Fig. 4
figure 4

a The influence of temperature on adsorption c, b the linear Van’t Hoff relationship to determine thermodynamic parameters, c regeneration study, and d FTIR of the adsorbents before and after MB adsorption

The temperature effect results were used to calculate the thermodynamic variables of the MB dye adsorption process. Figure 4b shows the linear relationship between ln Kd and 1/T to estimate thermodynamic parameters. The thermodynamic parameters were calculated using Eqs. (1517) [34]:

$$K_{d} = m\left( {\frac{{q_{e} }}{{C_{e} }}} \right)$$
(16)
$$\ln \left( {K_{d} } \right) = \left( {\frac{\Delta S^\circ }{R}} \right) - \left( {\frac{\Delta H^\circ }{{RT}}} \right)$$
(17)
$$\Delta G^\circ = - RT \ln \left( {K_{d} } \right)$$
(18)

where Kd is the equilibrium constant; ∆S° represents the entropy (J/Kmol); ∆H° denotes the enthalpy (kJ/mol); R is the universal gas constant (8.314 J/Kmol); T is the temperature (K) and ∆G° is Gibbs free energy (kJ/mol). Table S2 shows the thermodynamic variables, and the ∆S° value was positive shows a greater degree of randomization of the distribution of adsorbate between the solid and liquid phases. It was clear that the process was endothermic since ∆H° was positive. The negative ∆G° values ​​were verified, showing spontaneous adsorption process over the studied temperature range.

Regeneration

Adsorbent regeneration is one of the most important methods for determining the most efficient adsorbent for wastewater treatment applications. Real-world applications account for the management of pollutant-loaded adsorbents. It's important to understand that the MB-loaded adsorbent is toxic and difficult to dispose of. As a result, knowing the reusability and recyclability of adsorbent materials is crucial for both the economic and environmental sectors. As the number of adsorption–desorption cycles increased, the adsorption capacity of LBG-cl-(AA-co-AAm)/TiO2 HNCs decreased with no discernible difference but decreased with a noticeable difference for the corresponding hydrogel (Fig. 4c). After the sixth consecutive cycle, the adsorption ability of MB dyes decreased from 780.6 to 752.7 mg/g and from 778.4 to 756.0 mg/g for LBG-cl-(AA-co-AAm) hydrogel and LBG-cl-(AA-co-AAm)/TiO2 HNCs, respectively. The trend in adsorption capacity decreased after each cycle because of the loss of active sites as a result of partial desorption. Given the presence of TiO2 nanoparticles in the LBG-cl-(AA-co-AAm) hydrogel matrix, the high adsorption ability was maintained even after numerous cycles. Furthermore, the improved mechanical properties of the LBG-cl-(AA-co-AAm)/TiO2 HNCs may be responsible for this result. Table 2 indicates the compatibility of the prepared MB adsorbents with previously published MB adsorbents [27, 32, 52, 55, 33]. In an aqueous solution, the LBG-cl-(AA-co-AAm)/TiO2 HNCs have a potential adsorption capacity for MB dye.

The efficacy of a specific eluent in removing the adsorbate is contingent upon the interaction between the adsorbate and adsorbent, specifically, the impact of the eluent on the bond formation. The nature of the adsorption mechanism can be determined based on the desorption behaviour of the dye from the adsorbent. If neutral pH water is sufficient to achieve desorption, it suggests weak attachment of the dye to the adsorbent. Conversely, if desorption is facilitated by the use of sulphuric acid or alkaline water, it indicates that the adsorption is likely due to ion exchange. If an organic acid, such as acetic acid, is required to achieve desorption of the dye from the adsorbent surface, it suggests that the dye is chemisorbed onto the adsorbent. Finally, the effect of various reagents used in desorption studies demonstrates that hydrochloric acid is a superior desorption reagent because it can remove over 90% of the adsorbed dye [12]. The choice of eluent for the regeneration process of the MB-loaded adsorbents was determined to be 0.1 M HCl, as per the desorption studies from our previous studies and the literature [24, 28]. In accordance with the adsorption mechanisms, antithetical mechanisms were employed for the purpose of desorbing the adsorbed MB dye from the adsorbents. A plausible desorption mechanism, namely electrostatic exclusion, was postulated. The pH value of a solution containing desorbed MB dye in HCl (0.1 M) was altered, resulting in a modification of the surface charge properties of the MB-loaded samples. At pH < pHpzc, the positively charged adsorbents and MB+ dye molecules experience electrostatic repulsion, leading to the effective desorption of adsorbents from MB (Scheme S1).

Insights into the Mechanisms

The elucidation of the chemical structure of the adsorbent before and after MB adsorption may be used to suggest a plausible mechanism of MB adsorption by LBG-cl-(AA-co-AAm)/TiO2 HNCs (Fig. 4d). It is important to understand that both adsorbent’s surface and dye structure have an effect on the adsorption. After MB adsorption, the FTIR spectra of the hydrogel nanocomposites showed a significant change in the peak's position as well as the absorption peak intensities. Notably the removal of existing peaks and development of new peaks were analyzed to determine the nature of the adsorption. After MB adsorption, the broad band’s intensity at 2328 to 3694 cm−1 was reduced in LBG-cl-(AA-co-AAm)/TiO2 HNCs. There is a possibility of intermolecular hydrogen bonding between the surface of the hydrogel nanocomposites and the electronegative nitrogen atoms in the MB molecular structure. Moreover, the peaks at 1648 and 505 cm−1 in the hydrogel nanocomposites had lower absorption intensities after MB adsorption. The disappearance of the monomer-derived peaks at 1155 and 1710 cm−1 shows the electrostatic attraction of MB dye molecules with hydrogel nanocomposites surfaces. The C–H stretching of CH3 was associated with the appearance of strong peaks at 1550 to 1300 cm−1 in the FTIR of the MB-loaded LBG-cl-(AA-co-AAm)/TiO2 HNCs. According to the results, electrostatic interactions between the cationic dye (MB) and the negatively charged LBG-cl-(AA-co-AAm)/TiO2 HNCs surface are crucial to the adsorption process. The point-zero charge and the effect of the solution's pH confirmed the results. Similar results with MB dye adsorption systems have been published in the literature [55, 52, 33]. Accordingly, the interaction mechanism here consists mainly of electrostatic force and hydrogen bonding interactions. A possible adsorption mechanism between MB dye molecules and the hydrogel nanocomposites is shown in Scheme S1.

Conclusion

The study focused on the preparation of LBG-cl-p(AA-co-AAm)-based hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs as potential adsorbents for the removal of MB dye from aqueous solution. The developed adsorbents underwent testing using FTIR, XRD, TGA, SEM, TEM, DMA, and point-zero charge methods. The swelling capacity of both adsorbents was examined in various pH solutions. The research findings indicate that the inclusion of TiO2 NPs had a notable effect on the thermomechanical properties of the polymeric hydrogel nanocomposites. In addition, it was noted that the inclusion of TiO2 NPs resulted in a decrease in the hydrogel nanocomposites' ability to swell in water and absorb MB dye. On the basis of the adsorption process, it was observed that both adsorbents were a good match for the Sips isotherm model. Higher confidence values, lower chi-square test statistics, and low RMSE values are in support of this. The Langmuir maximum adsorption capacities of LBG-cl-p(AA-co-AAm) hydrogel and LBG-cl-p(AA-co-AAm)/TiO2 HNCs were found to be 1540.9 and 1273.4 mg/g, respectively. These values demonstrate their strong potential as effective adsorbents, making them viable alternatives to existing options. A pseudo-second-order model accurately describes the adsorption kinetics results. The thermodynamic parameters of both the hydrogel and HNCs indicate a favourable, predictable, heat-absorbing, and spontaneous adsorption process. After six adsorption/desorption cycles, the adsorbents were able to be regenerated, resulting in a yield of 752.7 mg/g with the hydrogel and 756.0 mg/g with the hydrogel nanocomposites at pH 7. Electrostatic force interactions and weak hydrogen bonding interactions primarily influenced the adsorption process between MB dye molecules and LBG-cl-(AA-co-AAm)/TiO2 HNCs.