Introduction

Surface engineering technologies have found numerous applications in diverse fields. Adequate knowledge of the types and features of coating technologies is essential for selecting the most appropriate coating technique. Electroplating, also known as electrodeposition or electrocrystallization, is a widely used method for producing metallic coatings or nanostructured alloys through the electrochemical deposition of a metal layer onto the cathode. This process involves the reduction of metal ions onto the cathode by an electric field that is applied due to the passage of an electric current from an external source when a metal salt is ionized in its electrolyte [1].

The electroplating technique offers several advantages, including its economy, high productivity, limited energy requirements, and the possibility of automation and control. It can coat a wide range of single- or multi-component coatings, including complex surfaces, and allows for control of thickness, roughness, hardness, and other mechanical and functional properties. It is a flexible method that does not require subsequent finishing operations [2,3,4]. Coating surfaces are essential for reducing corrosion, which is a significant challenge in various environments, including natural (air, sea, and earth), industrial, or biological environments. Corrosion problems are estimated to cost 3.4% of the global GDP and a total global cost of nearly 2.5 trillion USD annually. Zinc is known for its leading role in protecting steel from corrosion for a period of 25–75 years and is the fourth most used metal after iron, aluminum, and copper. There is an estimated 198,000 billion tons of extractable zinc in the Earth’s crust before 2050. However, the zinc market has shifted to a more balanced state since 2023 after a gradual recovery from the Covid-19 pandemic. Zinc prices are expected to decline from 2023 onward [5,6,7,8].

Studies have shown that the process of coating zinc and its alloys with elements of the third group (VIIIB) in the periodic table, such as Zn–Cr, Zn–Co, Zn–Fe, and Zn–Ni, provide economical methods for enhancing the corrosion resistance of performance steels and cast irons. The Zn–Ni coating, in particular, has good mechanical properties and outstanding corrosion resistance, several times superior to pure zinc layers, and the rest of the zinc alloy layers, making it an exceptional and remarkable coating. The Zn–Ni coating provides corrosion protection for steels used in various fields such as automotive, aerospace, marine, construction, oil and gas, and more. Moreover, the Zn–Ni coating is environmentally safe and has no harmful effects on human health, making it a suitable alternative to cadmium coatings and its toxic and carcinogenic compounds, which are prohibited according to European REACH legislation and similar regulations in other countries [3, 9,10,11,12].

The properties of the coating depend on various process parameters, such as the cathode current density, process time, temperature of the electrolyte solution, chemical composition of the solution, concentrations of its components, and physical and chemical properties of the substrate surface. Electroplating processes have advanced significantly in recent decades, driven by industrial needs, economic requirements, and the need to reduce the risk of product damage. Further understanding of the deposition process behavior, the search for high-performance coatings, and the influence of coating process parameters on coating properties and surface geometry have also driven development. Electroplating for alloys is a complex process, and its various parameters impact the rate of nucleation and growth of deposits. Many studies have been conducted on Zn–Ni coatings, which are an abnormal co-deposition process according to Brenner’s classification. The most active metal (Zn) is deposited in higher proportions than the more noble metal (Ni), and this type of deposition is rare and occurs only in specific conditions, especially if the electrolyte solution contains one or more of the ferrous metals’ groups (Fe–Ni–Co) [13,14,15].

Electroplating is characterized by the ability to coat polymeric materials (after carrying out pre-surface preparations) with a metallic layer for protection, electric current transmission, or decoration purposes. Recently, ionic liquids (ILs) have generated considerable controversy as an alternative to aqueous electrolytic solutions because electrolytic deposition in aqueous media is a problematic process such as irregular deposition as well as hydrogen evolution reaction. Electroplating is a suitable process for the preparation of metal nanoparticles compared to wet chemical methods; electrochemical sensors of nanomaterials are among the most recent applications in this field. Electroplating technology also faces a set of challenges, as the process is characterized by a large loss due to excessive use of materials, and it also suffers from difficulty in controlling the process variables. In addition to direct exposure of workers to some dangerous chemicals, in the surface engineering literature, the Zn–Ni layer is distinguished by its economy compared to other coating layers, and the electroplating technique is also distinguished by its economy compared to other coating techniques. This research exploits the economics of both technology and layer by combining higher properties and lower thickness [16,17,18,19].

