Introduction

The conducting polymers (CPs) have recently demonstrated massive curiosity because of their exciting optoelectronic properties. CPs are conjugated polymers that are highly absorbable, electrochemically active, conductive, and chemically stable (Krishnaswamy et al. 2019). Because of their distinct physical and chemical structures, they exhibit significant optical and electrical capabilities in a variety of applications, including electrochromic systems, emitting diodes, light photovoltaics, microwave shielding, electrodes for batteries, and sensors (Yadav et al. 2018; Cho et al. 2005; Jiang et al. 2005). Polypyrrole (PPy) is one of the conducting polymers with greater environmental stability and conductivity than many other conducting polymers. Commercial applications of PPy include biosensors (Vidal et al. 1999; Campbell et al. 1999; Sedahmed et al. 2011; Abdel-Aziz et al. 2013), gas sensors (Kincal et al. 1998; Kemp et al. 1999), microactuators (Smela 1999), anti-electrostatic coatings (Liang et al. 2017), polymeric batteries, electronic equipment, and functional films (Munish and Badlani 2019). PPy coatings offer high thermal stability and can be used in carbon composites (Iroh and Williams 1999; El-Ashtoukhy and Abdel-Aziz 2013). There are two methods for converting PPy from an insulator to a polymer conductor. The first approach involves doping PPy with reducing chemicals, which supply electrons to the empty bands of the polymer chains. It results in the formation of negatively charged carriers. The second doping approach involves utilizing oxidizing chemicals as dopants, which withdraw electrons from polymer chains to produce positive charges. These positive charges act as P-type material. Therefore, P-type doping is favored and displayed more importance in both fundamental research and its potential applications (Alcacer 1987). Carbon nanotubes (CNTs), on the other hand, have been widely employed as fillers, particularly in desirable combinations with conducting polymers. This is due to their great chemical stability, electrical conductivity, and surface area (Siwal et al. 2020; Endo et al. 2003; Heer et al. 2005). Polymer/CNTs composites have grabbed the interest of many researchers, because they may include unique combinations with better capabilities than the separate components (Liu et al. 2005; Wang et al. 2005; Sanghvi et al. 2005; Zhang et al. 2011; Ma et al. 2008; De et al. 2009). Herein, doped polypyrrole/functional multi-walled carbon nanotubes composites were produced using in situ oxidative polymerization means by anhydrous ferric chloride initiator in the presence of SDS surfactant to control the morphology of the resulting polypyrrole (2-dimensions). Thin films were fabricated from polypyrrole/functionalized multi-walled carbon nanotubes composites using the thermal evaporation technique.

Experimental section

Raw materials

Except for pyrrole distillation, all products have been utilized without further purification. Acros Organics supplied sodium dodecyl sulfate (SDS), ethanol (Aldrich), anhydrous dimethyl formaldehyde (DMF), dimethyl sulfoxide (DMSO), isopropyl alcohol (Aldrich), and anhydrous ferric chloride (Aldrich). Hydrochloric acid, hydrofluoric acid, nitric acid, a single crystalline (p-Si) were bought from Sigma-Aldrich, chromic acid (sulfuric acid combined with 25 ml of a saturated aqueous solution of chromium trioxide) (Sigma-Aldrich). Grafen Co., Turkey, provided the carboxylic functionalized multi-walled carbon nanotubes (MWCNTs). Table 1 lists the specifications of FMWCNTs (-COOH MWCNTs). Table 2 shows the description of the equipment used in the fabrication and analysis of the composites.

Table 1 Specifications of MWCNTs
Table 2 Equipment and methods used in fabrication and analysis of the composites

Synthesis of polypyrrole/FMWCNTs composites

3.5 g sodium dodecyl sulfate (SDS) was dissolved in 100 mL absolute ethanol. This solution was diluted by distilled water up to 400 mL using a magnetic stirrer (850 rpm) at room temperature; 0.8 g of carboxylic functionalized multi-walled carbon nanotubes was added to the previous solution; 4 mL pyrrole monomer was added to the above dispersion followed by an ultrasonic homogenizer for 20 min; 160 mL (0.5 M FeCl3) was added drop by drop to the dispersion for 45 min. Polypyrrole progressively developed during the addition step, which occurs in the presence of FMWCNTs during the polymerization process. Following the completion of the initiator addition, the resultant dispersion was placed under a magnetic stirrer for an additional 1 h. The resultant dispersion was allowed to settle overnight. The mixture was then filtered and rinsed with distilled water before being treated with ethanol. The final composite was cured for two days at 60 ˚C.

