1 Introduction

Lignin accounts for almost less a third of the organic carbon in the biosphere, and it is the second most abundant biopolymer [1]. It is a major component of plant cell wall, comprising three basic monomers viz., p-coumaryl, coniferyl, and sinapyl alcohols [2, 3]. These units differ only in their substitutions, at third and fifth carbons (Fig. 1). The principal monomer in softwood lignin is coniferyl alcohol (90–95%), which contains methoxyl group only at the 3rd position, whereas, in hardwood lignin, there are two monomers: coniferyl (25–50%) and sinapyl (50–75%) alcohols containing methoxyl groups at 3rd and 5th carbons. In woods and grasses, p-coumaryl alcohol is more prominent to about 10–25% with coniferyl alcohol, and sinapyl alcohol is about 25–50% [4]. As a result, the dry weight of lignin is dependent on the wood types and ranges from 15 to 40% [5].

Fig. 1
figure 1

Monomers of lignin a p-coumaryl alcohol, b coniferyl, and c sinapyl alcohol, drawn using ACD/ChemSketch (freeware) version 12.01

Lignin is usually hard to digest by living organisms, especially termites. Termites constitute up to 95% of the insect biomass of low-land tropical systems and in rainforests [6, 7]. Although only 185 of 2600 termite species are considered pests, however, these pests have a huge negative impact on economy. The expenditures for damage and preventative treatment run about $15–20 billion dollars worldwide [8, 9] and $ 2–3 billion dollars in Unites States alone annually [10]. Termites consume diet rich in cellulose, hemicellulose, lignin, and lignin derivatives [11]. The termite gut provides distinct suitable environment for specialized cellulytic and hemicellulytic microorganisms degrading 74–99% cellulose and 65–87% hemicellulose, respectively [12]. Symbiotic white rot-fungi can degrade lignin [13], but no microorganism has been observed in termite gut which can degrade lignin [14]. Lignin is extremely recalcitrant as seen in West Indian drywood termite, Cryptotermes brevis which contains over 70% lignin indicating that that lignin is not efficiently digested [15]. Hence, lignin can be extracted from termite frass and used as a sustainable bioresource.

There are plenty of opportunities for lignin to be used in industries for manufacturing biofuel [16], carbon fibers [17], high-performance strength aid in concrete [18], binding and dispersing agent [19], and agrochemical formulations [20]. The present study makes use of lignin from a novel source and addresses its anticorrosive property by subjecting the samples to potentiodynamic polarization and electrochemical impedance studies to measure the corrosion inhibitory effects. The surface of bare metal and the metal coated with lignin were compared before and after exposing it to the corrosive environment and presented here.

2 Experimental part

2.1 Preparation of test materials

The carbon steel (grade A8) rods of 1 cm2 were purchased from Servel Engineer, C7/C8, Industrial Estate, Yeyyadi, Mangalore-565008, India, and it was cut into cylindrical test coupons of required dimensions. The elemental composition of the test coupons before subjecting to the experiment was determined by EDAX spectral method. The composition is as follows: C (0.464%), Si (0.251%), Mn (0.710%), P (0.026%), S (0.031%), and Cr (0.016%). The test coupons were sealed with acrylic resin in such a way that the area exposed to the corrosion inducing medium was 1 cm2. The disk was polished with different grades of emery papers and further polished with alumina disk polisher. It was then dried and stored in a desiccator. All the experiments were performed in triplicates.

2.2 Extraction of lignin

Lignin was extracted from a sustainable source (termite frass) using a commonly employed method, i.e., Klason’s method or 72% (v/v) sulfuric acid procedure. In this method, the sample (termite frass) was treated with 72% sulfuric acid and diluted to 40% H2SO4 and was heated at 80 °C, and then diluted to 3 wt% H2SO4 and refluxed [21]. The resulting lignin was qualitatively confirmed using the Wiesner test, in which the sample was treated with a saturated solution of phloroglucinol in 20% HCl, and the instantaneous appearance of pink confirmed the presence of lignin. The extracted lignin was washed, dried, and applied as a coat on the test coupons (carbon steel) by preparing slurry that is composed of 1 part of lignin with 2 parts of water and one-fourth of metal binder. The coat was applied on the metal and allowed it to dry overnight.

