1 Introduction

Polymeric nanocomposites have been used in a wide range of fundamental studies and technological applications due to their distinct properties such as size distribution, composition, phase, shape, and structure (Elashmawi et al. 2023; Sharma et al. 2019; Thomas et al. 2014). Polyaniline (PANi) is made up of repeating units of aniline monomers that are connected through nitrogen atoms (Atta et al. 2022; Sendi et al. 2023). It contains alternating single and double bonds along its backbone. In its conductive form, PANi mainly exists in the emeraldine oxidation state. This contains amine as well as imine nitrogen atoms. The different oxidation levels allow charge carriers to move along the chain. PANi can be switched between insulating and conductive forms either by exposure to chemicals (doping/dedoping) or electrochemically. This tunable conductivity makes PANi useful for many applications (Sharma et al. 2014; Kariper 2022; Wang et al. 2019). Major advantages of PANi are its environmental stability, facile and low-cost synthesis, multiple possible oxidation states, and reversible control of conductivity (El-Naggar et al. 2023; Althubiti et al. 2022).

PANi is a conducting polymer which has garnered interest for use in sensors, batteries, and electromagnetic shielding applications due to its environmental stability, reversible control of conductivity, electrochromic properties, and low cost. However, limitations like poor mechanical properties have restricted widespread adoption. Recent works have explored using iron oxide (Fe3O4) nanoparticles to reinforce PANi and create functional PANi/Fe3O4 polymer nanocomposites (Learning and Imaging 2017; Al-Farraj et al. 2018). The magnetic Fe3O4 inclusion can enhance properties like tensile strength and hardness while adding magneto resistive characteristics (Lin et al. 2006; Huang et al. 2018(.

Magnetic polymer nanocomposites are materials that incorporate magnetic nanoparticles like iron oxide (Fe3O4) or cobalt ferrite (CoFe2O4) into a polymer matrix (Atta et al. 2022; Menazea 2020; Raza et al. 2016; Alshammari 2022(. The presence of magnetic nanoparticles lends properties like magnetization, magnetic responsiveness, and magnetoresistance to the polymer. As well as enhancing mechanical properties in some cases.

Magnetic nanoparticle-filled polymer composites leverage the functionality of magnetic fillers with process ability of polymers to create smart, multi-functional materials with growing relevance in several advanced technology domains. In recent research, the synthesis of conducting polymers based inorganic materials.

Iron oxide (Fe3O4) is a common magnetic substance that attracted great attention in different fields such as recording media, chemical sensors, drug delivery, microwave devices, electro photographic devices, medical applications, and magnetic sensing. Magnetite (Fe3O4) with magnetic, low density, and high crystallinity can be successfully prepared as the core or shell.

Research interest in conducting polyaniline (PANi) polymer nanocomposites filled with magnetic iron oxide nanoparticles (Fe3O4) has increased significantly. The incorporation of Fe3O4 nanoparticles can simultaneously enhance the structural, optical, mechanical, and magnetic properties and lend additional functionality like magnetoresistance, microwave absorption, and rapid heating abilities upon exposure to an alternating magnetic field. Review articles have highlighted the wide range of morphologies and properties achievable by different chemical syntheses of these PANi/Fe3O4 nanocomposites (Lai et al. 2021; Goswami and Mahanta 2020; Zhang et al. 2017; Diantoro et al. 2017; Patil et al. 2016). It is found flower-shaped particles yielded better electromagnetic heating behaviors compared to cubes or spheres. Multiple studies have tailored fabrication methods to optimize electrical conductivity, thermal stability, microwave absorption for electromagnetic interference shielding, and responsiveness to magnetic stimulation for potential biomedical uses. While dispersion and interfacial adhesion remains an issue, the versatility and customizability of PANi/Fe3O4 nanocomposites makes them promising candidates for sensors, organic electronics, magnetically guided drug delivery, and lightweight electromagnetic radiation shielding. Synthesis and microwave absorption properties of electromagnetic functionalized Fe3O4–polyaniline hollow sphere nanocomposites were studied by Zhu et al. (2013). The nanocomposites were synthesized by an electrostatic self-assembly approach. The morphology and structure were characterized. Magnetization measurements showed the saturation magnetization was 38.6 emu g−1. The results showed the nanocomposites are promising for microwave absorption applications. Lu et al. (Lu et al. 2005) reported the synthesis and characterization of PANi-Fe3O4 nanocomposites. The PANi-Fe3O4 nanocomposites were synthesized using a novel method involving aniline dimer-COOH to assist in dispersing the Fe3O4 nanoparticles in the PANI matrix. The nanocomposite structure was analyzed using techniques like FTIR, XRD, XPS, UV–Vis, and TEM. The PANI-Fe3O4 nanoparticles showed superparamagnetic behavior with high saturation magnetization, indicating their potential for applications. Araújo et al. (Araújo et al. 2010) prepared PANI-Fe3O4 nanocomposites by in-situ polymerization of aniline using Fe3O4 nanoparticles as the oxidant under UV irradiation. They provide a useful method for synthesizing PANI-Fe3O4 nanocomposites with combined electrical and magnetic properties. The nanocomposites have potential applications in areas like electromagnetic shielding, sensors, microwave absorption etc. The aim of this work is to fabricate, characterize, spectroscopic and magnetic properties of the PANi/Fe3O4 nanocomposites films. The incorporation of Fe3O4 nanoparticles provides magnetic properties to the PANi matrix, making PANi/Fe3O4 nanocomposites suitable for applications such as data storage and magnetic sensors.

2 Experimental section

2.1 Materials

Aniline sulphate (C6H5NH2)2.H2SO4, Alfa Aesar ≈ 98 %), ammonium peroxydisulfate (NH4)2S2O8, Riedel-deHaen, 98%), ferric chloride hexahydrate (FeCl3·6H2O) (Sigma > 99%), Ferrous chloride tetrahydrate (FeCl2.4H2O, Sigma > 99%) and sodium hydroxide (NaOH, Sigma = 97 %). The chemical structure of PANi is shown in Scheme 1.

Scheme 1
scheme 1

The chemical structure of PANi

2.2 Synthesis of magnetite nanoparticles

The co-precipitation method was employed to synthesize the magnetite nanoparticles (Fe3O4 NPs). To initiate the process, 2 wt% of FeCl3·6H2O and 2 wt% of FeCl2.4H2O were dissolved in 100 mL of distilled water under the influence of a magnetic stirrer at room temperature. Subsequently, NaOH was slowly added drop by drop until the pH level reached approximately 9.8. The resulting mixture formed a black precipitate (Fe3O4 NPs). This precipitate underwent a thorough washing process, involving three cycles of rinsing with distilled water and ethanol, respectively. Following the washing steps, the sample was subjected to centrifugation at 6000 rpm for 10 min to separate the solid from the liquid. Finally, the Fe3O4 nanoparticles were dried in an oven for characterization purposes.

2.3 Synthesis of polyaniline nanoparticles

PANi nanoparticles were synthesized using the solid-state polymerization technique. In this method, 0.2 g of ammonium peroxydisulfate (NH4)2S2O8), serving as the oxidizing agent, and 0.5 g of aniline sulfate (C6H5NH2)2.H2SO4) were combined. The mixture was then subjected to grinding, gradually transforming from a white color to a dark green shade, indicating the formation of a homogeneous sample. The resulting mixture was left undisturbed at room temperature overnight to allow for further polymerization. After 24 h, the dark green powder was subjected to a washing process using distilled water and methanol, respectively. The purpose of this step was to eliminate any residual chemicals. Subsequently, the sample was centrifuged at a speed of 6000 rpm to separate the nanoparticles from the remaining substances. Finally, the nanoparticles were dried in a vacuum oven at 35 °C for a duration of 12 h.

