1 Introduction

Energy crises continue to be a persistent global issue due to the ever-increasing demand for energy and the finite nature of fossil fuel reserves. As a result, there is a growing need to find alternative and sustainable sources of energy [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]. Harvesting low-grade thermal energy (LGTE), which constitutes more than 50% of global waste heat, is a promising technology that can help to address the energy crisis [19]. The conversion of waste heat into useful energy sources contributes toward improved energy efficiency, reduces carbon footprint, and cuts dependence on traditional energy sources, making it a valuable technology for a sustainable future. This harvested energy can be used to power small electronic devices, including sensors, wireless communication systems, and wearable devices [20]. The most common LGTE harvesters are the Organic Rankine cycle, Kalina cycle, and thermoelectric generators [21]. Even though these devices hold substantial promise, their commercialization remains a long way off because of their low energy conversion efficiencies and high operating costs.

Recent research has focused on developing new technologies to improve the efficiency of LGTE harvesting, and ionic thermoelectric materials (i-TEs) have emerged as promising solutions [22]. i-TEs utilize ions as charged carriers to convert heat into electrical energy, and they have been found to be highly effective at generating large voltages under small temperature differences. The key to the high performance of i-TEs lies in the Soret effect, which refers to the production of a voltage difference across an electrolyte due to the inhomogeneous distribution of cations and anions in response to a temperature gradient [23]. This effect is based on the movement of charged particles in response to a temperature gradient and can be observed in many types of electrolytes, including liquids, gels, and solids. One of the major advantages of i-TEs is their ability to produce high voltages under small temperature differences, making them ideal for harvesting low-grade thermal energy [24, 25].

Synthetic polymers have long been favored for synthesizing i-TEs due to their excellent mechanical properties along with processability and tunability of properties [26, 27]. However, their production process requires the use of non-renewable resources and hazardous chemicals, which can have significant negative effects on the environment [20]. Additionally, the disposal of synthetic polymers poses environmental risks since many do not degrade easily and can remain a long time in the environment [28]. It is, therefore, crucial to consider alternative sustainable materials as a building block for i-TEs to reduce the environmental impacts of this technology and contribute towards a greener and more sustainable future. Moreover, proper waste management is essential for creating a sustainable society that can effectively use its resources without increasing environmental pollution. One such potential alternative source of sustainable and environmentally friendly materials for i-TEs is lignocellulosic biomass.

Lignocellulose biomass represents the most abundant and renewable biomass on earth, with agricultural and forestry waste alone producing more than 200 billion tons annually [29]. Lignocellulosic biomass consists of three main components: cellulose, hemicellulose, and lignin. Although cellulose has long been considered a high-value product due to its many applications, lignin remains an underutilized and non-valued waste product [6]. In recent years, lignin has attracted significant attention due to its unique molecular structure and its abundant phenolic compounds [30]. This has led to extensive research on the customization of lignin to create hydrogels with predefined properties. Hydrogels, in general, are versatile materials known for their tunable mechanical properties and their ability to absorb and retain large amounts of water [31,32,33]. Lignin-based hydrogels, in particular, offer additional advantages due to their unique molecular structure and abundant phenolic compounds. These lignin-derived hydrogels exhibit low toxicity, eco-friendliness, biocompatibility, enzymatic breakdown, and biodegradability. These properties render them particularly attractive for high-value applications, such as tissue engineering, drug delivery, energy storage, composites, and biosensors, setting them apart in the world of hydrogel technology [34,35,36,37,38,39,40,41,42,43].

Particularly, in the realm of i-TEs applications, hydrogels have been attracting attention as they offer highly crosslinked matrices, tunable mechanical properties, and excellent electrolyte uptake capability. Recent studies have demonstrated promising results using a variety of polymers, such as polyethylene glycol, polyacrylamide, and carboxylated bacterial cellulose [44,45,46]. However, what is particularly intriguing is the limited exploration of lignin as a polymer for i-TEs. Given lignin’s unique molecular characteristics and sustainability, a more comprehensive investigation is imperative to determine its feasibility and unlock its potential in the development of i-TEs. This represents an exciting opportunity for future research in the field of thermoelectric applications. Additionally, in light of the upcoming 2050 carbon neutrality goals, it has become increasingly apparent that lignin is poised to undertake a pivotal role in the development of future materials and devices, underscoring its significant potential and importance [47].

