Introduction

In recent years, organic coatings have been predominantly employed to protect steel alloys, including stainless steels. Stainless steels are widely utilized across various industries due to their exceptional corrosion resistance. One particular stainless-steel variant, known as 316L, exhibits remarkable corrosion resistance owing to the presence of chromium and molybdenum elements [1]. However, it is important to highlight that in highly corrosive environments, the application of 316L stainless steel without implementing preventive measures such as coatings or corrosion inhibitors may not be economically viable [2]. Chromium compounds, which can be utilized as both coatings and inhibitors, have been utilized to effectively reduce the corrosion rate of stainless steels. Nevertheless, it is crucial to acknowledge that these materials possess carcinogenic substances and contribute to environmental pollution. Chromium compounds have been explored as a promising coating material due to their ability to enhance corrosion resistance. For instance, [3] investigated the high-temperature steam oxidation behavior of steels with varying chromium content. Their findings demonstrated that a higher chromium content led to the formation of a superior protective chromia layer, significantly improving corrosion resistance. In a separate study, [4] examined the growth behavior of the chromium-zirconium interlayer in a chromium-coated zirconium alloy exposed to high-temperature steam. Their research revealed a transformation of the interlayer over time, transitioning from a simple parabolic growth to a complex duplex structure and ultimately fragmenting into intertwined zirconium oxide and metallic chromium due to increasing oxygen pressure. These studies highlight the potential of chromium compounds in creating protective coatings and their influence on the material's response to harsh environments.

Due to limitations associated with traditional methods like chemical inhibitors, the use of organic coatings is rapidly growing. Unlike inhibitors, polymeric coatings offer clear advantages. They are easier to apply to surfaces, pose minimal health risks due to their non-toxic nature, and have a reduced environmental footprint. For instance, [5] demonstrated the effectiveness of a two-layer composite coating for magnesium alloy. This coating, comprised of nanoflower-shaped zinc phosphate bonded to a micro-arc oxidation layer, exhibited exceptional superhydrophobicity and corrosion resistance even under harsh conditions like salt, acid, and sunlight exposure. This example highlights the remarkable potential of organic coatings as a superior alternative for protecting materials.

The concept of employing conductive polymers for corrosion protection was first proposed by MacDiarmid in 1985 [6]. Subsequent research has extensively explored the application of conductive polymers as protective coatings, demonstrating their exceptional corrosion resistance [7,8,9,10]. These conductive polymers can be synthesized through chemical or electrochemical methods [11, 12]. Experimental results have revealed that when polyaniline (PANI) is synthesized on steel, it effectively protects the substrate in corrosive environments, even in the presence of strong acids [13,14,15]. The protection mechanisms of conductive polymers have been attributed to various theories [16]. Firstly, conductive polymers generate an electric field on the metal surface, impeding the flow of electrons from the metal to the oxidizing agent. Secondly, conductive polymers create a dense and low-porosity film on the metal surface, acting as a barrier between the metal and the corrosive environment. Lastly, conductive polymers facilitate the formation of a protective layer of metal oxide on the metal surface. Another advantage of polymeric coatings is their ability to passivate pinholes, further enhancing corrosion protection. Additionally, studies have demonstrated that conductive polymers, when removed from a solution and subsequently re-immersed after drying, can regain their original mechanical and electrical properties without significant deterioration [17].

Conductive polymers can be synthesized using a variety of methods, including chemical polymerization, electrochemical polymerization, photochemical polymerization, plasma polymerization, and solid-state polymerization. Of these methods, electrochemical polymerization is the most widely used due to its simplicity and ability to control the thickness of the polymer film. Among these methods, the electrochemical approach has gained significant attention due to its simplicity and the ability to control the thickness of the polymer film [18]. Furthermore, in the electrochemical polymerization process, dopant ions in the form of cations and anions can be added. Aniline, for instance, undergoes polymerization along with the insertion of anions (dopants) derived from the acid, as depicted by Eq. (1) [19].