Cathodic electrodeposition is the main and most economical technique for producing Zn–Ni coatings that exhibit ductility, metal joining, weldability, heat resistance, UV resistance, and fatigue resistance. However, increasing the thickness of the coatings leads to a decrease in both ductility and weldability, as well as a decrease in economic feasibility. Additionally, obtaining polished surfaces becomes difficult with increasing coating thickness [20,21,22,23].

This study aims to enhance the pioneering and economical role of the electroplating technique and the Zn–Ni coating by determining the optimal parameters for achieving coatings that combine low thickness and roughness and high microhardness and corrosion resistance, using the response surface methodology (RSM) in the design of experiments (DOE) with the Box–Behnken design (with an array consisting of 15 runs). The influential parameters were determined after screening the eight parameters affecting the coating properties (T, P, I, nickel chloride N, substrate hardness H, substrate roughness R, distance between cathode and anode X, and magnetic stirrer speed V), and the optimal levels for each parameter were determined to obtain the lowest thickness, lowest roughness, and highest microhardness of the exceptional coating in corrosion resistance. These influential parameters were screened using the Plackett–Burman design in DOE (with a primary test array consisting of 12 runs). Analysis of variance (ANOVA) was also used to determine the contribution of the parameters to the responses. The corrosion resistance was studied using Tafel curves in the potentiodynamic polarization test, and the morphological structure of the coatings was studied using XRD, SEM, and EDX techniques.

Materials and methods

The present study utilizes the methodology of design of experiments (DOE) to plan, execute, and analyze experiments systematically. DOE is a statistical methodology that aims to optimize a process or product by identifying the parameters that have the greatest impact on the response variable of interest and determining the optimal settings for those parameters that will result in the desired outcome. DOE involves the manipulation of one or more independent variables (factors or parameters) to observe the effect on a dependent variable (response), and the design of the experiment is critical to ensure that the results are valid and reliable. DOE can help to improve quality, reduce costs, and increase efficiency by identifying the most important parameters and the optimal settings for those levels.

There are three types of DOE, including robustness, screening, and optimization. Robustness (e.g., Taguchi design) tests a subset of the possible combinations of the parameters being studied, with an emphasis on robustness to noise factors. Screening (e.g., Plackett–Burman design) is used to identify the most important parameters that affect a process or product, and it allows researchers to quickly and efficiently identify the most significant parameters that affect the response variable of interest. Plackett–Burman design is a two-level factorial design that uses a limited number of experimental runs to estimate the main effects of each parameter, and it is particularly useful when the number of parameters is large and the resources available for experimentation are limited. The third type of DOE is optimization (e.g., response surface methodology, RSM), which involves testing a subset of the possible combinations of the factors being studied, with an emphasis on modeling the response surface. RSM, including Box–Behnken design, is a statistical methodology used to model and optimize a process or product by fitting a mathematical model to the experimental data to predict the response surface.

The present study employs the Plackett–Burman screening design (12 runs) and the Box–Behnken optimization design (15 runs) to determine the influential parameters and their optimal levels for achieving the lowest thickness, lowest roughness, and highest microhardness of the Zn–Ni coating with exceptional corrosion resistance. The GLM statistical framework is used to model the relationship between the response variable and the independent variables. The number of specimens in this study was determined based on the number of parameters studied and their levels using the statistical software Minitab (version 19, Minitab Inc., State College, PA, USA) [24,25,26,27].

Materials and electroplating method