2.3 Fourier transform infrared spectroscopy

The extracted lignin sample was prepared using solid potassium bromide (KBr) pellet (about ten times the weight of the sample) in a pestle and mortar. A thin pellet was obtained by applying hydrostatic pressure in a pellet maker. Then the sample was subjected to Fourier transform infrared spectrometer (SHIMADZU FTIR- 8400S) for identification. The measuring mode was set to % of absorption/transmission with a wavelength range between 4000 and 400 cm−1 with a resolution of 4 cm−1, and the number of scans was set between 1 and 4000 [22].

2.4 Electrochemical measurements

Electrochemical measurements were carried out by using an electrochemical workstation instrument (CH600, D-series, U.S. Model with beta software). Polarization studies were carried using conventional three-electrode Pyrex glass cell with a platinum counter electrode and saturated calomel electrode (SCE) as reference. The working electrode was made up of carbon steel. The values (potential) were measured along with the reference.

2.5 Tafel polarization studies

The finely polished specimens, one with lignin coat and one without the coat, were exposed to the corrosion medium NaOH solution at room temperature and allowed to establish a steady-state open circuit potential (OCP) at the end of 300 s. The potentiodynamic current–potential curves were recorded by polarizing the specimen to − 250 mV cathodically and + 250 mV anodically with respect to the OCP at a scan rate of 1 mV s−1. Inhibitor efficiency was calculated using the following equation:

$$IE\left( \% \right) = \frac{{i_{{{\text{corr}}}} - i_{{{\text{corr}}\left( {{\text{inhibitor}}} \right)}} }}{{i_{{{\text{corr}}}} }} \times 100,$$
(1)

where icorr(inhibitor) & icorr are the corrosion current densities obtained for inhibited and uninhibited specimens, respectively. The corrosion rate was calculated using the equation:

$$CR\left( {{\text{mm~yr}}^{{ - 1}} } \right) = \frac{{3.27 \times M \times i_{{{\text{corr}}}} }}{{\rho \times Z}} \times 100,$$
(2)

where 3.27 is a constant value that defines the unit of corrosion rate, icorr is the corrosion current density in A cm−2, p is the density of corroding material (g cm−3), M is the atomic mass of the metal, and Z is the number of electrons transferred per atom.

2.6 Electrochemical impedance spectroscopy (EIS)

The impedance measurements were carried out in the frequency range from 100 kHz to 0.01 Hz at the rest potential by applying 10 mV sine wave AC voltage. The impedance data were analyzed using the Nyquist plots. The charge transfer resistance, Rct, was extracted from the diameter of the semicircle in Nyquist plot. Potentiodynamic studies were done immediately after impedance measurement.

2.7 Atomic force microscopy (AFM)

The surface morphology of the carbon steel specimen immersed in 0.5 M NaOH solution in the presence and absence of corrosion inhibitor (lignin) was compared by recording AFM images of the samples using Bruker–Innova model with an operating voltage of 1.5 V and analyzed using EVO MA18 with Oxford Energy dispersive X-ray spectroscopy (EDS) X-act.

2.8 Scanning electron microscopy (SEM) and energy-dispersive X-ray spectroscopy (EDS)

The surface morphology of the carbon steel specimen immersed in 0.5 M NaOH solution in the presence as well as the absence of inhibitor was compared by recording the SEM images of the samples using Bruker–Innova model with an operating voltage of 1.5 V and analyzed using EVO MA18 with Oxford Energy dispersive X-ray spectroscopy (EDS) X-act. The immersion time of the electrode for the SEM analysis was 6 h.

3 Results and discussions

3.1 Fourier transform infrared (FTIR) spectroscopy

