Introduction

The massive use of coal and petroleum is an inevitable part of modern lifestyles for energy consumption and has resulted in significant environmental pollution. There are many alternative renewable resources used instead of fossil fuels. The power needs of the world can be satisfied by renewable energy sources, such as wind turbines, hydroelectric dams, solar panels, and geothermal energy. Storage of the energy harvested from renewable sources is consequently necessary for its later usage since renewable sources are not spontaneous sources of energy. In addition, the development of energy storage electronic devices is needed for effective energy storage [1, 2]. Electrolytes are the key component of energy storage devices such as batteries and supercapacitors and are currently attracting an abundance of research attention. Their primary function is to conduct ions between the electrodes, enabling the electrochemical reactions that generate or store energy. The performance, safety, and longevity of these devices are heavily influenced by the properties of the electrolytes used. Electrolytes can be broadly classified into three main types: liquid electrolytes, solid electrolytes, and gel electrolytes. Many liquid electrolytes are highly flammable. Liquid electrolytes can leak from the device if the casing is compromised, leading to potential damage to the device and creating safety hazards. Gel electrolytes typically have lower ionic conductivity than liquid electrolytes. Solid electrolytes are non-flammable and can potentially enable the use of high-voltage electrodes and metallic lithium anodes, increasing energy density.

For the preparation of solid electrolytes, polymers can be used. Polymers are macromolecules because they consist of a large number of monomer units. Polymers can be divided into two types. One is a synthetic polymer, and the other is a biopolymer. Synthetic polymers are nondegradable and increase environmental problems [3]. For example, the synthetic polymer PVP has an ionic conductivity on the order of 10−11 S/cm [4]. Recently, the use of bio-based materials which are derived from renewable resources has increased because the world is currently experiencing a serious crisis related to sustainability and environmental issues [5]. Many studies have been performed with natural polymers such as agar‒agar [6,7,8], chitosan [9], dextran [10], methylcellulose [11,12,13], starch [14], pectin [15], carrageenan [16,17,18,19], and gum-based polymers [20, 21].

Tamarind gum (TG) or tamarind seed polysaccharide is obtained from the seeds of Tamarindus indica [22]. TG functions as a highly branched carbohydrate composed of glucose, xylose, and galactose units that exists in a ratio of 2.8:2.25:1.0 along with side chains of xylopyranose and (1,6)-linked [-D-galactopyranosyl-(1,2)-D-xylopyranosyl] to glucose residues [23]. TG is a renewable and earth-abundant polysaccharide that is highly soluble in hot water and used in many industrial applications [24]. Specifically, the properties of solid polymer electrolytes (SPEs) are better than those of liquid or gel polymer electrolytes [25]. SPEs have many remarkable properties including low volatility, leak-proof construction, lack of solvents, and good thermal, electrical, mechanical, volumetric, and electrochemical stabilities. Due to their diverse and beneficial characteristics, SPEs have achieved remarkable success in electronic industrial applications [26, 27].

The conductivity of a polymer electrolyte can be improved by adding salts, plasticizers, nanofillers, and ionic liquids. The majority of research is focused on monovalent salt systems (H+, Li+, and Na+) [4, 28,29,30,31,32,33]. Magnesium is the eighth most abundant element in the Earth’s crust, making it significantly more available than lithium. Magnesium seems to be the most promising material among the other due to its potential for greater volumetric-specific capacity. Unlike lithium and sodium, which are monovalent, magnesium is divalent. This means that each Mg2⁺ ion can transfer two electrons per ion, potentially offering a higher-energy density. This can lead to a higher theoretical capacity compared to lithium-ion and sodium-ion batteries. The higher charge density of Mg2⁺ ions allows for more compact energy storage, potentially leading to batteries with higher-energy densities. Magnesium salts generally have lower environmental toxicity compared to lithium salts. Magnesium chloride is an inorganic salt that dissolves easily in water. In food preparation, pharmaceuticals, agriculture, marine applications, bath salts, and flotation tanks, magnesium chloride can be used [34].

