1 Introduction

Improper disposal of pollutants generated by human activities causes damage to the environment and the health of people interacting with this water [1]. Thus, water pollution by numerous industries, population, and industrial growth is a critical environmental issue [2, 3]. Potential toxic compounds (PTC) such as chromium, zinc, cadmium, mercury, lead, copper, and nickel are at high risk due to their carcinogenic and gastrointestinal effects, in addition to being bioaccumulative [4, 5]. Other PTC that need attention are dyes of synthetic origin, as they are complex aromatic molecules that make them very stable and non-biodegradable, presenting potential risks to ecological environments and public health [6,7,8,9]. Methylene blue is a cationic dye widely employed in the clothing and textile industry to color different materials. It poses a serious concern due to its discharge in wastewater, which may reach a high concentration that has the potential to impact human health, including nausea, vomiting, neuronal apoptosis, and damage to the respiratory system [10, 11].

Therefore, it is paramount to propose strategies to effectively eliminate various metal ions and dyes, avoiding direct or indirect adverse effects on the ecological environment and human health. Several techniques are applied for the removal of PTC from wastewater, such as solvent extraction [12, 13], reverse osmosis [14], ion exchange [15, 16], chemical precipitation [17, 18], membrane filtration [19, 20], electrochemistry [21, 22] and adsorption [23, 24].

Among these techniques, adsorption is a simple process for removing pollutants due to its economic viability, high performance, simplicity, and reuse of the adsorbent, and it is the most effective for low concentrations of contaminants [6]. Adsorption materials can be divided into polymeric, inorganic, carbon-based, and biological materials, such as activated carbon [25, 26], carbon nanotubes [27, 28], clay minerals [29, 30], biomass [31, 32], algae [33, 34], microplastics [35, 36], nanocellulose [37, 38], magnetic materials [39, 40], lignin and nanolignin [41, 42] However, some of these compounds have disadvantages for the industrial environment, such as high cost, high energy consumption, excessive regeneration waste, slow adsorption kinetics, low selectivity, and low adsorption efficiency [4, 43, 44].

Lignin is a natural polymer that has attracted more attention from researchers due to advantages such as low cost and biodegradability. Furthermore, the global chemical industry produces around 70Mt of lignin from wood pulp [45, 46]. Lignin is considered a complex organic biopolymer containing numerous polyphenols, and together with cellulose and hemicellulose, it forms an organic network using intermolecular bridges, covalent bonding, and Van der Waals forces [47]. As such, it contains several vital hydroxyl groups that can participate in chemical bonds, as well as an aromatic structure that can form a strong π-π bond interaction with the benzene ring structure of other molecules such as metallic ions and dyes [48]. Lignin has physicochemical characteristics such as hydrophilicity, reactivity, and functionality, being a great option for the adsorption of various pollutants and PTC [49].

The use of lignin as an additive incorporated into other polymeric matrices, such as hydrogels, has been gaining prominence as they have increased the ability to remove PTC and dyes compared to pristine hydrogels. Shen et al. [50] studied the adsorption capacity of lignin incorporated into the hydrogel to remove Cu2+ and Pb2+ obtained 0.144 mmol g−1 and 0.161 mmol g−1, respectively. Also, Liu et al. [51] achieved an adsorption efficiency of 833.3 g kg−1 for cadmium in soil from lignin hydrogel.

Hydrogel is a functional polymeric material with a three-dimensional polymeric network structure [52]. This material can be prepared by interpenetrating polymer networks containing two or more networks so that at least one of the polymers is prepared and or crosslinked in the presence of another, which may not covalent bonds together and cannot be separated except by breaking of bonds [53, 54]. Hydrogel has highly adaptable physicochemical properties, internal structure, and surface morphology and contains a large number of hydrophilic groups, making them a great potential for the removal of PTCs and dyes from water [42]. ALSamman et al. [55] discuss using biobased hydrogel adsorbents to remove organic dyes and metal ions from water. The study presents hydrogels with the capacity of absorption of 2000 mg g−1 of dye removal and 440 mg g−1 of metals. Furthermore, hydrogels can be used to treat wastewater under conditions of varying pH, ionic strength, light, and temperature [56, 57].

The literature shows few works about the preparation of starch hydrogels containing lignin. Thus, the main objective of this work is to analyze the influence of lignin incorporated in hydrogel based on starch, evaluating the physical-chemical, morphological, thermal, and mechanical properties. The ability to remove metallic ions (Cr6+, Cd2+, Ni+2, Mn2+, Zn+2, and Cu2+) and methylene blue from contaminated effluents was also evaluated.

2 Materials and methods

2.1 Materials

Corn starch (Amidex 3001–27% wt. of amylose and 73% wt. of amylopectin) was purchased from Ingredion Incorporated (São Paulo, Brazil). Sodium hydroxide (NaOH – 97%) and Citric acid (C6H8O7 – 99%) were purchased from Dinâmica, Química Contemporânea Ltda (Indaiatuba, Brazil).