In this work, medium carbon steel AISI 1045 (10 × 50 × 0.5 mm) was coated with a binary layer alloy (Zn–Ni). The specimens were cut using the water jet cutting technique to avoid the formation of thermally affected zones and thus prevent local variations in the structure and surface microhardness of the steel sheet (water pressure of 3000 bar, oil pump power of 55 HP, distilled water mixed with silicon sand particles was used, and the diameter of the nozzle head was 0.5 mm). Polisher (Eurotech) used to prepare the specimens surfaces for coating, with the following series of sand papers (SiC): P120-P240-P360-P400-P500-P600-P800-P2000. The specimens were prepared for coating by soaking them in thinner for two hours to remove fats and oils initially, then removing the remaining grease and oils with an alkaline solution:(25 g/l NaOH + 25 g/l Na2CO3 + 50 g/l Na3PO4). Then, they were washed with distilled water, and the fine rust spots were removed and the surface was activated with hydrochloric acid (S.G 1.18). Then, the specimen was transferred directly to the bath and the coating process was started according to the conditions specified in the experiments array. The electrolyte solution (bath) consists of: 40 g/l ZnCl2·6H2O, (20–50 g/l) NiCl2·6H2O, 150 g/l NH4Cl (is used to improve the conductivity of the electrolyte solution), and 20 g/l H3BO3 (Buffer, PH 4). The equipment also includes a pH meter (HANNA PH 211), power supply, and an electrical control panel (for deposition current density, plating time, and bath temperature) and a magnetic stirrer (VELP Scientifica—up to 1500 rpm) to stir the electrolyte solution. Table 1 shows the coating conditions in the screening array for the Plackett–Burman design, while Table 2 shows the coating conditions in the final array for the Box–Behnken design [28, 29].

Table 1 Experiments conditions of Plackett–Burman design
Table 2 Experiments conditions of Box–Behnken design

Coating tests

Various laboratory techniques were employed to analyze the properties of the coatings and substrate. The Rockwell hardness tester HRC from Eurotech was used to test the substrate's hardness, while the coating's microhardness was measured using Vickers's microhardness tester HV from GALILEO. The coating thickness was determined using the Mini Test 2100-Elektro Physik coating thickness tester, while the surface roughness was analyzed using the TR200 from Elektro Physik surface roughness tester. Additionally, the potentiodynamic polarization test (VoltaLab-PST050) was conducted to study the polarization curves and determine the corrosion current density iCorr and corrosion rate CR. The test was carried out on a 1cm2 surface with a 5 mV/s scan rate of a specimen representing the working electrode, with the auxiliary electrode being Ag/AgCl and the reference electrode being Pt. The surface morphology of the coatings was analyzed using the TESCAN-VEGA scanning electron microscope, while the chemical element ratios in the coating (specifically the content of nickel) were determined using energy-dispersive X-ray (EDX). Finally, X-ray diffraction was employed to identify the phases in the coating.

Results and discussion

Experiments array in Plackett–Burman design

The present study aims to investigate the effect of eight parameters, each with three levels, on a specific response variable, which requires a total of 6561 experiments. However, conducting such a large number of experiments is impractical due to resource limitations. Therefore, preliminary experiments were conducted to identify the most influential parameters and exclude the less important ones. This approach reduces the number of experiments required, saving time, effort, and costs. However, it is crucial to follow scientific principles and statistical significance when selecting the parameters to exclude.

In this study, Plackett–Burman designs were used as a directed experimental design method to screen the parameters. The experimental array was constructed in the Minitab-17 statistical software, and the results of measuring the coating thickness and microhardness according to the design conditions are presented in Table 3. The results of the analysis of variance (ANOVA), presented in Table 4, demonstrate that parameters T, P, and I have the most significant influence on the thickness and microhardness values of the coating. These parameters can be easily controlled, and their statistical significance is confirmed by the ANOVA results (P value < α, Rsq = 89.03%).

Table 3 Experiments array in Plackett–Burman design
Table 4 Analysis of variance for (A proportion) response of Plackett–Burman design (Rsq = 89.03%)

Figure 1 illustrates the effect of all parameters on the response variable, and the main goal of the study is to achieve low thickness coatings while maintaining low surface roughness, corrosion rate, and high microhardness values. Therefore, parameters T, P, and I were selected as the main parameters for subsequent experiments to study the response surface using the Box–Behnken design. The values of the other parameters were fixed at the highest proportion A, as shown in Fig. 1, in constructing the Box–Behnken experimental array, which is presented in Table 2.

