1 Introduction

Metals and alloys are used in different developmental activities and are susceptible to corrosion due to their thermodynamic instability especially in aggressive media. Corrosion is a thermodynamically feasible process because it is associated with negative change of the Gibbs free energy. The use of inhibitors is one of the most practical methods to protect metals against acid attack. Organic substances have been used extensively as corrosion inhibitors during the last four decades. Of these, heterocyclic compounds containing one or more N, O, and S atoms can affect the inhibition of corrosion of metals in aqueous acid solution [18]. Among different hetero atom containing compounds, condensation products of isatin have been reported to be a potential inhibitor for different metals. This behavior of isatin derivatives has opened a new avenue for exploring the applicability of such compounds as corrosion inhibitors for mild steel in aqueous HCl solutions. Under certain conditions, the electronic structure of the organic inhibitors has a key influence on the corrosion inhibition efficiency to the metal. The inhibitors influence the kinetics of the electrochemical reactions which constitute the corrosion process and thereby modify the metal dissolution in acids. The existing data show that most organic inhibitors act by adsorption on the metal surface. They change the structure of the electrical double layer by adsorption on the metal surface. Quite a number of studies have been carried out in determination of adsorptivity of various compounds at the electrode/solution interface [912]. The type of interaction of inhibitor on the electrode surface during corrosion has been deduced from its adsorption characteristics by several authors [1316].

Inspection of literature revealed that few Mannich bases have been reported effective acidic [17, 18] and vapor phase corrosion inhibitors [19]. In view of appreciable efficiency of Mannich bases, a series of new Mannich bases namely, [N-(Morpholinomethyl)-isatin-3-thiocarbohydrazone] (MOH), [N-(Morpholinomethyl)-5-nitroisatin-3-thiocarbohydrazone] (5-NMOH), and [N-(Morpholinomethyl)-5-bromoisatin-3-thiocarbohydrazone] (5-BMOH) have been synthesized to investigate its inhibition activities on corrosion of mild steel in aqueous HCl solution using weight loss, polarization resistance, Tafel polarization, electrochemical impedance (EIS), and atomic force microscopy (AFM) techniques. The effects of temperature and immersion time were also studied.

2 Experimental

2.1 Materials

Mild steel strips composed of (wt%) C = 0.17, Mn = 0.46, Si = 0.26, S = 0.017, p = 0.019 and balance Fe were pre-treated prior to the experiment by grinding with emery paper (grade 600, 800, 1000 and 1200) then cleaned with double-distilled water, degreased with acetone and dried. The rectangular specimens with dimension 2.5 × 2.0 × 0.025 cm were used in weight loss experiments and of size 1.0 cm × 1.0 cm (exposed) with a 7.5-cm long stem (isolated with commercially available lacquer) were used for electrochemical measurements. The solutions (1 M HCl) were prepared by dilution of an analytical grade HCl with double-distilled water.

2.2 Inhibitors

Isatins and thiocarbohydrazide (1:1 M ratio) were refluxed in ethanol for 2–3 h, cooled and the precipitate was filtered. This product was subsequently treated with formaldehyde and morpholine to get the desired product [20, 21]. The name and molecular structure of studied compounds were given as Scheme 1.

Scheme 1
scheme 1

Structure and synthetic route of Mannich bases

2.3 Weight loss studies

Weight loss experiments were done according to the method described previously [22, 23]. Weight loss measurements were performed at 308 K (except for temperature effect) for 3 h (except for immersion time effect) by immersing the mild steel coupons into acid solution (100 mL) without and with various amounts of inhibitors. After the elapsed time, the specimen were taken out, washed, dried, and weighed accurately. All the tests were conducted in aerated 1 M HCl. All the experiments were performed in triplicate and average values were reported. All the concentrations of inhibitors for weight loss and electrochemical study were taken in ppm.

The surface coverage (θ) and inhibition efficiency (\( \mu_{{{\text{WL}}_{{\text{\% }}} }} \)) were determined by using following equations:

$$ \theta \,\, = \,\,{\frac{{w_{\text{o}} - w_{\text{i}} }}{{w_{\text{o}} }}} $$
(1)
$$ \mu_{\text{WL}} \% \, = \,\,{\frac{{w_{\text{o}} - w_{\text{i}} }}{{w_{\text{o}} }}}\,\, \times \,\,100 $$
(2)

where, w i and w o are the weight loss value in presence and absence of inhibitors, respectively.

2.4 Electrochemical measurements

