1 Introduction

Zinc (Zn), a significant non-ferrous metal, is widely utilized for metallic coatings. Similar to aluminum, zinc demonstrates amphoteric characteristics when exposed to alkalis and acids. Both the zinc-coated also the zinc goods rapidly corrode when exposed to damp environments, producing white corrosion products known as ‘white rust’ [1]. For the protection of Zn corrosion in acidic and alkaline environments, application-specific organic compounds can be employed. Due to their efficiency in preventing corrosion, organic corrosion inhibitors are often used, and those containing nitrogen have received significant attention in the literature [2,3,4]. Among these, heterocyclic amines, aliphatic, and aromatic have been extensively researched as inhibitors of corrosion [5,6,7,8].

Due to concerns about the toxicity of certain corrosion inhibitors, there was a growing effort to find environmentally friendly alternatives, often referred to as green corrosion inhibitors [9]. Natural substances derived from plants, containing a range of organic molecules like tannins, alkaloids, pigments, amino acids, and organic acids, have been recognized for their inhibitive properties [10, 11]. This class of inhibitors is characterized by being eco-friendly, less harmful to the environment, cost-effective, readily accessible, and sourced from natural products like plant extracts [12]. Many extracts of plants were identified as potential corrosion inhibitors for the non-ferrous metals [13,14,15,16,17]. However, the exploration for environmentally friendly corrosion inhibitors for Zn in HCl has been limited. Several green inhibitors have been discovered for Zn metal in HCl, such as Artichoke [18], Ailanthus altissima [19], Elettaria cadamomum [20], Ferula hermonis plant [21], Bryophyllum pinnatum leaves [22], Avicennia Marina [23], Nictanthes plant [24], and Achillea fragrantissima [25], are recognized for their well-established corrosion inhibitory abilities. The fact that medicinal herbs have been used traditionally to inhibit corrosion in acidic environments demonstrates the early recognition of their effectiveness in protecting metal alloys [26, 27]. Despite their promise, the development of effective plant-based corrosion inhibitors is an ongoing research area [28].

Caesalpinia crista belongs to the Fabaceae family, and, this plant is distributed widely in India and various regions of Southeast Asia [29]. In India specifically, it goes by the name Katikaranja in Hindi, Kanchaki in Gujarati, and Kuberaxa in Sanskrit. It can be found in states such as West Bengal, Kerla, and Maharashtra. The medicinal plant Caesalpinia crista is known for its many advantageous benefits. It has been traditionally used as an antistress drink and as a remedy for conditions like back pain and rheumatism [30, 31]. Research on this plant has identified several bioactive components, including cassane, new cassane-like diterpenoids, flavonoids [32], proteins, alkaloids, and saponins [33]. These compounds are likely responsible for the plant’s anti-inflammatory, antimalarial, antimicrobial, and antioxidant characteristics [34, 35]. Caesalpinia crista fruit demonstrates strong corrosion inhibition on mild steel in HCl, with inhibition efficiency exceeding 90% at 5mM inhibitor concentration in a 1.0 M HCl solution [36]. Hence, our focus catered on exploring Caesalpinia crista as a potential corrosion inhibitor. The objective was to investigate the inhibitive properties of the Caesalpinia crista seeds extract against zinc corrosion in varying HCl concentrations (0.05 M, 0.075 M, and 0.10 M) via electrochemical and non-electrochemical methods. Additionally, the study encompasses an analysis of the morphological changes on the surface of the zinc.

2 Experimental

2.1 Materials

The test specimen consisted of Zinc which was chemically composed of 0.16% Ni (Nickel)and 99.84% Zn. Corrosion rate determination involved using rectangular Zn specimens measuring 5.0 cm × 2.0 cm × 0.10 cm, each featuring a small hole with a diameter of 0.5 cm near one end, resulting in a total exposed area of 0.23343 mg/dm2. Before conducting the test, all specimens were meticulously cleaned the buffing and then carefully wrapped in bags made up of plastic to protect them from atmospheric corrosion. A.R. (Analytical Regent) grade hydrochloric acid (HCl) has been utilized during the experiment.

2.2 Preparation of KSE

