1 Introduction

In the past few years, one-dimensional nanostructures, i.e., nanowires, nanotubes and nanorods of different diameter and length according to our needs, have been synthesized by electrochemical deposition in vertically aligned anodized aluminum oxide (AAO) templates. These templates have attracted a significant interest due to its numerous unique structural properties, such as ideal cylindrical geometry of pores, controllable pore diameter and very small size distribution due to its pore diameters [13]. For this purpose, the nanoporous templates are synthesized by anodization of aluminum which is simple and low cost method. These features of AAO template are controlled by anodization solutions, temperature, voltage or current density and pore widening. Due to these conditions, the AAO templates have become an ideal choice for the synthesis of nanomaterials. Particularly, the nanowires embedded in nanoporous templates have obtained significant attention due to their use in race track memory, and scientific devices like nanogenerators, nanolenses and information storage [4, 5].

The templates comprising hexagonally packed two-dimensional array of cylindrical pores with a uniform size are very suitable for the synthesis of nanowires [6]. These nanowires are generally synthesized using AC, direct current (DC)and pulse electrodeposition, but AC electrodeposition is less difficult process and easily controllable for the preparation of nanowires [6, 7]. The new magnetic, optical, electrical and sensing properties start to appear in the ferromagnetic nanowires due to quantum size effects and one-dimensional nanostructures [810].

The cobalt is a special type of ferromagnetic element, which has several applications in magnetic recording domain. The excessive coercivity of cobalt has made it unsuitable candidate for magnetic recording media [11]. So, it is important and a challenging task for us to tune the coercivity and other magnetic properties of cobalt to be used in magnetic recording media. The promising magnetic properties and anisotropic nature of ferromagnetic nanowires have made them a preferable candidate for memory devices. Recently, ferromagnetic–non-magnetic alloys have attained a special attention due to novel and interesting phenomena [1220]. The addition of non-magnetic element in a magnetic alloy nanowires has proved an efficient technique to tune the magnetic properties of the system according to our desire to enhance efficiency of magnetic recording media [21]. Few reports are found in the literature on the addition of Sn in ferromagnetic nanowires to modify the magnetic properties.

The addition of Tin in a ferromagnetic cobalt is expected to tune magnetic properties and crystal structure [2225]. Najaf et al. prepared CoSn nanowires arrays with high aspect ratio using A.C electrodeposition to fill the pores of AAO templates. They observed the magnetic properties of Co1−x Sn x nanowires, synthesized by A.C electrodeposition using different concentration of tin and also studied the effect of annealing up to 575 °C, which showed the enhancement of H C as well as shape anisotropy after annealing the sample up to 575 °C [26]. The CoSn alloy is also used as an electrode in Li ion batteries (LIB) and sodium ion batteries (SIB) with high specific capacity and good cycling performance. It is found in the literature that the particular composition (0.3 < X < 0.7) in Co1−x Sn x alloy gives optimum results for charging electricity 496 mAh g−1 and discharge capacity 380 mAh g−1 [27]. Moreover, the CoSn alloy shows excellent structural and soft magnetic properties with this composition. In our present work, we prepared cobalt–tin (CoSn) alloy nanowires by AC electrodeposition, using AAO templates. Our results show that the magnetic as well as crystalline properties of the CoSn nanowires become more different with Co and Sn. The magnetic and structural properties of CoSn nanowires into AAO templates are changed using different AC potential ranging from 9 to 17 V, which affects the concentration of cobalt and tin during deposition instead of by changing the molarity, pH or concentration of electrolyte solution each time. So in this way the ferromagnetic nanowires were fabricated to tune the magnetic and structural properties according to our desired target.

2 Experimental setup

To fabricate AAO templates, we selected aluminum sheet with a high purity of 99.995% and 0.5 mm thickness was cut into (3.5 cm × 3.5 cm) pieces. First aluminum foil was degreased into acetone for 10 min to remove the dust and sticked particles from the surface of aluminum sheet and then annealed at 500 °C for 1-h and rinsed in distilled water in order to produce homogeneity and uniform surface area. Before the start of anodization, Al foil was electropolished in the solution of perchloric acid (HClO4):Ethanol(C2H5OH) = 1:4 using constant DC source (9 V) at a room temperature, i.e., 25 °C for 3 min to mirror finish. The Al foil was cleaned with distilled water for sufficient time in order to avoid any impurity during anodization. Two steps of anodization were proceeded in the aqueous solution of 5% phosphoric acid using constant DC source at 60 V [6]. The first step of anodization was carried out for 6-h with constant stirring at temperature <5 °C. After the completion of first step, irregular and non-homogenous oxide layer (Al2O3) was formed. To reproduce regular and aligned templates, the sample was dipped into yellow solution, i.e., mixture of 6 wt% of phosphoric acid and 1.8 wt% of chromic acid for 2-h at 60 °C, so that irregular templates are cut at the bottom. The second step of anodization was completed in the similar conditions as in the first anodization with longer time T = 24-h. The voltage affects the diameter and interpore distance of the templates and time affects the length of the templates. During anodization, metal oxide (insulator) layer was formed at the interface [1, 2]. To produce conducting surface of Al foil for the synthesis of nanowires using AC electrodeposition, we remove barrier layer by reducing 1.5 V after every 3 min, until the voltage drops to zero. To synthesize CoSn nanowires, 0.35 M CoSO4·7H2O was added to 0.14 M SnCl2. Both electrolytes were dissolved in water and added separately. The boric acid and diluted HCl were added in the solution as a buffer and homogenizing agent, respectively [22, 25].