All electrochemical experiments were performed in Gamry electrochemical cell with three electrodes connected to Gamry Instrument Potentiostat/Galvanostat with a Gamry framework system based on ESA400. Gamry applications include software DC105 for corrosion and EIS300 for EIS measurements, and Echem Analyst version 5.50 software packages for data fitting. The mild steel of 1 cm2 was the working electrode, platinum electrode was used as an auxiliary electrode, and standard calomel electrode (SCE) was used as reference electrode. All potentials were measured versus SCE.

Tafel curves were obtained by changing the electrode potential automatically from −250 to +250 mV versus corrosion potential (E corr) at a scan rate of 1 mV s−1. EIS measurements were carried out in a frequency range from 100 to 10 MHz under potentiodynamic conditions, with amplitude of 10 mV peak-to-peak, using AC signal at E corr. All experiments were measured after immersion for 30 min in 1.0 M HCl with and without addition of inhibitors.

The linear polarization study was carried out from cathodic potential of –20 mV versus OCP to an anodic potential of +20 mV versus OCP with a scan rate 0.125 mV s−1 to study the polarization resistance (R p).

2.5 Atomic force microscopy

The mild steel strips of 1.0 cm × 1.0 cm × 0.025 cm sizes were prepared as described in Sect. 2.4. After immersion in 1.0 M HCl with and without addition of 200 ppm of all the three Mannich bases at 308 K for 3 h, the specimen were cleaned with distilled water, dried, and then used for AFM.

3 Result and discussion

3.1 Weight loss studies

3.1.1 Effect of inhibitor concentration

The corrosion rate decreased considerably with an increase in concentration of each inhibitor and reached the minimum value in the range of 200–250 ppm concentrations. The optimum concentration of inhibitors was evaluated based on their inhibition efficiency. All the synthesized compounds inhibit the corrosion. It is obvious that inhibition efficiency values for the three tested Mannich bases increase with the increase in inhibitor concentration, and this increase in the inhibition efficiency, at a given inhibitor concentration, enhances in the following order: 5-NMOH < MOH < 5-BMOH. The inhibition action of Mannich bases can be explained by considering the following mechanism: Fe (Inh) ads, reaction intermediates [24]: Fe + Inh ↔ Fe (Inh) ads ↔ Fen+ + ne + Inh. At first, when there is not enough Fe(Inh)ads to cover the metal surface, because the inhibitor concentration is low or because the adsorption rate is slow, metal dissolution takes place in sites on the mild steel surface free of Fe(Inh)ads. With high inhibitor concentration, a compact and coherent inhibitor over film is formed on the mild steel which reduces chemical attacks on the metal.

3.1.2 Effect of immersion time

The variation of inhibition efficiency of all the three Mannich bases with immersion time is shown in Fig. 1. The inhibition efficiency of the inhibitors was found to increase with time up to 12 h and thereafter remains almost constant, suggesting the formation of persistent film on the metal surface.

Fig. 1
figure 1

Variation of inhibition efficiency with different immersion time in 1 M HCl on mild steel of surface area 10 cm2 at 200 ppm concentration of Mannich bases

3.1.3 Effect of temperature

In order to study the effect of temperature on the inhibition characteristic of all the Mannich bases, weight loss measurements were performed at different temperatures from 308 to 338 K in the absence and presence of different concentrations of all Mannich bases for 3 h immersion time and the effect of temperature on corrosion rate at different inhibitor concentration is shown in Fig. 2.

Fig. 2
figure 2

Variation of corrosion rate and inhibition efficiency in absence and presence of different concentrations of different Mannich bases in 1 M HCl on mild steel of surface area 10 cm2 for 3 h immersion time at a 308 K, b 318 K, c 328 K and d 338 K

As detected from Fig. 2, corrosion rate decreased in the presence of optimum concentration of MOH, 5-BMOH, and 5-NMOH in studied temperature range. This behavior suggests that a protective film of these compounds was formed on the mild steel surface. The effect of temperature on inhibition efficiency of these compounds indicated that the protective layer formed on the mild steel surface is comparatively less stable in the case of 5-NMOH than MOH and 5-BMOH. In the case of 5-NMOH, nitro group tend to withdraw electron density from aromatic ring hence, availability of π-electrons of aromatic ring is decreased to some extent. Thus, the co-ordination ability of 5-NMOH with mild steel is affected at higher temperature.

The dependence of corrosion rate at temperature can be expressed by Arrhenius equation and transition state equation [25, 26]:

$$ \log ({\text {CR}}) = {\frac{{ - E_{\text{a}}^{{}} }}{2.303RT}} + \log \lambda $$
(3)
$$ {\text {CR}} = {\frac{RT}{Nh}}\exp \left( {{\frac{{\Updelta S_{\text{a}}^{ * } }}{R}}} \right)\,\exp \left( { - {\frac{{\Updelta H_{\text{a}}^{ * } }}{RT}}} \right) $$
(4)