The extracted lignin was compared with the IR absorption spectra of pure lignin (Fig. 2). The spectral peaks corresponding to the functional group distribution of pure lignin were similar to that of extracted lignin. Typical bands are found between 1500 and 1600 cm−1 and also around 1470 and 1460 cm−1. The IR spectrum can be split into four regions: (i) 4000–2500 cm−1: the absorption of single bonds to hydrogen, e.g., C–H, OH, and N–H, (ii) 2500–2000 cm−1: the absorption of triple bonds, (iii) 2000–1500 cm−1: the absorption of double bonds, e.g., C=C and C=O, and (iv) 1500–400 cm−1: absorption owing to other bond deformations. The band between 1134 and 1110 cm−1 was associated with syringyl structure of the lignin, and the band between 1217 and 1016 cm−1 was associated with guaiacyl structure of the lignin. These can be corroborated with Ibrahim et al. [23]. This confirmed the purity of extracted lignin. However, the presence of some additional functional groups might have emerged due to differences in the extraction procedures [5].

Fig. 2
figure 2

Comparison of FTIR spectra of a pure lignin and b extracted lignin

3.2 Potentiodynamic polarization (PDP) studies

The PDP studies showed maximum inhibition efficiency of lignin at two different concentrations (0.1 M and 0.5 M) of NaOH solution with a pH of 13 and 13.5, respectively. The PDP measurements were performed and the measurements were conducted on carbon steel coupons in 0.5 M and 0.1 M NaOH at 308 K, in the absence as well as the presence of lignin as inhibitor in increasing concentrations (Fig. 3). The electrochemical parameters including corrosion potential (Ecorr), corrosion current density (icorr), and Tafel slopes were obtained. Eqs. 1 and 2 (refer Sect. 2.5) are used to calculate the inhibition efficiency (I.E) and the corrosion rate (Table 1). A plateau of anodic slope is not well defined; hence, icorr and Ecorr values were obtained by extrapolating cathodic slopes (Fig. 3). The changes in shape of anodic slope can be attributed to the passivation that occur in the potential region of − 0.5 to − 0.2 V. The addition of the inhibitor decreased the corrosion current and thus the corrosion rate (Fig. 3).

Fig. 3
figure 3

Potentiodynamic polarization curves for corrosion of carbon steel in a 0.1 M NaOH and b 0.5 M NaOH containing different concentrations of lignin at 37 °C

Table 1 Results of potentiodynamic polarization studies of carbon steel in 0.1 and 0.5 M NaOH at various concentrations of lignin

The values of cathodic Tafel slope (− βc) indicate that the addition of inhibitor did not change the mechanism of the corrosion and reduced the corrosion by a simply blocking the available metal surface area (Table 1). Furthermore, with increasing concentration of lignin (100, 200, 400, and 600 ppm), the icorr and the corrosion rate (CR) values were reduced, while the inhibition efficiency (%) increased. This opposing trend of icorr, CR, and Ecorr may be due to binding of lignin inhibitor onto the carbon steel. The lignin acts as a protective barrier for the carbon steel from the corrosive environment by NaOH. The maximum I.E. of 46.53% in 0.1 M NaOH solution and 70.12% in 0.5 M NaOH solution was observed at 600 ppm lignin.

From this study, it was observed that lignin at 600 ppm concentration in 0.5 M NaOH showed better inhibition performance (70% I.E). Hence, 600 ppm of lignin concentration was used for coating on the carbon steel and immersed in 0.5 M NaOH solution. Further, potentiodynamic polarization and electrochemical impedance analyses were carried out for the lignin-coated samples. The PDP analysis indicated that there is a decrease in the CR by more than twofold when lignin coat was present as compared to the bare metal, without lignin coat (Table 2). Also, there is a remarkable inhibition efficiency of 70.34% when lignin coat was present on the metal surface indicating that lignin provides an anticorrosive characteristic to the metal, thus, having protective effects from corrosive environment (Fig. 4).

Table 2 Results of potentiodynamic polarization studies of carbon steel containing lignin in 0.5 M NaOH
Fig. 4
figure 4

potentiodynamic polarization curves for corrosion of carbon steel in 0.5 M NaOH-containing lignin coat

3.3 Electrochemical impedance spectroscopy (EIS)