2.4 Preparation of PANi/Fe3O4 nanocomposite

The synthesis of PANi/Fe3O4 polymer nanocomposites was carried out using the solid-state polymerization approach. A mixture comprising 0.05 g of Fe3O4 nanoparticles, 0.5 g of aniline sulfate, and 0.2 g of ammonium peroxydisulfate was prepared. The components were thoroughly mixed and ground until the reaction was complete. The resulting mixture powder was then left undisturbed at room temperature overnight to allow for characterization and further examination.

2.5 Characterizations

Fourier transform infrared (FT-IR) spectra were recorded on Thermo Scientific Nicolet iS10, the USA with a resolution of 2 cm− 1 in the spectral range 4000–400 cm− 1. Morphological and selective area electron diffraction (SAED) characterization was obtained via TEM (JEOL-JEM-2100, Japan). The magnetization properties of the PANi/Fe3O4 nanocomposite films were carried out using vibrating-sample magnetometry (VSM, TM-VSM5250, Japan)) at room temperature with a magnetic field range between − 20 and 20 KOe.

3 Results and discussion

3.1 Fourier transformation infrared (FT-IR) analysis

Figure 1 indicates the FT-IR absorption spectra of pure PANi, pure Fe3O4, and PANi/Fe3O4 nanocomposites in the range of wavenumber from 4000 to 400 cm− 1. The main characteristic bands of pure PANi are observed at 1567, 1472, 1296, and 1101 cm− 1. These bands are assigned to C=N stretching vibration of the quinoid ring, C=C stretching vibration of the benzenoid ring, C–H stretching vibration of the quinoid ring, C–N stretching vibration (–N–benzenoid–N–) and C=N stretching (–N=quinoid=N–), respectively. The infrared absorption band observed at 789 cm− 1 is attributed to the out-of-plane deformation vibrations of secondary aromatic amine C–N bonds and aromatic C–H bonds.