where E a apparent activation energy, λ the pre-exponential factor, ΔH *a the apparent enthalpy of activation, ΔS *a the apparent entropy of activation, h Planck’s constant and N the Avogadro number, respectively.

The apparent activation energy and pre-exponential factors for a wide range of concentration of Mannich bases can be calculated by linear regression between log CR and 1/T, the results were shown in Table 1. All the linear regression coefficients are close to 1, indicating that corrosion of mild steel in hydrochloric acid can be explained using the kinetic model. Figure 3 depicted an Arrhenius plots for mild steel immersed in 1 M HCl in presence of different concentration of isatin derivatives. The plots obtained are straight lines and the slope of each straight line gives its apparent activation energy. Table 1 summarizes E a values for a wide range of concentration of the three molecules tested. Inspection of Table 1 showed that at lower concentration of all the inhibitor, activation energy increased compared to the free acid solution. The increase in E a could be interpreted as the physical adsorption which occurs in the first stage [2733]. Unchanged or lowered energy is related to the existence of chemisorption. However, it is known that mixed adsorption should be characterized by minor or no changes in activation energy. Upward or downward changes might express the advantageous physical or chemical bonding [34]. From the Table 1, it can be seen that for a wide range of inhibitor concentrations, E a is higher for inhibited solution than free acid solution (42.21 kJ mol−1). At highest concentration, activation energy was found to decrease and these data agree with that reported in literature [33, 35]. The increase in activation energy can be attributed to an appreciable decrease in the adsorption of the inhibitor on the surface of mild steel with increasing temperature.

Table 1 Thermodynamic activation parameters for mild steel in 1 M HCl in absence and presence of different concentrations of different inhibitors
Fig. 3
figure 3

Adsorption isotherm plots for log CR versus 1/T at different concentrations of a MOH, b 5-NMOH and c 5-BMOH

The results obtained in the study could be explained by the mechanism proposed by Riggs and Hurd [34]. The authors suggested that the corrosion rate, \( {{ - {\text{d}}({\text{Fe}})} \mathord{\left/ {\vphantom {{ - {\text{d}}({\text{Fe}})} {{\text{d}}t}}} \right. \kern-\nulldelimiterspace} {{\text{d}}t}} \), can be expressed by sum of two rates: \( {{ - {\text{d}}({\text{Fe}})} \mathord{\left/ {\vphantom {{ - {\text{d}}({\text{Fe}})} {{\text{d}}t}}} \right. \kern-\nulldelimiterspace} {{\text{d}}t}}\, = \,\,k_{1} (1 - \theta )\, + \,k_{2} \theta \), where k 1 and k 2 are the rate constants for the uninhibited reaction and completely covered surface, respectively, and θ is the fraction of surface covered by adsorbed inhibitor.

The Fe (Inh)ads, reaction intermediates [24]: Fe + Inh ↔ Fe (Inh)ads + Fen+ + ne + Inh can explain the inhibition mechanism. At first, when there is not enough Fe (Inh)ads to cover the metal surface, because the inhibitor concentration is low or because the adsorption rate is slow, metal dissolution takes place on the mild steel surface free of Fe (Inh)ads. With high inhibitor concentration, a compact and coherent inhibitor over film is formed on the mild steel which reduces chemical attacks on the metal.

In many systems, k 2 may be so small that k 2θ may be negligible. When θ becomes quite large (>0.9), very small increase in k 2 causes the term k 1 (1 − θ) to decrease markedly so that it would take a very large ratio of k 1/k 2 to make the term k 2θ negligible at high coverage. Thus, the corrosion rates of many inhibited systems at high coverage do no suggest simply the high degree of adsorption but rather a new expression, i.e., simply k 2θ. In such cases, the term k 1 (1 − θ) will be negligible and the corrosion mechanism probably involves direct reaction of the species “metal atom-adsorbed inhibitor molecules”. It is, thus, probable that the activation energy in \( k_{2} = \,\lambda {\text{e}}^{{ - \Updelta E_{2} /RT}} \) will be quite different from that in the uninhibited rate constant k 1. Thus, it is possible that the activation energy of inhibited reaction at high coverage can be either larger or smaller than that of the uninhibited reaction. The trend of activation energies in the present study may be followed in this way.