Fabrication thin film

The thin film polypyrrole [PPy]TF and nanocomposite thin film [PPyCNsF]NC were made up to examine the greatest conductivity. Thin films on washed quartz substrates by chromic acid/deionized water are produced with a high vacuum coating system by standard thermal evaporation at a vapor pressure of about 5 × 10−5 mbar. The UNIVEX 250 Leybold (Germany), two tantalum boats with no vacuum rupture, and a deposition average of 3 Å/s were used (Al-Hossainy et al. 2019; Torraca et al. 2018). The UNIVEX 250 Leybold crystalline quartz micro-balance for film thickness is illustrated in Fig. 1a, with a length of approximately 200 nm. Figure 1b depicts the various steps involved in the preparation of [PPy/FMWCNTs] nanocomposites utilizing ferric chloride and the in situ polymerization process.

Fig. 1
figure 1

Fabrication of [PPyCNsF]NC by using physical vapor deposition (PVD) and chemical structure of [PPyCNsF]NC thin films

Computational study

According to DFT analysis, the product of CATSTEP and DMol3 scheming was used to evaluate the utility of [PPyCNsF]NC molecular structures and frequency measurements in the gas stage. The proof estimated by functional PBE and GGA exchanges, natural pseudo-conservative potential, and base range of DNPs, programmed for tolerable molecules, was calculated by DMol3 and CATSTEP accordingly (Lin et al. 2010). The degree of the plane-wave amputates capacity used in computer simulations was 830 eV. XRD and optical functions were constructed using the DMol3, physical and spectroscopic [PPyCNsF]NC, and the CATSTEP frequency was approximated. In combination with non-local needs, a practical interaction between Becker and Lee-Yang Parr (B3LYP/WBX97XD/6-311G) has been formed in terms of enhanced shapes and vibration (IR) levels of doped [PPyCNsF]NC in the gas state (Shuller-Nickles et al. 2014; Gill et al. 1992). The programmed GAUSSIAN 09 W Structure explores symmetry variables, enhanced layouts, vibration, and vitality of nanocomposite combinations. The DFT scheme based on the WBX97xd/6–311 G B3LYP technology has created several earnest consequences in studies published by our community for the configuration-spectrum relationship (Ibrahim and Al-Hossainy 2021) which contains a range of important experimental results. The Distance approach is used to approximate the doped representations of Gaussian and Castep [PPyCNsF]NC in the gas process, an intentional plurality of descriptors, prototypical knowledge on total energy, and the cumulative use of several versions of different complexity (Abd-Elmageed et al. 2020).

Results and discussion

FT-IR spectroscopy

The FT-IR spectroscopy was performed to define the functional groups in the structural backbone for [CNsF]NPs, [PPy], and [PPyCNsF]NC thin film which is shown in Fig. 2a–c. From Fig. 2c, the [PPyCNsF]NC thin-film performed the broadening vibration of absorption bands at 1109 cm−1, which is recognized to ν(C–O). In the range 3200–3600 cm−1, the absorption band was identified, and this is owed to O–H trembling (Abdel-Aziz et al. 2020a). Additionally, the distinctive bands of the resultant nanocomposite [PPyCNsF]NC thin film are represented in FT-IR spectroscopy. The spectrum of the thin films [PPyCNsF]NC revealed this hydrogen bonding among (–NH) groups of polymers produced and [PPyCNsF]NC groups of thin films [PPyCNSF]NC groups. Conversely, the Gaussian 09 W program framework on the WBX97XD for the [PPyCNsF]NC gassy process in the isolated molecule matrix is shown in Fig. 2 for the measured IR range at 6-311G/DFT. The resulting DFT-Gaussian 09 W vibration figures are very analogous to experimental findings. The corresponding vibration bands are very analogous to the investigational outcomes (Badr et al. 2006; Reddy et al. 2019). The [PyCNsF]NC gaseous step of the isolating molecule backbone as seen in Fig. 2d can be established on the measured data from the experiments and the 09 W/DFT program package.