The Kanchaki seeds used in this study were purchased from a local market (Surat, Gujarat, India) and underwent a thorough washing process to remove dust. Afterwards, the seeds were left to air-dry outdoors at room temperature. Once dried, the seed materials have been finely ground in a blender to ensure consistent particle size in powdered form. A 25 g sample of the dry powder was subjected to extraction using 350 ml of distilled ethanol in a Soxhlet extraction system for 5 h. After the process of the extraction had been completed, the ethanol was separated from the extract through fractional distillation, resulting in an inhibitor solution. The raw extracts were stored in glass bottles in a cool and dry environment until they were needed for further experiments. KSE solutions with varying content range from 0.4 to 2.0 g per litter (g/L) were prepared for use in subsequent experiments.

Top of Form.

2.3 FT-IR

In the investigation, the equipment utilized comprised a Bruker spectrophotometer. This instrument was employed for the characterization of the alcohol extract derived from the Kanchaki seeds extract. The spectra were recorded over a wavelength range spanning from 4000 to 600 cm−1. The purpose is to identify the functional groups within the extract that could potentially contribute to its impact of corrosion inhibiting.

2.4 Mass Loss

The gravimetric analysis is a reliable and extensively used technique for determining how metals will corrode in the inhibitors’ existence. In this investigation, corrosion measurements were made using previously weighed samples exposed to 0.10 M 0.075 M, and 0.05 M HCl solutions, with and without the addition of KSE inhibitor, at a constant temp of 303 K. To examine the inhibitory effect of KSE, the inhibitor concentration was varied at 0.4 g/L, 0.8 g/L, 1.2 g/L, 1.6 g/L, and 2.0 g/L of the acidic solutions. After 24 h, the samples were dried, washed, and reweighted to find the corrosion rate, surface coverage degree, and inhibitor effectiveness for every inhibitor concentration.

2.5 Effect of Temperature

The experiment involved immersing the sample in a 230 ml solution of 0.05 M HCl, containing an inhibitor with concentrations ranging from 0.4 to 2.0 g/L, at temperatures of 313 K, 323 K, and 333 K for three hours. This investigation aimed to assess the influence of temperature on the corrosion rate. Temperature control was maintained using a thermostatic assembly with precision of ± 0.5 °C. The results of the calculations are summarized in Tables 2 and 3, providing data on activation energy (Ea), the free energy of adsorption (ΔG0ads), heat of adsorption (Qads), enthalpy of adsorption (ΔH0ads), entropy of adsorption (ΔS0ads) and Inhibition efficiency (P%).

2.6 Electrochemical Measurements

The working electrode underwent a preparation process involving the use of different grades of emery papers for polishing. It was then washed with the distilled water and degreased by utilizing the acetone. Electrochemical measurements have been conducted by utilizing the CHI 760D Electrochemical impedance analyzer model. Before performing electrochemical experiments, a 30-minute stabilization period was observed, which had been previously established as adequate for achieving a stable OCP (Open Circuit Potential). The experiments were conducted in a 3-electrode cell set up at room temp (303 K). The counter electrode is an electrode of platinum, also the reference electrode has been SCE (Saturated Calomel Electrode). The working electrode has been composed of Zn with a visible surface area of 1 cm2, while the remaining portion was covered with commercially available Teflon. EIS measurements were acquired from the Nyquist plot, utilizing an AC signal with a 0.01 V amplitude. The spectrum of a frequency encompassed ranging from the 100 kHz down to 0.01 Hz. Curves of the potentiodynamic polarization have been recorded by varying the potential within a range of + 300mV from the OCP. The sweep rate for these measurements was set at 0.01 mV/s.

2.7 Surface Analysis

The surface characteristic of the metal sample was documented utilizing the SEM with the model name ‘S3400’. In the conducted investigations, samples of the Zn were submerged in a 0.05 M HCl solution for 24 h, both in the absence and existence of the inhibitor (KSE). After the immersion period, the metal samples were retrieved, rinsed with the use of distilled water, subjected to drying, and then subjected to analysis using the SEM methodology. The acceleration potential of the electron beam utilized in the process was set at 15.0 kV. The protective film presence at a Zn surface under the protected condition has been verified using the AFM method.

3 Results and Discussion