In this work, magnesium salt is chosen to enhance the conductivity of the TG. M. Sundar et al. have reported that poly(ethylene oxide) (PEO) and magnesium chloride doped with filler B2O3 have attained a maximum conductivity of 4.52 × 10−6 S/cm at room temperature [35]. The triblock copolymer poly(vinylidene chloride-co-acrylonitrile-co-methyl methacrylate) (poly(VdCl-co-AN-co-MMA)) with magnesium chloride has a maximum conductivity of 1.89 × 10−5 S/cm at ambient temperature [36]. Several methods have been developed for producing cost-effective energy storage devices, but there is a problem in making batteries with good performance. To address these issues, SPEs can be developed using an affordable solution-casting process with increased ionic conductivity. It has improved electrochemical and physical characteristics to be used in energy storage devices such as supercapacitors and solid-state batteries.

Materials

Tamarind seed polysaccharide (TSP) was obtained from Tokyo Chemical Industry, Japan. The magnesium ion source magnesium chloride hexahydrate (MgCl2·6H2O) salt with a molecular weight of 203.31 g/mol was obtained from Chemspure, Chennai. Double distilled water was used as the solvent. For electrode preparation, activated carbon, poly(vinylidene fluoride) (PVdF), and N-methyl pyrrolidone (NMP) were procured from Sanwa Components, Inc.

Preparation method

All the polymer electrolytes were prepared by the simple solution-casting technique. In this work, 1 g of TSP was dissolved in 50 ml of double distilled water at 80 °C for 5 h of vigorous stirring with a magnetic stirrer at 1500 rpm. Different concentrations of salt were dissolved in 20 ml of double distilled water, and the notations are given in Table 1. After dissolving the salt, TSP was added dropwise. The blended solution was stirred for 24 h. The homogeneous solutions were poured into Petri dishes and maintained at 60 °C in an oven for 24 h. Then, the transparent thin films are peeled off from the Petri dishes with a thickness of 0.022 cm, as shown in Fig. 1a.

Table 1 Polymer-salt composition and its sample codes
Fig. 1
figure 1

a Prepared solid polymer electrolyte. b Schematic representation of symmetrical supercapacitor

Fabrication of the symmetrical supercapacitor

N-methyl pyrrolidone (NMP), poly(vinylidene fluoride) (PVdF), and activated carbon were used at a ratio of 8:1:1 for electrode preparation. Using a mortar and pestle, PVdF, activated carbon, and NMP were mixed to form the slurry. Then, it was coated in a nickel foil. To stop the formation of moisture, the sample was dried for 12 h at 80 °C. The arrangement of the electrode and electrolyte in the symmetrical supercapacitor device is shown in Fig. 1b.

Results and discussion

XRD analysis

Figure 2a displays the typical XRD patterns of TSP and different weight percentages of magnesium chloride-doped TSP polymer electrolytes. TSP shows a broad diffraction halo at 2θ = 19.6°, 30.1°, and 41.1° [37]. With the addition of salt, the intensity of the small humps at 2θ = 19.6° is decreased. There is a slight increase in the hump at 2θ = 30.1° and 41.1° due to the addition of salt. For the sample 5 TML, the intensity of all the humps decreases, and the sample is highly amorphous [38, 39]. No crystalline peaks of magnesium chloride are observed which indicates the complete dissolution of salt with the polymer, and the JCPDS of pure magnesium chloride (2θ = 15.4°, 36.4°, and 50° (JCPDS-89–1567)) is shown in Fig. 2a.

Fig. 2
figure 2

XRD pattern of polymer electrolytes

The degree of crystallinity χ can be determined by the deconvolution of the XRD peaks. In the XRD pattern, the high-intensity peak at 2θ = 19.6° is considered as the crystalline peak. The formula for calculating the degree of crystallinity (χ (%)) is given below:

$$\chi(\%)=A_C/A_T\times100$$
(1)