2.2 Lignin preparation (Lignin)

Sugarcane lignin was isolated from sugarcane bagasse at the Pilot Plant for Process Development located at the Brazilian Biorenewable National Laboratory (Campinas, Brazil), according to Pereira and Arantes [58].

2.3 Hydrogel and hydrogel composite

For corn starch hydrogel preparation, an adequate amount of starch was dispersed in a predetermined amount of distilled water with a mixing rate of 280 rpm. This solution was heated at 40 °C and maintained in constant agitation. Then, the sodium hydroxide (NaOH) was added to the solution, the solution remained for 3 h in constant agitation, and it was added citric acid (C6H8O7) resulting in the hydrogels’ immediate crosslinking. After 17 h, the hydrogels were submitted in the water bath at 90 °C for 1 h to ensure complete crosslinking of the new bonds. Later, the prepared materials were poured into plastic molds and dried in an oven at 70 °C for 48 h.

A similar procedure was used to prepare the hydrogel composite with lignin (L), in which 5% wt. of lignin was added to the mixture after the starch was dispersed. The hydrogel composite was named hydrogel + 5%_L. Figure 1 illustrates the methodology for obtaining hydrogels with and without lignin.

Fig. 1
figure 1

Schematic representation of the starch chemical structure and its undergone reaction during the methodology used to produce the pristine hydrogel and hydrogel + 5%_L composite, highlighting the chemical crosslinking using citric acid in basic medium and the entrapment of lignin in the hydrogel matrix

2.4 Characterization

2.4.1 Fourier-transformed infrared spectroscopy (FTIR)

FTIR analyses were performed on all samples (lignin, starch, pristine hydrogel, and hydrogel + 5%_L composite) to investigate their main functional groups. FTIR spectra were determined using a Thermo Scientific Nicolet IS5 spectrometer (Waltham, United States), Model ID3 Ge, operated with an attenuated total reflection (ATR) and in the transmittance method. Values were measured from 400 to 4000 cm−1 range with 12 scans, with a spectral resolution of 2 cm−1.

2.4.2 Scanning electron microscopy (SEM)

Scanning Electron Microscopy (SEM) of the samples fixed on a carbon tape in a sample holder was also done by SEM microscope HITACHI (model TR-3000, Tokyo, Japan), with a tungsten filament, 5 kV, with a low-vacuum technique and secondary electron detector.

2.4.3 Thermogravimetric analysis (TGA)

Thermogravimetric analysis (TGA) was realized to detect the samples’ thermal stability and decomposition temperature using a TA Instruments SDT Q600 (New Castle, United States) thermogravimetric analyzer. The temperature range was 25–600 °C under an N2 atmosphere (10 mL min−1) at a heating rate of 10 °C min−1.

The thermal behavior of all samples (lignin, starch, hydrogel, and hydrogel + 5%_L composite) was analyzed using an SDT Q600 thermogravimetric analyzer from TA Instruments (New Castle, United States), operating under 100 mL min−1 constant nitrogen flow in a temperature range of 25 to 900 ºC and a 10 ºC min−1 heating rate, and ~ 10 mg of oven-dried at 50 °C for 24 h.

2.4.4 X-ray diffractometry (XRD)

The diffraction pattern of selected samples was analyzed by X-ray diffraction (XRD, Shimadzu Scientific Instruments Incorporated, Model XDR 6000, Kyoto, Japan) with scanning radiation at 30 kV and 15 mA. Prior to XRD analysis, all samples (lignin, hydrogel, and its hydrogel + 5%_L composite) t were oven-dried at 50 °C for 24 h. Then, the samples were scanned from 2θ of 10° to 60°, with scan speed 0.001–0.002 min−1.

2.4.5 Swelling degree

To evaluate the water absorption by pristine hydrogel and hydrogel + 5%_L composite was performed in triplicate. Water absorption experiments were performed from the immersion of 0.1 g specimens in 40 mL of distilled water at room temperature. The predetermined times were 5 to 2880 min. For each defined time, the samples were taken out of distilled water, and with the auxiliary of paper tissue, all water present on the surface was removed. Then, the specimens were weighed and immersed again. The swelling degree (SD) can be defined by Eq. 1, where mf is the swollen hydrogel mass at a time t in gram and mi is the dried hydrogel mass (t = 0) in gram:

$$SD=\frac{ {m}_{f}- {m}_{i}}{{m}_{i}}$$
(1)

where: mi is the initial dry mass of hydrogels at t = 0 (g), and mf is the swollen mass of hydrogels at time t (g).

2.4.6 Determination of the zero-charge point (ZPC)

Zeta potential measurements (pHzpc) were performed with a certain amount of hydrogel and hydrogel_5%L composite added to 50 mL of 0.1 mol L−1 NaCl solution. Simultaneously, the pH was adjusted to 2.0–10.0 using a solution of 0.1 M NaOH and 0.1 M HCl. After 24 h, the final pH values of the solution were measured. The pHzpc is equivalent to the point where the initial pH is similar to the final pH.