3.1 FT-IR

By way of illustrative instance, an FT-IR spectrum of KSE is shown, spanning from 4000 to 600 cm−1, as depicted in Fig. 1. The elucidation of functional groups accountable for the peaks of IR adsorption is delineated as given in Table 1.

Fig. 1
figure 1

IR spectrum of ethanolic extract of Kanchaki Seeds

Table 1 IR data with a functional group for KSE

3.2 Mass Loss

To evaluate the protective value of KSE as an inhibitor, various concentrations of KSE were added to each HCl concentration (0.05 M, 0.075 M, and 0.10 M). The inhibitor concentration was used 0.4 g/L, 0.8 g/L, 1.2 g/L, 1.6 g/L, and 2.0 g/L. The weight loss experiment data shown in Fig. 2 indicates that the rate of corrosion rises along with an increase in the acid concentration. The rate of corrosion in 0.05 M, 0.075 M, and 0.10 M HCl concentrations have been measured at 1439.9 mg/dm2, 2129.86 mg/dm2, and 2901.24 mg/dm2, respectively over 24 h at 303 K. The results reveal that at a constant concentration acid, the inhibition effectiveness (p%) of KSE in 0.075 M HCl, the inhibition efficiency has been seen to be 89.74%, 97.18%, 98.79%, 99.20%, and 99.40% concerning 0.4 g/L, 0.8 g/L, 1.2 g/L, 1.6 g/L, and 2.0 g/L inhibitor concentration, respectively. This shows that higher concentrations of KSE lead to better corrosion protection. Conversely, at constant inhibitor concentration, the p% reduces and has a rise in the concentration of an acid. At an inhibitor concentration of 2.0 g/L, the p% KSE was measured as 99.40%, 99.40%, and 97.64% with respect to 0.05 M, 0.075 M, and 0.10 M HCl concentration, respectively. This suggests that the effectiveness of KSE decreases with more acidic environments.

$$P\%=\frac{{ML}_{u}-{ML}_{i}}{{ML}_{u}} \times 100$$
(1)
$$\theta =1-\frac{{ML}_{i}}{{ML}_{u}}$$
(2)
Fig. 2
figure 2

Plot of inhibitor concentration Vs corrosion loss and inhibition efficiency at varied acid concentrations for 24 h at 303 K

Where the inhibition efficiency (P%) is determined by calculating the percentage reduction in corrosion loss achieved through the use of the KSE. The terms MLu and MLi denote the mass loss of corrosion in the absence of and presence of the inhibitor, respectively. The parameter ‘θ’ represents the surface coverage degree, indicating the percentage of the metal surface coated by the inhibitor. The inhibitory impact observed in the KSE can be attributed to the adsorption of its components onto Zn surfaces. The formation of the protective layer, composed of the adsorbed molecules, acts as a barrier, effectively isolating the metal surface from corrosive media. This isolation hinders the dissolution of the zinc surface by safeguarding against corrosion sites, ultimately resulting in a reduced corrosion rate [41].

3.3 Effect of Temperature

The experimental results presented in given Table 2 illustrate the effect of the temp on the Zn corrosion. It is evident that rise in a temperature leads to a greater rate of corrosion, indicating thermal-activated kinetics is a contributing factor [42]. The inhibition efficiency of KSE reduces with increasing temperature, with inhibition efficiencies of 98.36%, 96.00%, and 94.50% observed at 313 K, 323 K, and 333 K, correspondingly, at an inhibitor concentration of 2.0 g/L (Table 2). The mean activation energy (Ea) values have been determined by utilizing Eq. (3) for Zn in 0.05 M HCl, resulting in a value of 16.32 kJ/mol. However, in the presence of an acid-containing KSE, it has been observed that the mean activation energy (Ea) values are higher compared to those in an uninhibited environment (Table 3). The greater Ea values in the inhibitors’ presence suggest stronger interaction among the inhibitor molecules and also the metal, indicating physical adsorption [43]. This adsorption layer acts as a shield, improving the energy barrier for the procedure of corrosion and thus reducing the overall rate of corrosion [44, 45]. The consistency in Ea values from the Arrhenius graph (Fig. 3) and Eq. (4), validates their reliability in studying the inhibitory behaviour of KSE.