Here, AC is the area of crystallinity, and AT represents the total area of the peak. By deconvoluting the XRD peaks, the degree of crystallinity is decreased with increasing salt concentration. The values are given in Table 2. The intensity of the hump at 2θ = 30.1° is slightly increased for sample 6 TML.

Table 2 Degree of crystallinity of polymer electrolytes

FTIR spectrum analysis

The possible interactions between TSP and salt are shown in Fig. 3a. FTIR spectroscopy is a unique tool for investigating the complex nature of polymers and salts. The FTIR spectra of all the synthesized samples are shown in Fig. 3b. The band assignments for the peak values are given in Table 3.

Fig. 3
figure 3

a Chemical structure of TSP and magnesium chloride. b FTIR spectra of all the SPEs

Table 3 FTIR spectrum wave number and their assignments

The vibrational spectra of TSP show bands at 3373 cm−1, 2900 cm−1, 1645 cm−1, 1362 cm−1, 1018 cm−1, 938 cm−1, and 890 cm−1. The peak attributed to the hydroxyl group (O–H) stretching of the glucan backbone of TSP at 3373 cm−1 is shifted slightly due to the addition of salt [40]. In TSP, the transmittance peak at 2900 cm−1 corresponds to CH2 asymmetric stretching and shifts to 2928 cm−1 [24]. The transmittance peak at 1651 cm−1 is attributed to C = C stretching, and the intensity of that particular transmittance peak increases with increasing salt ratio [41]. This indicates the incorporation of magnesium chloride with TSP. The band at 1362 cm−1 is attributed to CH2 plane bending [37]. A strong C–O stretching vibration is observed at 1020 cm−1. With increasing the salt ratio, the intensity of this transmittance peak decreases. The transmittance peak intensity decreases with increasing salt ratio in the range of 938 to 890 cm−1 which is due to C–H out-of-plane bending and C-anomeric group stretching of the polysaccharide respectively [42].

DSC analysis of polymer electrolytes

Differential scanning calorimetry is employed to determine the glass transition temperature (Tg) of the prepared biopolymer electrolytes. Approximately, 3.4 mg of biopolymer electrolyte is placed in an aluminum pan under a nitrogen gas atmosphere and hermetically sealed. The glass transition temperature of the polymer is the temperature at which the polymer electrolyte changes its behavior from the flexible state to the glassy state [43].

A DSC plot of all the prepared electrolytes is shown in Fig. 4. The TSP sample has a Tg value of 59 °C. The addition of magnesium salt with TSP increases the Tg. For the higher conducting sample 5 TML, the glass transition temperature is 127 °C which is due to two main factors: (1) elongation of the polymer chain because of electrostatic repulsion in the polymer chain and (2) changes in the density of the solid polymer electrolyte [44]. This phenomenon has been explained as the result of less segmental motion resulting from an increase in the intermolecular coordination between the hydrogen and the oxygen atom in the polymer chain [45]. The higher conducting sample 5 TML has large number of free charge carriers which is the main reason for the increase in the glass transition temperature [46]. The Tg values of all the samples are given in Table 4.

Fig. 4
figure 4

Differential scanning calorimetry plots of a TSP, b 1 TML, c 2 TML, d 3 TML, e 4 TML, f 5 TML, and g 6 TML

Table 4 Calculated Tg, σ, and Ea values of SPEs

AC impedance analysis

Nyquist plot

Nyquist plots are typically produced using impedance measurements and can have three different configurations: (i) a tilted spike, (ii) a depressed semicircle, or (iii) a depressed semicircle combined with a tilted spike. Figure 5a and b shows the Nyquist plots of TSP and TSP with different concentrations of salt at room temperature. Figure 5a shows the Nyquist plot of TSP, which shows a semicircle. Figure 5b shows a low-frequency spike followed by a semicircle at high frequency for the salt-doped SPEs. Low-frequency spikes are noticed by the effect of the blocking electrodes. Due to the parallel combination of the bulk resistance and bulk capacitance, a high-frequency semicircle is observed. The bulk resistance (Rb) is determined by considering the high-frequency intercept of the semicircle and the low-frequency spike on the real axis (Z′). Using Z-view fitting software, the value of the bulk resistance is obtained. The AC ionic conductivity of the SPEs can be calculated by the following formula:

Fig. 5
figure 5

a Nyquist plot of TSP. b Nyquist plot of prepared electrolytes

$$\sigma = \frac{t}{A{R}_{b}}(S/cm)$$
(2)

Here, t is the thickness, Rb is the bulk resistance, and A represents the contact area. At ambient temperature, the ionic conductivity of the pure tamarind gum is 2.42 × 10−9 S/cm. When salt is added with TSP, the ionic conductivity of the SPEs is increased to a concentration of 0.5 g of salt with 1 g of TSP. A maximum ionic conductivity of 3.48 × 10−3 S/cm is observed at room temperature for 5 TML. The ionic conductivities of all the samples are given in Table 4. An increase in the amorphous structure of prepared electrolytes reduces the energy barrier and facilitates fast ion transport along with the release of many mobile charge carriers [47]. Upon further addition of salt (0.6 g), the ionic conductivity is decreased slightly to 1.78 × 10−3 S/cm. The decrease in ionic conductivity may be due to the aggregation of ions in the polymer matrix.

Conductance spectra

The conductance spectra of the biopolymer electrolyte TSP and various concentrations of salt are displayed in Fig. 6a and b. Pure tamarind gum has two regions in its conductance spectrum. The plateau region at low frequency occurs because of the space-charge polarization between the electrode–electrolyte interface, and the high-frequency dispersion region is observed by the bulk relaxation phenomenon [21]. The conduction spectrum of the salt-added samples consists of three distinct regions.

Fig. 6
figure 6

a Conductance spectrum of TSP. b Conductance spectra of TSP with salt-doped SPEs. c Conduction mechanism for the higher conducting sample

Region I is the low-frequency dispersion region which represents the space charge polarization at the interface of the electrode and electrolyte. The frequency-independent plateau region (region II) is observed in the mid-frequency range. With the increase in salt ratio, the mid-frequency plateau region decreases. Compared with the other electrolytes, sample 5 TML has a small mid-frequency plateau region. Due to the bulk relaxation, a high-frequency dispersion region (region III) is observed [48, 49].

Temperature-dependent conduction mechanism

Figure 6c shows the conduction mechanism of the higher conducting sample. The conduction mechanism is determined using Jonscher’s universal power law by increasing the temperature from 303 to 353 K.

$${\sigma }_{ac}={\sigma }_{dc}+A{\omega }^{s}$$
(3)
$${\omega }^{s}=\frac{{\sigma }_{dc}}{A}$$
(4)

Here, \(A\) is the temperature-dependent parameter, and \({\omega }^{s}\) is the hopping frequency. Three regions are observed in the conductance spectra. Nonlinear fitting is used for the determination of the slope (s) value. There are few models that depend on the value of the power law exponent “s,” which is usually less than 1. When T → 0 K, the “s” value increases towards unity, following the correlated barrier hopping (CBH) model. The temperature-independent “s” value provides information regarding the quantum mechanical tunneling model (QMT). The quantum mechanical phenomenon states that conducting ion and stress fields combine to generate the polaron. Tunneling is the mechanism by which polarons pass through a potential barrier. The increase in the “s” value due to the temperature increase is called nonoverlapping small polaron tunneling (NSPT). The overlapping-large polaron tunneling (OLPT) model is indicated by the dependence of “s” on temperature and frequency, as well as the reduction in “s” with increasing temperature [50, 51].