Fig. 1
figure 1

FT-IR spectra pure PANi, pure Fe3O4, and PANi/Fe3O4 nanocomposites

For Fe3O4 nanoparticles, the broad band centered at 580 cm− 1 is assigned to Fe–O stretching vibration mode. This band value is almost identical to the values reported in the literature (Chaki et al. 2015; Lesiak et al. 2019). The observed absorption band centered at 3412 cm− 1 corresponds to the O–H stretching vibrations of hydroxyl groups (OH) associated with water adsorbed on the nanoparticle surface.

The FT-IR spectra of PANi/Fe3O4 nanocomposites exhibit broad absorptions peaks at 1572, 1486, 1440, 1300, 1111, 796, and 506 cm− 1. These bands are attributed to a blue shift compared to pure PANi due to the lone pair of electrons in nitrogen atoms disposed to adsorb on oxygen atoms on the surface of magnetite via hydrogen bonding, thus the electron cloud density of conjugated bonds in benzenoid and/or quinoid rings is decreased (Atta et al. 2022; Sendi et al. 2023; Althubiti et al. 2022; Patil et al. 2016).

The intensity of the band at 580 cm− 1 of Fe3O4 to (Fe–O stretching) is dramatically decreased because of the weakening surface of (Fe–O) bonds. As a result, the spectra of PANi/Fe3O4 nanocomposites showed a definite combination and strong interaction rather than a blend of two components. This indicates a structural change and agrees with our XRD results, which show a new structural phase by adding Fe3O4. In addition, the decrease in the IR vibrational modes of all samples can be attributed to the interaction between the PANi and the magnetic (Fe–O) particles.

3.2 Morphology (TEM)

Figure 2a indicates an image of by the transmission electron microscopy (TEM) of pure Fe3O4 nanoparticles. As shown, shape of Fe3O4 contains a regular nanometric spherical shape. Fe3O4 nanoparticles are well polydispersity with an average diameter of 16 nm. The Fe3O4 nanoparticles exhibit a non-uniform size distribution as a result of aggregation into larger secondary particles. Agglomeration of the primary iron oxide particles causes them to cluster together into particle aggregates with an irregular size distribution spanning a broader range. This aggregation is likely driven by attractive forces like van der Waals interactions or magnetic dipolar forces between the nanoparticles. Consequently, the size distribution profile shows both small primary particles and larger agglomerated secondary structures rather than a narrow monodisperse profile. Additional particle stabilization methods could help mitigate this aggregation issue and yield a more uniform nanosized distribution. Several mechanisms can lead to nanoparticle aggregation including Van der Waals forces, electrostatic interactions, depletion interactions, and hydrophobic interactions while strategies for mitigating nanoparticle aggregation can be through steric stabilization, solvent selection, surface modification, ultrasonication or mechanical agitation, controlling pH and ionic strength.