The relationship between log(CR/T) and 1/T was shown in Fig. 4. Straight lines are obtained with a slope (\( {{ - \Updelta H_{\text{a}}^{ * } } \mathord{\left/ {\vphantom {{ - \Updelta H_{\text{a}}^{ * } } {2.303R}}} \right. \kern-\nulldelimiterspace} {2.303R}} \)) and an intercept of \( \left[ {\log \,({R \mathord{\left/ {\vphantom {R {Nh)\, + \,({{\Updelta S_{\text{a}}^{ * } } \mathord{\left/ {\vphantom {{\Updelta S_{\text{a}}^{ * } } {2.303R)}}} \right. \kern-\nulldelimiterspace} {2.303R)}}}}} \right. \kern-\nulldelimiterspace} {Nh)\, + \,({{\Updelta S_{\text{a}}^{ * } } \mathord{\left/ {\vphantom {{\Updelta S_{\text{a}}^{ * } } {2.303R)}}} \right. \kern-\nulldelimiterspace} {2.303R)}}}}} \right], \) from which the value of ΔH *a and ΔS *a were calculated and presented in Table 1.

Fig. 4
figure 4

Adsorption isotherm plots for log (CR/T) versus 1/T at different concentrations of a MOH, b 5-NMOH and c 5-BMOH

The relationship between activation energy and enthalpy of activation against the concentration of all the Mannich bases is shown in Fig. 5. From the data obtained in Table 1, it is clear that E a, ΔH *a vary in the same manner in the case of MOH, 5-NMOH, and 5-BMOH. However, the variation in the case of 5-NMOH is different from MOH and 5-BMOH. In the case of 5-NMOH, in all the concentration range, activation parameters are almost constant, whereas in the other two cases, activation parameters increase first, reaches maximum and thereafter gradually decrease. In the case of MOH and 5-BMOH, this phenomenon is interpreted by the fact that at a relatively lower concentration, the reduction in mild steel corrosion rate is mainly decided by kinetic parameters of activation. When the concentration is relatively increased, the decrease in mild steel corrosion rate is chiefly controlled by pre-exponential factor and in the case of 5-NMOH, there was no dramatic change in the value of A, and, therefore, the decrease in corrosion rate is mainly controlled by activation energy [36].

Fig. 5
figure 5

Variation of kinetic parameters with different concentrations of different Mannich bases

On comparing the values of entropy of activation (ΔS *a ) listed in Table 1, it is clear that entropy of activation decreased in presence of MOH, 5-NMOH, and 5-BMOH compared to free acid solution. Such variation is associated with the phenomenon of ordering and disordering of inhibitor molecules on the mild steel surface. The decrease of entropy of activation in the presence of MOH, 5-NMOH, and 5-BMOH reflects the formation of an ordered stable film of inhibitor on the mild steel surface [26, 37]. Investigation of Table 1 reveals that the change in randomness is comparatively smaller than MOH and 5-BMOH ongoing from reactant to activated complex [3840].

3.2 Thermodynamic parameters and adsorption isotherm

The adsorption on the corroding surfaces never reaches the real equilibrium and tends to reach an adsorption steady state. When corrosion rate is sufficiently decreased in the presence of inhibitor, the adsorption steady state has a tendency to attain quasi-equilibrium state. Now, it is reasonable to consider quasi-equilibrium adsorption in thermodynamic way using the appropriate adsorption isotherm. The degree of surface coverage (θ) for inhibitor was obtained from average weight loss data. Langmuir, Temkin, and Frumkin adsorption isotherms were tested to find the best suitable adsorption isotherm for adsorption of Mannich bases on the surface of mild steel from 1.0 M HCl solution. Langmuir adsorption isotherm (Eq. 5) was found fit. With regard to the Langmuir adsorption isotherm, the surface coverage (θ) of the inhibitor on the mild steel surface is related to the concentration (C inh) of the inhibitor in the bulk of the solution according to the following equation:

$$ \theta \, = \,{\frac{{K_{\text{ads}} C_{\text{inh}} }}{{1 + K_{\text{ads}} C_{\text{inh}} }}} $$
(5)

where, K ads is the equilibrium constant for the adsorption/desorption process. This equation can be rearranged to

$$ {\frac{{C_{\text{inh}} }}{\theta }}\, = \,{\frac{1}{{K_{\text{ads}} }}}\, + \,C_{\text{inh}} $$
(6)

It is known fact that K ads represents the strength between adsorbate and adsorbent. Large values of K ads imply more efficient adsorption and hence better inhibition efficiency [41].

From the intercepts of the straight lines on the C/θ-axis (Fig. 6), K ads can be calculated which is related to free energy of adsorption, ΔG oads , as given by Eq. 7.