Region I obeys the overlapping large polaron tunneling (OLPT) model. In which, the “s1” value decreases with increasing temperature. As a result, the lack of dependence of ions on one another facilitates tunneling rather than hopping [52]. The quantum mechanical tunneling model (QMT) is observed in region II, in which the “s2” value is constant as the temperature increases. In region II, the polarons can be tunnelled through the potential barrier to nearby sites. The slope of “s3” increases with increasing temperature, which proves that the nonoverlapping small polaron tunneling (NSPT) model is applicable in region III. The equations for all the regions are shown in Fig. 6c.

Arrhenius plot

The temperature dependence of the ionic conductivity of all the prepared electrolytes from 303 to 353 K is shown in Fig. 7a and b. The ionic conductivity of the electrolyte increases with increasing temperature. All polymer complexes obey the thermally activated Arrhenius process which is defined by the given relation:

$$\sigma ={\sigma }_{0} exp\left({~}^{-{E}_{a}}\!\left/ \!{~}_{KT}\right.\right)$$
(5)

\({\sigma }_{0}\) represents the preexponential factor, Ea is the activation energy, and K denotes the Boltzmann constant. By linear fitting of the plot, the slope can be obtained. The activation energy (Ea) of all the polymer membranes is determined by the slope. The minimum activation energy for the optimized sample (5 TML) is 0.045 eV. The activation energy decreases as the salt concentration increases. The reason for the increased conductivity with temperature is that the vibrational modes of the polymer segments increase, and the ions move across nearby coordination sites rapidly at higher temperatures due to the greater free volume [53, 54]. As a result, hopping intrachain and interchain ion motions are encouraged, and the conductivity of the polymer electrolyte increases [55]. The values of the activation energy of all the electrolytes are given in Table 4.

Fig. 7
figure 7

a Temperature-dependent conductivity plot for TSP. b Temperature-dependent conductivity plot for TSP with salt-doped SPEs

Dielectric spectra

The amount of dipole alignment in a given volume is expressed by the dielectric constant (ε′). When the polarity of the electric field suddenly changes, there must be a loss of energy due to ion migration and dipole alignment which is represented by dielectric loss (ε′′). These ε′ and ε′′ are correlated with the conductivity of the dielectric materials [56]. Figure 8a and b represents the frequency-dependent real (ε′) and imaginary parts of the complex permittivity (ε′′) of all the prepared electrolytes at room temperature. The complex permittivity can be defined by the following:

Fig. 8
figure 8

a Real part of dielectric as the function of log frequency for all the prepared electrolytes. b Imaginary part of dielectric as the function of log frequency for all the prepared electrolytes

$$\varepsilon =({\varepsilon }{\prime}-i{\varepsilon }^{{\prime}{\prime}})$$
(6)
$${\varepsilon }{\prime}= \left({~}^{{Z}^{{\prime}{\prime}}}\!\left/ \!{~}_{\omega {C}_{0}\left({Z}^{{^{\prime}}^{2}}+{Z}^{{{\prime}{\prime}}^{2}}\right)}\right.\right)$$
(7)
$${\varepsilon }^{{\prime}{\prime}}= \left({~}^{{Z}{\prime}}\!\left/ \!{~}_{\omega {C}_{0}\left({Z}^{{^{\prime}}^{2}}+{Z}^{{{\prime}{\prime}}^{2}}\right)}\right.\right)$$
(8)

Here, \({\varepsilon }{\prime}\) is the dielectric constant, \({\varepsilon }^{{\prime}{\prime}}\) is the dielectric loss, ω is the angular frequency, \({Z}{\prime}\) and \({Z}^{{\prime}{\prime}}\) are the real and imaginary parts of the impedance respectively, and \({C}_{o}\) is the vacuum capacitance [57]. Owing to the interfacial polarization, the dielectric constant (\({\varepsilon }{\prime}\)) is high at low frequencies. In the polymer electrolyte, the ions tend to propagate and move along an electric field in the proper direction. With the movement of ions in the salt-added polymer matrix, the ions dissociate into anion–cation pairs. The ions are still blocked from crossing through the electrode–electrolyte contact because the electrodes do not allow charge transfer into the external circuit. At the interface between the electrode and electrolyte, these limited and reversible trapped ions subsequently gather, localize, and create a heterocharge layer. The sample is believed to be significantly thicker than this heterocharge layer which causes a sharp increase in the ε′ value. The dielectric constant rapidly decreases and becomes frequency independent in the high-frequency region. This is due to the difficulty for the charge carriers or dipoles in the polymer chain to move and orient themselves. There is virtually no extra ion diffusion in the direction of the electric field because the periodic reversal of the electric field occurs quickly [58].