2.4.7 PTEs sorption

The affinity of pristine hydrogel and its compound with six coexisting metallic ions (Cr6+, Cd2+, Ni2+, Mn2+, Zn2+, and Cu2+) was studied. The metallic solutions were prepared by dissolving the metallic salts (K2Cr2O7, Cd(NO3)2·4H2O, Ni(NO3)2·6H2O, Mn(NO3)2·4H2O, Zn(NO3)2·6H2O and Cu(NO3)2·3H2O) in ultrapure water at pH 3.5–4.0. The total concentration of competing ions (Cr6+, Cd2+, Ni2+, Mn2+, Zn2+ and Cu2+) was 0.963 mmol L−1 (0.161 ± 0.024 mmol L−1 each). The tests were performed under agitation (~ 150 rpm) at room temperature (~ 25 °C), with a dosage of 1.0 g L−1 and pH 3.5–4.0 in Erlenmeyer flasks (125 mL). Subsequently, in 24 h, the metal concentrations were measured by ion chromatography, IC (Metrohm, model 940 Professional IC Vario, Herisau, Switzerland). Removal rates (%) were calculated by Eq. (2).

$$R\;\left(\%\right)=\frac{{C}_{0}-{C}_{e}}{{C}_{e}}\times 100$$
(2)

where: C0 is the initial concentration of PTEs (mmol L−1) and Ce is the concentration at equilibrium (mmol L−1).

2.4.8 Methylene Blue (MB) sorption tests

Experiments were performed in triplicate to analyze the adsorption capacity (mg g−1) and efficiency (%) of pristine hydrogel and its hydrogel + 5%_L composite for MB dye removal.

Effect of contact time

The sorption capacities of pristine hydrogel and hydrogel + 5%_L composite for MB were studied under a dynamic system. The sorption tests were performed using 30 mg of the materials immersed in 100 mL of MB solution at 50 mg L−1, with agitation (150 rpm) and at 25 °C. The predetermined contact times were 10 min, 20 min, 30 min, 40 min, 50 min, 60 min, and 70 min. Subsequently, the concentration of MB in the solution was observed using a UV-visible spectrophotometer (Bel, model UV-M51, Monza, Italy) at a maximum wavelength of 665 nm. The amount of dye adsorbed on the adsorbent (qe, mg g−1) and removal efficiency (%) were calculated using Eqs. 3 and 4, respectively:

$${q}_{e} = \left({C}_{o} -{C}_{e}\right)\frac{V}{M}$$
(3)
$$\%Removal = \frac{Ci - Ce }{Ci} \times 100$$
(4)

where: qe = amount of dye in mg per gram of adsorbent; Ci and Ce = initial concentration and equilibrium time of dye in mg per L; V = volume of the solution; m = mass of adsorbent in gram.

Effect of initial concentration and isotherms

The adsorption isotherms are the study that aims to indicate how the MB dye was adsorbed and to estimate the maximum amount of dye that the hydrogels can absorb. To evaluate the fit of the isotherm model, the samples were submitted to different concentrations of MB (25–500 mg L−1) for 10 min, shirred (150 rpm), and temperature of 25 °C. The sorption isotherm models used were Langmuir, Freundlich, and Temkin.

Langmuir isotherm

The Langmuir isotherm is one of the most used isotherms for adsorption. It determines that the adsorption process occurs in a single layer of molecules on the surface of the adsorbent, but not occurring at the adsorbed sites [59]. This isotherm can be described by Eq. 5:

$${q}_{e} =\frac{qm \ Kl \ Ce}{1 + KlCe}$$
(5)

where: qmáx = sorbent monolayer capacity; KL = sorption free energy constant; Ce = equilibrium concentration; qe = equilibrium dye concentration of the sorbent.

qm and KL can be determined from linear adjustment using Ce/qe and Ce data. Also, a dimensionless constant named separation factor (RL) (Eq. 6) can obtain the tendency of adsorption efficiency and usability of the Langmuir method [60]:

$${R}_{L} = \frac{1}{1 + Kl \ Ce}$$
(6)

where: RL represents the process favorability. If RL > 1, the process is unfavorable. If RL = 1 is linear. If 0 < RL < 1 is favorable. If RL = 0 is irreversible.

Freundlich sorption isotherm

Relative to Langmuir, Freundlich is a variation of the isotherm. It is an empirical model that considers multilayer adsorption, where the surface of the adsorbent has heterogeneous sites [59]. The Freundlich model can be described by Eq. 7:

$${q}_{e} = {K}_{F} {{C}_{e}}^{\frac{1}{n}}$$
(7)

where: KF = sorption capacity constant; n = sorption intensity constant. If n = 1, it is a linear sorption process. If n < 1 is a chemical process. If n > 1 is a physical process.

KF and n can be calculated by Eq. 8:

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

Temkin sorption isotherm