$$ \Updelta G_{\text{ads}}^{\text{o}} \, = \, - RT\,\ln (55.5K_{\text{ads}} ) $$
(7)
Fig. 6
figure 6

Langmuir’s adsorption isotherm plots for the adsorption of Mannich bases in 1 M HCl on the surface of mild steel at a 308 K, b 318 K, c 328 K and d 338 K

The negative values of ΔG oads ensure the spontaneity of the adsorption process and stability of the adsorbed layer on the mild steel surface [42, 43]. It is usually accepted that the value of ΔG oads around −20 kJ mol−1 or lower indicates the electrostatic interaction between charged metal surface and charged organic molecules in the bulk of the solution while those around −40 kJ mol−1 or higher involve charge sharing or charge transfer between the metal surface and organic molecules [44].

Assuming thermodynamic model, corrosion inhibition of mild steel in the presence of Mannich bases can be better explained, therefore, heat of adsorption and entropy of adsorption were calculated.

According to Van’t Hoff equation [45]:

$$ \ln K_{\text{ads}} \, = \,({{ - \Updelta H_{\text{ads}}^{\text{o}} } \mathord{\left/ {\vphantom {{ - \Updelta H_{\text{ads}}^{\text{o}} } {RT}}} \right. \kern-\nulldelimiterspace} {RT}})\, + \,{\text{constant}} $$
(8)

In order to calculate adsorption heat, ln K ads was plotted against 1/T, as shown in Fig. 7a. The straight lines were obtained with slope equal to \( ({{ - \Updelta H_{\text{ads}}^{\text{o}} } \mathord{\left/ {\vphantom {{ - \Updelta H_{\text{ads}}^{\text{o}} } R}} \right. \kern-\nulldelimiterspace} R}) \)and intercept equal to \( ({{\Updelta S_{\text{ads}}^{\text{o}} } \mathord{\left/ {\vphantom {{\Updelta S_{\text{ads}}^{\text{o}} } R}} \right. \kern-\nulldelimiterspace} R}\, + \,\ln \,1/55.5) \). The calculated values of heat of adsorption and entropy of adsorption are listed in Table 2. Under the experimental conditions, the adsorption heat could be approximately regarded as the standard adsorption heat (ΔH oads ).

Fig. 7
figure 7

Adsorption isotherm plot for a lnK versus 1/T and b ΔG oads versus T for adsorption of different Mannich bases on mild steel in 1 M HCl

Table 2 Thermodynamic parameters for the adsorption of inhibitors in 1 M HCl on the mild steel at different temperatures

The thermodynamic parameters ΔH oads and ΔS oads can also be calculated from the following equation:

$$ \Updelta G_{\text{ads}}^{\text{o}} \, = \Updelta H_{\text{ads}}^{\text{o}} \, - T\Updelta S_{\text{ads}}^{\text{o}} $$
(9)

A plot of ΔG oads versus T gives straight lines (Fig. 7b) with the slope equal to −ΔS oads , and the value of ΔH oads can be calculated from intercept. Values of ΔH oads and ΔS oads obtained by both methods follow the same trend.

The sign of enthalpy of adsorption is negative in the case of MOH, whereas positive in 5-NMOH and 5-BMOH. The values of entropy of adsorption are positive in all the cases. In fact, it is well known fact that adsorption is an exothermic phenomenon accompanied by a decrease in entropy [46]. In aqueous solution, the adsorption of organic molecule is generally accompanied with desorption of water molecules. The adsorption of an organic adsorbate at the metal/solution interface is considered a “substitutional adsorption” phenomenon [47]. Therefore, the positive values of ΔH oads and ΔS oads related to “substitutional adsorption” can be attributed to the increase in the solvent entropy and to a more positive water desorption enthalpy. Inspection of Table 2 revealed that decrease in enthalpy is the driving force for the adsorption of MOH, whereas increase in entropy is the driving force for the adsorption of 5-NMOH and 5-BMOH on the mild steel surface.

3.3 Electrochemical impedance spectroscopy

Electrochemical impedance measurements were carried out over the frequency range from 100 to 0.01 Hz at open circuit potential. The appropriate circuit for studies was shown in Fig. 8. Nyquist plots of mild steel having various concentrations of all the Mannich bases in 1.0 M HCl solutions are given in Fig. 9a–c. Inhibition efficiency can be calculated from Nyquist plot as follows:

$$ \mu_{{R_{\text{ct}} \% }} \,\, = \,\,{\frac{{R_{\text{ct}}^{\text{i}} - R_{\text{ct}}^{\text{o}} }}{{R_{\text{ct}}^{\text{i}} }}}\,\, \times \,\,100 $$
(10)