$$Log \frac{{P}_{2}}{{P}_{1}}=\frac{{E}_{a}}{2.303R} \left(\frac{1}{{T}_{1}}-\frac{1}{{T}_{2}}\right)$$
(3)

The alteration in entropy and alteration in enthalpy information can be determined using the subsequent formula:

$$K= \left(\frac{RT}{Nh}\right){exp}\left(\frac{{\varDelta {S}^{0}}_{ads}}{R}\right)exp\left(\frac{{-\varDelta {H}^{0}}_{ads}}{RT}\right)$$
(4)

Wherein K denotes “the corrosion rate (CR), h symbolizes Plank’s constant, Avogadro’s number is denoted as N, ΔS0ads stands for the activation entropy, and ΔH0ads signifies the activation enthalpy. A graphical representation of Log (K/T) v/s /T, as displayed in Fig. 4, is expected to yield a linear plot. This line should have a gradient of \(\left(\frac{-{\varDelta {H}^{0}}_{ads}}{2.303R}\right)\), and a y-intercept of \(Log \left(\frac{R}{Nh}\right)+\left(\frac{{\varDelta {S}^{0}}_{ads}}{2.303 R}\right)\). Utilizing these values, the ΔS0ads and ΔH0ads details can be determined and exhibited in the given Table 3. The negative ΔS0ads values for the inhibitor show that the activated complex is involved in the step of rate-determining, performing an association instead of a dissociation action. This suggests a reduction in the disorder at the time of transition through the reactant to the activated complex” [46]. Furthermore, evident from Table 3, is the noticeable increase in ΔH0ads values when in comparison to the uninhibited scenario. These values are positive and represent the characteristics of endothermic Zn dissolution throughout the corrosion procedure [47, 48], these sign of ΔH0ads shows that the inhibitor molecules’ adsorption is an endothermic process.

The additional thermodynamic parameter that provides further insight into the adsorption mechanism involved in the procedure of corrosion inhibition is the adsorption heat, denoted as Qads. This parameter is linked to the extent of coverage on the surface, represented as θ, and the relationship is expressed as follows (Eq. 5):

$${Q}_{ads}=2.303 R \left\{log \left(\frac{{\theta }_{2}}{1-{\theta }_{2}}\right)-log\left(\frac{{\theta }_{1}}{1-{\theta }_{1}}\right) \right\}\times \left(\frac{1}{{T}_{1}}-\frac{1}{{T}_{2}}\right)$$
(5)

Here, θ1 and θ2 correspond to the degrees of surface coverage at the given temp which are T1 and T2 respectively. The determined Qads values, as also presented in the given Table 3, are all negative and fall ranging from 6.40 to -77.03 kJ/mol. The presence of negative Qads values indicates that as temperature increases, the adsorption process as well as inhibition efficiency experience a reduction [49].

Fig. 3
figure 3

Arrhenius plots with and without KSE in 0.05 M HCl for 3 h

Table 2 Corrosion loss and inhibition efficiency data obtained in 0.05 M HCl with varied concentrations of KSE for 3 h
Table 3 Heat of adsorption, entropy of adsorption, enthalpy of adsorption, and activation energy containing KSE in 0.05 M HCl for 3 h
Fig. 4
figure 4

Plot of log (K/T) versus 1/T for Zn corrosion in 0.05 M HCl with KSE

3.4 Adsorption

The analysis of surface coverage (θ) data plays a crucial role in understanding the intricacies of adsorption characteristics. By examining how the proportion of the surface covered changes with concentration under constant temperature conditions, we can gain insight into equilibrium scenarios for various adsorption isotherms. Several models, including Freundlich, Langmuir, Frumkin, and Temkin isotherms, have been employed to match experimental results. However, the most compelling agreement was achieved with the Langmuir and Freundlich isotherms. Equation (6) [50] and (7) [51] below, representing the Langmuir and Freundlich adsorption isotherms respectively, establish the relationship between inhibitor concentration and the extent of surface coverage. The exceptionally high linear correlation coefficient of the fitted data suggests a robust alignment of inhibitor molecule adsorption with Langmuir adsorption isotherm (Fig. 5).