The dielectric loss reaches a maximum at higher frequencies. Through internal friction, polarization produces heat and results in energy loss. Dielectric loss is a direct reflection of both the energy dissipation and the out-of-phase degree of the incident electric field [54]. The of sample 5TML has the highest values of \({\varepsilon }{\prime}\) and \({\varepsilon }^{{\prime}{\prime}}\) which is attributed to the motion of free charge carriers within the polymer matrix.

Modulus spectra

To further elucidate the dielectric behavior, modulus analysis is used. The relation between the complex permittivity and dielectric modulus is given below:

$${M}{\prime}=\frac{{\varepsilon }{\prime}}{{{\varepsilon }{\prime}}^{2}+{{\varepsilon }^{{\prime}{\prime}}}^{2}}$$
(9)
$${M}^{{\prime}{\prime}}=\frac{{\varepsilon }^{{\prime}{\prime}}}{{{\varepsilon }{\prime}}^{2}+{{\varepsilon }^{{\prime}{\prime}}}^{2}}$$
(10)

Here, \({M}^{*}\) denotes the complex dielectric modulus, and \({M}{\prime}\) and \({M}^{{\prime}{\prime}}\) represent the real and imaginary parts of the dielectric modulus respectively [59]. The above formula is used for the dielectric modulus (\({M}^{*}\)) which is inverse of the complex permittivity \(({\varepsilon }^{*}\)). At low frequencies, the long tail is observed in \({M}{\prime}\) and \({M}^{{\prime}{\prime}}\) which is due to the capacitance behavior of the electrode as shown in Fig. 9a and b. The bulk effect is the reason for the increase in the modulus with increasing frequency [60]. Both the real and imaginary parts (\({M}{\prime}\) and \({M}^{{\prime}{\prime}}\)) of the modulus have low values for the higher conducting sample.

Fig. 9
figure 9

a Real part of modulus spectra of salt added polymer electrolytes. b Imaginary part of modulus spectra of salt-added polymer electrolytes

Tangent analysis or dissipation factor (δ)

By investigating tan δ as a function of frequency, the dielectric relaxation parameters can be determined. The ratio of mobile to stored dipoles is expressed by the given loss tangent (δ) equation:

$$\text{tan}\delta =\frac{{\varepsilon }^{{\prime}{\prime}}}{{\varepsilon }{\prime}}$$
(11)

The variation in tan δ as a function of frequency at room temperature is shown in Fig. 9 for all the prepared electrolytes. This confirms the non-Debye nature of the polymer electrolytes [61]. The frequency of the maximum tan δ value is taken for the determination of the relaxation time. The relaxation time (τ) for all the electrolytes is calculated by the following formula:

$$\tau =\frac{1}{2\pi f}=\frac{1}{\omega }$$
(12)

Here, τ denotes the relaxation time, and f is the maximum frequency [60]. The values of tan δ increase with salt ratio. Samples 3 TML, 4 TML, 5 TML, and 6 TML have sharp peaks. The charge carriers in the polymer chain have long-range mobility which is the reason for the increase in the relaxation frequency as well as the maximum tan δ value [62]. Figure 10 depicts the different tan δ values for the logarithmic frequency. The relaxation time τ is determined for all the samples, and the values are given in Table 5. The lowest relaxation time is observed for sample 5 TML.

Fig. 10
figure 10

Tangent spectra of salt-added polymer electrolytes