where, R ict and R oct are the charge transfer resistance of mild steel with and without inhibitor molecules, respectively. Inhibition efficiencies and other calculated impedance parameters are presented in Table 3.

Fig. 8
figure 8

Electrochemical equivalent circuit used to fit the impedance spectra

Fig. 9
figure 9

Nyquist plots of mild steel in 1 M HCl with different concentrations of a MOH, b 5-NMOH, and c 5-BMOH

Table 3 Impedance parameters and inhibition efficiency values for mild steel after 30 min immersion period in 1 M HCl in absence and presence of different concentrations of different inhibitors

The impedance response of mild steel in acid solution was significantly changed after the addition of all the Mannich bases, and the impedance of the inhibited system increased with inhibitor concentration. Furthermore, at 200 ppm concentration of Mannich bases gives rise to much larger semicircle diameter than other two lower concentrations of Mannich bases (Fig. 9a–c). In the presence of all the Mannich bases, in the completely studied concentration interval, the electrochemical impedance spectra in complex plane presentation (Nyquist diagram) are characterized by one depressed semicircle, with a high frequency capacitive loop and low frequency inductive loop. Deviation from perfect circular shape, often known as frequency dispersion, was attributed to surface roughness and inhomogeneities of the solid surface [48, 49]. The high frequency capacitive loop may be due to a charge transfer process. In the presence of lower concentration of MOH and 5-BMOH and all the concentration of 5-NMOH, the low frequency inductive loop can be attributed to bulk relaxation process of the adsorbed compound or to a dissolution process [50]. It might be also attributed to the re-dissolution of the passivated surface at low frequencies. The fact that this semicircle cannot be observed after the addition of higher concentration of MOH and 5-BMOH supports our view.

In order to get more accurate fit of these experimental data, constant phase element has used instead of capacitive element. The CPE impedance is given by [51]:

$$ Z_{\text{CPE}} \, = \,Y_{\text{o}}^{ - 1} \,(i\omega )^{ - n} $$
(11)

where Y o is the CPE constant, ω is the angular frequency (in rad s−1), i 2 = −1 is the imaginary number and n is a CPE exponent which can be used as a gauge of the heterogeneity or roughness of the surface [52]. Depending on the value of n, CPE can represent resistance (n = 0, Y o = R), capacitance (n = 1, Y o = C), inductance (n = −1, Y o = L) or Warburg impedance (n = 0.5, Y o = W).

The electrochemical parameters, including R s, R ct, Y o, and n, obtained from fitting the recorded EIS data using the equivalent circuit of Fig. 8, were listed in Table 3. Cdl values derived from CPE parameters according to Eq. 12 were also listed in Table 3.

$$ {\text{C}}_{\text{dl}} \, = \,(Y_{\text{o}} \cdot \,R_{\text{ct}}^{\,1 - n} )^{\,1/n} $$
(12)

Inspection of the results in Table 3 indicated that the R ct value increased with the concentration of Mannich bases. In addition, the value of the proportional factor Y o of CPE varies in a regular manner with inhibitor concentration. The change of R ct and Y o values can be related to the gradual replacement of water molecules and/or hydroxyl ions by Mannich bases molecules on the surface and consequently to a decrease in the number of active sites necessary for the corrosion reaction. The increase in R ct value is attributed to the formation of protective film on the metal/solution interface. Indeed, the increase of the values of n when compared with 1 M HCl and with Mannich bases concentration can be explained by some decrease of the surface heterogeneity, due to the adsorption of the inhibitor on the most active adsorption sites [53]. Moreover, the values of double-layer capacitance, Cdl, decreased with increasing Mannich base concentration. The decrease in Cdl is probably due to a decrease in local dielectric constant and/or an increase in the thickness of a protective layer at electrode surface, enhancing, therefore, the corrosion resistance of the studied steel. The thickness of the protective layer (d) is related to Cdl according to the following equation [54]:

$$ {\text{C}}_{\text{dl}} \, = \,{\frac{{\varepsilon \,\varepsilon_{\text{o}} }}{d}} $$
(13)

where, ε is the dielectric constant of the protective layer and εo is the permittivity of free space.

It is obvious from the results that the Mannich bases inhibit the corrosion of mild steel in 1 M HCl solution at all concentrations used in this study and the \( \mu_{{R_{\text{ct}} \% }} \) was seen to increase continuously with increasing additive concentration at 303 K (Table 3). The inhibition efficiencies, calculated from ac impedance results, show the same trend as those obtained from weight loss measurements.

3.4 Linear polarization resistance

Polarization resistance values were determined from the slope of the potential–current lines,