$$\frac{{C}_{inh}}{\theta }=\frac{1}{{K}_{ads}}+ {C}_{inh}$$
(6)
$$Log \theta =Log {K}_{ads}+n Log {C}_{inh}$$
(7)

Here, θ represents the surface coverage degree, n is the coefficients, Cinh signifies “the inhibitor concentration in g/L, and Kads represents the equilibrium constant governing the equilibrium desorption/adsorption procedure of molecules of an inhibitor on the surface of the metal. The Kads values have been derived by the adsorption process plot intercept and are interconnected with the free energy alteration of adsorption, denoted as ΔG0ads, through the equation (Eq. 8) [52, 53]:

$$\varDelta {G}_{ads}^{0}= -RTln\left({1000K}_{ads}\right)$$
(8)

The Langmuir and Freundlich adsorption parameters and ΔG0ads values, observed in the presence of KSE, are meticulously detailed in Table 4. Scrutiny of Table 4 unveils the negative nature of ΔG0ads, which signifies the tenacity of the layer that is adsorbed at a surface of Zn and the inherent propensity of the adsorption procedure to foster the creation of an adsorbed film on the metal’s surface. Across the range of a concentration is 0.4 to 2.0 g/L for KSE, the ΔG0ads values consistently fall within − 11.91 to -14.05 kJ/mol, indicative of a prevailing physisorption mode. ΔG0ads values lower than − 20 kJ/mol are typically associated with physisorption, while the values higher than − 40 kJ/mol are indicative of chemisorption [54, 55].

The observed linear relationship between surface coverage and inhibitor concentration for KSE (Fig. 6) strongly supports the hypothesis that corrosion inhibition arises from the formation and preservation of protective film on the Zn surface. This additional layer proficiently covers both anodic and cathodic sites through a consistent process of adsorption. The alignment of experimental data with these isotherms gives compelling substantiation for the pivotal role that adsorption plays in the discernible inhibitive impact of the KSE. The linear regression derived through the graph of log θ against log C yields a correlation coefficient of 0.9081 (Fig. 6).

Table 4 Freundlich and Langmuir adsorption isotherm parameters for zinc in 0.05 M HCl with KSE
Fig. 5
figure 5

C/ϴ versus C plot for KSE extract in 0.05 M HCl for 3 h

Fig. 6
figure 6

Log ϴ versus Log C plot for KSE extract in 0.05 M HCl for 3 h

3.5 OCP

In an OCP experiment involving Zn corrosion, a Zn specimen immersed in a 0.05 m HCl solution exhibited a stable potential of – 796 mV compared to a standard SCE. When varied concentration (0.4 to 2.0 g/L) of KSE was introduced, the maximum corrosion potential shifted to – 783 mV for 2.0 g/L. The use of KSE indicated a slightly positive shift in the potential of the corrosion, by proposing the polarization for the local anodes (Fig. 7).

Fig. 7
figure 7

Open circuit potential plot for Zn in 0.05 M HCl solution with varied concentration of KSE at 303 K

3.6 Potentiodynamic Polarization

The study involved determining corrosion current densities using extrapolation of cathodic as well as anodic Tafel lines to find their intersection (Fig. 8). The finding indicated that the effectiveness of corrosion protection increased as the concentration of KSE in the treatment solution 0.05 M HCl. This was evident from the shift of the corrosion potential (Ecorr) towards the more noble direction and also a reduction in the corrosion current values (icorr). Cathodic curves exhibited a gradual shift towards the lower current density regions with increasing KSE concentration, while the anodic curves showed no significant shift. The most significant corrosion protection was observed at 2.0 g/L KSE concentration. In the 0.05 M HCl, the substantial KSE concentration caused a potential shift in the direction of an anode, though the shift was modest at 46 mV. This value fell below the generally accepted threshold of ± 85 mV, which is commonly employed to categorize inhibitors as either anodic or cathodic [56]. This outcome might be attributed to the organometallic protective film forming presence at the surface of an electrode, leading to a reduction in the effectiveness of a “rate of electron transfer at the site of the interface. The marginal alteration in both βc & βa values suggests a lack of variation in the inhibition mechanism, both in the absence and presence of the inhibitor [57, 58]. Table 5 provided data on corrosion potential (Ecorr), Corrosion current (icorr), cathodic and anodic Tafel slopes (βc & βa), and inhibition” effectiveness (p%) of KSE. The P% has been determined by utilizing a specified relation (Eq. 9), that involves comparing corrosion densities with and without the inhibitor icorr(inh) and icorr(u) respectively [59].