Looking at this scenario, this study focuses on the development and optimization of lignin-derived hydrogels to produce sustainable i-TE materials for the first time. Lignin-derived hydrogels enhance the ionic conductivity and Seebeck coefficient due to the selective ionic migration in synergy with the Soret effect due to the presence of ionizable groups on the surface of hydrogels. The i-TE performance of synthesized hydrogels was optimized by evaluating the effect of different lignin concentrations, various electrolytes, various crosslinker concentrations, and finally various electrolyte concentrations. Lignin-derived hydrogel synthesized using 9 wt% lignin, 2.5% v/v crosslinker, and infiltrated with 6 M KOH electrolyte exhibits high ionic conductivity (226.5 mS/cm), lower thermal conductivity (0.29 W/m K), and a superior Seebeck coefficient of 13 mV/K. Subsequently, an exceptional power factor of 3831 µW/m·K2 that corresponds to an impressive Fig. of merit ZTi = 3.75 is attained, which is superior to most of the reported state-of-the-art ionic thermoelectric materials until now. These findings represent a novel contribution to the field of thermoelectric energy conversion, paving the way for further explorations and inquiries into sustainable ionic conductive hydrogels. We envision these lignin-based hydrogels for a range of potential applications, including temperature sensing and low-grade thermal energy harvesting.

2 Experimental section

2.1 Materials

Kraft lignin (TcB) of Mw = 3153 g/mol was supplied by Tecnaro (GMbH, Ilsfeld, Germany). Sodium hydroxide (NaOH) pellets with ≥ 98% purity were purchased from AppliChem GmbH (Ilsfeld, Germany). Ninety-nine percent hydrolyzed Poly (vinyl alcohol) (PVA), with a Mw of 85,000–124,000 g/mol, and epichlorohydrin (ECH) having purum grade and purity ≥ 99% was purchased from Sigma-Aldrich (Spain).

2.2 Synthesis of lignin-based hydrogels

A 0.8 g of PVA were initially added to 5 mL of deionized water under stirring at room temperature to avoid PVA clumps. Afterwards, the solution was vigorously stirred for 30 min at 90 °C until the complete dissolution of PVA. The obtained PVA solution was cooled down to room temperature and ultrasonicated for 5 min to remove the entrapped air. Then, 5 mL of 2.5 M NaOH was added to the solution under mixing followed by the addition of various amounts of lignin. A homogenous mixture of lignin/PVA was obtained after 5 h of magnetic stirring at room temperature. Afterwards, the ECH crosslinker with a predefined quantity (%v/v) was added to the solution. A homogeneous mixture was formed by stirring vigorously for 30 min before pouring it into molds. These moulds were then placed overnight at room temperature for complete crosslinking to form lignin-derived hydrogels. Crosslinked hydrogels were thoroughly washed to remove uncross-linked lignin and NaOH before electrolyte infiltration. The prepared hydrogels were denoted as TcBx – y% CL, where x indicates the weight of added lignin (g) and y represents the %v/v concentration of the ECH crosslinker. All the formulations of lignin hydrogel have been summarized in Table S1.

2.3 Material characterizations

The structural morphology of lignin-based hydrogels was studied by scanning electron microscopy (SEM) using a Hitachi SU-4800 (Hitachi High-Technologies Corporation, Tokyo, Japan). FTIR was performed using an Agilent Cary 630 FTIR spectrophotometer (Agilent Technologies) in transmittance mode. Swelling tests of all the hydrogel samples were conducted at room temperature in water and KOH electrolyte. The % swelling of the gels is calculated using Eq. (1) as follows:

$$\%\;swelling=\frac{W_s-W_d}{W_d}\times100$$
(1)

where \({W}_{s}\) is the weight of the sample at a given time while \({W}_{d}\) is the dry weight of the sample.

2.3.1 Electrolyte infiltration and i-TE testing