$$({{PANI}})_n + nyA^- \to [{{PANI}}^{y + } (A^- )_n + nye^- ]$$
(1)

The doping degree (y) represents the ratio between the number of charges in the polymer and the number of monomer units. Various factors influence the electrochemical polymerization of aniline using cyclic voltammetry, including the substrate material, scan rate, potential window, number of cycles, dopant anions, electrolyte composition, pH, and others. The corrosion of stainless steel in acidic environments can lead to significant economic losses, safety hazards, and environmental concerns. By investigating the effectiveness of polyaniline coatings, this study aims to provide a potential solution to mitigate corrosion and extend the lifespan of stainless steel components. The objective of the present study is to investigate the corrosion behavior of polyaniline (PANI) coatings on 316L stainless steel, synthesized using cyclic voltammetry. Specifically, we aim to explore the influence of scan rate and potential window during the cyclic voltammetry process on the properties of the PANI coating.

Experimental methods and samples

The substrate utilized in this study was 316L stainless steel, with an area of 0.78 cm2. The chemical composition of the stainless-steel substrate is provided in Table 1. Prior to the experiments, the specimens were meticulously polished using up to 2400-grit SiC (silicon carbide) abrasive paper, followed by 1 µm diamond paste, to achieve a smooth surface. Subsequently, the specimens were thoroughly degreased using acetone to remove any residual contaminants. Aniline and sulfuric acid, both of which were obtained from Merck (Darmstadt, Germany), were employed in the experimental procedures. Aniline, prior to its use, underwent a distillation process and was stored in a dark and cool environment to preserve its quality. It is essential to perform the distillation operation to eliminate impurities such as hydroquinone and other phenolic compounds, which could interfere with or even halt the polymerization process. To ensure complete extraction of aniline, the distillation process was performed twice, further guaranteeing the purity of the reagent.

Table 1 Chemical composition of the 316L stainless steel

The deposition of PANI coatings was accomplished using a solution comprising 0.1 M H2SO4 with 0.1 M aniline through the cyclic voltammetry technique involving 10 cycles. The potential cycling ranged from − 0.1 V to 1.4 /AgCl for sample 1. The specific potential windows employed during the cyclic voltammetry process were as follows: − 0.2 V–1.4 V for the first cycle, 0.1 V–1 V for the second cycle, and 0.1 V–0.9 V for subsequent cycles in the case of sample 2. Notably, within these potential ranges, only the formation of a passive layer occurs without the polymerization of the monomer. For the deposition process, a three-electrode cell configuration was utilized. The working electrode consisted of stainless steel 316L, the reference electrode was Ag/AgCl, and Pt served as the counter electrode (as illustrated in Fig. 1). Electrochemical investigations were performed using an Autolab PGSTAT 302N system (Metrohm, Utrecht, Netherlands).

Figure 1
figure 1

Schematic set up of electrochemical cell.

To investigate the impact of scan rate during the polymerization process on the corrosion behavior, two different scan rates were employed: 10 mV/s (low scan rate) and 50 mV/s (high scan rate). The sample preparation conditions are summarized in Table 2.

Table 2 Sample preparation conditions

To ensure successful polymerization of aniline and to characterize the resulting thin film, Fourier-transform infrared (FTIR) spectroscopy was performed using a Vectory22 instrument (Bruker Optics, Karlsruhe, Germany) in the wavenumber range of 500–2000 cm−1. Electrochemical impedance spectroscopy (EIS) was employed to assess the corrosion behavior of both coated and bare steel specimens immersed in 1 M H2SO4 for varying durations. The Nyquist plots were recorded within a frequency range of 100 kHz–1 mHz, with an amplitude of 10 mV. The impedance data were analyzed using ZSimpWin 3.30 software. To gain a comprehensive understanding of the effectiveness and durability of the polyaniline (PANI) coatings, further analysis was conducted on the bare and coated steel samples after 72 hrs. of immersion. Scanning electron microscopy (SEM) was employed using a STOE STADI-MP instrument from Germany to examine the morphology of the samples. This technique allowed for a detailed examination of the surface characteristics and the presence of any corrosion-related features. By comparing the electron micrographs of the bare steel samples with those of the coated ones, it was possible to visually assess the protective properties of the PANI coatings and identify any signs of corrosion or degradation.