Table 5 Relaxation time and transference number of prepared polymer electrolytes

Transference number measurement

Wagner polarization method

The measurement of the transference number provides details about the role of electrons and ions in the total conductivity. The total transport number can be calculated by Wagner’s polarization method. In this method, polymer electrolytes are inserted between two silver electrodes, and a fixed DC voltage of 2 V is applied. Graphite is coated on one silver electrode which acts as an electronic transport barrier. In this method, the change in the polarization current is monitored as a function of time until a steady state is reached [47, 63]. The transference number of ions (tion) and electrons (tele) is calculated by the following:

$${t}_{ion}= \left[\left({I}_{i}- {I}_{f}\right)/{I}_{i}\right]$$
(13)
$${t}_{ele}=\left(1-{t}_{ion}\right)$$
(14)

Here, tion is the transport number of ions, tele is the transport number of electrons, Ii is the initial current, and If is the final current. When the DC voltage is applied, the initial current is detected owing to both electron and ion motion, and it rapidly decreases with time. A steady state is reached when only a small amount of constant current persists after all the ions have been drained. Under these conditions, electrons induce the final current [63]. The transport number of ions reached a maximum (0.999) for the higher conducting sample 5 TML. The values of tion and tele are given in Table 5 for all the samples. The polarization current versus time plot for the sample with the highest conductivity is displayed in Fig. 11.

Fig. 11
figure 11

Plot of polarization current vs time

Symmetrical supercapacitor device characterization

Linear sweep voltammetry (LSV)

The LSV is observed for the higher conducting sample 5 TML as shown in Fig. 12. The electrochemical stability and potential of the electrolyte are examined using linear sweep voltammetry (LSV) [64]. The LSV curve implies a slight increase in the current at the beginning. At the cutoff voltage, the current starts increasing suddenly due to the decay of the polymer electrolyte. When the potential is greater than 1.7 V, the current suddenly increases. The 5TML has a potential window of 1.7 V.

Fig. 12
figure 12

Linear sweep voltammetry

Cyclic voltammetry (CV)

The CV curves are recorded at various scan rates (15–100 mV/s) in a potential window spanning from − 0.7 to 1 V and displayed in Fig. 13. The specific capacitance of the device can be calculated by the following formula:

Fig. 13
figure 13

Cyclic voltammetry of fabricated supercapacitor device

$${C}_{sp}=\frac{A}{m \times v \times \Delta V}$$
(15)

Here, A is the area of the CV curve, m is the mass of the active material, v is the scan rate, and \(\Delta\) V is the potential window [65]. Figure 13 shows a CV curve with a leaf-like shape. Changes in the shape of the curve may be caused by the internal resistance and porosity of the carbon electrodes at the electrode–electrolyte interface, which stimulates the formation of an electric double layer and improves the energy storage capacity of the EDLC [66]. In the anodic and cathodic areas of the EDLC, charge storage is achieved at each interface via a non-Faradaic mechanism. However, no peaks are observable in the plot, which indicates the absence of oxidation or reduction in the entire system. Since most of the ions have enough time to absorb on the electrolyte surface, more energy is stored at lower scan rates. Consequently, this mechanism explains how potential energy is stored as a result of the double-layer charge that forms on the surfaces of carbon electrodes [67,68,69]. At a low scan rate of 15 mV/s, the specific capacitance is calculated to be 413.05 Fg−1 with a potential window of 1.7 V. The specific capacitance values for the different scan rates are given in Table 6. However, the charge and discharge processes take less time to complete, and there is insufficient contact between the electrodes and the ions at faster scan rates which decreases the amount of energy that can be stored. The performance of the fabricated supercapacitor in terms of specific capacitance is compared with the earlier reported literature and tabulated in Table 7. From this, it is confirmed that the supercapacitor performs well.

Table 6 Value of specific capacitance, power density, and energy density
Table 7 Specific capacitance values from literature

Galvanostatic charge‒discharge (GCD)