The Seebeck coefficient of the infiltrated lignin-derived hydrogels was measured using a laboratory-made apparatus. The samples with known geometry were placed on the apparatus with either end contacting a Peltier cell, a thermocouple, and a voltage contact. The Seebeck coefficient (S) of the samples is calculated using Eq. (2):

$$S=\Delta V/\Delta T$$
(2)

where ΔT is the temperature difference and ΔV is the open-circuit voltage difference.

Electrochemical AC impedance spectroscopy was used to characterize the ionic resistance of the hydrogels by applying 10 mV AC voltage while sweeping the frequency from 1 Hz to 100 kHz. The ionic resistance R was obtained from the intercept of the impedance response on the abscissa, and the ionic conductivity (\({\sigma }_{i})\) can be obtained using Eq. (3):

$${\sigma }_{i}=\frac{d}{A\bullet R}$$
(3)

where A is the contact area between the sample and the electrodes and d is the sample thickness.

The thermal conductivity of the hydrogels was measured in a homemade set-up. The heat flux, Q, is determined according to the Eq. (4) provided by Hukseflux for the particular sensor [48]:

$$Q=\frac{V}{s\left(1+0.002\left(T-20\right)\right)}$$
(4)

where \(V\) is the output voltage obtained by the heat flux sensor, \(s\) is the sensor sensitivity, and \(T\) the absolute temperature. The thermal conductivity, \(\kappa\), of the hydrogels is calculated from the Fourier law (Eq. (5)):

$$Q=-\kappa \frac{\Delta T}{\Delta x}$$
(5)

where Q is the previously obtained heat flux value, \(\Delta T\) is the temperature difference across the sample, and \(\Delta x\) is the distance of heat transfer (the thickness of the sample).

The thermoelectric performance of an iTEs is measured by the dimensionless figure of merit (ZTi) using Eq. (6):

$$Z{T}_{i}=\frac{{\sigma }_{i}{S}^{2}}{\kappa }\times T$$
(6)

where σi is the ionic conductivity, S is ionic Seebeck coefficient, σiS2 is known as Power Factor (P.F.), \(\kappa\) is the thermal conductivity, and T is absolute temperature. All samples were tested at a pressure of 10 kPa. A detailed description of the methodology can be found in the supporting information.

3 Results and discussion

Figure 1a illustrates the facile methodology employed for synthesizing lignin-derived hydrogels. Kraft lignin and NaOH were added to PVA solution and stirred overnight to ensure through mixing. In order to crosslink the polymeric molecules, ECH was utilized as a crosslinking agent. The inclusion of NaOH in the reaction mixture deprotonates the lignin and enhances its reactivity with PVA and ECH, facilitating the chemical reaction and allowing for the creation of chemical crosslinks. An ether bond is formed between a hydroxyl group of PVA or lignin and the epoxy group of ECH (Fig. 1b). Simultaneously, the epoxy group is formed by removing HCl from the other end of ECH, while the aforementioned reaction proceeds [49]. This method was selected to achieve the long-term stability of lignin-derived hydrogels for i-TE applications.

Fig. 1
figure 1

a Schematic representation of lignin-derived ionic thermoelectric hydrogels synthesis process. b Chemical crosslinking mechanism

Morphological analysis of lignin-derived hydrogels with varying lignin concentration was performed using SEM; the results are presented in Fig. 2a. All the hydrogels exhibit porous morphology with no significant differences in their physical structures with the lignin concentration. This is because the concentration of the chemical crosslinker is the main contributor that affects the formation of the crosslinked hydrogel network and, thus, its physical properties [41]. In this case, since the concentration of crosslinker remains constant, varying the lignin concentrations does not lead to noticeable differences in the morphology of the hydrogels. However, altering the lignin concentration does affect other properties of the hydrogels, such as their chemical compositions, mechanical properties, and swelling capacities.