The results of the Tafel polarization method were compared with the results of impedance measurements. The EIS measurements were carried for the lignin (600 ppm)-coated samples and studied by immersing in 0.5 M NaOH solution. The Nyquist plot for the carbon steel coupons with and without lignin coat in 0.5 M NaOH is shown in Fig. 5. The diameter of the capacitive loop increased for the lignin-coated samples as compared to the uncoated samples.

Fig. 5
figure 5

Electrochemical Impedance Spectroscopy, Nyquist plot for corrosion of carbon steel in 0.5 M NaOH-containing lignin coat

The equivalent circuit of nine elements is depicted in Fig. 6 (inset), which was used to simulate the impedance plot of carbon steel. The equivalent circuit consists of solution resistance (Rs), charge transfer resistance (Rct), inductive resistance (RL), and inductive element (L). The constant phase element (CPE), Q, is parallel to the series of capacitors C1 and C2 and is also parallel to the series of resistors R1, R2, RL, and Rct. The parallel circuit is attributed to oxide film due to ionic conduction in the oxide film and the capacitance due to its dielectric properties.

Fig. 6
figure 6

The fitting curve and the simulated equivalent circuit [inset: R(Q(R(C(R(LR)(CR)))))] used to fit experimental EIS data

The double layer capacitance (Cdl) and the polarization resistance (Rp) were calculated by using the equations:

$$R_{p} = R_{1} + R_{2} + R_{L} + R_{{ct}},$$
(3)
$$C_{{dl}} = C_{1} + C_{2}.$$
(4)

The ZSimpWin software (v 3.21) was used to fit the circuit. The results are tabulated in Table 3. The components Q and a coefficient ‘a’ of CPE quantifies different physical phenomena such as surface roughness due to surface inhomogeneous, adsorption of inhibitor, porous layer formation, etc. Accordingly, in the mathematical analysis of impedance plots, constant phase element (Q) is frequency dependent, and it is used to denote the deviation from ideal behavior. The constant phase element (Q) is related to the ideal capacitor C by the following equation:

$$C_{{dl}} = Q_{{dl}} \times \left( {2\pi f_{{\max }} } \right)^{{(a - 1)}},$$
Table 3 Electrochemical impedance values of carbon steel in 0.5 M NaOH-containing lignin as inhibitor

where fmax is the frequency at which the imaginary part of the impedance (Z″) is maximum and a is a constant phase element exponent. The value of ‘a’ provides a measure of unevenness or roughness of the electrode surface. The value of ‘a’ is given by (− 1 ≤ a ≤ 1). When a = 1, the constant phase element behaves as an ideal capacitor; thus, Cdl is replaced with Qdl values.

The results indicate that the Rp value increased with the deposition of lignin coat (Table 3). As the Rp value increased, there was a decrease in the Qdl value. Thus, effective corrosion resistance was observed to be associated with high Rp and low Qdl value. The increase in Rp value indicates adsorption of inhibitor with decrease in corrosion rate, and decrease in Qdl value indicates increase in the thickness of the electrical double layer at metal–surface interface [24,25,26].

Percentage efficiency of the inhibitor is calculated using the following relation:

$$\eta \left( \% \right) = \left( {\frac{{R_{{p\left( {{\text{inh}}} \right)}} - R_{p} }}{{R_{{p\left( {{\text{inh}}} \right)}} }}} \right) \times {\text{1}}00,$$
(5)

where ƞ is equal to IE%, Rp(inh) and Rp are the polarization resistances in the presence and absence of the inhibitor (lignin), respectively.

The results of Tafel polarization and electrochemical impedance methods are in good agreement with one another. This proves that corrosion rate depends upon the nature of the inhibitor used and not on the technique employed for measuring the same. Thus, lignin can be effectively used as a coating material to prevent corrosion [27].

3.4 Surface morphology

3.4.1 Atomic force microscopy (AFM)