$$P\%=\frac{{i}_{corr\left(u\right)}-{i}_{corr\left(inh\right)}}{{i}_{corr\left(u\right)}} X 100$$
(9)

The higher concentration of KSE results in reduced corrosion current densities, indicating improved corrosion protection for the Zn. This behaviour implies that the presence of KSE on the surface of the Zn electrode leads to enhanced resistance against the corrosion process, making it a favourable choice for corrosion prevention.

Table 5 data derived from the Tafel graph for Zn corrosion in 0.05 M HCl with and without KSE at 303 K
Fig. 8
figure 8

Tafel plot for varied KSE concentration in 0.05 M HCl solution

3.7 EIS

The EIS experimental data was thoroughly evaluated by fitting it to the similar electrical circuit depicted in the given Fig. 9. The outcome of this analysis was visually represented in Fig.10, where dotted lines indicate the fitted circuit. These indicate two-time constants, each contributing to different processes. The time constant observed in the Nyquist plot represents the behaviour of the electrochemical double layer formed at the interface of zinc electrolyte and was identified as an outcome of passive layer formation on the zinc surface. The passive layer works as a protective barrier, shielding the metal from further corrosion [60,61,62]. When KSE was introduced into the system as an inhibitor, the plot showed an inductive loop at low frequencies. This observation suggests that the KSE extract effectively adsorbed on the zinc surface, functions as an inhibitor to hinder corrosion processes.

Key parameters related to impedance diagrams, such as CPE (Constant Phase Element), charge transfer resistance (Rct), CPE exponent (n), and double layer capacitance (Cdl) along with inhibition effectiveness (p%) were documented in Table 6. The calculation of p% involved the comparison between charge transfer resistances of uninhibited & inhibited cases. Quantifying the inhibition efficiency involves utilizing Eq. (10) [63] with the following expression:

$$\rho \left(\%\right)=\left(\frac{{R}_{ct\left(i\right)}-{R}_{ct \left(u\right)}}{{R}_{ct\left(i\right)}}\right) \times 100$$
(10)

In the context of Eq. (10), Rct(i) & Rct(u) denote the charge transfer resistances in the KSE’s existence & absence, correspondingly. Interestingly, the p% values obtained through both the measurements of a weight loss & electrochemical impedance spectroscopy exhibited a consistent sequence. Further investigation revealed that Rct values increased with rising inhibitor concentration, while Cdl values decreased. This shift was attributed to the increased surface coverage by KSE, leading to higher inhibition efficiency. In this study, the n value encompasses a spectrum from 0.924 to 0.713, signifying the KSE extracted molecule’s adsorption onto the most active sites of the zinc and showcasing substantial surface heterogeneity. The time of a relaxation (measured in seconds) signifies the brief timespan essential for reaching charge distribution equilibrium, as outlined in the following Eq. (11). The adsorption process of the KSE undergoes a rapid equilibration, as evident from Table 6. Noteworthy is the elongation of relaxation time with increasing KSE concentration., indicative of heightened KSE extracted constituent’s adsorption at a surface of Zn [64]. This effectively diminishes the exposed electrode area within corrosive surroundings.

$$\tau ={C}_{dl}\times {R}_{ct}$$
(11)

The estimation of Cdl values is derived from impedance values through the Nyquist plot. The estimation is achieved using Eq. (12) [65]. Here, fmax corresponds to the frequency where the max imaginary component of the impedance denoted as (− Z’ max) is attained. The calculation of Rct values is established by the subsequent Eq. (13) [66]:

$${C}_{dl}= \frac{1}{2\pi {f}_{max}{R}_{ct}}$$
(12)
$${R}_{ct}=Z \left(at low frequency\right)-Z \left(at high frequency\right)$$
(13)
Table 6 Data derived from Nyquist plot of 0.05 M HCl with and without KSE at 303 K
Fig. 9
figure 9