Figures 2b and S1 illustrate the FTIR spectra of these lignin-derived hydrogels, providing valuable insights into their chemical compositions and chemically crosslinked structure. All the hydrogels exhibit similar FTIR spectra with slight variations in peak intensities. The broad peak around 3550–3200 cm−1 is related to the presence of bonded -OH stretching vibrations associated with the hydroxyl groups in lignin-derived hydrogels. Interestingly, the bandwidth of the -OH stretching appears to shift from 3260 to 3301 cm−1 as lignin concentration increases (Fig. S2). This band shift corresponds to the formation of new hydrogen bonds between PVA and lignin in response to the variations in lignin concentrations [50]. The -CH3, -CH2 stretching at 3150–2840 cm−1 is attributed to the aromatic structure and the carbonyl functional groups available at the surface of the lignin-derived hydrogels and their peak intensity (availability) increases with the increase in lignin content in the hydrogels [51]. The crosslinked hydrogels also have aromatic skeleton vibrations of lignin around 1586 cm−1 and 1451 cm−1, corresponding to the stretching and the band at 823 cm−1 attributed to bending vibrations of C = C. The slight shift of the 1586 cm−1 peak is an indication of successful cross-linking of lignin and PVA [49]. It is important to mention that as the lignin content increases, the degree of chemical crosslinking also varies which is depicted by the etheric C–O–C asymmetrical vibrations peak around 1284 cm−1. Another characteristic peak of hydrogels is noticed at 1034 cm−1, which depicts the alcoholic/phenolic -CO stretching vibrations. The intensity of these characteristics increases with increasing lignin content, indicating that alcoholic and phenolic functional groups are becoming more abundant. Additionally, the offset of the peak around 1088 cm−1 indicates that the degree of interaction between polymer chains within the hydrogel has changed with the increase of the lignin content [52]. These observations suggests the successful incorporation of lignin and PVA to form the lignin-derived hydrogels [53]. The increase in the lignin content of the hydrogel results in a greater number of functional sites on their surface, which can contribute to selective ionic migration and improved i-TE performance.

The swelling capacity of the synthesized hydrogels was examined in deionized (DI) water at room temperature and the results are plotted in Fig. 2c. All the lignin-derived hydrogels demonstrate excellent swelling capacity. The maximum swelling capacity of 817.9% was attained by the hydrogel with the lowest lignin content (TcB3). As the concentration of lignin increases in the hydrogels, swelling capacity reduces to 439.4% and 252.1% for TcB6 and TcB9, respectively. This reduction is associated with the hydrophobic character of the kraft lignin molecules which reduces water imbibition in the hydrogel network and results in lower swelling capacities [54]. Nevertheless, these results indicate that all the synthesized hydrogels have sufficient water uptake capacity to be suitable for electrolyte infiltration and i-TE applications.

Fig. 2
figure 2

a SEM images of lignin-derived hydrogels with different lignin concentration, their b FTIR spectra, and c swelling capacity in water

The i-TE testing was carried out to investigate the performance of lignin-derived hydrogels. Initially, TcB3 – 5.0% CL hydrogels were infiltrated with various electrolytes with 1 M concentrations. This analysis aimed to identify the most suitable electrolyte based on the Seebeck coefficient values and ionic conductivity results, as presented in Fig. 3a. Hydroxide-based electrolytes, specifically KOH and NaOH, exhibited significantly higher ionic thermoelectric responses compared to other electrolytes. The recorded Seebeck coefficients were 2.32 ± 0.13 mV/K and 1.70 ± 0.04 mV/K for the hydrogels infiltrated with KOH and NaOH electrolytes, respectively. Furthermore, the ionic conductivity values of 55.9 mS/cm and 98.5 mS/cm for KOH and NaOH electrolytes, respectively, were also significantly higher. The resulting power factor for KOH and NaOH electrolytes was 30.3 µW/m K2 and 29.1 µW/m K2, respectively (Fig. 3b).

Fig. 3
figure 3

Ionic thermoelectric performance of 3 wt% lignin hydrogels in terms of a Seebeck coefficient and ionic conductivity, b power factor; c schematic representation of selective ion migration within hydrogels. Effect of lignin concentration on d Seebeck coefficient and e ionic conductivity of hydrogels