The Temkin isotherm model assumes that the heat of adsorption decreases linearly in all molecules. It also predicts that binding energy will be uniformly distributed, and surface coverage will increase due to adsorbate-adsorbent interaction [61]. The Temkin model can be described by Eq. 9:

$${q}_{e} =\frac{RT}{bt}\text{ln} \ {C}_{e} + \frac{RT}{bt}\text{ln} \ {K}_{T}$$
(9)

where: KT = Temkin isotherm constant; bt = adsorption energy variation factor; R = universal gas constant; T = absolute temperate.

3 Results and discussion

3.1 Fourier transformed infrared spectroscopy (FTIR)

Figure 2 presents the FTIR spectrum of corn starch, starch hydrogel, lignin and hydrogel + 5%_L composite.

Fig. 2
figure 2

Fourier transform infrared spectroscopy (FTIR) spectra for starch, lignin and hydrogels presenting (a) full spectra, (b) zoom-in regions between 3700 and 2650 cm−1, (c) zoom-in regions between 1250 and 850 cm−1, (d) 1800 to 1250 cm−1, and (e) highlight for a deconvolution of peaks between 1800 and 1500 cm−1 for the Hydrogel + 5% _L

From Figs. 2b, c, and d, it is possible to notice the typical peak at 3300 cm−1 of the starch associated with the stretching vibration of the O-H [62], the peak at 2934 cm−1 corresponds to the stretching vibration of the C-H bond in aliphatic methyl (-CH3) or methylene (-CH2) groups the peak at 1640 cm−1 is ascribed to the vibrational stretching of the carbonyl group (C = O) [63,64,65]. The peaks at 1456 cm−1 and 1337 cm−1 are related to CH2 twisting and scissoring, respectively, while 1148 cm−1 is associated with CO stretching. The peaks at 995 and 1078 cm−1 can be assigned to C-O stretching vibration in the functional groups C-O-C and C-O-H, respectively [66]. The peak at 931 cm−1 represents asymmetric C–O stretching vibration from the glycosidic linkage, and the peak at 861 cm−1 indicates symmetrical CH and CH2 deformation in starch [62, 66]. For the hydrogel sample, it is possible to observe in Figs. 2c and d that new peaks appeared, especially the peaks at 1581, 1390, 1303, and 1280 cm−1, with the peak at 1078 cm−1 showing similar intensity while the peak at 1012 cm−1 showed a considerable intensity reduction. Moreover, there was a shift for the peak at 1148 to 1155 cm−1. These modifications indicate that conformational changes in starch structure occurred during the reticulation process, indicating the structure crosslinking [67].

For lignin spectra, it was observed typical peaks at 3350 cm−1 related to -OH stretching [68], 2923 cm−1 ascribed to –CH3 and –CH2– asymmetric and symmetric stretching [69], 1595 and 1420 cm−1 associated with –(Ar) C = C stretching, 1461 cm–1 attributed to the methoxyl C–H bending and C–C stretching in the aromatic skeleton [69]. The peaks at 1326 and 1265 cm–1 are attributed to aromatic C–O stretching. Peaks at 1216 cm−1 and 1029 are related to C-O-C stretching [69]. The spectrum of the hydrogel containing lignin showed similar peaks to the pristine hydrogel but with a change in intensities, indicating that the presence of lignin must have influenced the crosslinking process. Moreover, there were some shifts in the spectra, like the peak at 1580 shifted to 1585 cm−1 and from 1640 to 1648 cm−1. New shoulders and peaks at 1560, 1376, and 1206 cm-1 also appeared, indicating lignin interference during the hydrogel reticulation process. This is highlighted in Fig. 2-e in the deconvolution graph presented for the hydrogel + 5%_L that illustrates the presence of a new peak at 1560 cm−1 which was absent for the other samples. In addition, it was impossible to observe any characteristic lignin peak in the hydrogel, which may indicate that the lignin was possibly incorporated internally into the hydrogel matrix.

3.2 Morphological analysis (SEM)

The morphology and particle size are important characteristics that can influence the final properties and impact the application. Therefore, SEM analysis was performed to evaluate the lignin particles, and the results are presented in Fig. 3a, in which it is possible to observe that the lignin powder exhibits a blocky structure with different particle sizes. Wu and co-workers also observed a similar morphological structure for commercial lignin [70]. The particles presented an average length size of (29.2 ± 12.5) µm for lignin extracted from sugarcane bagasse. Upon higher magnification, as seen in Fig. 3b, the lignin sample displays a smooth surface which could indicate that the particles present a low specific surface area. Similar observations regarding the structural morphology of lignin have been reported by Bertolo et al. [71] that studied the synthesis of lignin nanoparticles from sugarcane bagasse.

Fig. 3
figure 3

SEM micrographs of lignin particles employed in the present study, using different magnifications a) 100x and b) 500x, highlighting its morphological characteristics and size distribution, which is further illustrated in the inserted histogram that presents the mean size of lignin particles