Figure 1
figure 1

Main effects screener for (A) proportion in Plackett–Burman design

Based on the goal of this study, which is aimed at determining the parameter levels to obtain the least thickness without conflicting with the coating’s performance and properties, and based on the fact that less rough coatings are more suitable than rough coatings, especially in highly aggressive environments, because increasing roughness means increasing the contact surface area and interaction with the surrounding medium, which in turn increases the chances of corrosion acceleration [22].

In addition, increasing the coating’s microhardness is an important indicator of increasing its nickel content, which has a prominent role in protecting the coating by the barrier and in participation with the zinc protection by sacrifice. Therefore, this work proposed a calculated proportion A that can be considered a simple indicator to improvement the coating properties, according to the mentioned above, and its value is directly proportional to microhardness and inversely to the coating thickness. That is, the sources of increasing the proportion of A are either increasing its microhardness or decreasing its thickness, and any other contributes to enhancing coating properties. Table 3 shows the Ai proportion, i = 1 to 12 is number of runs that is the number of rows in the Plackett–Burman array; A is a proportion without a unit.

Experiments array (15 Runs) of Box–Behnken design

Results of changing the responses (4 responses) with change the parameters (3 parameters) are shown in Table 5.

Table 5 Experiments array (15 runs)—Box–Behnken design and the responses results (4 responses)

Analysis of variance (ANOVA) results in Table 6 indicate that the parameters (T, P, and I) have statistical significance (P value < α = 0.05), and that the coating process time has the greatest impact on the coating thickness, which is an expected result. On the other hand, the coating process time has statistical significance and also has the greatest impact on the surface roughness of the coating. This result can be used to confirm the directed relationship between the roughness and coating thickness, which are both affected significantly by the coating time. This result is consistent with the previous studies results [30].

Table 6 Analysis of variance (ANOVA) and the contribution ratio of parameters (T, P, and I for P value < α = 0.05) in changing the responses

The predicted thickness equation using the multiple regression analysis was:

$${\text{Thickness}}_{{{\text{Predicted}}}} = {2}.{71 } + \, 0.{671}T + \, 0.{19}P - { 5}.{34}I{-} \, 0.0{1338}T^{{2}} + \, 0.{687}I^{{2}} + 0.0{1}0{75}T.P + \, 0.0{7}T.I \left( {{\text{Rsq }} = { 99}.{44}\% } \right).$$

It should be noted that the electroplating process is a complex electrochemical deposition process that it affects a large number of parameters, so the Plackett–Burman method was used to determine the most influential basic parameters (according to the degree of statistical significance) and then move on to the next step, which is the Box–Behnken design to study the behavior of the responses (layer corrosion resistance, its microhardness, roughness, and thickness) under the influence of the basic parameters (T, P, I) which were challenged according to the Plackett–Burman array. Taking into account the importance of obtaining the best performance (highest response) at the lowest possible thickness, therefore, the equation of the regression line for the expected thickness was found in terms of the basic parameters to know the values of the parameters suitable for a specific expected thickness.

Minitab uses a stepwise multiple regression procedure to fit the data model. In the first step, the procedure always chooses the element most associated with the dependent variable Y. In the following steps, the procedure tries to add or remove any elements to the model to get the optimal values. The model can include linear or quadratic elements for all X variables, as well as the interactions between all X predictor variables.

The units are for thickness [μm], T [CO], P [min], and I [A/cm2].

Figure 2 shows the contour lines (2D) and response surface prediction (3D) of corrosion rate, microhardness, thickness, and roughness. The areas indicated by the arrows indicate the limits of the levels of the parameters that allow obtaining the best possible response (highest corrosion resistance, highest microhardness, lowest roughness, corresponding to the lowest possible thickness, to enhance the economy of the coating by saving time, reducing waste in materials, and investing in technical flexibility).

Figure 2
figure 2

a Contour plot (2D) of CR vs. thickness, microhardness, b contour plot (2D) of thickness vs. roughness, microhardness, c response surface plot (3D) of CR vs. thickness, microhardness, d response surface plot (3D) of thickness vs. roughness, microhardness. The arrow indicates to the optimal area