Fig. 2
figure 2

a Experimental IR spectrum for [CNsF]NPs; b Experimental IR spectrum for [PPy]; c Experimental IR spectrum for [PPyCNsF]NC and d Simulated IR spectrum for [PPyCNsF]NC by using Gaussian/ DFT method

The theoretical IR spectrum of [PPyCNsF]NC gasses in the isolated molecule was predicted to have spectroscopic signs. Figure 2 shows the minor variations between the expected and observed frequencies. The key intention behind the differentiation was to conduct the count in a vacuum while the calculations for the solid-state were done. The dynamic nature of the vibratory modes of the ligands investigated indicates that the torsion is weak and because the decryption of the ring modes besides the imitative is difficult to allocate to all plane modes. However, the existence of such apparent vibrations is to be seen in the graph obtained (Al-Hossainy and Ibrahim 2015a; Awad et al. 2004). The direct correlation between the calculated \(\left( {\lambda_{{{\text{Cal}}{.}}} } \right)\) and experimental wavenumbers \(\left( {\lambda_{{{\text{Exp}}.}} } \right)\) is described by the following equation for [PPyCNsF]NC gaseous phase of an isolated molecule

$$ \lambda_{{{\text{Cal}}{.}}} = 0.971\lambda_{{{\text{Exp}}{.}}} + 20.75 $$
(1)

with correlation coefficients (\(R^{2} = 0.988\)).

Surface morphology study of the thin film

The surface morphology and nanostructure form of the synthesized neat PPy was investigated by the SEM technique. The obtained SEM images are represented in Fig. 3a and b. These SEM images show that the PPy structures are produced in a 2-dimensional film. These films are composing fine nanoparticles impeded in the film. The shape and size of the resulting polymer depend on the type of used surfactant during the polymerization process. The formation of PPy sheet/films in the presence of SDS using FeCl3 as an oxidizing agent was reported by Gangopadhyay (2013) (dissolved in a water medium), but it is stated that the films are too brittle to handle freely. This perhaps might be due to the absence of ethanol as a cosolvent or might be due to the variations in the molar ratios of the pyrrole and surfactants/oxidants, which might affect the bonding between the formed PPy chains. Figure 3c and d show SEM of the resulting FMWCNTs coated with PPy at two different magnifications. It can be observed the nanotubes of carbon through the resulting composite after being coated by polypyrrole polymer.

Fig. 3
figure 3

a-b SEM image of the as-synthesized [PPy] thin film at 1 μm and 2 μm magnifications. c-d [PPyCNsF]NC thin film at 100 nm

XRD of [PPyCNsF]NC thin film

The XRD pattern reveals the long-range order and the crystallinity of the doped [PPyCNsF]NC thin film with a sharp peak series of 5° < 2θ < 45° ranges as displayed in Fig. 4a–b. Moreover, x-ray diffraction appears to suggest that the thin film matrix is distributed to the consistent one. The polyclinic structure with \({\text{Triclinic}}\;{\text{symmetry}}/P\overline{1}\) based on database_code_amcsd 0,020,331 is seen in both thin-film and gas phases (Kampf et al. 2014). [PPyCNsF]NC thin film, XRD configuration includes a sharp top in the region 5° < 2θ < 45° showing a long-range setting and crystallinity. In addition, [PPyCNsF]NC thin-film matrix displays the XRD patterns as evidence of homogeneous distribution. The XRD configuration exhibited the identical diffraction peaks with variable intensity Sect. 5° ≥ 2θ ≥ 28° located at 6.95°, 11.65°, 16.24°, 17.71º, 19.30°, 22.21°, 25.24°, 26.86°, 28.23° and 31.35° for [PPyCNsF]NC thin-film matrix. The measurement method Crystal Sleuth Microsoft and Polymorph calculate the maximum online diffraction values in relation to the expected information. The calculated crystallinity parameters for the application refinement type 3.0, the mean crystallite scale (D), the Miller index (Hkl), and full width at half-maximum (FWHM) are given in Table 3 by applying Kurt Barthelme's & Bob Downs program application. Application Scherrer equation, the range of Bragg angle 5 ≤ 2θ ≤ 45, the range 1/dhkl = 0.0566 Å−1–0.7446 Å−1, λ = 1.540562 Å, source copper, \(I_{2} /I_{1} = 0.5\), Pseudo-Voigt function to figured XRD for doped [PPyCNsF]NC using polarization = 0.5. The \(D_{{{\text{avarge}} }}\) of doped [PPyCNsF]NC thin film has been dogged employing Debye -Scherer's equation.