Fitted circuit of EIS spectrum for KSE at 303 K

Fig. 10
figure 10

EIS graph for Zn in 0.05 M HCl in varied concentrations of KSE at 303 K

Fig. 11
figure 11

Fitted Bode plot for KSE in 0.05 M HCl solution at room temperature (303 K)

Figure 11a–b exhibit the Bode curves, indicating a positive relationship between the rise in the linear slope section and the amount of KSE. This implies that KSE adsorbate is present on Zn before oxidation occurs during sliding [67]. Additionally, the increase in phase angles is indicative of enhanced surface coverage [68] (Fig. 11b).

3.8 SEM

SEM micrographs in Fig. 12a–b exhibit Zn samples with and without 2.0 g/L of the investigated KSE. The absence of KSE (Fig. 12a) [69] displays a severely corroded and rough surface. However, in the KSE existence, the damage to the Zn surface significantly reduces due to the KSE presence, resulting in a much smoother surface (Fig. 12b).

Fig. 12
figure 12

SEM Images of Zn surface in a absence and b presence of KSE for 24 h

3.8.1 EDX

To collect an understanding of the zinc sample’s surface composition, we conducted EDX analysis in both inhibitor-free and inhibitor-treated environments, immersed in a 0.05 M HCl solution for three hours, the KSE employed at a concentration of 2.0 g/L, showcasing the highest inhibition efficiency (Fig. 13) [69]. Table 7 outlines the Atomic (At %) and Weight (Wt %) percentages of elements obtained from EDX analysis. Figure 13 examination unveils a conspicuous decrease in O and Cl peaks, juxtaposed with an ascent in the C peak in the presence of KSE. In HCl solutions, heightened O peck arises from zinc oxide formation on the metal surface [70]. The mitigation of O and Cl peaks, coupled with the augmentened C peak, indicates the KSE efficacy in shielding the surface from corrosion products. This observation aligns with EDX data, affirming the robost adsorption of inhibitor molecules on the Zn surface, cuminnating in the formation of a protective film [71].

Fig. 13
figure 13

EDX spectrum of Zn in the a absence of KSE and b presence of KSE in 0.05 M HCl after 3 h at 303 K.

Table 7 Atomic and Weight% of elements obtained from EDX spectrum in 0.05 M HCl in the absence and presence of KSE.

3.9 AFM

Atomic force microscopy (AFM), stands out as an exceptional high-resolution scanning probe method, widely acclaimed for its prowess in delving into surface morphology investigation. AFM is potent for analyzing surface characteristics at the scale of micro to nano. It has emerged as a valuable method to explore how inhibitors influence corrosion at the interface of metal and solution [72]. The research delved into the topography of the surface using 2D and 3D imaging, extracting parameters like surface roughness (Rmax), average roughness (Ra), and maximum peak-to-valley height. The study presented diverse AFM parameters for Zn surfaces subjected to different environments. Results demonstrated that immersion without KSE led to the creation of zinc oxides, evidenced by elevated Ra (38.0 nm), Rmax (557.0 nm), and peak valley height (164.3 nm) values, signifying increased roughness. In contrast, when immersed with an inhibitor formulation containing 2.0 g/L KSE, the Zn surface exhibited decreased Ra (10.6 nm) and Rmax (110.0 nm) values, along with a peak-to-valley height 27.9 nm. indicating the protective film formation at surface of the metal. This film contributed to smoother and more homogeneous surfaces, devoid of corrosion product deposits. Assessing the alterations in symmetry around surfaces’ mean line involves measuring roughness skewness, a parameter that demonstrates remarkable sensitivity to irregular high peaks or deep valleys [73]. The attainment of a negative skewness value is instrumental in creating an exceptional bearing surface, as indicated by previous studies [74]. In terms of statistical analysis, roughness kurtosis offers insights into spike distribution above and below the mean line. Regardless of the existence or else the absence of the inhibitor, kurtosis values exceeding 3 denote a prevalence of spiky surfaces, while a value below 3 indicates surfaces with bumps. A value close to 3 suggests a random surface texture [69]. These findings strongly affirm the corrosion resistance capabilities of the KSE inhibitor (Fig. 14, Table 8).