For the investigations of cyclic stability and the charge‒discharge process, GCD observations are used. The current density is varied from 3 to 7 mA/g to observe the charge‒discharge characteristics as shown in Fig. 14. The nature of the EDLC is observed in the symmetrical charge‒discharge process in the potential range of − 0.7 to 1 V. By varying the applied current, the charge‒discharge time is varied. When a current density of 7 mA/g is applied, the discharge time is minimal, and the charge‒discharge curve is changed by varying the current density as shown in Fig. 14. The maximum discharge time is observed at a current density of 3 mA/g. At a high current density, this occurs due to the delayed movement of ions in the electrolyte to the electrode surface. Using this discharge time, the specific capacitance can be calculated. Energy density and power density values can be calculated from the GCD. [18]. From the GCD characteristics, the energy density and power density can be calculated by the following formulas:

Fig. 14
figure 14

GCD curves of the device with different current densities

$$E= \frac{1}{2}{C}_{sp}{V}^{2}$$
(16)
$$P= \frac{E}{\Delta \text{t}}$$
(17)

Here, E represents the energy density (WhKg−1), P denotes the power density (W kg−1), Δt is the discharge time (s), and V is the potential window (V). When a 0.003-A current is applied, the maximum specific capacitance observed is 427 Fg−1. The calculated specific capacitance, power density, and energy density values are given in Table 6.

Ragone plot

Ragone plot is plotted between energy density and power density of the device for the various current densities which are given in Fig. 15. Increasing the current density value from 3 to 7 mA, the value of power density is increased.

Fig. 15
figure 15

Ragone plot for the fabricated supercapacitor

Figure 16 illustrates the variations in energy density (E) and power density (P) of the constructed EDLC over 1000 cycles. The stored energy starts at 3 Wh·kg−1 during the first cycle and eventually stabilizes at the same value. The observed power density of 1500 W/kg is stable after the 1000 cycles. This happens during the fast charge–discharge process, and the cation and anion do not reassociate to create ion aggregation, which delays ionic transport. As a result, the ion adsorption at the electrode and electrolyte interface is improved [70]. Similarly, the energy density of the EDLC is also almost give the same results. The slight decrease in the energy density is noticed in the energy density values while increasing the cycles.

Fig. 16
figure 16

Cyclic stability of the device

Conclusion

Tamarind gum-based magnesium ion-conducting polymer electrolytes are prepared by a simple solution-casting method using magnesium chloride. Structural analysis is carried out by XRD and FTIR analysis. A glass transition temperature of 127 °C is observed for sample 5 TML which is due to the elongation of the polymer chain. The maximum ionic conductivity is calculated for sample 5 with a TML of 3.48 × 10−3 S/cm at ambient temperature. The conduction mechanism of the higher conducting electrolyte follows three models in which region I obeys the overlapping-large polaron tunneling (OLPT) model. The quantum mechanical tunneling model (QMT) is observed in region II, and the nonoverlapping small polaron tunneling (NSPT) model is observed in region III. The minimum activation energy of 0.045 eV is observed for sample 5 TML according to the Arrhenius plot. The tangential spectra are used for investigating the relaxation time (τ), and the higher conducting sample has the lowest relaxation time (τ) of 7.94 × 10−7 s. The movement of magnesium ions in the polymer electrolyte is responsible for this maximum ionic conductivity, which is confirmed by Wagner’s DC polarization method. The supercapacitor shows EDLC behavior with a specific capacitance of 413.05 Fg−1 at a scan rate of 15 mV/s as determined by cyclic voltammetry (CV). From the GCD analysis, the power and energy density are calculated as 1499 W/kg and 100 Wh/kg, respectively. The performance of the supercapacitor is compared with the earlier reports and presents better specific capacitance. The cyclic stability of the device is confirmed by the observed values of power and energy density for different cycles up to 1000. Therefore, it is concluded that the prepared electrolyte is a worthy candidate for energy storage applications.