1 Introduction

One of the best things about living is having access to electrical energy, which can come from both renewable and non-renewable sources [1]. However, non-renewable resources like petroleum, coal, and fossil fuels are limited and cannot be replenished [2, 3]. Renewable energy conversion is the process of turning renewable energy into electrical. Renewable energy conversion has a less detrimental effect on the environment than the conversion of non-renewable energy. Solar energy is a plentiful energy source that may be used to create electricity with the use of photovoltaic (PV) cells [4]. Numerous types of PV cells are being developed and improved, including inorganic, perovskite, organic dye sensitizer, and quantum dot solar cells [5, 6]. Organic solar cells (OSCs) have drawn more attention than other types of solar cells because of their adaptability, simplicity in production, compatibility, and affordability [7]. To increase efficiency, researchers are focusing their efforts on developing active materials, improving the various interlayers, such as the electron transport layer and hole transport layer (HTL), and improving the OSCs device architecture [8]. This is because OSCs’ efficiency is lower than that of other solar cells.

The HTL is a hub of an OSC because it separates holes from the donor, reduces charge recombination and leakage current, and increases power efficiency [9]. High transmittance, increased charge mobility, ease of production, and mechanical and environmental stability are all desirable characteristics of HTL [10,11,12,13]. Materials both inorganic and organic are frequently used as HTL [14]. Organic polymers that conduct electricity have many benefits, such as a large surface area, easy coating and printing techniques, and inexpensive cost. These characteristics show that organic polymers [15, 16] are viable OSC possibilities, and researchers are particularly interested in polyaniline (PANI) [17], polythiophene [18], polypyrrole, and PEDOT: PSS [19], which are used as OSCs' hole transport layers. Due to its remarkable characteristics, including high conductivity and transmittance, ease of synthesis, and chemical stability, PANI [20,21,22] is a superior hole transport layer to others. Its principal drawback is that it dissolves poorly in common solvents. Scientists are focusing on many strategies to overcome this difficulty as a result. Electropolymerization is the ideal method to solve this problem since the polymer is directed coated on fluorine-doped tin oxide (FTO) substrate [23, 24]. However, there are not many articles that discuss using PANI as a hole transport layer via the electropolymerization process.

As a result, we employed the electropolymerization technique for the polymerization of PANI on the FTO substrate [25, 26]. Due to its transparency, FTO is frequently used as an electrode substrate for solar cell applications; however, because it lacks porosity sites for polymer formation, the polymerization process cannot play a significant role, leading to poor polymer loading [27, 28]. Since electrospinning is a potent approach for producing porous nanofibers for a range of applications, including energy [29], solar cells [30,31,32], food processing [33], dye degradation, and biological research. Carbon materials, such as MXenes [34, 35] and boron nitrides [36], along with doped metal oxides, exhibit enhanced porous characteristics and ample surface area, making them excellent electrocatalysts for the hydrogen evolution reaction. Their porous nature and large surface area enable efficient catalytic activity. 2D carbon materials [37], organic frameworks [38] 2Dg–C3N4 [39,40,41,42], and CeO2–graphene composite [43] have superior electrochemical and photophysical materials used in electrochemical sensing and photocatalyst applications. Therefore, we first create the porous nature on the FTO substrate in this study with the help of carbon owing to their higher porous nature and conductivity. We electrospun polymer made of polyacrylonitrile (PAN) to create CNF [44], which is then carbonized [45, 46].

When this type of nanofiber is connected to a PANI chain, its conductivity and stability are increased [47, 48]. For example, materials based on PANI–GO are HTL in perovskite solar cells [49], resulting in a 9.24% efficiency. This finding implies that PANI-doped carbon source [50] enhances solar cell efficiency. In light of this, carbon nanofiber (CNF) is the ideal material for growing conductivity polymers [51]. The porous nature of CNF has caused it to be coated on the FTO substrate, where PANI development is higher than on the uncoated fiber substrate. Then, conductive improvement recommends including copper (Cu) [52, 53] in the polymer. Materials based on copper (Cu), such as Cu2ZnSnS4 [54], CuO [55], CuI [56], and CuBr [57], are used as HTL in perovskite and organic solar cells. The carbon, polymer, and Cu materials appear to be promising HTL in OSC applications, according to all the data. So, we use electrospinning and electropolymerization methods to create CNF–PANI–Cu material.