$$ D_{{{\text{average}}}} = \frac{0.9\lambda }{{{\text{FWHM}}\;\cos \theta }} $$
(2)

where (λ = 0.154 nm), θ the matching 2θ and the FWHM (in radians) (Almutlaq et al. 2021; Rajeh et al. 2019; Mahmoud et al. 2020). The crystallite size (D) value average is 74.24 nm for [PPyCNsF]NC. The polymorphic PXRD studies are compared with the PXRD equations of the associated practical X-ray configuration. In the PXRD measured and/or experimentally finished film portion, there are small variations in the strength and position values of specific peaks. Besides the data processing and instrumentation features, several parameters for defining microstructural samples such as their size, form, and path of distribution of the crystallites in the powder may affect the PXRD testing pattern.

Fig. 4
figure 4

a-b Combined experimental of [PPyCNsF]NC thin film and simulated XRD patterns of [PPyCNsF]NC as isolated molecule in gaseous state

Table 3 The computed crystallinity parameters for [PPyCNsF]NC thin film at λ = 1.54 Å, machine error = -0.162

[PPyCNsF]NC simulated a polycrystalline nature place and created a triclinic alignment with the \(P\overline{1}\) space group. [PPyCNsF]NC chief peak/2θ = 16.24˚, the qualitative distinction relies on visual assessment and the accuracy of computations PXRD for polymorphs and experimental trends. [PPyCNSF]NC key peak/2θ = 16,24˚, a consistency comparison relies on a visual assessment to detect a strong agreement on both polymorphs and experimental patterns between computed PXRD (Grzelak et al. 2017; Almutlaq and Al-Hossainy 2020; Bersani et al. 2016).

XPS measurements

XPS measurements should be performed to obtain information about the type of functional groups and their quantitative share. The results of these works should be included in the theoretical model. The XPS elemental analysis and their atomic percentage are also shown in Fig. 5a–b.

Fig. 5
figure 5

Typical XPS survey profiles of a FMWCNTs and b PPy/ MWCNTs composite

The XPS survey profiles of the FMWCNTs and PPy/FMWCNTs composite are shown in Fig. 6a–b. The C1s and O1s OKLL peaks could be observed in the spectra of the neat of both FMWCNTs and PPy/FMWCNTs composite. A weak Cl2p and S2P bands were observed at around 200 eV for PPy/MWCNTs composite. These peaks are due to the chloride ion doped from FeCl3 oxidizing agent and sulfur gained from SDS surfactant during the polymerization process. The C1s/O1s ratio of the neat FMWCNTs is higher than that of the PPy/FMWCNts composite. The intensity of the O1s band decreased slightly for the PPy/MWCNTs composites. This indicates the success of doping with chloride ions for the PPy chains during the polymerization process. The C1s XPS profiles of FMWCNTs and PPy/MWCNTs composites are represented in Fig. 6a and b. As shown in Fig. 6a, the observed three peaks at 284.47, 286.15 and 289.59 eV are occupied areas of 80.89%, 15.19%, and 3.92%, respectively, for neat FMWCNTs while the observed peaks (Fig. 6b) for the composite at 284.56, 286.27 and 289.31 eV are occupied areas of 58.69%, 35.67%, and 5.64%, respectively, for PPy/FMWCNTs composite. The spectra of the coated FMWCNTs by PPy in the current composite are nearly similar to the spectra of the uncoated FMWCNTs. There are no significant changes observed in the peak positions. This confirms that PPy has successfully coated MWCNTs with no extra bonds or crosslinking in the contact surfaces. The excellent π-π stacking between PPy backbones and FMWCNTs might also assist in stabilizing.

Fig. 6
figure 6

XPS profiles of a FMWCNTs and b PPy/FMWCNTs composite

Geometry Study for [PPy] and [PPyCNsF]NC as an isolated molecule