Optical and SEM analyses were used to understand the impact of lignin on the hydrogels porous structure, and the images are presented in Fig. 4. The pristine hydrogel demonstrated a rough surface with a pore size of 0.30 ± 0.06 μm. The observed roughness is caused by the partial collapse of the polymer network during the drying of the hydrogel [72]. The hydrogel roughness is interesting as it increases the surface area and available groups. However, the low pore size that the pristine hydrogels present could be a problem in exposing its surface area for interaction during application for removing toxic compounds.

Evaluating the hydrogel + 5%_L composite, it was verified that the incorporation of lignin in the formulation promoted an increase in medium-sized pores, with a mean pores size of 1.6 ± 0.8 μm and with a heterogeneous surface. The higher pore size is attractive for exposing the hydrogel surface area and improving application performance. Similar results are observed in the literature and are related to lignin acting as a nucleating agent, which impacts pores formation during hydrogel preparation [73]. In addition, the compact structure presented is due to the lower lignin content [74]. Chiane et al. [75] evidenced a similar behavior when studying gelatin/lignin hydrogels’ synthesis and characterization, which demonstrated that lignin content influenced pore size.

Fig. 4
figure 4

Hydrogels surface analysis using: ON RIGHT: Optical images and ON LEFT: SEM images with the magnification of 2000x, which illustrates the difference of surface roughness and pore size of each formulation, indicating lignin influence on hydrogel morphological characteristics

3.3 Thermogravimetric analysis (TGA)

TGA/DTG curves for lignin, pristine hydrogel, starch and hydrogel + 5%_L are shown in Fig. 5(a-b). The decomposition of the lignin can be divided into two essential stages: the first (i) is an initial stage (25–140 °C), with weight loss of 3.5% (Table 1) due to the evaporation of absorbed water/moisture [76]. The second stage evidences a broad temperature region (between 140 °C and 600 °C) associated with the decomposition of phenolic, organic compounds and gaseous products in the lignin structure [77]. These components undergo conversion into volatile gases such as CO, CO2, and CH4. As the temperature exceeds 350 °C, this stage progresses further, eliminating degraded volatile lignin compounds such as phenolics, alcohols, and aldehyde acids [78, 79]. Additionally, gaseous byproducts are generated and eliminated during this stage, as reported in the literature [80]. After pyrolysis, the solid residue is essentially composed of fixed carbon and mineral matter. After the thermal degradation of lignin compounds at 600 °C, it had a final weight of 48.2%. Wądrzyk et al. [76] extracted lignin from wheat straw with a residue percentage of 30.8%. In the literature, other studies have utilized different lignin sources, such as eucalyptus globulus and pinus radiata, which resulted in residue percentages of 25.1% and 24.0%, respectively [81]. The variation observed in the residue can be attributed to the inherent structural differences between lignin obtained from different lignocellulosic materials (sugarcane bagasse, wheat straw, eucalyptus globulus, and pinus radiata).

As can be seen in Fig. 5, the decomposition of the studied starch sample can be divided into two essential stages: (i) an initial stage below 140 °C which corresponds mainly to water-free water and adsorbed water of the corn starch; (ii) in the second stage, the α–1, 4 glycoside bonds are broken, and the sample was depolymerized into multiple glucose units. Upon reaching a temperature of 300 °C, the hydroxyl groups between the C-1 and C-6 position of the glucose molecule underwent a dehydration reaction and formed some intermediate products such as levoglucan. Then, the main chain of levoglucan was oxidized and broken, and various gaseous products (H2O, CO2, CH4, CH2O and CH3OH) were precipitated. Similar results of the decomposition of corn starch were reported by Liang et al. [82].

Fig. 5
figure 5

Thermogravimetric curves (a) TGA and (b) DTG for lignin, starch, pristine hydrogel, and hydrogel + 5%_L composite illustrating the degradation behavior under thermal exposure of each material showing the impact of crosslinking and lignin on thermal stability on developed hydrogels

The TGA curve of the pristine hydrogel demonstrates a weight loss occurring in two distinct stages, as shown in Table 1. In the first stage, the temperature range of 185–220 °C, a weight loss of 4.9% is observed, which can be attributed to the thermal decomposition of unreacted citric acid alongside adsorbed water. It is worth noting that citric acid begins to evaporate at temperatures exceeding around 150 °C, as reported by [83]. The second stage (220–350 °C) exhibits a weight loss of 49.9% due to the thermal degradation or pyrolysis of the crosslinked starch structure. This phenomenon is similar to the study developed by Rai et al. [84].

