1 Introduction

Modern society relies on sustainable, environmentally friendly, inexhaustible, and safe energy sources for their electronic gadgets. Any electronic gadgets require an efficient battery for their better performance. The battery performance depends on its component electrode and electrolyte. The better performance of the battery has been obtained using a stable, safe and reliable electrolyte [1,2,3,4]. In recent years the usage of polymer electrolyte has increased in industries [5]. The polymer electrolytes could be fabricated in any desired size and shape, with cost-effectiveness and flexibility [6]. Hence the polymer electrolytes in solid-state batteries and fuel cells receive much attention [7].

Solid polymer electrolytes exhibit good physical properties, chemical properties, enhanced softness, high amorphous region, flexibility, strong ionic conductivity and sufficient electrochemical stability [8]. The solid polymer electrolytes play a vital role in battery protection and stability because of its non-leakage and non-reactive characteristics [9,10,11].

Polymers are available in two forms that are natural polymer and synthetic polymer. The synthetic polymer has got a lot of attention in electrochemical analysis because of its excellent performance, versatility, high energy density and long-life span [12]. However, the processing, usage and disposal of polymer electrolyte results in pollution that leads to environmental degradation [13]. To overcome these pollution issues, the renewable biopolymer has been introduced. It has the potential characteristics that degrade quickly in the environment without generating harmful effects or toxic residues, moreover it is available in low cost with biocompatibility. Many natural biopolymers such as Dextron/chitosan, Carrageenan and Pectin have been studied for the fabrication of electrochemical devices [14,15,16].

Sodium alginate is one of the promising host candidates for solid biopolymer electrolyte. The pure sodium alginate (NaAlg) is extracted from the cell walls of brown algae with the empirical formula NaC6H7O7 [17]. Sodium alginate is a water soluble linear polysaccharide from carbohydrate family [18]. It has formed from monomers of β-Mannuronic acid and α-1-guluronic acid [19,20,21].

Sodium alginate (Fig. 1) contains a huge amount of hydroxyl and carboxyl group. This biopolymer is preferable owing to its non-toxicity, high hydrophilic ability and biocompatibility [22,23,24]. Sodium alginate is suitable as a host biopolymer, but it has low conductivity. Therefore, a dopant system is desirable to enhance the ionic conductivity [25]. The novelty of this Sodium alginate is that it has got an OH and COO group that can act as a coordination site. A large number of cationic salts could be attached to increase the conductivity. Rasali et al. have synthesized biopolymer electrolyte Sodium alginate doped with ammonium nitrate (NH4NO3) for electrochemical device and reported that the sample containing 25 wt.% of NH4NO3has got a higher ionic conductivity of 5.56 × 10−5 S cm−1. Fuzlin et al. has developed sodium alginate polymer electrolytes doped with LiBr with the highest ionic conductivity of 7.46 × 10−5 S cm−1. Likewise, Fuzlin et al. have prepared a biopolymer membrane using sodium alginate doped with NH4Br and reported the ionic conductivity value of 4.41 × 10−5 S cm−1 with 20 wt.% of NH4Br [26,27,28].

Fig. 1
figure 1

Chemical structure of the sodium alginate

Improved ionic conductivity is required for rechargeable battery systems to perform better in a variety of applications. A low-cost, user-friendly, and high-energy-storage material is needed for the rechargeable battery network. Lithium-ion batteries, one of the good sources of electricity that possess high energy density with low maintenance but are expensive. Dendrite growth is one of the disadvantages of lithium ion batteries that leads to the batteries to short circuit and catch fire [29, 30]. Therefore, it is intended to develop a new form of eco-friendly, less expensive, reliable, and non-dendrite rechargeable battery. The magnesium (Mg) battery has emerged as the next alternative for lithium-ion batteries. Magnesium can be electro deposited competently without any dendrite growth [31].