This research examines the current range of CNF, PANI, Cu, CNF–PANI, CNF–Cu, and CNF–PANI–Cu on SS plates. Because CNF–PANI–Cu has a wider current range than other materials, it is employed in several scan coating studies. The 20 scans coated CNF–PANI–Cu-20 s electrode, we conclude, will likely have a high current and charge–discharge capacity, making it appropriate for electrical applications. The PANI, CNF–PANI, and CNF–PANI–Cu are then coated on the FTO electrode after 20 scans. Finally, we look into the optical, structural, and conductivity characteristics of the electrodes in relation to OSCs [58].

2 Experimental section

2.1 Materials

Sigma Aldrich Chemical Limited provided the aniline, sulfuric acid, polyacrylonitrile (PAN), copper nitrate, dimethylformamide (DMF), N-Methyl-2-Pyrrolidone (NMP), and FTO plates. The aniline monomer underwent two distillations before usage.

2.2 Preparation of carbon nanofiber (CNF)

First, under ideal conditions, the CNF electrospun nanofiber is generated utilizing the electrospinning procedure. Briefly, 10 mL of DMF solution is used to dissolve 10% PAN. After that, the polymeric solution is vigorously agitated for a further 12 h to achieve homogeneity. Furthermore, a metallic needle with an inner diameter of 0.8 nm is used to inject the polymeric solution into a 10.0 mL syringe. When the syringe is mounted vertically on the syringe pump, the flow rate is 1.3 mL/h, the applied voltage is 15 kV, and the needle-to-collector distance is 10 cm. With the aid of a grounded fixed cylindrical collector, the fibers are gathered and coated with aluminum foil. In an enclosed box, the full electrospinning apparatus is run at 28 °C and 18% relative humidity. The generated fiber is subsequently carbonized in a nitrogen environment for 4 h at 900 °C at a rate of 5 °C/min. After carbonization, the CNF is obtained gradually.

2.3 Fabrication of a carbon nanofiber (CNF)-coated electrode

The SS plates are ultrasonically cleaned with deionized water, submerged in ethanol for 15 min, and then coated after 15 min of immersion in acetone. 1 × 1 cm is chosen as the active coating area, with an adhesive tape coating used to isolate the rest of the area. First, 5.0 mg of CNF material is accurately weighed. Next, 50 L of N-Methyl-2-Pyrrolidone is combined and completely pulverized. Over perfectly clean stainless steel plates, the slurry is poured. The plates are also dried for 12 h at 600.0 °C. The CNF on FTO is coated using the same procedure for OSCs applications.

2.4 Electrolyte preparation for polymerization

For example, they are divided into three sections for the preparation of the electrolyte for polymerization. Aniline monomer preparation, copper monomer preparation, and copper–aniline monomer combination preparation.

2.4.1 Preparation of aniline monomer

Using the vapor phase distillation technique, aniline is first twice distilled. Then, using Millipore water, 0.2 M (0.9 mL) distilled aniline, and 0.5 M H2SO4 are created up to the point in a 50.0 mL standard manufacturing flask. This electrolyte serves as the catalyst for the monomer's electropolymerization.

2.4.2 Preparation of copper monomer

The exact weight of 2.416 g (0.2 M) copper nitrate is transferred to a 50 mL standard-making flask, where Millipore water is used to create the copper nitrate up to the point.

2.4.3 Preparation of a copper–aniline monomer mixture

Carefully poured 1.3 mL (0.5 M) sulfuric acid, 0.9 mL (double-distilled aniline solution), and 2.416 g (0.2 M) copper nitrate into the 50.0 mL standard-making flask [59]. As an electrolyte, the resulting solution is utilized to coat PANI–Cu on CNF-coated SS and FTO plates.

2.5 Electropolymerization of aniline