The TGA curve of the hydrogel + 5%L reveals an initial higher weight loss of up to 180 ºC, compared to pristine hydrogel. This could be associated with lignin influence in the hydrogel structure, either by adsorbing more water due to its functional groups or by impacting the reticulation process, which could result in unreacted citric acid. At higher temperatures, the main stage of weight loss occurs between 220 and 350 °C, resulting in a weight loss of 52.1%. The DTG peaks provide further insight, suggesting the lower interaction between the structure hydrogel (amylose/amylopectin) and group lignin contributed to the maximum rate of mass loss observed at 255 °C. This low interaction can reduce the crosslinking of the hydrogel, which can be seen with the lower thermal stability of the hydrogel + 5%L. This behavior indicates a decrease in the onset temperature (Tonset) compared to the pristine hydrogel, showing the influence of adding 5%L on the thermal behavior of the hydrogel.

Table 1 Degradation stages with Tonset, mass loss, Tmax, and residue of the lignin, pristine hydrogel, and hydrogel + 5%_L composite

3.4 X-ray diffraction (XRD)

Figure 6 shows the X-ray diffraction (XRD) pattern of lignin, pristine hydrogel, and hydrogel + 5%_L. The diffractogram of pristine hydrogel shows a characteristic semicrystalline structure, evident from the presence of four distinct broad peaks at 2θ = 14.9°, 17.6°, 19.6°, and 22.6°. These are typical crystalline regions observed in starches derived from cereals, as documented in previous literature [85]. The XRD pattern of lignin, wherein a distinctive diffraction peak at 22° can be observed, showed no crystalline peaks, confirming the amorphous nature of the lignin as described in the literature [86]. This amorphous peak of lignin disappeared in the XRD of the hydrogel. Thus, adding lignin to the hydrogel, the semicrystalline structure of the hydrogel was slightly modified, although the prominent peaks did not disappear. Morales et al. 2020 evidenced similar behavior when evaluating the synthesis of physically crosslinked lignin hydrogels [87]. Tahari et al. [88] also observed that the amorphous peak of lignin disappeared in the XRD of hydrogels when studied lignin/ montmorillonite hydrogels synthesized using N, N’-Methylenebisacrylamide and ammonium persulfate via a crosslinking reaction assisted by ultra-sonication.

Fig. 6
figure 6

Diffractograms of lignin, pristine hydrogel, and hydrogel + 5%_L with the highlight of typical crystalline peaks observed in starch and the amorphous peak observed in lignin

3.5 Swelling degree

The swelling behavior is directly associated with a material’s surface functional groups and can be associated with its potential application for contaminants removal. Therefore, the swelling degree of the hydrogels was investigated using distilled water to immerse the hydrogels for varying durations, with the maximum time set at 2800 min to ensure equilibrium swelling. The outcomes of this experiment are presented in Fig. 7, which illustrates the percentage of swelling observed in the pristine hydrogel and the hydrogel + 5%_L.

It is noted that the pristine hydrogel presented an initial swelling of around 45% and then increased steadily with time, reaching a swelling of around 80% after 45 min oscillating around this value for longer periods. The swelling of the starch hydrogel can be associated with the available hydroxyl groups from starch chains that promptly interact with water, and as the hydrogel structure swells, the water can penetrate further within hydrogel chains.

By incorporating lignin, it can be observed that initially, the hydrogel + 5%_L obtained a lower swelling degree compared to the neat hydrogel. This can be due to increasing the rigidity conformation of the hydrogel with the incorporation of lignin, resulting in lower molecular chain mobility and water retention inside the pores, result similar to are described in the literature using activated carbon [89]. Notably, after 60 min, the hydrogel + 5%_L showed a swell degree around 90%, maintaining this value for longer periods, indicating that the inclusion of lignin helped to increase and promote better stability for the composite hydrogel compared to the pristine hydrogel.

Fig. 7
figure 7

Swelling degree curves for hydrogel and hydrogel + 5%_L throughout 5 to 2880 min illustrating that 45 and 60 min, respectively, are required to attain a swelling equilibrium state

3.6 Zero-charge point (zpc)

The pH of zero-point charge aims to provide the pH value of the solution where the surface charge of the hydrogels is zero, that is, where all active sites remain neutral. Furthermore, the pH values of the solution indicate whether the surface is positive (pH < pHzpc) or negative (pH > pHzpc) [90]. This property is extremely important to indicate the material’s viability for removing contaminants in its aqueous and ionized form [91].

Figure 8 shows the behavior of the pristine hydrogel and the hydrogel + 5%_L in the pH variation and its point of zero charge (pHzpc). When analyzing the graph, the samples showed pH 7.0 and 8.5 for pristine hydrogel and hydrogel + 5%_L, respectively. Thus, it can be seen that lignin increased the pHzpc of the hydrogel. Regarding the absorption of contaminants, when the adsorbent surface carries a net negative charge at pH > pHzpc, the adsorption of cationic species is more favorable. In contrast, for pH < pHzpc, the adsorbent surface carries a net positive charge and can repel cations [92].

Fig. 8
figure 8

Measurement of pH of zero-point charge (pHzpc) of (a) hydrogel and (b) hydrogel + 5%_L that showed values of 7.0 and 8.5, respectively

3.7 PTEs sorption