Figure 3 shows the main effects of parameters (T, P, and I) on the responses (thickness, roughness, microhardness, and corrosion rate).

Figure 3
figure 3

The main effects of parameters (T, P, and I) on the: a microhardness, b roughness, c thickness, d corrosion rate

Table 6 presents the effect of coating parameters and their contribution to response variation. The results of analysis of variance (ANOVA) indicated that the parameter with the most significant effect on coating thickness and roughness is time (P), with a contribution of 83.87% and 65%, respectively. This result is expected, and thus the correlation between thickness and roughness can be explained based on the strength of time's influence on both. On the other hand, time did not have a statistically significant effect on changes in corrosion rates and had a weak effect on changes in microhardness with a contribution of only 8.1%.

The weak effect of time on microhardness and coating corrosion rate can be explained by the fact that microhardness and corrosion resistance are related to the nature of the phases formed in the coating, surface morphology, and grain size. Several studies have shown that corrosion resistance and coating hardness are related to the grain size and the nature of the formed phases, which in turn are related to the deposition current density.

The phases formed and the size of the particles can be controlled by controlling the deposition conditions (the levels of the parameters, especially the cathodic current density and temperature), reducing the particles size to enhance the corrosion resistance of the layer. On the other hand, the decrease in the crystals size means an increase in the grains’ boundaries, which in turn hinder the movement of dislocations, which increases the hardness of the layer [10, 14].

This fact is consistent with the results of the current study, where the contribution of cathodic current density (I) was about three-quarters of the effect of all parameters on changes in microhardness and corrosion rate (75.1% and 69.37% in the microhardness and the corrosion rate, respectively).

Table 7 shows the results of the corrosion test with the potentiodynamic polarization. The table shows the values of corrosion potential, corrosion current density, and the slope of the anodic and cathodic polarization curves (βa, βc), respectively. The table also shows the annual corrosion rates; the test results indicate that sample 12 has the lowest corrosion current density (iCorr) and therefore the lowest corrosion rate (CR).

Table 7 Results of corrosion test data with potentiodynamic polarization (3.5% NaCl)

The contribution of temperature (T) was 17.61% and 8.78% in changing the values of corrosion rate and thickness, respectively, which can be attributed to the nature of the relationship between temperature and the nucleation rate [31]. Figure 3 shows the effect of factor levels on response variation, and Table 5 shows that an increase in temperature, time, and deposition current density leads to an increase in thickness, roughness, and microhardness, and a decrease in corrosion rate (Fig. 4).

Figure 4
figure 4

Tafel curves from potentiodynamic polarization test (3.5% NaCl) specimens (1, 7, 12, and reference) according to Box–Behnken array (15 runs)

Morphological structure study

Table 8 shows the test results of three specimens (1, 7, and 12) were selected of Box–Behnken design (15 runs) for morphological study. Sample 12 was chosen because it has the highest microhardness and the lowest corrosion rate, while sample 7 has the lowest microhardness and the highest corrosion rate. Sample 1 was selected because it has low roughness and thickness, and a relatively low corrosion rate. Figure 5 shows the results of EDX and EDX-mapping analysis, while Fig. 6 shows the results of SEM. The grain size was determined using the Scherrer’s equation after applying the Bragg’s law at the diffraction angles (θ) at the highest peaks from the XRD spectrum using Origin Pro-9 program (especially at the diffraction angle 2θ = 42.55°). The nature of the formed phases was also determined based on the (Zn–Ni) phases library (Joint Committee Powder Diffraction Society—JCPDS). Figure 7 shows the spectrums of XRD. The results of the analysis of sample 12, which has the highest corrosion resistance (lowest corrosion rate) and the highest microhardness, indicate that the dominant phase in this sample is γ phase, which explains its high resistance to corrosion. The high corrosion resistance and microhardness are attributed to the high nickel content. The decrease in grain size is attributed to the coating process conditions, which were carried out at high values of cathodic current density and temperature [32].

Table 8 Results of corrosion test data with potentiodynamic polarization
Figure 5
figure 5