A CNF-coated SS and FTO plate are used as the working electrode (WE), a graphite rod is used as the counter electrode (CE), and Ag/AgCl is used as the reference electrode for electropolymerized aniline using a potentiostatic method at a constant potential of 50 mV/s for 5 scans in a 0.2 M aniline/0.5 M H2SO4 electrolyte solution (RE). To electropolymerized aniline, the potentiostat method (scan rate = 50 mV/s; scan = 5) is employed. Finally, aniline monomer and oligomer PANI are removed from the polymeric film by immersing PANI-modified CNF electrodes in 0.5 M H2SO4, rinsing them repeatedly with deionized water, and drying them in a vacuum for 24 h at 60 °C. The PANI–Cu solution is then polymerized using various scans and scan rates on a CNF-coated SS plate. The CNF unaltered PANI plate is made using the same method. The PANI, CNF–PANI, and CNF–PANI–Cu-coated FTO electrodes are produced using the same procedure at 50 mV/s in 20 scans. The yield of the prepared electrodes (weight) is as follows: PANI, 87 mg; CNF–PANI, 95 mg; and CNF–PANI–Cu, 102 mg.

3 Results and discussion

3.1 Cyclic voltammetry study

Figure 1A illustrates the potentiostatic analysis of Cu, CNF, CNF–Cu, PANI, PANI–Cu, CNF–PANI, and CNF–PANI–Cu electrodes in a CV at 5 mV/s in 1 M H2SO4 electrolyte solution (A). The Cu, CNF, CNF–Cu, and CNF–PANI electrodes have very low current ranges. PANI current range is 1.1 mA due to the interaction between the metal and polymeric chain of CNF, but the PANI–Cu current range is a little greater at 1.6 mA. But because the aniline and Cu solution combine to create a bond in the monomer solution, a significant change in the CNF–PANI–Cu electrode’s extremely high current range is seen (3.0 mA). On the CNF electrode substrate, a PANI–Cu chain forms when the electrochemical technique is applied. The several scan examinations of the CNF–PANI–Cu electrode are shown in Fig. 1B. The current range gradually increased when the scan rate is raised, but the current density decreased because the electrode and electrolyte made fast contact. The greater current range of 13 mA is available for scan rates of 100 mv/s. Figure 1C depicts the current evaluation of several scan-coated CNF–PANI–Cu electrodes on SS plates (C). The current range increased depending on the scan mode used to coat polyaniline on the SS plate. This is because more scanning results in better polymer growth on the SS plate. The CNF–PANI–Cu-20 s electrode has 20 scans total with a current range of around 10 mA. Figure 1D displays the various scan rates of CNF–PANI–Cu-20 s, where the current range is increased in response to scanning rate improvement.

Fig. 1
figure 1

A CV study of different electrodes at 5 mV/s scan rate, B Different scan rate study of CNF–PANI–Cu electrode, C Different scan-coated CNF–PANI–Cu electrodes at 5 mV/s, and D Different scan rate study of CNF–PANI−Cu-20 s in 1 M H2SO4

3.2 Cyclic voltammetry and impedance study of FTO plate

FTO plate-coated PANI, CNF–PANI, and CNF–PANI–Cu electrodes are evaluated by potentiostats in a CV at 5 mV/s in 1 M H2SO4 electrolyte solution (Fig. 2A). The PANI current range is 11 mA while the CNF–PANI current range is 13 mA due to the interaction between the CNF and Polyaniline chains. The CNF–PANI–Cu electrode has a comparatively high current range of 18 mA in comparison to the other electrodes because the mixture of aniline and copper solution establishes a bond in the monomer solution. On the CNF electrode substrate, a PANI–Cu chain forms when an electrochemical process is employed.

Fig. 2
figure 2

A CV study at 5mv/s, B Nyquist plot Impedance spectra of FTO-coated polymers, and C Different scan study CNF–PANI–Cu FTO electrode in 1 M H2SO4 electrolyte