The metal sorption affinity test was performed to evaluate the potential removal capacity of the hydrogel against several PTEs compounds, and the results are presented in Table 2.

Table 2 Metal sorption removal for the pristine hydrogel, and hydrogel + 5%_L composite

From Table 2 is observed that the hydrogel and hydrogel composites could only be effective in removing chromium from the affinity test. At the same time, all the other metals showed only little removal potential. Moreover, pristine hydrogel and hydrogel + 5%_L presented the following metallic affinity order: Cr6+ > Cd2+ > Ni2+ > Mn2+ > Zn2+ > Cu2+ and Cr6+ > Cu2+ > Cd2+ > Mn2+ > Zn2+ > Ni2+, respectively. This result is consistent with the Zero-charge point results since the pH used during the test was below the pHzpc, promoting a net positive charge at the hydrogel’s surface [92]. The pH of 4 was used to ensure no precipitation occurred during the test, which would impact the adsorption results. However, the metallic ions are commonly observed as cations in the medium and due to the pH condition being lower than the pH of zero-point charge, the hydrogels’ surface presents a net positive charge that repels the ions, which explains the low removal observed. The chromium species presented a distinct behavior because they are observed as oxyanions in the medium and therefore are attracted to the hydrogels’ surface, reaching a complete removal during the test.

Literature mentions that starch lacks functional moieties to promote the removal of chromium species, indicating that some reactions may be necessary to improve its adsorption capacity [93]. The results indicate that the crosslinking reaction provided new carbonyl groups related to citric acid structure, consistent with the FTIR results, and potentialized chromium adsorption for the developed hydrogel. Including lignin in the hydrogels did not impact the removal potential significatively for the test conditions. However, evaluating the pHzpc value that was even higher than pristine hydrogel suggests that the hydrogel + 5% L would be even more suitable for removing anionic compounds.

3.8 MB sorption

3.8.1 Effect of contact time

To further evaluate the developed material’s potential to remove contaminants, dye removal was evaluated using methylene blue (MB). For this test, the contact time is one of the most significant parameters as it greatly influences the percentage of contaminant removal [94]. Following the pHzcp, the pH was adjusted to induce the negatively charged surfaces of both composites, thus facilitating favorable adsorption through electrostatic interactions with the cationic dye, methylene blue. The literature explains that at pH levels below pHzpc, electrostatic repulsion may occur between the cationic dye and the composites [95]. Figure 9 shows adsorption efficiencies at different times (10–70 min) at 25 °C with an initial MB concentration of 50 mg L−1 at pH 9.

Fig. 9
figure 9

Methylene blue sorption with varying contact times of hydrogel and hyrogel + 5_L illustrating the increasing sorption over time due to the interaction with dye and active sites

When the pH of the solution is adjusted to an alkaline state, a gradual ionization from -COOH to -COO- is induced within the hydrogel, leading to an increase in the degree of ionization [96]. As a result, both hydrogels exhibited anionic characteristics, facilitating electrostatic interactions with MB. The degree of protonation of the amine group decreased, thus reducing the repulsion towards methylene blue and increasing the adsorption of MB through hydrogen bonds and electrostatic interactions [96]. This phenomenon led to an ionic complex between the MB molecules and the hydrogel networks, increasing the dye removal capacity.

The MB removal data show that both hydrogels showed significant dye removal, with adsorption efficiency higher than 90%. However, the hydrogel + 5%_L stood out, reaching an adsorption capacity greater than 99.4 mg g−1 in 70 min, compared to the pristine hydrogel, which obtained a value of 94.0 mg g−1. Moreover, the pristine hydrogel exhibited a similar removal trend over time, while the + 5%_L hydrogel showed a significant increase, achieving almost complete MB removal, thus making it an extremely effective adsorbent.

This observation can be attributed to the adsorption equilibrium of the material since some available sites will remain in the adsorbent, as discussed by Hu et al. [43]. These results suggest that adding 5% lignin to the hydrogel substantially impacted its adsorption efficiency, making it a promising choice for removing dyes such as MB in aqueous solutions. The superior behavior of the hydrogel + 5%_L can be explained by the formation of more active adsorption sites, resulting from incorporating lignin into the hydrogel, leading to a greater adsorption capacity and faster dye removal. Furthermore, the ability of the hydrogel + 5%_L to remove almost 100% of the MB in a relatively short time is a significant advantage in terms of applicability in the treatment of effluents contaminated with industrial dyes.

The literature has also examined the relationship between the hydrogel and the alkaline pH of MB. Wang et al. 2023 developed a bio-based hydrogel (LN-NH-SA hydrogel) prepared from aminated lignin and sodium alginate but obtained a maximum adsorption capacity of 388.81 mg g−1. The study conducted by Luo et al. [97] involved the preparation of a physically crosslinked hydrogel, combining cellulose nanofibrils, alkaline lignin network, montmorillonite and polyvinyl alcohol, in order to investigate its effectiveness in the adsorption of methylene blue (MB). The results revealed a significantly higher adsorption efficiency at pH 10.5 than acidic pH conditions, with a removal rate of 94.2% for MB in longer time. An additional relevant study conducted by Al-Wasidi et al. [98] explores using a modified chitosan hydrogel as an adsorbent. The researchers reported that the hydrogel exhibited a remarkable adsorption capacity of 200 mg g−1 after a contact time of 140 min.