Fig. 2
figure 2

TEM images of: a Fe3O4 nanoparticles, b PANi with 0.02 wt% of Fe3O4 nanocomposites, c PAni with 0.04 wt% of Fe3O4 nanocomposites and SAED of Fe3O4 nanoparticles

Figure 2b and c observe clear morphological changes of PANi/ Fe3O4 core-shell nanocomposites. Magnetite nanoparticles are well widespread by the shell surface of the PANi matrix. Moreover, Fe3O4 nanoparticles are well wrapped by the shell layer of PANi. The aniline sulfate monomer is adsorbed by electrostatic and hydrogen bonding to the surface of the magnetite. The existence of polyaniline is noted as a gray cloud embedding Fe3O4 nanoparticles. The selective area electron diffraction (SAED) also indicated the crystalline structure of Fe3O4 nanoparticles depicted in Fig. 2d. The dark field revealed a single crystal structure of Fe3O4 nanoparticle. The image exhibits well-defined and distinct lattice fringes, which can be attributed to the Miller indices and corresponding interplanar spacings of the (1 1 1), (2 2 0), (3 1 1), (4 0 0), (5 1 1), and (4 4 0) planes. This observation suggests that the synthesized Fe3O4 particles possess a high degree of crystallinity and uniform morphological characteristics. These diffraction patterns are consistent with the calculated X-ray diffraction patterns reported in the literaturev (Cassim et al. 2011).

3.3 SEM analysis

The scanning electron microscopy (SEM) analysis has been used to validate the morphology of pure Fe3O4 nanoparticles and PANi/Fe3O4 nanocomposites presented in Fig. 3. The SEM images unequivocally demonstrate that the Fe3O4 nanoparticles possess a spherical shape. The significance of this observation lies in the fact that the morphology of nanoparticles plays a vital role in their properties and applications. The spherical shape of Fe3O4 nanoparticles is particularly desirable due to its uniformity, which enhances their dispersibility, reactivity, and stability. The confirmation of the spherical morphology through SEM images provides visual evidence of the synthesized Fe3O4 nanoparticles' quality and homogeneity. SEM imaging allows for the assessment of the size distribution and surface characteristics of the nanoparticles, ensuring that they meet the desired specifications. By observing the SEM images, researchers can gain insights into the uniformity and consistency of the nanoparticles, which are crucial factors in determining their behavior and performance in various applications. Furthermore, the SEM analysis extends its importance to the characterization of PANi/Fe3O4 nanocomposites. The SEM images enable researchers to examine the dispersion of Fe3O4 nanoparticles within the PANi matrix, providing valuable information on the nanocomposite's structure and morphology. A well-dispersed and uniform distribution of nanoparticles is highly advantageous, as it can enhance the overall properties and performance of the nanocomposite material. By understanding and optimizing the morphology and distribution of nanoparticles, researchers can tailor the properties of these materials to meet specific requirements and enhance their performance in various fields.

Fig. 3
figure 3

SEM images of: a pure PANI, b pure Fe3O4 NPs, and c PANi/Fe3O4 nanocomposites

3.4 Magnetic properties