In the steps of the leucoemeraldine–emeraldine transformation and the emeraldine–pernigraniline transformation, polyaniline is oxidized and reduced at a scan rate of 5 mV/s [60]. For EIS evaluation, as displayed in Fig. 2B, the EIS tests are carried out in the frequency range of 105–10–2 HZ at a 10 mV AC voltage and no DC voltage. At the electrode–electrolyte interface of PANI, CNF–PANI, and CNF–PANI–Cu, the semicircles in the higher frequency region Rct (charge transfer resistance) are 59.79Ω, 20.21 Ω, and 25.72 Ω, respectively. Additionally, the low-frequency straight line indicates a limiting diffusion mechanism in the H2SO4 electrolyte, which is solution resistance Rs, with values of 7.25 Ω, 10.01 Ω, and 7.37 Ω for PANI, CNF–PANI, and PANI, respectively. Comparing the three electrodes, the CNF–PANI–Cu electrode has a higher conductivity and a moderate Rct and Rs value. Figure 2C shows the current examination of various scan rates of CNF–PANI–Cu. It is generally known that during the potential scan, the scan rate has a considerable effect on the electrolyte ions and electrode surface. The morphology of the peak and the current range altered as the scan rate rose because of the accelerating outer surface interaction between the electrode and the electrolyte ions.

3.3 Optical study

Figure 3A displays the absorption spectra of films coated with FTO. (A), where the first PANI film absorption band appears at 364 nm as a result of the PANI's π–π* transition and the other two film bands are somewhat blue-shifted. Compared to PANI, the CNF–PANI and CNF–PANI–Cu bands are shifting their position due to the intermolecular interaction of CNF (ππ interaction) and Cu (electrostatic interaction) with the PANI chain. The CNF–PANI film has a hypsochromic shift of 20 nm (364 to 344 nm), while the CNF–PANI–Cu film has a hypsochromic shift of 8 nm (364 to 356 nm). The three films also exhibit a second band at 650, 675, and 682 nm, which supports the validity of the polaron and bipolaron states in the PANI chains shown in Table 1.

Fig. 3
figure 3

A UV–Visible, and B Transmittance spectra of FTO-coated polymers

Table 1 UV–Vis absorbance range of polymer plates

The results demonstrate that CNF and Cu are substantially infused into PANI. The polaron state of PANI exhibits a lower bandgap and a higher wavelength and conductivity compared to the neutral state. The polaron structure of CNF–PANI–Cu is strong, and PANI’s wavelength has been changed from 650 to 682 nm. Additionally, Fig. 3B displays the transmittance spectra of films with FTO coatings. It is good knowledge that transmittance is among the most crucial factors in a solar cell application. Since light easily passes through the HTL layer and arrives at the donor layer without suffering any losses, the absorption behavior of the donor material automatically increases when the transmittance of the HTL layer is raised. As a result, an organic solar cell’s hole transport substance should have a high transmittance. The CNF–PANI–Cu film is a useful hole transport material for organic solar cells since it has a better transmittance than other films.

3.4 Fluorescence and FT-IR study

Figure 4A displays the fluorescence spectra of the three polymers. The PANI displays fluorescence characteristics at 340.0 nm when the excitation wavelength is 300.0 nm. The fluorescence intensity of CNF–PANI has grown as a result of the interaction between nitrogen lone pairs in CNF and PANI. CNF–PANI–intensity Cu's has, however, diminished. This is because the polymer matrix employs a FRET (Frontier resonance energy transfer) mechanism [61, 62], in which copper metal quenches the fluorescence of the polymer matrix. In Fig. 4B, the structure of the PANI, CNF–PANI, and CNF–PANI–Cu are examined using FT-IR spectra. The peak of the C–N stretching vibration coincided with the peak of N–B–N stretching at 1643 and 1487 cm−1 (B is a benzenoid unit). The strong peak at 1146 cm−1 indicates that PANI is doping. The V-shaped peak at 3409 cm−1 denoted the N–H [63] of the PANI chain. The CNF–PANI and CNF–PANI–Cu peaks, respectively, have slightly shifted the bonding between CNF [OH-groups] and Cu metal. For instance, the quinoid peak changed from PANI to CNF–PANI–Cu, moving from 1141 to 1146 cm−1. The interaction between the nitrogen lone pair electrons in the quinoid ring and copper ions (positive ions) results in a non-covalent bond, known as electrostatic interaction. This interaction is responsible for the peak shift towards a higher frequency region [64]. These results demonstrate the potent binding of CNF–PANI–Cu.