The 3D plots of electron density and potential come to be realistic in most computations with the DNP basis sets for [PPy] and [PPyCNsF]NC as isolated molecules are shown in Fig. 7a–d, respectively. In all calculations, the negative electrostatic potential is visible and symmetrically distributed in respect to the macrocyclic plane, while both positive and negative lobe form varies according to the basis set. As was detected in our previous theoretical experiments of the interactions of the [PPy] open cyclic keto dyes with the [CNs]NPs nanoparticles moiety to form the closed cyclic, the negative lobe contacting carbon nanocluster contracts though the opposite one expands (Hashim et al. 2020; Abdel-Aziz et al. 2020b).

Fig. 7
figure 7

The DFT computation used DMOl3 Material studio software programs of a Electron density of the [PPy]; b Electron density of the [PPyCNsF]NC c Potentials of the [PPy]; d Potentials of the [PPyCNs]NC; e MEP of the [PPy] and f MEP of the [PPyCNs]NC gaseous phase as isolated molecule

In addition, the electrostatic potential maps (MEP) are an electrostatic potentials trace mapped at a constant electron density surface with DMOl3. Figure 7e–f are often too significant for research into the physicochemical relationship of molecular structure with a red color. The highest negative region for the electrophilic attack site and blue color express the maximum positive region that is the favored nucleophilic attack site. The potential is following red < green < blue, the most desirable being blue. The remarked 3D of MEPVmin minimum principles neighboring the lone pair area of [PPy] and [PPyCNsF]NC as isolated molecules are − 1.046 × 10–1 and − 1.476 × 10–1 kcal/mol done by MEP structure calculation, respectively (Veved et al. 2020; Ibrahim et al. 2020a). The calculated values of MEPVmax of the nanocomposite and hybrid nanocomposite derivatives as a gaseous phase molecule are + 2.436 and + 5.465 × 10–1 kcal/mol done by DMOl3/DFT computations, respectively. As predicted, the \({\text{MEPV}}_{\min } \) and \({\text{MEPV}}_{\max }\) values should be calculated by electronically substituted magnitudes. The MEPVmax negative amount (− 1.046 × 10–1 kcal/mol) is found for the [PPy] as an isolated molecule. The positive value of MEPVmax (2.436 kcal/mol) functioned as an important quantitative predictor for the single couple (Mohlala et al. 2020; Al-Hossainy and Eid 2020). MEPVmin may be more instrumental and straightforward than techniques based on ν(C = O) values relying on quantification of electronic results of dies. MEPVmax can be used as σ-donor power to the [PPy] derivatives movement [PPyCNsF]NC as an isolated molecule matrix.

If no major π-back bonding of [PPy] as an isolated molecule is present, the energy interaction between nanoparticles [PPy] and [CNs]NPs is directly proportional to the value of MEPVmax (Lim et al. 2020; Zoromba et al. 2019).

The computed HOMO and LUMO for [PPy] and [PPyCNs]NC

The molecular structures along with atomic numbering of [PPy] and [PPyCNsF]NC as well as their nanocomposites are shown in Fig. 6a–b. The bond length and angle of the [PPy] and [PPyCNsF]NC as isolated molecules are supplied in Table 4. The comparison of the [PPy] data with the corresponding nanocomposite [PPyCNsF]NC as isolated molecule indicated that (Wang et al. 2020; Al-Hossainy et al. 2020):

  1. (a)

    The bond angles of the [PPy] as isolate molecule was decreased or enhanced due to the formation of six-membered chelate.

  2. (b)

    The angles around the ion of metals correspond with the geometry of the octahedral.

  3. (c)

    The bonds of the coordination sites become longer and weaker than that previously found in nanocomposite, e.g., C–OH, and/or C–O–C as a result of –O–[CNs]NPs formation.

  4. (d)

    There is a difference in C–O–C bond lengths of [PPy] and hybrid nanocomposite [PPyCNsF]NC as isolated molecule attribute to the coordination gets place via O atoms of the (–C–O–C) ester group in [PPy].

  5. (e)

    The data of [PPy] and hybrid nanocomposite [PPyCNsF]NC as isolated molecules cleared that the lengths bonds –C–O–C– bonds are short than the lengths bonds –C–OH bonds (Badry et al. 2020; Eid and Al-Hossainy 2020).