3.8.2 Effect of initial concentration and Isotherms

The study sought to analyze the impact of MB concentration on adsorption efficiency. For this, tests were carried out with different dye concentrations, ranging from 25 to 500 mg L−1, while the mass of the hydrogels remained constant at 50 mg.

Table 3 illustrates that the adsorption capacity of hydrogels increased as MB concentrations increased. This behavior can be explained by the fact that higher initial concentrations generate a more intense concentration gradient, facilitating the mass transfer of MB molecules from the solution to the surface of the hydrogels [99]. Moreover, it is possible to notice that the hydrogels did not saturate even at higher concentrations, indicating that the developed materials present great potential in application towards removing dyes [100]. It is also noticed that the hydrogel + 5%_L presented slightly superior adsorption capacity, indicating that including lignin in the hydrogel helped the adsorption process.

Table 3 Adsorption capacity using different initial concentrations (mg g−1) for the developed hydrogels

Adsorption isotherm models play a fundamental role in determining the interactions between adsorbate and adsorbent and in the distribution of adsorbates between adsorbents and the aqueous phase during the adsorption process. This study fitted the data using different adsorption isotherms models, namely Langmuir, Freundlich and Temkin. The linear equations of the three models are presented below:

$${q}_{e} =\frac{qm \ Kl \ Ce}{1 + KlCe}$$
(10)
$$qe = {K}_{F}{C}_{e}^{\frac{1}{n}}$$
(11)
$${q}_{e} =\frac{RT}{bt}\text{ln} \ {C}_{e} + \frac{RT}{bt}\text{ln} \ {K}_{T}$$
(12)

where Ce represents the equilibrium concentration of the dye (mg L−1); qmáx represents the equilibrium and the maximum adsorption capacity (mg g−1); KL, KF, and KT represent the Langmuir, Freundlich, and Temkin constants, respectively. The fitted parameters are presented in Table 4.

To assess the applicability of these models, the correlation coefficient (R2) was used to compare the linear fit. Adsorption data showed that R2 values decreased in the order: Freundlich > Temkin > Langmuir. In this way, the model of the Freundlich model proved to be more applicable in this study to both hydrogels with R2 values > 0.99. This model postulates local energies on heterogeneous surfaces and multilayer sorption levels [101]. In the Freundlich model, the 1/n value obtained for dyes is above 1, indicating that the adsorption condition is favorable. This result suggests that the adsorption of the dyes is efficient and that the molecules are favorably retained in the adsorption sites of the hydrogels. This can be attributed to stronger interactions between the dye and the active sites in the hydrogels, leading to a higher adsorption capacity [102].

Table 4 MB adsorption parameters to the hydrogel using the Langmuir, Freundlich, and Temkin isotherm models

It is worth mentioning literature studies that also involve MB adsorption from the hydrogel. Hassan et al. [103], for example, obtained better coordination of autonomous (R2) for the Langmuir model. The authors explained that the adsorption occurred via chelating complexation indicating a monolayer process carried out at the distributed active sites. Allouss et al. [104] obtained a better linear fit for the Freundilich model stating that adsorption involves a multilayer adsorption process on a heterogeneous surface.

The elevated adsorption capacity towards toxic compounds with a thermodynamic favorable behavior highlights the hydrogel application in the environmental field as an alternative product using biodegradable materials.

4 Conclusion

This work proposes the development of a starch hydrogel incorporating lignin to create a new eco-friendly adsorbent for removing toxic metal ions and dyes. FTIR analysis revealed that the crosslinking reaction induced conformational changes in the starch structure with new peaks associated with the citric acid. Additionally, lignin incorporation introduced new shoulder peaks, indicating its interaction with the hydrogel’s polymeric structure, which affected the average pore size and enhanced the swelling degree. The hydrogel’s sorption capacity showed a close relationship with the pHzpc and the test pH due to the induced surface charges, and adding lignin promoted an increase in the pHzpc. The removal efficiency for cationic metals at pH < pHzpc was low, while chromium removal was complete due to its oxyanion nature, aligning with the hydrogel’s positive charge in these conditions. Also, at a slightly alkaline medium, the removal of methylene blue was over 90% which illustrates the great potential of the developed hydrogels, with highlights for lignin + 5%_L that presented an adsorption capacity of 99.4 mg.g−1 at 70 min. Moreover, the Freundlich isotherm presented a better fit, indicating that the adsorption is a thermodynamically favorable process. These results support understanding hydrogels’ properties to remove toxic compounds, highlighting the development of alternative structures using eco-friendly materials to remove toxic compounds from water.