Fig. 4
figure 4

A Fluorescence, and B FT-IR spectra of a PANI, b CNF–PANI, and c CNF–PANI–Cu

3.5 XRD and TGA analyses

Figure 5A illustrates the polycrystalline peak of the polymer chain (PANI) as two distinct peaks at 19.94° and 20.90° [65]. In CNF–PANI, these two peaks have slightly shifted to 19.57° and 21.43° due to the interaction between CNF and PANI. The CNF consists of a sp2 hybridized carbon network that exhibits a large π-bond. This π-bond interacts with the conjugated chain structure of PANI through a π-stacking interaction, also known as π-π interaction [66, 67]. As a result, the intensity of CNF–PANI is enhanced. In the CNF–PANI–Cu composite, the polyaniline peaks are observed at 20.92° and 21.88°. Additionally, there are additional peaks present at 31.07°, 37.35°, 42.19°, 44.86°, 56.45°, 65.49°, and 72.60°. These peaks confirm the presence of copper (II) oxide (JCPDS card no. 801268) in the CNF–PANI–Cu composite.

Fig. 5
figure 5

A XRD, and B TGA spectra of a PANI, b CNF–PANI, and c CNF–PANI–Cu

Thermal experiment analysis using thermogravimetric data (TGA). Figure 5B displays the thermograms of PANI, CNF–PANI, and CNF–PANI–Cu. The thermogram of PANI showed that there are three major weight losses: the first occurred before 150.0 °C when water molecules and volatile chemicals entirely evaporated, and the second occurred between 250.0 and 370.0 °C when low molecular weight polymer fragrant is eliminated. The third stage of weight loss occurred between 370.0 and 431.0 °C as a result of the degradation polymer main chain, also referred to as the polymer backbone. Due to the alteration in the main chain of the CNF polymer caused by the interaction with PANI, three major polymeric weight loss peaks in the CNF–PANI thermogram have been relocated to a higher temperature, showing that CNF–PANI is a co-polymeric mixture. In the case of PANI–PANI–Cu, the thermal removal of the CNF moieties caused a mass of weight loss between 275.0 and 420.0 °C, with peaks between 420.0 and 550.0 °C indicating polymer main chain breakup. These spectra demonstrate that the Cu with CNF–PANI composite has enhanced thermal stability.

3.6 XPS spectra

Figures S1 and S2 display the XPS survey spectrum of PANI and CNF–PANI, revealing the presence of carbon, nitrogen, and oxygen elements. Each element is independently identified using fitting software. In PANI and CNF–PANI, the C 1 s spectrum exhibits sp2 hybridized carbons originating from C–C/C–H, C–N/C = N, and O = C–O functional groups derived from the components of the CNF and PANI composite. The N 1 s core level spectrum of both materials shows a split peak corresponding to the binding energies of benzenoid amine bonds (= N–) and quinoid imine bonds (–NH–) in PANI. The O 1 s spectrum of PANI and CNF–PANI exhibits two binding energies, attributed to C = O and C–OH/C–O functionalities. In Fig. 6, the C 1 s spectrum of CNF–PANI–Cu displays C/C–H and C–N/C = N signals, while the N 1 s spectrum reveals the presence of benzenoid amine bonds (= N–) and quinoid imine bonds (–NH–) of PANI. The O 1 s spectrum of CNF–PANI–Cu exhibits two binding energies, corresponding to Cu = O and Cu–O–Cu species. The Cu2O exhibits a 2p3/2 peak at 930.36 eV and a 2p1/2 peak at 949.27 eV. CuO 2p3/2 and 2p1/2 have binding energies of 933.88 and 951.51 eV, respectively [68, 69]. Copper is divalent, as shown by the binding energy gap of CuO, which is 17.63 eV. These peaks show that the copper oxide and polymer matrix have a solid connection.

Fig. 6
figure 6

XPS spectra of CNF–PANI–Cu composite

3.7 Structure morphology study