These promising results suggest a potential correlation between the chemical structure of the crosslinked hydrogels and the improved performance observed with hydroxide-based electrolytes. This could be explained by the possible mechanism wherein the terminating alcoholic or phenolic groups of the crosslinked framework (C–OH) undergo transformation into anionic alkoxide groups (C-O) upon immersion in hydroxide-based electrolytes [55, 56]. This leads to an electrolyte containing free mobile K+ and bonded anions shown by the attraction to the hydrogel matrix in Fig. 3c. Likewise, the imbalance in mobility of cations and anions results in an enhanced concentration difference within the hydrogel network, facilitating selective ionic migration and superior Seebeck coefficients [57].

Subsequently, the effect of varying the lignin content on the i-TE performance of hydrogels was investigated by assessing their Seebeck coefficient, ionic conductivity, and power factor values. When compared to other hydrogels, all hydrogels infiltrated with the KOH electrolyte showed significantly higher Seebeck coefficients, and the Seebeck coefficients increased as the lignin content increased: S(TcB3) = 2.33 mV/K, S(TcB6) = 2.51 mV/K, and S(TcB 9) = 3.48 mV/K (Fig. 3d). This phenomenon is attributed to the fact that the synthesized hydrogels with higher lignin content contain more ionizable phenolic groups, which results in an improved selective ion migration [58]. Consequently, an increased ion concentration difference is achieved, leading to superior Seebeck coefficient values. The impedance measurements (Nyquist plots) were utilized to determine the hydrogel resistance, which was then utilized to measure the ionic conductivity (Fig. S3). The ionic conductivity values were also higher in the hydroxide-based electrolytes. Interestingly, the ionic conductivity value decreases for TcB9 hydrogels. This is associated with the swelling capacity of these samples, implying reduced absorption of electrolytes, resulting in fewer available ions for conduction [59]. Furthermore, the interconnectivity of the porous structure within the hydrogel may be limited, disrupting the continuous pathways that are essential for the efficient migration of ions. The limited swelling and disrupted porous network impede the free flow of electrolyte ions, hampering the hydrogel’s ability to conduct ions effectively. However, the trend of ionic conductivity for all electrolytes was comparable (Fig. 3e). This is because the ionic conductivity is primarily influenced by the concentration/molarity of the electrolyte rather than the structure of the polymer matrix [60]. Based on the comprehensive analysis of all possible combinations, the selection of TcB9 – CL 5% hydrogel infiltrated with the 1 M KOH electrolyte was deemed favorable for subsequent exploration owing to its superior power factor (58.3 µW/m K2) and promising prospects for further development (Table S3).

After the selection of the most appropriate electrolyte and concentration of lignin in the hydrogels, further optimization was conducted based on the concentration of the crosslinker. Three lignin-derived hydrogels were synthesized with different chemical crosslinker concentrations (TcB9–CL 2.5%, TcB9–CL 5.0%, and TcB9–CL 10% v/v). The morphological analysis of lignin-derived hydrogels with varying crosslinker concentrations was carried on using SEM; the results are depicted in Fig. 4a. The findings clearly indicate that hydrogel porosity decreases as the crosslinker concentration increases. This phenomenon can be attributed to the increased number of crosslinks formed between the polymer chains, leading to a densely crosslink network with reduced porosity. It is clearly visible that the pore size significantly changes with varying crosslinker concentrations (≈ 46.53 µm for TcB9-2.5%, ≈ 25.89 µm for TcB9-5.0%, and ≈ 6.23 µm for TcB9-10%). The limited porosity of hydrogels with higher crosslinker concentrations will ultimately impact their swelling capacity and their i-TE performance.

Since KOH was shortlisted as the most suitable electrolyte for lignin-derived i-TE hydrogels; the swelling capacity of these hydrogels was evaluated in 1 M KOH electrolyte at room temperature, and the results are plotted in Fig. 4b. The swelling results are in excellent agreement with the morphological analysis. The maximum swelling capacity of 500 ± 80% was achieved for TcB9–2.5% CL hydrogel. All the hydrogels demonstrated similar swelling capacity behavior, with the maximum swelling being achieved within 24 h. As the concentration of crosslinker increases in the hydrogels, the swelling capacity reduces to 272.7% and 98.6% for TcB9–5% CL and TcB9–10% CL, respectively. This reduction in swelling capacity can be explained by the increased crosslinking density of hydrogels with increased crosslinker concentrations. The increased crosslinking density of the hydrogels makes them less permeable and limits their ability to absorb electrolyte, causing the swelling capacity to decrease as the concentration of crosslinker increases.