$$ R_{\text{p}} \, = \,A{\frac{{{\text{d}}E}}{{{\text{d}}i}}} $$
(14)

where, A is the surface area of the electrode, dE is change in potential and di is change in current. The R p values were used to calculate the inhibition efficiencies, (\( \mu_{{R_{\text{p}} }} \% \)) using the relationship:

$$ \mu_{{R_{\text{p}} }} \% \, = \,{\frac{{R_{\text{p}}^{\text{i}} - R_{\text{p}}^{\text{o}} }}{{R_{\text{p}}^{\text{i}} }}}\, \times \,100 $$
(15)

where, R ip , and R 0p are the polarization resistances in the presence and absence of inhibitor, respectively. The inhibition efficiencies and polarization resistance parameters are presented in Table 4.

Table 4 Potentiodynamic polarization parameters for mild steel without and with different concentrations of different inhibitors in 1 M HCl

3.5 Tafel polarization

The values of corrosion potential (E corr), corrosion current density (i corr), and anodic and cathodic Tafel slopes (βa and βc) can be evaluated from anodic and cathodic regions of Tafel plots. The linear Tafel segments of anodic and cathodic curves were extrapolated to corrosion potential to obtain corrosion current densities (i corr).

The inhibition efficiency was evaluated from the measured i corr values using the relationship:

$$ \mu_{\text{P}} \% = {\frac{{i_{\text{corr}}^{\text{o}} - i_{\text{corr}}^{\text{i}} }}{{i_{\text{corr}}^{\text{o}} }}} \times 100 $$
(16)

where, i 0corr and i icorr are values of corrosion current density in absence and in presence of inhibitor, respectively.

Figure 10a–c represents the potentiodynamic polarization curves of mild steel in 1 M HCl in the absence and presence of various concentrations of the MOH, 5-NMOH, and 5-BMOH. It can be seen from the Fig. 10a–c that, in the presence of inhibitor, the curves are shifted to lower current regions, showing the inhibition tendency of the Mannich bases. There was no definite trend observed in the E corr values in the presence of all the Mannich bases. In the present study, shift in E corr values is in the range of 20–25 mV suggesting that they all act as mixed type of inhibitor [55, 56]. The values of various electrochemical parameters derived by Tafel polarization of all the inhibitors are given in Table 4. Investigation of Table 4 revealed that the values of βa change slightly in the presence of all the Mannich bases, whereas more pronounced change occurs in the values of βc, indicating that both anodic and cathodic reactions are affected but the effect on the cathodic reactions is more prominent. Thus, all the Mannich bases acted as mixed type corrosion inhibitor, but predominantly cathodic inhibitor [57]. It is seen (Table 4) that the inhibition efficiency of all the compounds increases with the increase in the inhibitor concentration and the inhibition efficiency showed the following order: 5-NMOH < MOH < 5-BMOH. Increase in inhibition efficiencies with increasing concentration of all the three Mannich bases studied reveals that inhibition action are due to adsorption on steel surface and the adsorption is known to depend on the chemical structure of the inhibitors.

Fig. 10
figure 10

Tafel polarization behavior of mild steel in 1 M HCl with different concentrations of a MOH, b 5-NMOH and c 5-BMOH

The results indicate good agreement between the values of corrosion efficiency from the weight loss, polarization resistance, Tafel polarization, and impedance measurements. It is concluded that the corrosion rate depends on the chemical nature of the electrolyte rather than the applied technique [58]. The differences are sometime as high as >7–8% but the order of magnitude is the same for all the methods.

3.6 Surface characterization: AFM study

In order to establish whether inhibition is due to the formation of a film on the metal surface through adsorption, atomic force micrographs were taken. The three-dimensional AFM images are shown in Fig. 11a–e. As can be seen from Fig. 11c–e, there was much less damage on the surface of mild steel with all the Mannich bases. The average roughness of polished mild steel (Fig. 11a) and mild steel in 1.0 M HCl without inhibitor (Fig. 11b) was calculated to be 66 and 395 nm, respectively. The mild steel surface in the free acid solution is getting cracked due to the acid attack on the surface (Fig. 11b). However, in presence of 200 ppm concentration of all the Mannich bases, the average roughness was reduced to 220, 245, and 205 nm in the presence of MOH, 5-NMOH, and 5-BMOH, respectively (Fig. 11c–e).

Fig. 11
figure 11

Atomic force micrographs of mild steel surface of a polished mild steel, b mild steel in 1 M HCl, c inhibited mild steel (1 M HCl + 200 ppm MOH), d inhibited mild steel (1 M HCl + 200 ppm 5-NMOH), e inhibited mild steel (1 M HCl + 200 ppm 5-BMOH)