To analyze the influence of inhibitor on the surface morphology of the metal surface, AFM was used [28]. The morphology and the cross-sectional profile for polished carbon steel surface, corroded bare metal, and the carbon steel surface coated with lignin are shown in Figs. 7 and 8. The bare metal (a) and the corroded bare metal (b) were used as controls, whereas the lignin coat on metal (c) was used as reference. It can be seen that metal coated with lignin (d) is less corroded than the corroded bare metal (b). It shows that lignin has provided protection to the metal against corrosion in the corrosive environment (0.5 M NaOH solution).

Fig. 7
figure 7

Top view of atomic force microscopic (AFM) images: a bare metal, b corroded bare metal, c lignin coat on metal, and d corroded lignin coat

Fig. 8
figure 8

Side view of atomic force microscopic (AFM) images: a bare metal, b corroded bare metal, c lignin coat on metal, and d corroded lignin coat

The difference in the maximum height of bare metal (Fig. 8a) and corroded bare metal (Fig. 8b) from the base is ~ 2.7 µm, which is the corroded part due to the corrosive environment provided by 0.5 M NaOH, whereas it can be observed that the difference in maximum height of lignin coat on metal (Fig. 8c) and corroded lignin coat (Fig. 8d) from the base is only 0.8 µm. This is very less as compared to the bare metal corrosion (Fig. 8b). Thus, from the observations, it can be concluded that inhibition effect of lignin coat protects the metal surface from the corrosive environment of 0.5 M NaOH in a very effective manner. Similar studies on green corrosion inhibitors also confirm the protection [29].

3.4.2 Scanning electron microscopy (SEM) and energy-dispersive X-ray spectroscopy (EDX)

Scanning electron microscope (SEM) images depict the surface morphology of mild steel in the presence and absence of lignin (as corrosion inhibitor). SEM image (Fig. 9a) reveals that in the absence of lignin, the mild steel surface is highly damaged with pitted areas. This shape is typical to pitting corrosion. The deposited lignin extract showed a smooth surface after immersion in 0.5 M NaOH solution (Fig. 9b). By comparison of SEM images at the same magnifications (× 1000), it is indicated that mild steel is almost free from corrosion in NaOH solution with lignin deposition. This is because of the adsorbed film of lignin on the metal surface, inhibiting the pitting corrosion of mild steel.

Fig. 9
figure 9

SEM micrographs for mild steel surface a in the absence and b in the presence of lignin coat with magnification of × 1000

The EDX spectrum for the corroded carbon steel is shown in Fig. 10a, and the spectrum shows peaks for iron and oxygen suggesting corroded sample in the presence of sodium hydroxide. In the case of EDX spectrum for the inhibited sample in the presence of lignin coat (with metal binder), the spectrum shows peaks for zinc and chromium (Fig. 10b) suggesting that the metal binder is mainly composed of Zn–Cr complex which aids lignin to bind to the metal surface and has a protective effect.

Fig. 10
figure 10

EDX spectrum of carbon steel in 0.5 M NaOH a in the absence and b in the presence of lignin coat

4 Conclusions

The lignin extracted from termite frass was confirmed with the IR spectra of lignin standard. The potentiodynamic polarization studies confirmed that the addition of inhibitor (lignin) decreased the corrosion current, and in turn, the corrosion rate. The results of Tafel polarization method and EIS method were in good agreement with each another. The effective corrosion resistance was associated with high polarization resistance (Rp) and low double layer capacitance (Cdl). The impedance of the inhibited substrate increased with the inhibitor concentration. The adsorption of lignin on carbon steel in corrosive solution followed Langmuir’s adsorption isotherm. This was confirmed with the delta G value of − 16.128 kJ mol−1 (i.e., lesser than − 20 kJ mol−1). The anticorrosive effect was found to be 70.34%, and the corrosion rate was very low when compared to bare metal under corrosive conditions. Taken together these results, along with surface morphology of the control and test specimens by AFM, SEM and EDX substantiated the protective effects of lignin. Thus, the study proves the corrosion protection potential of lignin that can be used for anticorrosive applications. However, the results presented here are only limited to carbon steel. Hence, an extension of this study needs to be carried out on other metals too. The results from the study suggest lignin from termite frass as a sustainable biological source to prevent humongous loss of money spent on corrosion prevention.