Furthermore, the thermal stability of the PANI coatings was evaluated using thermogravimetric analysis (TG). This technique measures the weight changes of the coatings as they are subjected to increasing temperatures. By analyzing the TG data, it was possible to determine the temperature at which the coatings start to degrade or lose their protective properties. This information is crucial in understanding the long-term stability and performance of the PANI coatings in real-life scenarios, where they may be exposed to elevated temperatures.

Results and discussion

Figure 2a illustrates the cyclic voltammograms obtained during the electrodeposition of PANI coatings (S1) onto the 316L stainless steel substrate using a low scan rate in 10 cycles. The voltammogram displays three distinct peaks observed at approximately 0.2 V, 0.6 V, and 1.1 V. According to [20], peak A corresponds to the partially oxidized emeraldine state of PANI, indicating the formation of radical cations. Peak B represents the fully oxidized form of PANI, known as pernigraniline, while peak C corresponds to the degradation of the radicals into benzoquinone during the polymerization process. The electro-polymerization of aniline generally involves four steps [21]:

  1. 1-

    Protonation of the aniline monomer in an acidic environment, leads to the formation of free radicals.

  2. 2-

    Formation of dimers.

  3. 3-

    Formation of oligomers and the PANI film.

  4. 4-

    Growth of the polyaniline film.

Figure 2
figure 2

Cyclic voltammetry for PANI coating in 0.1M aniline and 0.1M H2SO4.

Upon repeating the potential scans, the observed increase in the oxidation and reduction peak heights indicates successful deposition of polyaniline onto the stainless-steel substrate and an increase in the film thickness. To investigate the influence of the potential window on the polymerization process, another coating with a different potential window was deposited on the steel surface. Figure 2b presents the cyclic voltammograms during the electro-polymerization of the monomer for the first and second cycles. The peak observed at 1.1 V is attributed to the oxidation of the steel substrate and the formation of a passive layer. The current density decreases in subsequent cycles due to the formation of a more pronounced passive layer. Figure 2c demonstrates the cyclic voltammograms for the subsequent cycles of PANI coating (S2).

To estimate the thickness of the film formed on the surface, the following empirical formula was utilized [22]:

$$d = \frac{Q_a M_w }{{zFA\rho }}$$
(2)

where Qa represents the amount of charge transferred from the leucoemeraldine to the emeraldine state, Mw is the molecular weight of aniline, z is the number of electrons/aniline unit (0.5), A is the electrode area, ρ is the specific density of aniline, and F is Faraday's constant. It is important to note that this formula does not account for factors such as porosity and counter-ion volume, therefore providing only an estimated thickness [23]. According to this formula, the estimated thicknesses of S1 and S2 were 7.7 µm and 8 µm, respectively. It can be observed that the thickness of the coating does not vary significantly between the two samples, with the main difference lying in the degree of adhesion and uniformity.

Figure 2d presents the cyclic voltammograms obtained during the electrodeposition of PANI coating at a high scan rate of 50 mV/s. The maximum current density is observed in the first sweep, while the current density of subsequent cycles is lower than that of the initial sweep. This behavior indicates a restricted growth of the polyaniline film on the electrode surface. The higher scan rate limits the opportunity for polymer chains to effectively join, resulting in a less developed and less uniform film formation. Conversely, when the scan rate is lower, the film formed on the surface tends to exhibit improved homogeneity and uniformity.