The FTIR spectra of these lignin-derived hydrogels were employed to evaluate the effects of the chemical crosslinker concentration on the chemical structure and degree of crosslinking of the hydrogels, as shown in Figs. 4c and S4. It was found that all the hydrogels had similar FTIR spectra. However, the intensity of some noticeable peaks varies with the degree of crosslinking. The intensity of the broad peak at 3500–3200 cm−1, associated with -OH stretching vibrations in lignin-derived hydrogels, reduces with the increase in the crosslinker concentration. This is due to the utilization of most of the available hydroxyl groups for covalent bonding at higher crosslinker concentration, resulting in a highly crosslinked hydrogel framework with restricted porosity (Fig. 4a) and limited availability of -OH functional sites [61]. Additionally, etheric symmetrical and asymmetrical linkages (C–O–C) at 1038 cm−1 and 1284 cm−1 also become prominent at a higher degree of crosslinking. Interestingly, the aromatic skeleton vibrations at 1586 cm−1 also vary with the concentration of crosslinker.

Fig. 4
figure 4

a SEM images of lignin-derived hydrogels with different crosslinker concentration, their b swelling capacity in 1 M KOH, and c FTIR spectra

The i-TE thermoelectric properties of these hydrogels were evaluated, and the obtained results are presented in Fig. 5a–c and Table S4. The ionic resistance obtained from the impedance response (Fig. S5) increases with the concentration of the crosslinker, and hence lower ionic conductivity (Fig. 5a). This is associated with the fact that the reduction in the pore size and the increase of the crosslinking density with the increase in crosslinker concentration result in restricting the movement of ions or molecules within the hydrogel, thereby reducing the ionic conductivity. Remarkably, the hydrogel sample with the lowest crosslinker concentration displayed the highest levels of ionic conductivity (62 ± 5 mS/cm) and Seebeck coefficient (5.8 ± 0.9 mV/K), yielding an outstanding power factor of 207 ± 22 µW/m K2. This superior performance can be ascribed to the more porous structure of the hydrogel network facilitated by the reduced crosslinker concentration as illustrated in the SEM results (Fig. 4a). The increased porosity enables improved absorption and transport of the electrolyte, resulting in elevated ionic conductivity and Seebeck coefficient. Moreover, the lower crosslinker concentration promotes enhanced ionic selectivity by providing more available functional sites on the hydrogel surface, further facilitating rapid and unhindered ion migration within the hydrogel matrix and leading to superior i-TE properties.

Fig. 5
figure 5

Effect of crosslinker concentration on ionic thermoelectric properties of lignin-derived hydrogels in terms of a ionic conductivity, b Seebeck coefficient, and c power factor

Final optimization of lignin-derived hydrogels was carried out on the basis of electrolyte concentration (Tables S4 and S5). The TcB9–2.5% CL hydrogels were infiltrated with varying molar concentrations (ranging from 0.1 M to 6.0 M) of KOH electrolyte, and subsequent testing was conducted to evaluate the i-TE properties. Figure 6a–c and e show the results obtained for the Seebeck coefficient, ionic conductivity, thermal conductivity, Fig. of merit, and power factor of all the hydrogel samples subjected to an axial thermal gradient (Fig. 6d). Notably, an increase in the electrolyte concentration correlated with amplified values of the Seebeck coefficient and ionic conductivity. The maximum value of thermal voltage was recorded to be 13.0 ± 0.7 mV/K for the 6 M KOH concentration (Figs. S6 and S7). This enhancement in thermal voltage is attributed to the improved influence of ionic selectivity within the hydrogel framework resulting from the increased ionic concentration [62]. As a result, cations (K+) diffuse more rapidly than anions, leading to a larger Seebeck coefficient. Likewise, the ionic conductivity monotonously increases with electrolyte concentration in all hydrogels up to 4 M concentration before reaching the saturation point (Figs. 6b and S8). Consequently, an exceptionally high-power factor of 3831 ± 45 µW/m·K2 was registered for the hydrogel infiltrated with 6 M KOH electrolyte, outperforming most of the existing state-of-the-art ionic thermoelectric materials (Table S7).