Due to the divalent atmosphere of Mg2+, it might have a higher theoretical volumetric potential (3832 mAhcm−3) than Li (2062 mAhcm−3) [32]. Magnesium is more plentiful and extensively available in the earth's crust than lithium. Rebar et al. implemented an efficient methodology using plasticized polymer electrolytes of chitosan and dextran from leuconostoc mesenteroides impregnated with magnesium acetate. Polu et al. developed a polymer electrolyte PVA with magnesium salt to enhance ionic conductivity. Magnesium sulfate doped with polymer electrolyte developed by Hassan et al. to improve several transport parameters. Manjuladevi et al. developed blend polymer electrolyte based on poly(vinyl alcohol)-poly (acrylonitrile) with magnesium nitrate for magnesium battery [33,34,35,36].

No study is available on sodium alginate with Mg(NO3)2.6H2O in the literature. Solid biopolymer electrolyte system based on sodium alginate with Mg(NO3)2.6H2O at various concentrations have been prepared via solution casting technique. Prepared biopolymer membranes have been analyzed using various characterizations like X-ray diffraction (XRD) analysis, Fourier transforms infrared spectroscopy (FTIR), differential scanning calorimetry (DSC), AC impedance, and linear sweep voltammetry (LSV).

2 Experiment

2.1 Material and methods

In the study, sodium alginate (M.wt 216.12 gmol−1) and magnesium nitrate [Mg (NO3)2.6H2O] (M.wt 256.41 gmol−1) were used as the raw materials, and hot water has been used as a solvent to make solid biopolymer electrolytes using the solution casting technique. All the chemicals used in this study are purchased from Merck (Kenilworth, NJ, USA). The different M wt.% of sodium alginate (60 to 30%) has been dissolved in hot water (90 °C) using a magnetic stirrer. [Mg (NO3)2.6H2O] of various M wt.% (40 to 70%) has been dissolved separately and added with the biopolymer solution. In order to obtain a homogeneous solution, the solution is stirred well for 1 h. The solution is then cast into a polypropylene petri dish and kept in an oven at 70 °C for 24 h to obtain a clear and freestanding film. Different characterization techniques such as XRD, DSC, FTIR, AC impedance analysis, and LSV have been used to study the developed membrane.

2.2 Characterization techniques

2.2.1 X-ray diffraction analysis

X-ray Diffraction (XRD) measurement has been made using XPERT-PRO diffractometer system RIGAKU UL1TIMA IV, Japan, with Cu–Kα radiation (λ = 1.514 Å) in the range 2θ = 0 to 80°used to study the amorphous/crystalline nature of the prepared solid biopolymer membrane at room temperature.

2.2.2 Vibrational study

The functional groups in the solid biopolymer electrolyte have been investigated using Fourier transform infrared (FTIR) analysis with SHIMAZDU IR Affinity-1 over the range 500 to 4500 cm−1 with a resolution of 1 cm−1.

2.2.3 Differential scanning calorimetry study

The thermal properties of the prepared solid biopolymer membrane has been studied using differential scanning calorimetry (DSC) Q20 V 24.11 Build 124 system at a heating rate of 10 °C/min the temperature range of 0 to 150 °C in the nitrogen atmosphere.

2.2.4 Impedance study

The ionic conductivity of the prepared solid biopolymer electrolyte has been obtained by measuring AC impedance with HIOKI3532-50 LCR HI-Tester at room temperature with a frequency range from 42 Hz to 5 MHz.

2.2.5 Transference number measurement

Transference number measurement (TNM) is measured using the direct current (DC) polarization technique of Wagner's and Evan's to measure the ionic conduction quality. The DC value has been tracked as a function of time through a cell potential of 1.5 V over the sample sandwiched between two stainless steel electrodes.

2.2.6 Electrochemical stability studies