In Fig. 3, the FTIR spectra of the PANI thin film are depicted. The peak observed at approximately 1562 cm−1 and 1469 cm−1 corresponds to the C–C bonds present in the benzenoid and quinoid rings of PANI. Additionally, characteristic vibrations of the C–N bonds are observed at 1300 cm−1, 1243 cm−1, 1180 cm−1, 1051 cm−1, and 1010 cm−1. The peaks at 855 cm−1, 850 cm−1, and 580 cm−1 represent the vibrations of the C–H bonds. The FTIR analysis results align well with the findings reported in [24, 25] where similar peaks were observed.

Figure 3
figure 3

FTIR spectra of PANI.

To assess the corrosion behavior, the specimens were immersed in a 1M H2SO4 solution for various durations (1, 24, 48, and 72 h), and electrochemical impedance spectroscopy (EIS) measurements were conducted. The EIS data obtained for both uncoated and coated steels was fitted using the equivalent circuit shown in Fig. 4. ZSimpWin 3.30 software was employed for this purpose. In the equivalent circuit, Rs represents the solution resistance between the reference and working electrodes, CPE1 represents the constant phase element of the coating, Rf denotes the surface film resistance, Rct represents the charge transfer resistance, and CPE2 corresponds to the constant phase element of the double layer. The constant phase element (CPE) was utilized in the impedance representation, defined by Eq. (3):

$$Z\left( Q \right) = Y_0 ^{ - 1} \left( {j\omega } \right)^{ - n}$$
(3)
Figure 4
figure 4

Electrical circuit used to simulate the EIS results.

Here, Y0 denotes the CPE constant, ω represents the angular frequency (in rad/s), j2 =  − 1 is the imaginary number, and n represents the CPE exponent [26]. For the bare steel sample, the equivalent circuit reflects the electrochemical system in which a metal with a porous coating is subjected to ongoing corrosion. It is expected that the behavior of the system will be influenced by the immersion time and the occurrence of pitting corrosion on the surface of the steel.

The Nyquist plots of uncoated stainless-steel specimens immersed in a 1M H2SO4 solution are presented in Fig. 5a. After 24 hrs of immersion, there was an increase in the charge transfer resistance (Rct), indicating a decrease in the corrosion rate. This behavior can be attributed to the formation of a passive layer on the substrate, which acts as a protective barrier against corrosion. However, with prolonged exposure, the passive layer may eventually break down, allowing corrosive agents to penetrate through and leading to severe corrosion of the steel surface. Figure 5b displays the Nyquist plots of the PANI-coated specimens (S1). Over time, as corrosive agents penetrate the coating, the corrosion reaction initiates at the metal/polymer interface. This interface becomes critical in determining the overall corrosion resistance of the coating.

Figure 5
figure 5

Nyquist plots of the impedance spectra for samples a bare, b S1, c S2 and d S3.

Over time, the penetration of corrosive agents into the holes or defects in the PANI coating establishes a galvanic coupling between the metal substrate and the polymer. This phenomenon, known as the ennoblement of defects by polyaniline, is illustrated in Fig. 6 [27]. The deliberate removal of a portion of the coating creates a defect, leading to the initiation of corrosion reactions shortly after the ingress of electrolyte into the hole. As a result, cathodic potential shift occurs, causing metal dissolution, while the reduction of the polymer takes place. Consequently, the positive charge accumulated in the polymer is transferred to the defect, thereby maintaining it within the passive region.

Figure 6
figure 6

Idea of the defect protection by the conductive polymers.

Figure 7 presents the standard polarization curve of stainless steel, illustrating two distinct regions: the active region and the passive region, which are separated by a critical passivating current density (icrit). It is crucial to maintain the potential within the passive region to prevent corrosion. Achieving this can be accomplished by applying an anodic current greater than icrit, which effectively shifts the potential of the stainless steel to the passive region. The reduction of polyaniline can serve as a source of current for this purpose.

Figure 7
figure 7

Standard polarization curve of stainless steel.