All the samples were synthesized by varying AC voltage from 9 to 17 V by increasing 2 V for each sample such that time of deposition t = 15 s, which is optimized after several attempts and frequency f = 50 Hz remained constant throughout deposition and in this way nanowires were prepared in the AAO templates. We observed that electrodeposition of alloy nanowires changed the color of the templates from white to black which showed the growth and nucleation of the nanowires [6, 7]. The surface morphology of the samples was examined by scanning electron microscopy (SEM) whereas electron dispersive spectroscopy (EDS) was used to study the composition of CoSn nanowires. The vibrating sample magnetometer (VSM) was used to measure the magnetic properties of CoSn nanowires at room temperature. The X-ray diffraction pattern was used to study the structure analysis.

3 Results and discussions

3.1 Formation of templates

The anodic aluminum oxide templates were grown by two-step anodization in phosphoric acid at 60 V and temperature T = 5 °C. The transient behavior of current during two-step anodization of the AAO templates is shown in Fig. 1. The oxidation occurs at anode during the formation of the porous oxide layer and the anodic Al dissolution reaction is presented by:

$$2{\text{Al}} \to 2{\text{Al}}^{3 + } + 6{\text{e}}^{ - }$$
(1)
Fig. 1
figure 1

Current versus time graph of anodization

The hydrogen gas is produced due to reduction at the cathode:

$$6{\text{H}}^{ + } + 6{\text{e}}^{ - } \to 3{\text{H}}_{2}$$
(2)

The reactions at anode taking place at the boundary of metal/oxide:

$$2{\text{Al}} + 3{\text{O}}^{2 - } \to {\text{Al}}_{2} {\text{O}}_{3} + 6{\text{e}}^{ - }$$
(3)

Aluminum cations react with water molecules:

$$2{\text{Al}}^{3 + } + 3{\text{H}}_{2} {\text{O}} \to {\text{Al}}_{2} {\text{O}}_{3} + 6{\text{H}}^{ + }$$
(4)

Overall anodization reaction:

$$2{\text{Al}} + 3{\text{H}}_{2} {\text{O}} \to {\text{Al}}_{2} {\text{O}}_{3} + 3{\text{H}}_{2}$$
(5)

3.1.1 Current versus time graph of anodization

  • Region 1 In Fig. 1, as potential applied across the electrodes, maximum current is observed which gradually drops down within few seconds, at this stage oxidation takes place at entire metal surface.

  • Region 2 Then current gradually starts to increase because of dissolution of barrier oxide layer and to produce thin barrier layer, resistance starts to decrease. So current is increasing slightly and porous layer starts depositing on thick barrier layer and dissolution occurs due to hydration reaction formed oxide layer.

  • Region 3 With the passage of time, current becomes constant in this region, because aluminum oxide (porous layer) formation balances with dissolution of oxide at oxide/electrolyte interface. So this stability in current yields regular pore structure.

3.2 Morphology investigation

The SEM topography of AAO nanoporous templates prepared by two-step anodization is shown in Fig. 2a, b. The AAO templates have highly ordered and uniform arrangement with 200 nm in diameter and 300-nm interpore distance. The SEM images of nanowires are shown in Fig. 3 which was obtained after the whole sample was dissolved in 0.01 M of NaOH at 60 °C for 1 h. Figure. 3a, b clearly shows nanowires with AC potential of 9 and 15 V, respectively, for 15 s. The approximate diameter and length of CoSn nanowires are 170 and 1000 nm, respectively.

Fig. 2
figure 2

A typical top view SEM micrograph of AAO templates prepared by 5% H3PO4 using two-step anodization with high-density array of nanopores

Fig. 3
figure 3

Shows SEM images and EDX pattern of CoSn nanowire array at different magnifications and voltages. In a deposition voltage was 9 V for 15 s, b the deposition voltage was 15 V for same time and c, d confirmations the presence of Co and Sn

3.3 Composition investigation