The electrochemical stability for the higher ionic conducting solid biopolymer electrolyte [40 Mol.wt.% NaAlg:60 Mol.wt.% [Mg(NO3)2.6H2O] has been analyzed using linear sweep voltammeter (LSV) with the help of Bio-Logic Science instrument VSP-300, France at the scanning rate of 1mVs−1 in room temperature at the potential range of 0–5 V.

2.2.7 Fabrication of primary Mg battery

Highest conducting solid biopolymer electrolyte is used for the construction of primary magnesium battery.

2.2.8 Anode

Magnesium metal plate (diameter—12 mm and thickness—1 mm) is used as an anode.

2.2.9 Cathode

Mortar has been used to grain manganese dioxide (MnO2), graphite, and the highest ionic conducting electrolyte in the ratio of 3:1:1. The final mixture has been pressed to form a pellet with a diameter of 12 mm and a thickness of 2 mm at a pressure of 5 tons.

2.2.10 Electrolyte

The highest conducting solid biopolymer membrane is used as the electrolyte to construct the magnesium battery.

3 Results and discussion

3.1 XRD analysis

The amorphous (or) crystalline nature of biopolymer electrolytes has been studied using XRD measurements. The XRD diffraction pattern of pure sodium alginate (NaAlg) and sodium alginate with different M wt.% of Mg(NO3)2.6H2O like (a) 60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, (b) 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O, (c) 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O, (d) 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O, are shown in Fig. 2.

Fig. 2
figure 2

XRD patterns of (a) Pure NaAlg, (b) 60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, (c) 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O, (d) 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O and (e) 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O

XRD pattern of pure sodium alginate shows prominent small intense and broad peaks at 13.26° and 22.90°. These values are consistent with the previously reported result for pure sodium alginate biopolymer [37]. Figures 2b–d, 3 it is observed that peaks at 2θ = 13.84° have been completely suppressed due to the addition of various compositions of Mg(NO3)2.6H2O. On adding salt to the pure sodium alginate, broad nature of the peak increases between 22° and 25° and the intensity decreases for various compositions of [(60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O), (50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O) and (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O). Cation and anion of the salt perturbed the arrangement of the polymer matrix. This leads to the increase of amorphous nature. This decrease in intensity and increase of broadness of peak is as per Hodge et al. criterion [38]. For, 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O biopolymer electrolyte, sharp peaks have been observed at 2θ = 28.04°, 26.95° 25.05°, 20.13° and 15.21°. These peaks are due to Mg(NO3)2.6H2O, ensured by Sirota et al. [39]. This is because host biopolymer is not possible to accommodate more salt.

Fig. 3
figure 3

Deconvoluted XRD patterns of (a) Pure NaAlg, (b) 60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, (c) 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O, (d) 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O and (e) 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O

The percentage of crystallinity has been calculated from the formula using the deconvoluted XRD pattern.

$$ {\text{Percentage}}\,{\text{ of}}\,{\text{ Crystallinity}}\,\left( {\% {\text{C}}} \right) = \frac{{{\text{The}}\,{\text{area}}\,{\text{under}}\,{\text{the}}\,{\text{crystalline}}\,{\text{ region}}}}{{{\text{The}}\,{\text{ total}}\,{\text{ area}}\,{\text{ of}}\,{\text{ the}}\,{\text{ peak}}}} \times 100 $$
(1)

The crystallinity percentage of the pure sodium alginate is higher than the salt-doped compositions of (NaAlg with Mg(NO3)2.6H2O),as seen from the Table 1. On analysing the crystallinity percentage for sodium alginate with various concentrations of Mg(NO3)2.6H2O, it is found that there is a decrease in crystallinity percentage with the increase of concentration of the salt. Solid biopolymer membrane 40 M wt.% NaAlg:60 M wt.% Mg(NO3)2·6H2O has a crystallinity percentage of 20.65, indicating that it is more amorphous than any other membrane. Further, the crystallinity percentage is observed to increase for the highest concentration 30 M wt.% NaAlg:70 M wt.% Mg(NO3)2·6H2O biopolymer membrane.

Table 1 Percentage of crystallinity calculated from deconvoluted XRD graph

3.2 FTIR analysis

Analysis of FTIR spectroscopy is an efficient method to analyze the complex formation between the host biopolymer (sodium alginate) and salt (Mg(NO3)2.6H2O). Figure 4 depicts the FTIR analysis of the pure sodium alginate and sodium alginate with various Mg(NO3)2.6H2O compositions. Table 2 shows the FTIR assignments of solid biopolymer electrolytes.

Fig. 4
figure 4

FTIR spectra of (a) Pure NaAlg, (b) 60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, (c) 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O, (d) 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O and (e) 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O

Table 2 FTIR spectral assignments of the solid biopolymer electrolytes

Peaks at 1080, 1397, 1638, 2952, and 3377 cm−1of sodium alginate are due to glycoside bond (C–O–C), symmetric stretching COO, antisymmetric stretching COO, CH2 and O–H stretching of biopolymer backbone structure, respectively [40,41,42,43]. On Mg(NO3)2.6H2O incorporation, a shift in the peak position with variation in intensity is observed which may be due to interaction between ionic salt and the polar group C–O–C, COO,OH.

Based on Fig. 4, the FTIR spectral analysis of pure sodium alginate, the O–H stretching peak at 3377 cm−1 of solid biopolymer electrolyte has been moved to the low wavenumber positions and occur at 3370 cm−1, 3371 cm−1, 3349 cm−1 and 3336 cm−1 for (60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O), (50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O), (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) and (30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O) respectively. The C–H stretching peak of pure sodium alginate at 2952 cm−1 is moving to the lower wavenumber of 2939 cm−1, 2938 cm−1, 2888 cm−1, and 2840 cm−1for various compositions of (60 M wt.%NaAlg: 40 M wt.% Mg(NO3)2.6H2O), (50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O), (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) and (30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O) salt-doped biopolymer electrolytes, respectively [26, 44]. The absorption peak between 2000 cm−1 and 2300 cm − 1 may be due to the absorption of carbon dioxide (CO2). Similar results have been given by Rasali et.al. [26]. The C–O–C vibrational stretching band at 1045 cm−1 is shifted to the lower wavenumber (1028 cm−1) after the addition of Mg(NO3)2.6H2O. This change indicates that the addition of magnesium salt caused ion-induced dipole interactions.

The characteristic peak of pure sodium alginate at 1638 cm−1 and 1397 cm−1due to both asymmetric and symmetric of the COO, the peak at1397 cm−1 has moved to a lower wavenumber value at 1372 cm−1, 1366 cm−1, 1321 cm−1 and 1334 cm−1 upon the addition of various composition (60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O), (50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O), (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) and (30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O) of salt-doped biopolymer electrolytes, respectively.The changes in the frequency is due to dissociated Mg2+ cation interacts with the negatively charged lone pairs of electrons (coordinating site) of COO of Sodium alginate through Vander Waals force [45,46,47].

The band observed at 1080 cm−1 of the pure sodium alginate resembles the alpha 1,6-glycosidic bond. It is found to be shifted to 1068 cm−1, 1048 cm−1, 1042 cm−1, and 1036 cm−1 for sodium alginate with the addition of (60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O), (50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O), (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) and (30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O) respectively. The plane deformation mode of NO3is found at 834 cm−1, 825 cm−1 in the (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) and (30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O) biopolymer electrolytes which is not present in the pure sodium alginate biopolymer [48].

The existence of a characteristic peak of the nitrate group in the biopolymer membrane confirms the presence of Mg(NO3)2.6H2O in the salt-added biopolymer membranes. Thus, the complex formation between the pure biopolymer and the Mg(NO3)2.6H2O salt has been confirmed from the changes in FTIR spectra band positions and the intensity [49, 50].

3.3 DSC analysis

The DSC curve for the biopolymer electrolyte of pure sodium alginate and sodium alginate with various compositions of Mg(NO3)2.6H2O are shown in Fig. 5. Tg values for pure sodium alginate and sodium alginate with different composition of salt are provided in Table 3. The Tg value obtained for the host biopolymer is 67.0 °C. The value agrees with the earlier report [26]. As seen from Table 3, the glass transition temperature (Tg) decreases with increase in salt concentration. The decrease of Tg value is due to the plasticization effect of the salt. The decrease in Tg value predicts flexibility attainment in polymer membranes. The flexibility of polymer membrane causes higher segmental motion, which produces voids for free flow of ions. 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O biopolymer membrane has got a Tg value 52.51 °C. The value 52.51 °C is greater than that of polymer electrolyte: 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O. This increase in Tg value for higher concentration of salt may be due to the presence of some undissociated salt in the polymer matrix.

Fig. 5
figure 5

DSC Thermogram of (a) Pure NaAlg, (b) 60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, (c) 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O, (d) 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O and (e) 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O

Table 3 Tg values of M wt.% of Sodium Alginate (60 to 30%) with [Mg (NO3)2.6H2O] of various M wt.% (40 to 70%)

3.4 Electrochemical impedance analysis

3.4.1 Cole–Cole

Using Ac impedance spectroscopy, the electrical characterization of all the prepared solid biopolymer electrolytes has been analyzed. In addition, using AC impedance analysis, the conductivity of the solid biopolymer electrolytes is calculated at room temperature. By sandwich between the two stainless steel plates that will act as the blocking electrodes for Mg2+ ions under an applied electric field, the impedance analysis of the solid biopolymer electrolyte has been carried out.

The Cole–Cole plot consists of two different regions. A semicircle occurs in the high-frequency region due to the bulk effect of the electrolyte which is represented by the parallel combination of bulk resistance and capacitance [37]. The spike appears at the lower-frequency area after the semicircle, which may be due to electrode/electrolyte interface [3].

Figures 6 and 7 show the Cole–Cole plot for the pure sodium alginate and sodium alginate with various compositions of Mg(NO3)2.6H2O at room temperature. From Fig. 6, it has been observed that the pure sodium alginate has a high-frequency depressed semicircle followed by a low-frequency inclined spike. The presence of a depressed semicircle may be due to the biopolymer electrolyte's non-debye nature [51]. This implies a typical distribution of relaxation times. Figure 7 shows that the samples (60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O), (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) and (30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O) have a low-frequency inclined spike. The biopolymer electrolyte's semicircle disappearance specifies that only the solid biopolymer electrolyte repellant component is more prevalent. This ensures that the prepared solid biopolymer electrolyte's ionic conductivity is primarily due to the movement of ionic charge carriers in the biopolymer electrolyte.

Fig. 6
figure 6

Cole–Cole plot for a Pure NaAlg

Fig. 7
figure 7

Cole–Cole plot for (b) 60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, (c) 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O, (d) 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O and (e) 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O

The equivalent circuit of the salt-doped system consists of bulk resistance (Rb) and constant phase element (CPE) in series. The Rb represents migration of the mobile ions, the CPE indicates the polarization at the electrode surface. The CPE defined as

$$ {\text{ZCPE}} = {1 \mathord{\left/ {\vphantom {1 {Q_{0} \left( {j\omega } \right)^{n} }}} \right. \kern-\nulldelimiterspace} {Q_{0} \left( {j\omega } \right)^{n} }} \, $$
(2)

where Q0 is the CPE constant; ω is the angular frequency (radians/s); j is the imaginary number; n represents a deviation from the ideal capacitor (n ≤ 1) [52]. If n = 1, it represents a pure capacitor. If n = 0, it represents a pure resistor.

The bulk resistance (Rb) of the prepared biopolymer electrolyte has been identified using Boukmap's EQ software program [53]. As the concentration of salt Mg(NO3)2.6H2O rises, the bulk resistance (Rb) decreases. The rise in salt concentration would increase the mobile charge carriers, which would increase the biopolymer electrolytes conductivity.

Furthermore, the ionic conductivity of the biopolymer electrolyte is determined with the below equation:

$$ \sigma = \frac{l}{{R_{B} A}}{S \mathord{\left/ {\vphantom {S {cm}}} \right. \kern-\nulldelimiterspace} {cm}} $$
(3)

where σ ionic conductivity, l thickness of the film, A film area, and Rb bulk resistance.

The ionic conductivities of the pure sodium alginate and the different concentrations of sodium alginate with Mg(NO3)2.6H2O are shown in Table 4. The EIS parameters (the impedance plot has been fitted with the EQ software provided by Boukamp’s et al.) for all the biopolymer membranes are listed in Table 5. The ionic conductivity increases as the salt concentration increases to 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O. This may be due to a large number of mobile charge carriers. The biopolymer electrolyte 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O has the highest conductivity of 4.58 × 10−3S cm−1 because for this biopolymer electrolyte, the mobile charge carriers are very high and the amorphous nature is maximum (from XRD). The DSC result reveals that this biopolymer electrolyte has the lowest Tg value among the various biopolymer electrolytes indicating that it is flexible compared with other biopolymer electrolytes. The ionic conductivity decreases for 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O due to the accumulation of ions and the insolubility of Mg(NO3)2 salt.

Table 4 Ionic conductivities of pure sodium alginate and various compositions of sodium alginate with Mg(NO3)2.6H2O at room temperature
Table 5 Electrochemical impedance spectroscopy (EIS) parameters for all the Biopolymer membranes

As per the earlier study, Ponraj et al. has reported the good ionic conductivity as 1.6 × 10−4 S cm−1 for 70 wt.% poly(VdCl-coAN-co-MMA):30 wt.% Mg(NO3)2 composition at room temperature [54]. The highest ionic conductivity of 9.19 × 10−4 S cm−1 for 60 wt.% cellulose acetate/40 wt.% Mg(NO3)2·6H2O as reported by Mahalakshmi et al. [55]. The highest ionic conductivity of 8.03 × 10−3 S cm−1 for 700 mg Dextran:300 mg PVA:0.6 M wt.%NH4SCN has been reported by Maheswari et al. [51]. Similarly, Mohamed et al. has reported the highest ionic conductivity of chitosan:starch with NH4SCN is 1.30 × 10−4 S cm−1 [56].

3.5 Conductance spectra

Figure 8 represents the frequency-based conductivity of pure sodium alginate and various compositions of Sodium alginate with Mg(NO3)2.6H2O biopolymer electrolytes. The conductance spectra are usually split into three regions. The space charge polarization at the blocking electrode is visible in a low-frequency dispersion region. The mid-frequency plateau region due to ion migration in neighboring sites, and the dispersive high-frequency region reveals the bulk conductivity [57]. As observed in the biopolymer electrolyte, the pure sodium alginate shows all three regions in the present analysis. The remaining samples show the two sharp regions, the mid-frequency plateau region, and the low-frequency dispersive region. Extrapolating the plateau area to the log σ axis yields the DC conductivity values of the biopolymer electrolyte prepared at room temperature [55]. The conductivity measurements observed from the conductance spectra are matched with the values obtained from the Cole–Cole plot.

Fig. 8
figure 8

Frequency dependance conductance spectra for (a) Pure NaAlg, (b) 60 M wt.% NaAlg: 40 M wt.% Mg(NO3)2.6H2O, (c) 50 M wt.% NaAlg: 50 M wt.% Mg(NO3)2.6H2O, (d) 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O and (e) 30 M wt.% NaAlg: 70 M wt.% Mg(NO3)2.6H2O

3.6 Linear sweep voltammetry

In electrochemical devices application, the stability of solid biopolymer electrolytes is the auspicious parameter. The electrochemical stability of maximum ionic conducting solid biopolymer electrolyte has been measured using Linear sweep voltammetry at the scanning rate of 1 mVs−1 and the voltage is between 0 and 5 V at room temperature. The electrochemical stability of the largest ionic conducting biopolymer electrolyte (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) is shown in Fig. 9. From the figure, it has been observed the prepared solid biopolymer electrolyte has electrochemical stability up to 3.5 V. This recommends that the prepared solid biopolymer membrane is more appropriate for application in Mg ion Batteries. Literature reports reveal that the electrochemical stability value of 2.05 V has been reported by Kiruthika et al. for pectin with MgCl2 [58], 1.94 V for K-carrageenan with MgCl2 has been reported by Sangeetha et al. [59], Ponraj et al. reported 3.3 V for poly(vinylidene chloride-co-acrylonitrile-co-methyl methacrylate) [60] and Chitosan-magnesium acetate Mg(CH3COO)2−-based polymer electrolyte is stable upto 2.4 V as reported by Aziz et al. [61].

Fig. 9
figure 9

Linear sweep voltammogram for the highest conducting biopolymer electrolyte (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O)

3.7 Transference number measurements

3.7.1 Wagner's method

Transfer number measurements used to measure the involvement of charge conducting species like electrons/ions in the solid biopolymer membrane. The total ionic transference number (tion) for the solid biopolymer electrolyte with stainless steel electrodes is analyzed using Wagner's DC polarization technique [62]. From this technique, the optimum conducting solid biopolymer (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2) electrolyte has been polarized with a fixed potential of 1.5 V, which is kept at ambient temperature in between two stainless steel blocking electrodes. The resulting polarization current flowing through the solid biopolymer electrolyte is controlled as a function of time by the exhaustion of charged species. Figure 10 shows the DC polarization plot of (SS/40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2/SS) and (SS/40 M.wt% NaAlg: 60 M wt.% Mg(NO3)2/Mg) incorporated biopolymer electrolytes at room temperature. Obviously, the plot exhibits a high polarization current at the initial point and decreases to get a constant value for a prolonged period of polarization. The electrodes completely block the ionic movement after a certain time and the cell is polarized [48]. The following equation calculates the total ionic transference number (tion) of the solid biopolymer electrolytes:

$$ t_{{{\text{ion}}}} = \frac{{\left( {I_{{\text{i}}} - I_{{\text{f}}} } \right)}}{{I_{{\text{i}}} }} $$
(4)
Fig. 10
figure 10

DC polarization curve of (SS/40 M.wt% NaAlg: 60 M.wt% Mg(NO3)2/SS) and (SS/40 M.wt% NaAlg: 60 M.wt% Mg(NO3)2/Mg) cell at room temperature

where Ii and If indicate the initial and final current, respectively. The transference number (tion) of the highest ionic conducting solid biopolymer electrolyte (40 M wt.% NaAlg:60 M wt.% Mg(NO3)2.6H2O) is found to be 0.96 it is almost near to unity. It Illustrates that transport is primarily due to ions in the highest conducting biopolymer electrolyte.

3.7.2 Evan’s method

Transference number measurement by Evan's method has been used to identify the contribution of magnesium ions to the conductivity of a solid biopolymer membrane with magnesium (Mg) electrode. Evan's et al. established a grouping of AC/DC techniques for Mg-SBPE-Mg cells to calculate the cationic transfer number by evaluating the bulk resistance of the Mg-SBPE-Mg cell before and after polarization [63]. The persistent DC potential of 1.5 V is passed through the cell to polarize the biopolymer electrolyte. At room temperature, the initial and final currents flowing through the cell are recorded. The AC impedance analysis has been used to govern the cell's bulk resistance (Rb) using the AC impedance plots before and after polarization of solid biopolymer electrolyte.

Similarly, cationic transference number (t+) can be obtained from the given equation

$$ t^{ + } = \frac{{I_{s} \left( {\Delta V - I_{0} R_{0} } \right)}}{{I_{0} \left( {\Delta V - I_{s} R_{s} } \right)}} $$
(5)

The initial current (I0) and the final current (Is) at DC polarization flow through the sample. The current difference as a function of time has been shown in Fig. 11. R0, Rs are the bulk resistance before and after cell polarization obtained from the AC impedance plot shown in Fig. 11. The transfer number measured is 0.31 for the maximum conducting sample (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2·6H2O) which indicates the vital contribution of Mg2+ ions to the overall ionic conductivity of biopolymer electrolyte. In previous reports of magnesium-based electrolytes, for poly(vinyl alcohol)–poly(acrylonitrile) blend polymer electrolyte with magnesium perchlorate t + is 0.27 [64], 0.30 for the blend polymer membrane based on poly(vinyl alcohol)-poly(acrylonitrile) with magnesium nitrate salt at room temperature [37] and the highest conducting sample pectin with Mg(NO3)2 the value of transference number reported was 0.29 [65].

Fig. 11
figure 11

The AC impedance plot for before and after polarization of a typical symmetric (40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O) Mg cell at room temperature

3.8 Fabrication and performance of Mg battery

The highest ionic conducting (40 M wt.% NaAlg:60 M wt.% Mg(NO3)2·6H2O) solid biopolymer membrane has been used to build a primary Mg ion battery. The biopolymer electrolyte is sandwiched between the cathode and anode. Figure 12a shows the diagrammatic representation of a constructed magnesium ion battery. The time-dependent open-circuit voltage (OCV) is monitored. The voltage is stable at 1.94 V when the cell is discharged through the load of 100 KΩ. The OCV has been monitored and it keeps constant for 72 h, as shown in Fig. 12b.

Fig. 12
figure 12

a Diagram for the fabricated battery. b Diagram for open-circuit potential as a function of time for 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O biopolymer electrolyte. c Diagram for discharge curves of the cell using 100KΩ for 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2.6H2O biopolymer electrolyte

After 72 h, the OCV got reduced to 1.87 V, which is constant for 125 h, as shown in Fig. 12c. Due to polarization, this slight intermediate decrease occurs in battery voltage.

The chemical reactions in the battery cell are presented below.

At the anode,

$$ {\text{Mg}} + 2({\text{OH}}^{ - } ) \to {\text{Mg}}\left( {{\text{OH}}} \right)_{2} + \, 2e^{ - } $$

At the cathode,

$$ 2{\text{MnO}}_{2} + {\text{H}}_{2} {\text{O}} + 2e^{ - } \to {\text{Mn}}_{2} {\text{O}}_{3} + 2{\text{OH}}^{ - } $$

Overall reaction:

$$ {\text{Mg}} + 2{\text{MnO}}_{2} + {\text{H}}_{2} {\text{O}} \to {\text{Mg}}\left( {{\text{OH}}} \right)_{2} + {\text{Mn}}_{2} {\text{O}}_{3} $$

The structure of sodium alginate contains OH group. This is a source of OH ion in Mg–MnO2 battery.

Figure 12c it shows. the battery discharge behavior. The battery potential initially decreases due to the polarization effect at the electrode–electrolyte interface but remains stable at 1.59 V for 168 h. The measured cell parameters are listed in Table 6. The picture of OCV for the fabricated Magnesium ion battery is given in Fig. 13.

Table 6 Cell parameters for 40 M wt.% NaAlg:60 M wt.% Mg(NO3)2·6H2O
Fig. 13
figure 13

OCV of the fabricated Magnesium battery

4 Conclusion

A new solid biopolymer electrolyte sodium alginate with various Mg(NO3)2·6H2O concentrations have been prepared via solution casting technique and characterized. The XRD patterns reveal that the inclusion of Mg(NO3)2·6H2O changes the semicrystalline nature of the biopolymer to a more amorphous nature. The prepared biopolymer electrolytes are subjected to the FTIR analysis for finding the complexation between the host biopolymer and the salt. The DSC studies indicate the flexibility of the solid biopolymer electrolytes, and the glass transition temperature decreases with the increase in the Mg(NO3)2·6H2O salt concentration. Further, the highest ionic conductivity has been achieved for the 40 M wt.% NaAlg:60 M wt.% Mg(NO3)2·6H2O biopolymer electrolyte as 4.58 × 10−3 S cm−1 at room temperature using Ac impedance analysis. Using Evan's method, the ionic transference number for Mg+ has been estimated to be 0.31 for the 40 M wt.% NaAlg:60 M wt.% Mg(NO3)2·6H2O electrolyte film. The electrochemical stability of 3.5 V for highest ion conducting biopolymer membrane 40 M wt.% NaAlg: 60 M wt.% Mg(NO3)2·6H2O has been observed from LSV, which is sufficient for electrochemical applications. A primary magnesium battery has been developed using the highest ionic conducting biopolymer membrane 40 M wt.% NaAlg:60 M wt.% Mg(NO3)2·6H2O, and its performance is studied. The OCV of the battery is found to be 1.94 V. In short, and it is clear that the solid biopolymer electrolyte sodium alginate with Mg(NO3)2·6H2O is one of the promising candidates for electrochemical applications.