Fig. 14
figure 14

AFM image of Zn surface a without KSE and b with KSE

Table 8 AFM roughness parameters of zinc surface in the absence and presence of KSE.

3.10 Mechanism

In the corrosive environment of an HCl electrolyte, Zn undergoes an anodic reaction, where it oxidizes to form zinc ions (Zn+2) and releases two electrons ( \(Zn \to {Zn}^{+2}+ {2e}^{-})\). Being a metallic conductor, Zn readily facilitates the electronic transfer to its cathodic regions. Within this electrolyte, hydrogen ions are also present due to the dissociation of HCl. These hydrogen ions can interact with the free electrons in Zn, leading to the formation of hydrogen gas at the cathodic regions, as expressed by the equation \({2 H}^{+}+ {2e}^{-}\to {H}_{2}\) [75]:

Many plant extracts contain organic molecules that are rich in sulphur (S), nitrogen (N), and oxygen (O) atoms, and the aromatic rings at the chemical structures. The preliminary phytochemical screening of the alcoholic and aqueous extract of C. crista revealed existence of various compounds, including: Tannins, Flavonoids, alkaloids, proteins, carbohydrates, coumarins, and triterpenoids [76]. Furthermore, the plant seeds of Crista were found to be contain the 49% carbohydrate including starch (6.1%), water soluble mucilage (4.4%), and pentosan (16.8%). In addition to these compounds, 4-O-methyl myoinositol hydrate has been isolated through the C. crista that grows in the China as per the study conducted by Chopra in 1993 [77]. According to Umoren et al. [78] The primary confines associated through the utilization of the inhibitors that is derived through the extracts of plants are the complex nature of these extracts, which contain a wide variety of heteroatoms. The complexity makes it challenging to identify a specific molecule which is responsible for the process of the inhibition [79]. KSE naturally comprises a multitude of organic compounds, including the above-mentioned molecules, which can enhance inhibition effectiveness. This is because extracts of the plant are rich in organic compounds that contain heteroatoms [80]. These heteroatoms have the capacity to donate electrons, and these molecules activities are linked to their capability to adsorb onto metal surfaces through the utilization of unshared pair of electrons from O atoms [81]. Moreover, these atoms or the π (pi) electrons that exists at aromatic ring can coordinate with empty orbital of the corroding Zn metal creating a protective layer at the metal’s surface.

4 Conclusion

By “the above forgoing experiments, the mentioned conclusions could be drawn regarding the corrosion inhibition of Zn in 0.05–0.1 M HCl solutions by KSE.

  • KSE effectively inhibits the zinc corrosion in solutions of 0.05-0.10 M HCl, demonstrating its potential as a corrosion inhibitor.

  • The corrosion inhibition is achieved through the adsorption of KSE onto the Zn surface, generating a protective layer that hinders the destructive attack.

  • The inhibition efficiency of KSE rises with the greater inhibitor concentrations, suggesting the possibility of tailoring its performance for corrosion protection needs.

  • KSE works as the mixed-type inhibitor for Zn surface corrosion in 0.05 M solutions of HCl, inhibiting both the cathodic & anodic processes.

  • The KSE adsorption at a surface of zinc from the 0.05 M HCl solutions adheres to the Langmuir and Freundlich adsorption isotherms, implying monolayer adsorption and uniform coverage.

  • SEM micrographs provide graphic validation of the formation of a protective layer on the Zn surface, supporting the inhibitive properties of KSE and its role in protecting the metal from further corrosion reactions”.

  • Additionally, AFM and SEM have been utilized to confirm and support the findings that are attained through mass loss, EIS, and polarization approaches.

  • Consideration of Kanchaki seeds extract as a corrosion inhibitor is recommended, due to their low cost and environmentally friendly attributes. The advantages, including easy application and minimal disruption to industrial processes make plant-based inhibitors, like Kanchaki seeds, an environmentally sustainable and economically viable solution for corrosion control. Before widespread implementation, it is recommended to conduct comprehensive research and testing to ascertain the full potential and effectiveness of Kanchaki seeds in specific industrial applications.