After 72 hrs. of immersion, the charge transfer resistance observed in the Nyquist curve decreases due to the penetration of the corrosive solution into the substrate. As the immersion time increases, a greater amount of the solution infiltrates the coating, creating pathways for corrosive agents. In Fig. 5c, the Nyquist plots of PANI coating (S2) are shown. Coatings synthesized under these conditions and deposited on the steel surface are expected to exhibit high corrosion resistance due to the formation of a uniform and low-porosity coating. A less porous coating restricts access of water and other corrosive agents to the steel surface, while polyaniline can effectively passivate defects. Analysis of the Nyquist curves and simulation-derived parameters presented in Table 3 indicate that the coating synthesized within a narrower potential window exhibits higher corrosion resistance. Figure 5d demonstrates the Nyquist plots of the PANI coating synthesized at a high scan rate (S3). As previously explained, a lower scanning speed allows for the joining of polyaniline chains, resulting in a more regular and structured arrangement of the chains.

Table 3 Impedance parameters of bare and coated steels in 1M H2SO4

The corrosion parameters determined from the Nyquist plots are listed in Table 3, including the roughness coefficient (n), protection efficiency (η), and charge transfer resistance (Rct). In an ideal case, n would equal 1, and the Nyquist plots would appear as perfect semicircles. However, in practice, n is typically less than 1. A decrease in the roughness coefficient indicates an increase in the corrosion rate [28]. The efficiency of protection (η) was calculated using the following equation:

$$\eta = \frac{{R_{{{ct}}}^{\prime} - R_{{{ct}}} }}{{R_{{{ct}}}^{\prime} }} \times 100$$
(4)

where \(R_{{{ct}}}^{\prime}\) and \(R_{{{ct}}}\) is the charge transfer resistance of coated and bare steel, respectively.

To calculate the corrosion rate (Mpy) at the first corrosion current obtained from Stern-Geary formula [29]:

$$i_{{{corr}}} = \frac{0.025}{{R_{{{ct}}} }}$$
(5)

Then following formula was used to calculate the corrosion rate in Cm/s:

$${{CR}} = \tfrac{iM}{{ZFD}}$$
(6)

where i is current density (amps/cm2), M is atomic weight (g/mol), Z is number of transferred electrons, F is Faraday constant and D is density (g/cm2). Following equation was employed for convert to Mpy:

$$1.242 \times 10^{10} \times {{CR}} = {{Mpy}}$$
(7)

According to the standard classification corrosion rate that are given in Table 4, corrosion rates of the samples were compared.

Table 4 Standard classification corrosion rate [30] and The Mpy of the samples in 1M H2SO4

Figure 8 depicts scanning electron micrographs of bare steel and PANI coating samples after 72 h of immersion in a 1M H2SO4 solution. In Fig. 8a, the surface of the bare steel exhibits substantial damage caused by the aggressive attack of corrosive agents. The absence of a protective polyaniline coating allows for easy penetration of the corrosive agents, resulting in corrosion of the steel surface. Figure 8b displays the SEM image of PANI coating (S1) after 72 hrs. of immersion. The image reveals the presence of significant cracks and a non-compact structure within the coating. As previously explained, the infiltration of the electrolyte into these coating defects leads to the formation of a galvanic couple between the PANI and the steel substrate. Consequently, the damaged regions of the substrate where the coating is compromised undergo passivation, providing some level of protection.

Figure 8
figure 8

Scanning electron micrograph of a1, a2 bare, b1, b2 S1 and c1, c2 S2.

Figure 8c presents the SEM image of PANI coating (S2) after 72 hrs. of immersion. This figure serves to validate the influence of the potential window used during the polymerization process on the coating's uniformity. Notably, this coating exhibits a more tightly packed and interlocked structure of PANI chains. It is essential to consider the presence of an interlocking and uniform structure within the coating, as it plays a crucial role in ensuring its optimal protective performance. It is important to note that while the observations in the SEM images provide valuable insights, additional quantitative data and analysis would further enhance the understanding of the coating's performance and its ability to withstand corrosion under prolonged immersion.