Figure 7a depicts the smooth carbon nanofiber created from the CNF nanofiber during the carbonization process. As shown in Fig. 7b, one nanofiber has a diameter of 538 nm. It is widely known that this type of nanofiber has a high porosity [70] and a large surface area [71], making it ideal for surface activation on nonporous surfaces. Because the porosity augmentation of the FTO plate improves polymer development on the electrode substrate, the CNF is, therefore, coated on electrode plates prior to electropolymerization in this investigation. Figure 7c and d demonstrates the amorphous development on the FTO substrate, respectively. The CNF–PANI composite in Fig. 7e displays a homogeneous and closed-packing amorphous polymer growth as compared to PANI because the polymer develops readily on the porous CNF substrate [72]. The CNF–PANI–Cu composite morphology shown in Fig. 7g features a fine crystalline and amorphous structure in addition to homogeneous polymer development because Cu metal is present there. The element's composition and % value are determined by the EDX mapping research shown in Fig. 8. The elements in PANI (Fig. 8a) that are compatible with its EDX elemental mapping result are carbon (61.25%) and nitrogen (38.75%). The CNF–PANI–Cu (Fig. 8b) result shows that the polymer chains are bonded to copper or copper oxide since it contains 45.07% carbon, 11.92% nitrogen, 41.55% oxygen, and 1.46% copper.

Fig. 7
figure 7

SEM images of CNF (a, b), PANI (c, d), CNF–PANI (e, f), CNF–PANI–Cu (g, h)

Fig. 8
figure 8

EDX and mapping images of PANI (a, c), CNF–PANI–Cu (b, d)

Figure 9 presents the microstructure morphology of the CNF–PANI–Cu composite through TEM images. The SEM image in Fig. 7b demonstrates the morphology of CNF fibers, which is also visible in Figs. 9a and b. Furthermore, a thick dark region indicates the presence of PANI and copper ions dispersed on the CNF surface [73]. In Figs. 9c–e, the thin dark region with a white background signifies the presence of copper ions in PANI and on the CNF surface.

Fig. 9
figure 9

TEM images of CNF–PANI–Cu composite

3.8 Current–voltage (I–V) characteristics/study

Figure 10 displays the current–voltage (I–V) investigation of PANI, CNF–PANI, and CNF–PANI–Cu-coated FTO plates. PANI, CNF–PANI, and CNF–PANI–Cu electrodes exhibit respective Jsc values of 18.05, 17.55, and 26.31 as well as Voc values of 0.19, 0.20, and 0.16. The Jsc of the PANI and CNF–PANI electrodes are comparable; however, the Jsc of CNF–PANI–Cu is a little higher than PANI due to the interaction of the CNF fiber and Cu metal with the polymer backbone chain. This study demonstrates that the CNF–PANI–Cu blocks electrons due to its large current range and readily isolates the holes from the donor material when light illumination is utilized. These characteristics enhance the behavior of hole transport and raise solar cell efficiency. Additionally, we believed that using this material as an HTL will increase the solar cell’s Jsc, Voc, and efficiency. The CNF–PANI–Cu is a good hole transport material for OSCs as a result of this discovery.

Fig. 10
figure 10

I–V study of FTO-coated polymers

4 Conclusions

Hole transport materials have been demonstrated and successfully employed in the fabrication of organic solar cells based on an ordered change of the crucial parameters for the electropolymerization of PANI-based materials. Remarkably, the PANI current range is 1.1 mA, but the PANI–Cu current is slightly greater at 1.6 mA. On the SS plate, however, the aniline, CNF, and Cu solution combine to create a substance that resembles a composite and produces a current range of about 10 mA after 20 scans. Eventually, at the current range of 18 mA, CNF–PANI–Cu coated on an FTO plate produced higher results. Eventually, at the current range of 18 mA, CNF–PANI–Cu coated on an FTO plate produced higher results. Additionally, the conductivity of charge transfer resistance is relatively greater, and a modest Rct and Rs value of 25.72 and 7.37 is achieved. The CNF–PANI–Cu material’s UV–Vis absorbance range is between 356 and 682 nm, and due to its absorbance and transmittance characteristics, UV light is allowed to pass through to the hole transport layer. The electrode materials for organic solar cells are supported by the current–voltage study's findings and comments in their entirety.