The energy dispersive X-ray spectroscopy (EDX) configuration shows that the elemental composition of CoSn nanowire arrays. The EDX reveals that at different voltages, Co and Sn atoms are deposited during synthesis of nanowires. The concentration of Sn in CoSn alloy nanowire is nonlinear, i.e., deposition of Sn ions increases by increasing voltage up to some specific value. In spite of that Sn contents deposited much faster than cobalt. Figure 3d shows that Aluminum peaks were linked with alumina and substrate of the sample, respectively. Table 1 shows the atomic % of Co and Sn in CoSn nanowires at different voltages.

Table 1 Atomic% of Co and Sn

3.4 Structural analysis

Figure. 4 shows XRD graph of CoSn nanowires. The XRD is obtained without dissolving the AAO templates which was used to analyze crystalline structure. The crystallite size of synthesized samples were found tobe 30 nm by using Debye–Scherrer formula \(\left( {D = K\lambda /\beta \text{Cos} \theta } \right)\) where K is shape factor, (λ) is wavelength of Cu-Kα 1.54 Å radiation and is full width at half maximum. The crystality of synthesized samples was examined using Xpert MPD diffractometer Cu-Kα radiation with a wavelength of 1.54 Å. In these pattern, the common diffraction peaks are observed at 2θ = 45.068°, 65.703° and 78.306°. The peaks at 78.306° refers to Al substrate with (311) miller indices of cubic crystal structure, while the intense peaks at 45.068° and 65.703° refers to hexagonal crystal structure CoSn (JCPDS002-0559) and tetragonal crystal structure CoSn2 (JCPDS 002-1038) with miller indices (201) and (420) respectively. In XRD pattern of Sample A, relatively less intense peaks are observed at 30.699°, 32.054° and 44.142° that refers to tetragonal crystal structure of Sn (JCPDS 001-0926) with miller indices (200), (101) and (220), respectively. In Sample D, the peak at 39.492° with miller index (200) is also observed that refers CoSn. These patterns indicate that the changing of deposition voltage affects the growth of crystal phases. At low voltage, mostly Sn was deposited and with the increase in voltage, the concentration of Co increases to form new phase. These patterns also indicated that the width of peaks is changing with applied deposition voltage due to which crystallite size varied. Figure 4 also shows that a slight shift in diffraction angle by increasing the voltage, which indicates that grain size has been increased with increase in voltage. The shifting of XRD toward higher angles is also attributed to stress and strain in CoSn alloys nanowires. The concentration of Sn ions increases with increase in voltage to a specific value which increases the volume of unit cell to a large extent, producing large internal stresses in the material. This means that the lattice parameter is decreasing which increases the strain in the material [28].

Fig. 4
figure 4

XRD pattern of CoSn nanowires

3.5 Magnetic measurements

The vibrating sample magnetometer (VSM) was used to measure the magnetization of the samples which are synthesized at different voltages for same period of time. The MH loops of all the CoSn nanowires are shown in Fig. 5a–e. The magnetic anisotropy strongly depends upon the variation of height, diameter and interwire distance of CoSn nanowires. These parameters depend upon synthesis time. We have prepared each sample for constant period of time during deposition process to make all these variables unchanged. There are two angles at which the samples are placed to the external magnetic field. That includes the easy-axis which is parallel to the nanowires at 0° and the hard-axis perpendicular to the nanowires at 90° as shown in Fig. 5. When AC potential gradually changes, the deposition of Co and Sn ions varies depending upon reduction potential. The addition of more non-magnetic ions occurs than that of magnetic ions when AC potential rises gradually from 9 to 13 V as a result coercivity and saturation magnetization decreases as shown in Fig. 6a, b, respectively. After a certain critical potential (13 V), more magnetic ions are deposited relative to non-magnetic ions with the increase in AC potential as shown in Table 1. The distribution of magnetic and non-magnetic ions in CoSn alloys causes the separation of domains, defect clusters and formation of nanostructures islands resulting with the increase in domain walls density sites. The coercivity Hc and saturation magnetization Ms increase due to the formation of pinning sites which hinder the motion of domain walls in magnetic grain and phase boundaries.

Fig. 5
figure 5

MH loops of CoSn nanowires at different voltages

Fig. 6
figure 6

a The coercivity and b saturation magnetization against voltage

4 Conclusion

The Co1−X Sn X (X = 0.3–0.7) nanowires were prepared by AC electrodeposition into AAO templates. The length and diameter of CoSn nanowires are found to be 1 µm and 170 nm, respectively, from SEM images. The elemental composition of nanowires is confirmed from EDS analysis. The XRD results of nanowires show the hexagonal crystal structure along with other phase, and the hysteresis curves of CoSn nanowires show isotropic and ferromagnetic behavior due to presence of diffuse magnetic moments and cobalt. The nonlinear voltage-dependent coercivity is explained on the basis of magnetic ions addition and domain wall pinning. The optimum voltage for synthesis of CoSn nanowires is found to be 15 V.