Fig. 6
figure 6

Effect of electrolyte concentration in terms of a Seebeck coefficient, b ionic conductivity, c thermal conductivity, d thermal camera image of hydrogel subject to axial temperature difference, and e power factor and Figure of merit of lignin-derived hydrogel

The thermal conductivity of infiltrated TcB9-2.5% CL hydrogels was investigated by measuring the thermal conductivity values at different electrolyte concentrations, as shown in Fig. 6c. The observed thermal conductivity values ranged from 0.43 to 0.29 W/m K. The highest thermal conductivity value of 0.43 W/m K was obtained for the hydrogel infiltrated with 0.1 M KOH electrolyte, while the lowest value of 0.29 W/m K was observed for the hydrogel with 6 M electrolyte. The decrease in thermal conductivity can be attributed to the water uptake during the swelling process, as distilled water has a thermal conductivity of approximately 0.6 W/m K [63]. The swelling of hydrogels was observed to decrease with increasing KOH concentration (Fig. S9), resulting in lower electrolyte uptake and consequently lower thermal conductivity values. The thermal conductivity values tended to approach those of the precursor materials, such as pure PVA (0.2–0.3 W/m K) [64] and other lignin-based materials (0.3–0.5 W/m K) [65, 66]. The combination of the lower thermal conductivity observed in lignin-derived hydrogels infiltrated with a highly concentrated KOH electrolyte, and their exceptional power factor values yields remarkable Figure of merit (ZTi). Specifically, the ZTi values reach 3.12 and 3.75 for 4 M and 6 M KOH infiltrated hydrogels, respectively (Fig. 6e).

It is important to mention here that the significant increase in the thermal voltage starts after 1 M KOH concentration. Subsequently, the thermal voltage increased by 40.6% and 52.3% as the concentration of KOH electrolyte rose to 2 M (9.8 mV/K) and 4 M (12.2 mV/K), respectively. However, beyond the 4 M concentration, the Seebeck coefficient showed no substantial increase, with a mere 3.1% rise observed for the 6 M KOH concentration. Additionally, hydrogels immersed in 6 M KOH electrolyte shrink significantly, which makes processing difficult. This shrinking is associated with a change in osmotic pressure and ion concentration of the external solution, according to Flory network theory [67]. At 6 M KOH concentration, the external solution has a higher solute concentration than that of lignin-derived hydrogel; electrolyte will be drawn out of the hydrogel, resulting in shrinkage of the hydrogels [68]. Additionally, the structural integrity and degree of crosslinking of the hydrogel are also at risk at such high concentrations. As a result, it is imperative to give special consideration to the selection of the electrolyte concentration. Conclusively, the chemically crosslinked framework of lignin hydrogels promotes ionic transport, resulting in higher ionic conductivity, superior power factor, and higher ZTi, paving the way for sustainable i-TE materials.