Figure 4 shows the measurements of magnetic hysteresis loops using a vibrating sample magnetometer (VSM)) (Petcharoen and Sirivat 2012; Elashmawi et al. 2014; Ghandoor et al. 2012) for pure Fe3O4 NPs dependence of low concentrations of Fe3O4 incorporated in polyaniline (PANi) at room temperature and in a magnetic field (20 kOe to − 20 kOe) range. Magnetic hysteresis measurement of Fe3O4 showed a maximum value of magnetization saturation value (Ms) reached to 49.57 emu/g. The magnetization saturation values (Ms) are 27.57, 13.82, 5.56, and 2.75 emu/g for 0.02, 0.04, 0.06, 0.08 wt% of Fe3O4 NPs, respectively. It clear that no magnetic of pure PANi The magnetic parameters (Lin et al. 2006) such as saturation magnetization (Ms), coercivity (Hc), and remnant magnetization (Mr) are recorded in Table 1. This increase can be attributed to an increase in the number of Fe3O4 magnetite nanoparticles found in the PANi polymer. The binding of the organic group in PANi to the pure Fe3O4 NPs diminished the Ms values (Sharma et al. 2020). Magnetic measurements prove that the pure Fe3O4 NPs display superparamagnetic behaviour as the magnetization curve passes through the origin of the axes. This means that when external field is zero and the magnetization is also zero. Magnetic measurements prove that the pure Fe3O4 NPs display superparamagnetic behavior, as evidenced by the magnetization curve. The magnetization curve exhibits no hysteresis loop, which is a characteristic of superparamagnetic materials. This lack of hysteresis indicates that the Fe3O4 NPs do not retain any permanent magnetization when the external magnetic field is removed. The superparamagnetic behavior arises due to the small size of the Fe3O4 NPs, where each particle essentially behaves as a single magnetic domain. At this nanoscale size regime, thermal energy is sufficient to demagnetize the particles by randomly reorienting the magnetic moments, resulting in a negligible overall magnetization in the absence of an external field. The observation of superparamagnetic in the Fe3O4 NPs is advantageous for various applications, such as magnetic resonance imaging and magnetic data storage, where a high magnetic response and the absence of magnetic remanence are desirable properties.

Fig. 4
figure 4

Magnetization versus applied magnetic field (KOe) of pure Fe3O4 NPs, pure PANi, and PANi incorporated with 0.02, 0.04, 0.06, and 0.08 wt% of Fe3O4 nanocomposites

Table 1 The values of saturation magnetization (Ms), remanent magnetization (Mr), and coercive field (Hc) po PANi/Fe3O4 nanocomposites. (Lin et al. 2006 and Sharma et al. 2020)

4 Conclusion

The preparation of polyaniline (PAni)/iron oxide (Fe3O4) nanocomposites with a core-shell structure at room temperature via a solvent-free method has been successfully improved. Fourier-transform infrared (FT-IR) spectroscopy analysis of the prepared samples confirms the successful polymerization of PANi onto Fe3O4. The resulting PAni/ Fe3O4 nanocomposites exhibit broad absorption bands at specific wavenumbers, indicating the presence of diverse functional groups. The observed blue shift in certain peaks suggests an interaction between nitrogen atoms in PANi and oxygen atoms on the magnetite surface through hydrogen bonding. The intensity and wavenumber of the Fe3O4 absorption band decrease, indicating weakened Fe-O bonds. These findings demonstrate a strong interaction and integration of PANi and Fe3O4 in the nanocomposites. The magnetic saturation measurements reveal an increase in magnetization with higher loading of Fe3O4 nanoparticles. This change in magnetic behavior offers the ability to tune the magnetization strength of the nanocomposites to suit specific application requirements. The Fe3O4 nanoparticles themselves exhibit a uniform spherical shape with an average diameter of 16 nm. However, they also display a non-uniform size distribution due to aggregation into larger secondary particles, likely driven by attractive forces. The morphological analysis of PANi/ Fe3O4 core-shell nanocomposites reveals distinct changes, with Fe3O4 nanoparticles being well dispersed and encompassed by the PANi shell. Electron diffraction techniques confirm the crystalline structure of the Fe3O4 nanoparticles, displaying diffraction rings consistent with those of magnetite. Overall, these results validate the potential of incorporating magnetic Fe3O4 nanoparticles to introduce magnetic functionality into PANi-based nanocomposite materials.