4 Mechanism of inhibition

From the results obtained from different electrochemical and weight loss measurements, it was concluded that all the three Mannich bases (MOH, 5-NMOH, and 5-BMOH) inhibit the corrosion of mild steel in 1 M HCl by adsorption at mild steel/solution interface (Fig. 12).

Fig. 12
figure 12

Three-dimensional representation of a MOH, b 5-NMOH and c 5-BMOH

It is general assumption that the adsorption of organic inhibitors at the metal surface interface is the first step in the mechanism of the inhibitor action. Organic molecules may be adsorbed on the metal surface in four types, namely

  1. (i)

    Electrostatic interaction between the charged molecules and the charged metal,

  2. (ii)

    Interaction of unshared electron pairs in the molecule with the metal,

  3. (iii)

    Interaction of π-electrons with the metal and

  4. (iv)

    a combination of types (i–iii) [5961]

In general, all the three Mannich bases, MOH, 5-NMOH, and 5-BMOH contain one iminic group (−C=N), two secondary amino group, one primary amino group, one thio group, aromatic ring, and residue of morpholine ring.

The inhibition of active dissolution of the metal is due to the adsorption of the inhibitor molecules on the metal surface forming a protective film. The inhibitor molecules can be adsorbed onto the metal surface through electron transfer from the adsorbed species to the vacant electron orbital of low energy in the metal to form a co-ordinate type link.

The inhibition efficiency depends on many factors [62, 63] including the number of adsorption centers, mode of interactions with metal surface, molecular size, and structure.

It is well known that iron has co-ordination affinity toward nitrogen, sulfur, and oxygen-bearing ligands [6467]. Hence, adsorption on iron can be attributed to co-ordination through iminic group, hetero atom (N and S), and π-electrons of aromatic ring.

If one considers the structures of investigated compounds (Scheme 1) several potential sources of inhibitor–metal interaction can be identified. In all the three Mannich bases, there are the unshared electron pairs on N and S, capable of forming a co-ordination σ-bond with iron [68]. Further, the double bonds in the molecule allow back donation of metal d-electrons to the π*-orbital and this type of interaction cannot occur with amines. Another striking feature for high inhibition performance of all the studied compounds is the presence of S-atom. The presence of S-atom in the inhibitor structures makes the formation of dπ–dπ bond resulting from overlap of 3d-electrons from iron atom to the 3d vacant orbital of S-atom possible, which enhances the adsorption of the compounds on the metal surface.

The better inhibition performance of 5-BMOH than MOH is due to the presence of Br atom in its structure, because of electron releasing effect, Br increases the electron density of aromatic ring and makes the π-electrons more available to interact with mild steel surface. Thus, 5-BMOH is more effectively adsorbed. The difference in inhibition efficiency of MOH and 5-NMOH can be explained by considering the presence of NO2 group. The nitro group withdraw the π-electron density of aromatic ring and the availability of π-electrons for interaction with iron is decreased. Thus, 5-NMOH is not adsorbed on the mild steel surface effectively as much as MOH. Another reason for low efficiency of 5-NMOH is that due to electron withdrawing effect of nitro group, partial negative charge is developed on nitro group and due to this, there is repulsion between negatively charged mild steel surface and inhibitor molecule. Thus, the inhibition efficiency of the studied compounds follows the order 5-NMOH < MOH < 5-BMOH. The results of weight loss, EIS, linear polarization, and Tafel polarization follow the same trend.

5 Conclusions

All the studied Mannich bases show excellent performance as corrosion inhibitors in HCl acid solution. They inhibit corrosion of mild steel in HCl solution by an adsorption mechanism. Various measurable quantities deduced for the corrosion system with and without the inhibitor reflect the microscopic surface state of the system. The principle conclusions are

  1. 1.

    The adsorption of all the three Mannich bases obeyed Langmuir adsorption isotherm.

  2. 2.

    All the three Mannich bases acted as mixed type inhibitor.

  3. 3.

    The increasing value of CPE exponent (n) with increasing inhibitor concentration indicated that surface roughness decreased with increasing inhibitor concentration.

  4. 4.

    The adsorption of 5MOH and 5-BMOH is favored at higher temperature while adsorption of 5-NMOH is not favored at higher temperature.

  5. 5.

    Decrease in enthalpy is the driving force for the adsorption of MOH while increase in entropy is the driving force for the adsorption of 5-NMOH and 5-BMOH.

  6. 6.

    The inhibition efficiency of tested inhibitors follows the order 5-NMOH < MOH < 5-BMOH.