Various mechanical testings were conducted on lignin-based hydrogels, and the results are presented in Fig. 7. The hydrogels were stretched within their elastic limits in order to determine the maximum degree of elasticity. The outstanding elasticity, as indicated by the stretchability results ranging from 146.2 ± 14.2% for TcB9-10% to 265.4 ± 31.2% for TcB3-5%, stems from the synergistic effects of lignin and PVA component (Fig. 7a). These variations in elasticity are attributed to differences in polymer composition, crosslinker concentration, and crosslinking density within the hydrogel formulations. Figure 7b illustrates the stretchability of TcB9-2.5% lignin hydrogels in laboratory. The compression testing of hydrogels was also conducted, and results are plotted in Fig. 7c. The stress–strain graphs of lignin-based hydrogels depict typical trends for flexible hydrogels with gradual increase in stress until a certain strain, after which a sharp rise in the stress occurred [69, 70]. This behavior can be explained by elastic region of the hydrogels followed by the rearrangement of polymer chains and increased resistance to deformation beyond a certain strain threshold. This sharp rise signifies the hydrogels’ exceptional ductility, allowing them to withstand substantial deformation without fracturing. The differences in the points where the sharp rise of stress starts can be attributed to the varying compositions of your hydrogels. The Young’s modulus values for these hydrogels were comparatively low, with a maximum of 50.91 kPa recorded for TcB9-5%. Moreover, extensive flexibility testing, including bending to 90 and 180 degrees, rolling around fingers, and twisting around a ballpoint, revealed the TcB9-2.5% hydrogel exceptional flexibility and resilience (Fig. 7e). It is noteworthy that despite their distinct composition differences, all hydrogels display exceptional flexibility. The combination of lignin and PVA in these hydrogel formulations results in a material with a balanced set of mechanical properties, combining the strength and rigidity of lignin with the flexibility and elasticity of PVA [32]. Furthermore, we conducted extensive tests to evaluate the ionic thermoelectric performance of TcB9-2.5% C.L hydrogels. These assessments included testing the hydrogels for ionic conductivity at different temperatures (Fig. S12), examining their ionic conductivity during compression cycling (Fig. S13), and observing their thermal voltage response when deformed (Fig. S14). Across all these tests, the hydrogels consistently demonstrated exceptional performance, showcasing their reliability and effectiveness under various conditions. These findings underscore the potential of these highly elastic, stretchable, and resilient hydrogels for advance energy harvesting and biomedical applications.

Fig. 7
figure 7

Mechanical properties of hydrogels a elasticity; b photographs of TcB9-2.5% before, during, and after stretching, c compressive stress strain curves, d Young’s modulus, and e flexibility testing of TcB9-2.5% hydrogel

Finally, the ionic thermoelectric supercapacitor was fabricated using TcB9-2.5% CL hydrogel, infiltrated with 4 M KOH, and encapsulated between highly capacitive lignin-based 3D spherical porous carons (LSPCs) electrodes that were synthesized in our recent study [71]. CV curve and Nyquist plot of the supercapacitor device are presented in Fig. S15a and b. The devices exhibited symmetrical boat-like shape, indicating a combination of electric double layer and pseudocapacitive charge storage behavior [35]. EIS curve is more inclined toward the vertical axis, indicating EDLC behavior and fast ion transport between hydrogel and electrodes. Fig. S15c illustrates the four stages involved in the working of an ionic thermoelectric supercapacitor. The power density and energy density were calculated for 2nd stage at 1 KΩ external load and estimated to be 17.12 µW/m2 and 228 mJ/m2 respectively. Additionally, the current density–voltage–power density (I–V–P) curves of the device at 20 K temperature difference is shown in Fig. S15d, and results are aligned with previous published studies [72, 73].

4 Conclusions

This study aimed to investigate the ionic thermoelectric phenomenon using lignin-derived hydrogels. Lignin-derived hydrogels enhanced the ionic conductivity and Seebeck coefficient due to the selective ionic migration in synergy with the Soret effect due to the presence of ionizable groups on the surface of hydrogels. Various compositions of lignin derived hydrogels were tested for optimizing i-TE thermoelectric efficiency. It was found that hydrogels with higher lignin concentrations (TcB9) and lower crosslinker concentrations (2.5% v/v) have excellent swelling capacity (500 ± 80%) and superior thermopower (5.8 ± 0.9 mV/K) compared to others. The optimized lignin-derived hydrogel, infiltrated with 6 M KOH electrolyte, exhibits high ionic conductivity (226.5 mS/cm), low thermal conductivity (0.29 W/m K), and a superior Seebeck coefficient of 13 mV/K, leading to a remarkable ZTi of 3.75. These hydrogels possess outstanding ionic thermoelectric properties, and, importantly, they are biocompatible, environmentally friendly, and biodegradable. These features make them suitable for several high-end applications, including temperature sensors for monitoring the environment, healthcare applications in biomedical sensors, and wearable electronics designed for sustainable and efficient energy harvesting. This innovation not only advances ionic thermoelectricity but also has significant potential for addressing environmental sustainability and technological progress.