The thermal stability of PANI was evaluated using thermogravimetric analysis (TGA), and the results are presented in Fig. 9. The TGA curve specifies that PANI experiences thermal degradation at a temperature of approximately 325 °C. As reported in the literature [31], the TGA analysis reveals a three-stage decomposition pattern for PANI. The first stage of weight loss observed in the TGA curve corresponds to the dehydration process, during which PANI undergoes the removal of moisture content. This initial weight loss is attributed to the elimination of water molecules associated with the polymer. The second stage involves the loss of the dopant from PANI. Dopants are typically added during the polymerization process to enhance the electrical conductivity and stability of PANI. The release of these dopant molecules contributes to a further decrease in weight. The final stage of decomposition in the TGA curve corresponds to the breakdown of the polymer chain itself. At this stage, the PANI polymer undergoes thermal degradation, resulting in the fragmentation and decomposition of the polymer structure. By conducting TGA analysis, the thermal stability of PANI can be assessed, providing insights into its performance and suitability for various applications. The observed decomposition pattern in the TGA curve highlights the dehydration process, dopant loss, and polymer chain degradation as significant factors contributing to the thermal behavior of PANI.

Figure 9
figure 9

Themogravimetric analysis curve of PANI.

The findings of this study provide valuable insights into the development of effective strategies to protect stainless steel from corrosion in acidic environments. By utilizing electrochemical deposition of polyaniline coatings, it is possible to enhance the corrosion resistance of 316L stainless steel, thereby extending its lifespan and reducing maintenance costs. This research has practical implications in various industries, such as chemical processing, oil and gas, and marine applications, where stainless steel is commonly exposed to acidic environments. Implementing the findings of this study can lead to improved durability and reliability of stainless steel components, ensuring their optimal performance and safety in real-life scenarios.

Conclusion

In conclusion, this study investigated the electrochemical deposition of polyaniline (PANI) coatings on 316L stainless steel to enhance its corrosion resistance in acidic environments. The successful polymerization of PANI onto the stainless-steel substrate was confirmed through cyclic voltammetry with 0.1 M aniline in 0.1 M H2SO4 solution, with an increase in film thickness observed with repeated potential scans. Fourier transform infrared spectroscopy (FTIR) analysis revealed characteristic bonds present in PANI, further confirming the successful deposition.

The corrosion behavior of the coated stainless steel was assessed using electrochemical impedance spectroscopy (EIS) in 1M H2SO4. The Nyquist plots obtained from the EIS showed that the corrosion resistance of the PANI coating improved significantly with a decrease in scan rate and by limiting the upper potential, especially during longer exposure times. The Nyquist plots of S2 exhibited a 1.18 times larger diameter than S1 and a 2.7 times larger diameter than S3 after 72 h of immersion. This indicates superior corrosion resistance of the coating synthesized within a narrower potential window and at a lower scan rate. The high scan rate in S3 hinders effective polymer chain joining, resulting in less developed and uniform film formation. In contrast, the lower scan rate in S2 allows sufficient time for polymer chains to join and form a uniform coating. Additionally, comparing S1 and S2, revealed that the first cyclic voltammetry of S2 occurred within a wider potential window. This wider range promoted the formation of a uniform passive layer on the steel, enhancing corrosion resistance compared to S1.

Scanning electron microscopy (SEM) images confirmed the presence of corrosion damage on the bare steel surfaces, while the PANI coating exhibited cracks and a non-compact structure. However, the presence of an interlocked and uniform structure within the PANI coating was observed when the potential window during the polymerization process was optimized.

Overall, these findings demonstrated that controlling the deposition parameters and optimizing the electrochemical conditions can lead to significant improvements in the corrosion resistance of stainless steel, and ultimately, providing valuable information for researchers and engineers in developing better strategies for enhancing the durability and performance of stainless steel in acidic environments.