Table 4 Comparison data and calculated EHOMO, ELUMO, energy band gap (\(\Delta E_{g}^{{{\text{Opt}}}}\)), chemical potential (\(\mu\)), electronegativity (\(\chi\)), global hardness (\(\eta\)), global softness (б) and global electrophilicity index (\(\omega_{1}\)) for [PPy] and [PPyCNsF]NC as isolated molecule

The frontier molecular orbits were called HOMO (π-donor) and LUMO (π-acceptor) (FMOs). The energy transmitting correlation in the fragment is explained by the FMO vitality sources, \(E_{{{\text{HOMO}}}}\) and \(E_{{{\text{LUMO}}}}\), in addition to the energy difference, \(\Delta E_{g}^{{{\text{Opt}}}}\), demonstrated in Fig. 8 (Ibrahim 2020; Thabet et al. 2020) and Table 4. The chemical reactivity descriptors similar to global softness (б), global electrophilicity index (\(\omega_{1}\)) electronegativity (χ), global hardness (\(\eta\)), and chemical potential (\(\mu\)) for the [PPy] and [PPyCNsF]NC as isolated molecules were calculated. The obtained EHOMO and ELUMO were negative demonstrating the steadiness of these composites. The [PPy] and [PPyCNsF]NC as isolated molecules revealed energy gap value, \(\Delta E_{g}^{{{\text{Opt}}}}\), 2.888 and 1.616 eV, correspondingly, which showed their great energy enthusiasm and consequently high stability. The molecule's narrower energy difference makes it more polarizing and softer, as soft molecules are more reactive than hard molecules due to their ability to send an acceptor electron quickly. The electrophilicity index (\(\omega_{1}\)) is used as the most fascinating quantum chemistry descriptor, because it indicates the toxicity of various contaminants and the biological function of drugs. It measures energy stability as the device receives additional electronic charges (El-Moussawi et al 2019, 2020; Wan et al. 2019; Ennehary et al. 2020; Al-Hossainy and Zoromba 2018).

Fig. 8
figure 8

The DFT computation used DMOl3 Material studio software programs for a HOMO and LUMO calculations of the [PPY] and b HOMO and LUMO calculations of the [PPyCNs]NC

Optical Properties of the thin film

The functional aspects of nonlinear optics (NLOs) are dominated by the interaction of electromagnetic radiation with matter; its interactions polarize the distribution of charge at the molecular level and change the field propagation. The linear approach is represented through polarization and nonlinear response through hyperpolarization. The optical properties study nonlinear optical property measurements on bulk systems, such as [PPy] and its hybrid nanocomposite [PPyCNs]NC, with significant performance in the quantum chemistry and in such a way that the data can be included in the calibration of experiments. Figure 9a–d show the optical parameters such as absorbance (Abs), transmittance (T(λ) %), and reflectance (T(λ) %) spectra of all simulated methods as an isolated molecule and experimental method as thin films. In Fig. 9a and c, the absorbance maximum value for [PPy] and [PPyCNsF]NC thin films appear at \(\lambda_{\max } = 433\;{\text{nm}}\) and 590 nm. Thus, the two absorption bands for [PPy] and [PPyCNsF]NC thin films are assigned to π → π* shift, suggesting the occurrence of unsaturated C = O connections at 1109 cm− 1 as stated in the FTIR. This again confirms the complexity and associations between the [CNs]NPs and polymer chains. In Fig. 9b and d, the [PPy] polymer exhibits \(T()_{\max } \%\) at 94.98% and the nanocomposite films [PPyCNsF]NC also show a reasonable \(T()_{\max } \%\) at 96.21% in most of the wavelength spectrum analyzed. The values of \(T()_{\max } \%\) confirm the creation of homogeneous composites that are ideal for optical applications of coating (Chen et al. 2017; Al-Hossainy 2016).

Fig. 9
figure 9

a Absorbance (Abs) UV–Vis spectra for the simulated [PPy] and Experimental [PPy]TF; b Transmittance T(λ)% and reflectance R(λ)% spectra for the Experimental [PPy]TF; c Absorbance (Abs) UV–Vis spectra for the simulated [PPyCNs] and Experimental [PPyCNs]NC. d Transmittance T(λ)% and reflectance R(λ)% spectra for the Experimental [PPyCNs]NC