Results of morphology analysis: a and (A): EDX spectrum and EDX mapping, respectively, of the specimen (1), b and (B): EDX spectrum and EDX mapping, respectively, of the specimen (7), c and (C): EDX spectrum and EDX mapping, respectively, of the specimen (12)

Figure 6
figure 6

Results of morphology analysis SEM (a), (b) and (c) of the specimen (1), (7) and (12). Magnification: 2000×, HV: 10 kV. The arrows in the specimen (12) indicate to the fine cracks

Figure 7
figure 7

XRD spectrums (λ = 1.542 Å) a, b and c of the specimen (1), (7) and (12), respectively, and phases with preferred orientations of the crystals

A distinct coating was obtained in the sample (1) with a small grain size (grain size = 19.1 nm) at a cathodic current density (I = 3 A/dm2), where the deposits were very smooth, non-porous, gray with a dull appearance as shown in Fig. 6a. Similarly, the deposits in sample (12) had the highest cathodic current density (I = 4 A/dm2) and thus the higher nickel content, but with the appearance of some microcracks as shown in Fig. 6c, whereas sample (2) showed nodular deposits with clumps upon cathodic at low values of current density (I = 2 A/dm2). The appearance of cracks can be attributed to the increase of nickel content. The smoothness of the coating can be explained by the small particle size resulting from the mean values of the cathodic current density.

On the other hand, the results of SEM analysis indicated the presence of some fine cracks in the coating, the appearance of cracks in sample 12, despite its small grain size, may be due to internal stresses resulting from the hydrogen embrittlement phenomenon during the deposition process, especially since the coating was carried out at high levels of current density and bath temperature. On the other hand, an increase in the deposition temperature may contribute to the appearance of cracks [31]. The SEM and XRD results for sample 7 indicate the presence of agglomerated clusters in addition to several phases, indicating that the γ phase is not the dominant phase in this sample (γ phase is the most corrosion-resistant phase) [32,33,34,35]. The appearance of some phases at the expense of the γ phase may be responsible for the increased corrosion rate in this sample. Sample 1 has a relatively low corrosion rate, good microhardness, and relatively low thickness. The morphological analysis results indicate that sample 1 has a dense and homogeneous structure, free of cracks and pores, and with small grain size. The dominant phase in this sample is the γ phase with a preferred orientation of the crystals (330).

Conclusion

This study aimed to investigate the effect of eight parameters on the properties of Zn-Ni coatings on carbon steel specimens using electroplating in a chloride acidic medium. The Plackett–Burman design (12 runs) was used as a preliminary step to identify the most influential parameters on coating hardness relative to thickness, with subsequent analysis using the Box–Behnken design (15 runs) based on response surface methodology. Mechanical, geometrical, and functional properties, including thickness, roughness, microhardness, and corrosion rate, were studied using SEM, EDX, and XRD techniques.

The results of the Plackett–Burman design showed that temperature, time, and deposition current density had a statistically significant effect on the coating hardness and thickness, with a confidence interval. Subsequent Box–Behnken design analysis revealed that time had the most significant effect on thickness and roughness, followed by temperature. Deposition current density had a significant effect on thickness but did not show statistical significance on roughness. Furthermore, the deposition current density had the most significant effect on corrosion resistance and microhardness, followed by temperature. Time had the most significant effect on microhardness, but no statistically significant effect on corrosion rate.

The study demonstrates the ability to predict mechanical, geometrical, and functional properties based on the deposition conditions using response surfaces, indicating the possibility of achieving good microhardness and relatively low corrosion rates at small thicknesses. The morphological study revealed that at relatively high values of current density and temperature, fine cracks appeared at relatively large thicknesses. However, deposition at moderate current density and high temperature yielded a dense structure free of cracks and pores, with good mechanical and functional properties and low thickness.

In conclusion, this study contributes to the understanding of the effects of different deposition conditions on the properties of Zn–Ni coatings on carbon steel specimens. The results provide insight into the most significant parameters affecting the mechanical, geometrical, and functional properties of the coating, as well as the possibility of predicting these properties based on the deposition conditions.