The electronic transition of the [PPy] and [PPyCNsF]NC isolated molecules from HOMO to LUMO is related to this absorption band at 2.888 eV (λ = 429 nm) and 2.061 eV (λ = 601 nm), respectively (Navale et al. 2014; Al-Hossainy and Ibrahim 2015b). The absorption on the y-axis against wavelength on the x-axis for [PPy] and [PPyCNsF]NC matrices by exploiting DMOl3 in DFT scheming at 360 \(\le\) λ \(\le\) 1000 nm are shown in Fig. 9a and b. Two functions absorption bands were found for [PPy] and [PPyCNsF]NC isolated molecules located at \(_{\max } = 433\;{\text{nm}}\) and 590 nm due to π-π* shift as of optical properties. Conclude that, if a qualitative distinction is made, a strong consensus is detected for both simulated optical and experimental optical parameters between the computed DMOl3.

To determine the \(E_{g}^{{{\text{Opt}}}}\) of the investigated materials in this work, Tauc’s equation was used (Baishya 2018):

$$ \left( {\alpha {\text{hv}}} \right)^{2} = A\left( {{\text{hv}} - E_{g}^{{{\text{Opt}}}} } \right) $$
(3)

and

$$ \left( {\alpha {\text{hv}}} \right)^{1/2} = A\left( {{\text{hv}} - E_{g}^{{{\text{Opt}}}} } \right) $$
(4)

for direct and indirect optical transformations, where A is a constant and \({\text{hv}}\) is the approximated value of the incident photon energy

$$ {\text{hv}}\left( {{\text{eV}}} \right) = 1242/\lambda \left( {{\text{nm}}} \right) $$
(5)

Figure 10a–b show the dependency of together \(\left( {\alpha {\text{hv}}} \right)^{2}\) and \(\left( {\alpha {\text{hv}}} \right)^{1/2}\) and on photon energy. Extending the linear parts of \(\left( {\alpha {\text{hv}}} \right)^{1/2}\) and \(\left( {\alpha {\text{hv}}} \right)^{2}\) curves to \(\alpha = 0\) provide the indirect \(E_{g}^{{{\text{Opt}}}}\) and direct \(E_{g}^{{{\text{Opt}}}}\), separately. The direct and indirect \(E_{g}^{{{\text{Opt}}}}\) of [PPy] thin-film are 2.68 and 2.77 eV, respectively, after loading [CNs]NPs the direct and indirect \(E_{g}^{{{\text{Opt}}}}\) decreased to 1.93 and 2.00 eV, individually. The strong interactions between the [CNs]NPs carboxylic group and [PPy] thin film are attributable to the discussed FTIR findings. Those thin films can therefore form load transfer complexes and cause defects in the [PPy] matrix. This complexation and enlarged disturbance, assisted by XRD findings, facilitates section movement of the chains and allows ion diffusion among the valence and lead bands of [PPy] (Ibrahim et al. 2020b; Gemeinera et al. 2015).

Fig. 10
figure 10

Plot (αhν)m vs photon energy (hν) eV for [PPy] and [PPyCNs]NC as-deposited thin film

Conclusion

In situ oxidative polymerization is a suitable route for the preparation of doped polypyrrole/functionalized multi-walled carbon nanotubes composites [PPyCNsF]NC. A surfactant such as sodium dodecyl sulfate can be used to control the morphology of the resulting nanocomposite. A thin film with controlled thickness can be prepared using the thermal evaporation technique. SEM photographs observed that the shape and size of the resulting polymer is depending on the type of used surfactant during the polymerization process and the presence of MWCNTs. The XRD obtained for the [PPy] and [PPyCNsF]NC thin films confirm that the material is nanocrystalline with the average crystallite size of 74.24 nm by using modified Scherer's equation. The increase in absorption bands from 433 to 590 nm in the UV/Vis region can be interpreted by π to π* transitions between bonding and anti-bonding molecular orbital for [PPy] and [PPyCNsF]NC thin films, respectively. The indirect optical transition for [PPy] and [PPy NsF]NC thin films is decreased from 2.77 to 2.00 eV for the fundamental energy bandgap, respectively. Optical thin-film characterizations demonstrated that optoelectronics and solar cell applications are excellent choices. The equal consensus between the theoretical and experimental findings of the present paper shows that a numerical approach is possible to forecast thin film features over a large range of conditions.