A Novel Trace-Level Ammonia Gas Sensing Based on Flexible PAni-CoFe2O4 Nanocomposite Film at Room Temperature

In this study, we developed a new chemi-resistive, flexible and selective ammonia (NH3) gas sensor. The sensor was prepared by depositing thin film of polyaniline-cobalt ferrite (PAni-CoFe2O4) nanocomposite on flexible polyethylene terephthalate (PET) through an in situ chemical oxidative polymerization method. The prepared PAni-CoFe2O4 nanocomposite and flexible PET-PAni-CoFe2O4 sensor were evaluated for their thermal stability, surface morphology and materials composition. The response to NH3 gas of the developed sensor was examined thoroughly in the range of 1–50 ppm at room temperature. The sensor with 50 wt% CoFe2O4 NPs content showed an optimum selectivity to NH3 molecules, with a 118.3% response towards 50 ppm in 24.3 s response time. Furthermore, the sensor showed good reproducibility, ultra-low detection limit (25 ppb) and excellent flexibility. In addition, the relative humidity effect on the sensor performance was investigated. Consequently, the flexible PET-PAni-CoFe2O4 sensor is a promising candidate for trace-level on-site sensing of NH3 in wearable electronic or portable devices.


Introduction
Ammonia (NH 3 ) is a pungent, toxic, colorless, water-soluble and flammable gas produced worldwide in large quantities of more than 200 million tons per annul. It plays a vital role in all life forms and is one of the major industrial raw materials in chemicals production facilities such as agriculture, refrigeration technology, food, fertilizers and medical facilities [1,2]. According to Occupational Safety and Health Administration (OSHA) and the Agency for Toxic Substances and Disease Registry (ATSDR), ammonia is hazardous gas and its presence in atmosphere even at very low concentrations of 50 ppm could irritate the respiratory tract, skin, nose and throat of children and/or adults. It also has a bad impact on the environment and can cause lung damage or even death at high concentration levels beyond 500 ppm [3]. Therefore, a low-cost, sensitive, stable, ambient temperature, and reliable ammonia detection sensor is imperative. Recently, conductive conjugated polymers on flexible substrate are in fashion as sensing materials for trace-level detection of ammonia owing to their lightweight, flexible, and portable nature [4]. These type of ammonia sensors are widely reported due to their simple synthesis, ambient temperature sensitivity and low cost processing [5][6][7][8]. In this context, polyaniline (PAni) is one of the most significant conducting polymers used for ammonia sensing because of its high reactivity and facile synthesis [9] along with its reversible doping/dedoping property [10], excellent electrical properties, unique redox characteristics and adjustable sensing at ambient temperature. However, pure PAni-based sensors have certain associated caveats, such as limited sensing efficiency in context of response, selectivity, and long response/recovery time [11]. Recently, researchers focused more on PAni-based nanocomposites using functionalized carbon-based materials and metal oxide semiconductors [12][13][14][15][16][17] that resulted in a significant performance improvement in PAni-based ammonia sensors.
The current tendency in producing trace-level NH 3 gas sensors is to prepare flexible substrate sensors based on PAni as conducting polymers due to their lightweight, portable, and flexible properties. Y. Zhang et al. [18] prepared an NH 3 sensor based on polyaniline/SrGe 4 O 9 nanocomposite on Polyimide (PI) substrate by in situ chemical oxidation polymerization technique. The sensor revealed excellent response time (24 s), good flexibility and reproducibility. Q. Wu et al. [4] utilized porous polyvinylidene fluoride (PVDF) as aflexible template for PAni composed with graphene (GP) with 10% response towards 0.1 ppm NH 3 and response time (46 s). J. Ma et al. [19] modified PET fibers by ethylenediamine (EDA) to expose amino groups and adhere to carboxyl groups of MWC-NTs and coated by PAni, the sensor showed 117% response towards 50 ppm NH 3 with response time (47 s) and cost-effective flexible substrate modification.
Cobalt ferrite (CoFe 2 O 4 ) is an n-type semiconductor with band gap of 1.76 eV [20]. This material showed promising magnetization properties [21,22], including high remanence magnetization and coercivity. It also has shown high chemical stability, cost-effectiveness, and shape versatility when produced at high temperatures. Cobalt ferrites have been applied in many technological fields, such as ferrofluids, catalysis, electronics, cancer treatment [23] and chemi-resistive sensors [24]. It has an inverse spinel structure in which, Fe 3+ ions are distributed between octahedral and tetrahedral sites and Co 2+ ions are in octahedral sites. In oxidation reactions, CoFe 2 O 4 has significant catalytic properties due to the high mobility of oxygen ion at the film surface and thus is highly preferred for the gas sensing applications [25].
Herein, we report a thin film of PAni-CoFe 2 O 4 nanocomposites with different concentrations of CoFe 2 O 4 NPs deposited on a flexible PET substrate by using in situ chemical oxidative polymerization technique. The prepared sensor is subsequently applied for room temperature detection NH 3 gas. Several gas sensing parameters, such as selectivity, response at different gas concentrations, reproducibility, response/recovery times, flexibility, and low detection limit were studied. and kept at these conditions for further 14 h. Finally, a green emeraldine salt precipitate of PAni was formed. The as-synthesized CoFe 2 O 4 NPs (10, 30 and 50 wt%) were sonicated and added to the C 6 H 7 N for the preparation of hybrid nanocomposite on the PET film. The flexible film was filched from the PAni solution, washed with DI water and finally placed in an oven at 60 • C for 1 h. The screen-printing technique was used to print the silver-integrated electrode onto the surface of the film to obtain the flexible gas sensor film. The scheme of film formation is depicted in Figure 1.

Experimental
70 °C. The experimental procedure is as follows: PET films were immersed vertical solution of 0.2 M C6H7N monomer dissolved in 1 M HCl at 0-5 °C. The mixture stirred using a mechanical stirrer supplied with Teflon rod to avoid any agglomera After ~1 h, 0.1 M (NH4)2S2O8 was drop-wise added to the above mixture with contin stirring and kept at these conditions for further 14 h. Finally, a green emeraldine precipitate of PAni was formed. The as-synthesized CoFe2O4 NPs (10, 30 and 50 w were sonicated and added to the C6H7N for the preparation of hybrid nanocomposit the PET film. The flexible film was filched from the PAni solution, washed with DI w and finally placed in an oven at 60 °C for 1 h. The screen-printing technique was use print the silver-integrated electrode onto the surface of the film to obtain the flexible sensor film. The scheme of film formation is depicted in Figure 1.

Characterization and Gas Detection Measurements
As-prepared samples were investigated for their chemical structure by Fo transform infrared spectroscopy (FT-IR) (Thermo Nicolet Avatar 370). Structural s was conducted by XRD (ARL X'TRA Powder Diffractometer, Thermo Scientific)

Characterization and Gas Detection Measurements
As-prepared samples were investigated for their chemical structure by Fourier transform infrared spectroscopy (FT-IR) (Thermo Nicolet Avatar 370). Structural study was conducted by XRD (ARL X'TRA Powder Diffractometer, Thermo Scientific) at a speed of 5 • per min, 2θ scan range 5-80 • with λ 1.5406 Å. Surface topography and surface roughness average (Ra) for flexible sensors were measured by a profilometer with contact stylus tracing (KLA Tencor™ P-7, Milpitas, California, USA). The diameter of the diamond tip was 2.4 mm with accuracy 1 mm/s. Measurements were performed in three different positions of each film, Ra Mean values were calculated for each sample. The surface morphology was carried out by FE-SEM (Quanta FEG 250, Waltham, MA, USA). CoFe 2 O 4 particle size was investigated using HR-TEM (JEOL-2100, Tokyo, Japan). The glass transitions (T g ) of the flexible sensors were carried out using a (TA Instruments DSC Q4000, New Castle, DE, USA). The thermal stability of samples was monitored by TGA using a (TA Instrument TGA Q500, New Castle, DE, USA) with nitrogen purge flow 50 mL per min at 25-900 • C with a ramp rate of 10 • C per min. PAni-CoFe 2 O 4 (50%) nanocomposite elemental composition was evaluated by XPS (K-ALPHA, Themo Fisher Scientific, Waltham, MA, USA). CoFe 2 O 4 NPs hysteresis loop parameters were evaluated by a Vibrating Sample Magnetometer (VSM) (Lakeshore-7410, Westerville, OH, USA). The gas sensing properties of the sensors were evaluated at 40% relative humidity and room temperature by a homemade chamber as shown in Figure 2. The chamber is attached with a real-time acquisition system to measure the resistance. Prior to introducing NH 3 gas in to the test chamber, the sensor film was stabilized for 20 min to obtain the stable baseline in dry air, then a gas stream in the ambient temperature with various concentrations in the range of 1-50 ppm was injected to evaluate the sensors responses NH3 and selectivity test of interfering gas molecules (CO 2 , C 2 H 5 OH and CH 3 OH) at 50 ppm. A mass flow controller (MFC 300) (was utilized to expose a constant flux of 50 cm 3 min −1 from dry air to various injected target gas). To desorb NH 3 after each test, the sensor was flushed with dry air. The % response of the sensor is expressed by the following equation: where R o and R g are the measured resistances of air and tested gas, respectively [27,28]. The recovery time (T rec ) and response time (T res ) were measured as the times taken by the film sensor to reach 90% of the resistance change [29,30]. The humidity effect on PET-PAni-CoFe 2 O 4 sensor was detected using humidity chamber (Cincinnati Sub Zero-CSZ) by replacing the test gas chamber in the environmental chamber and adjusting the desired value of RH for 20 min till equilibrium before testing.
where Ro and Rg are the measured resistances of air and tested gas, respectively [27,28] The recovery time (Trec) and response time (Tres) were measured as the times taken by the film sensor to reach 90% of the resistance change [29,30]. The humidity effect on PET-PAni-CoFe2O4 sensor was detected using humidity chamber (Cincinnati Sub Ze ro-CSZ) by replacing the test gas chamber in the environmental chamber and adjusting the desired value of RH for 20 min till equilibrium before testing.

Magnetic Properties of CoFe2O4 NPs
The calcination temperature effect on the magnetic parameters of the precursor was recorded by VSM at room temperature, Figure 3 displays the M-H hysteresis loop for the CoFe2O4 NPs. The hysteresis curve shows ferrimagnetic performance of spinel CoFe2O nanocrystals. The coercive field (Hc), saturation magnetization (Ms), remanence mag

Magnetic Properties of CoFe 2 O 4 NPs
The calcination temperature effect on the magnetic parameters of the precursor was recorded by VSM at room temperature, Figure 3 displays the M-H hysteresis loop for the CoFe 2 O 4 NPs. The hysteresis curve shows ferrimagnetic performance of spinel CoFe 2 O 4 nanocrystals. The coercive field (Hc), saturation magnetization (Ms), remanence magnetization (Mr), and the squareness (R) value (Mr/Ms), were 1523 (Oe), 68.5 (emu/g), 29.5 (emu/g), and 0.43, respectively. The value of Ms is lower than the observed bulk (74.08 emu/g) [31]; this may be attributed to the modified cationic distribution and the disorder of the nanoparticle's surface. This is an indication of the excellent magnetic properties of CoFe 2 O 4 .

FT-IR Analysis
FT-IR spectra of PAni, CoFe2O4 NPs, and PAni-CoFe2O4 (50%) nanocomposite presented in Figure 4. The spectrum of PAni have a peak at 797 cm −1 due to C-H b ing of aromatic ring (out of plane) [32]. The absorption peaks at 1131 cm −1 and 1293 are attributed to the C-N stretching of quinoid and benzenoid ring, respectively The peaks at 1479 cm −1 and 1563 cm −1 represent thestretching vibration C=C of benze and quinoid structure, respectively [34]. The peak observed at 2411 cm −1 is due to C= [35]. The PAni spectrum has a prominent peak at 3417 cm −1 for aromatic aminestretching while the peaks at 2919 and 2850 cm −1 are attributed to -C-H stretching. above-mentioned typical peaks confirm the synthesis of PAni in protonated s CoFe2O4 have strong peaks at 580 and 493 cm −1 which represent the vibrations (ν) of M (Metal (M)=Fe, Co) symmetric stretching in tetrahedral and octahedral sites of CoF [36,37]. The peak at 1633 cm −1 corresponds to bending vibration of H-O-H [23]. The p at 3432 cm −1 can be inferred to stretching vibration of O-H group at the surface of due to surface water [38]. It is important to note that that the peak of CoFe2O4 in spectrum of PAni-CoFe2O4 (50%) nanocomposite shifted to higher wavenumbers of cm −1 that indicates the strong interaction between metal ions of CoFe2O4 and nitro atoms of PAni due to hydrogen bonding.

FT-IR Analysis
FT-IR spectra of PAni, CoFe 2 O 4 NPs, and PAni-CoFe 2 O 4 (50%) nanocomposite are presented in Figure 4. The spectrum of PAni have a peak at 797 cm −1 due to C-H bending of aromatic ring (out of plane) [32]. The absorption peaks at 1131 cm −1 and 1293 cm −1 are attributed to the C-N stretching of quinoid and benzenoid ring, respectively [33]. The peaks at 1479 cm −1 and 1563 cm −1 represent thestretching vibration C=C of benzenoid and quinoid structure, respectively [34]. The peak observed at 2411 cm −1 is due to C=NH + [35]. The PAni spectrum has a prominent peak at 3417 cm −1 for aromatic amine -N-H stretching while the peaks at 2919 and 2850 cm −1 are attributed to -C-H stretching. The abovementioned typical peaks confirm the synthesis of PAni in protonated state.  [36,37]. The peak at 1633 cm −1 corresponds to bending vibration of H-O-H [23]. The peak at 3432 cm −1 can be inferred to stretching vibration of O-H group at the surface of NPs due to surface water [38]. It is important to note that that the peak of CoFe 2 O 4 in the spectrum of PAni-CoFe 2 O 4 (50%) nanocomposite shifted to higher wavenumbers of 584 cm −1 that indicates the strong interaction between metal ions of CoFe 2 O 4 and nitrogen atoms of PAni due to hydrogen bonding. Polymers 2021, 13, x FOR PEER REVIEW
For PAni, two broad peaks at 20 and 25° are related to the amorphous struc PAni [39]. In PAni-CoFe2O4 (50%), no diffraction peak for PAni was noticed in t tern, which confirms the amorphous nature of PAni in its composites with metal [40]. In the composite synthesis, the ammonium persulfate as an oxidative initiat ceeded on the CoFe2O4 NPs surface and encapsulated in PAni shell leading to th tive effect of nanoparticles that hamper the crystallinity of PAni. The crystal f CoFe2O4 NPs in PAni-CoFe2O4 composite pattern showed low crystallinity comp CoFe2O4; the phenomenon is attributed to the coating effect and intermolecular i tion between surface of CoFe2O4 and conducting PAni [41].

Morphological Analysis (FE-SEM)
FE-SEM analysis was performed to visualize the morphology of the as-synthesized CoFe2O4 NPs, PET-PAni and PET-PAni-CoFe2O4 (50%) sensors, Figure 6. According to the results of FE-SEMSEM, the CoFe2O4 NPs, Figure 6a, have a tendency to agglomerate that is attributed to their ferrimagnetic properties [42] and sponge-like structure with  For PAni, two broad peaks at 20 and 25 • are related to the amorphous structure of PAni [39]. In PAni-CoFe 2 O 4 (50%), no diffraction peak for PAni was noticed in the pattern, which confirms the amorphous nature of PAni in its composites with metal oxides [40]. In the composite synthesis, the ammonium persulfate as an oxidative initiator proceeded on the CoFe 2 O 4 NPs surface and encapsulated in PAni shell leading to the resistive effect of nanoparticles that hamper the crystallinity of PAni. The crystal form of CoFe 2 O 4 NPs in PAni-CoFe 2 O 4 composite pattern showed low crystallinity compared to CoFe 2 O 4 ; the phenomenon is attributed to the coating effect and intermolecular interaction between surface of CoFe 2 O 4 and conducting PAni [41].

Morphological Analysis (FE-SEM)
FE-SEM analysis was performed to visualize the morphology of the as-synthesized CoFe 2 O 4 NPs, PET-PAni and PET-PAni-CoFe 2 O 4 (50%) sensors, Figure 6. According to the results of FE-SEMSEM, the CoFe 2 O 4 NPs, Figure 6a, have a tendency to agglomerate that is attributed to their ferrimagnetic properties [42] and sponge-like structure with porous morphology, which may have a great impact on the sensing properties. Despite the agglomeration and the blurred edges of CoFe 2 O 4 , the NPs are still uniform spheres with particle sizes of 70-80 nm. The larger grain size might be attributed to crystallites magnetic properties.
A quantitative elemental EDS spectrum in Figure 6b is used to calculate the CoFe 2 O 4 NPs composition, the molar ratio of Co, Fe, and O was found to be 1:1.96:3.94 that is fairly close to the theoretical values of 1:2:4, indicating the nominal composition and the stoichiometric proportion is maintained. It is clear from Figure 6c that PAni behaves in a similar way to a well-developed interconnected fiber with porous morphology in PET-PAni film. The surface morphology of PET-PAni-CoFe 2 O 4 (50%) film was found in clusters, porous and rough surface, Figure 6d. Moreover, the agglomeration of CoFe 2 O 4 NPs on the PAni surface was observed, which endorses literature reports showing that an increase in NPs loading in the matrix leads to coagulation [43].

TEM Analysis
TEM and SAED patterns were recorded for detailed insight into the microstructure of CoFe 2 O 4 NPs (Figure 7). The particles have a spherical shape with particle size in the range of 40-80 nm (Figure 7a). Segregated as well as agglomerated particles are clearly visible which endorse FE-SEM data. Selected area electron diffraction (SAED) pattern shows white spot rings indicating the polycrystalline structure of CoFe 2 O 4 NPs, Figure 7b. SAED results matched well with the XRD patterns.

Roughness Measurements
Profilometer is one of the most commonly used devices for measuring the roughness (Ra) and 3D images for the nanocomposite. Generally, the roughness of the nanocomposite surface depends on the structure of the organic matrix and the content of the inorganic filler. The surface topography of PET-PAni shows a relatively uniform and smooth structure compared to PET-PAni-CoFe 2 O 4 (50%) in Figure 8. The mean surface roughness of the PET-PAni and PET-PAni-CoFe 2 O 4 (50%) samples were found to be 1.15 and 5.3 µm, respectively. This increase in Ra value lead to augmented polarity and surface area that results in extra growth sites and buildup of adhesion between PAni and CoFe 2 O 4 NPs. TEM and SAED patterns were recorded for detailed insight into the microstructure of CoFe2O4 NPs (Figure 7). The particles have a spherical shape with particle size in the range of 40-80 nm (Figure 7a). Segregated as well as agglomerated particles are clearly visible which endorse FE-SEM data. Selected area electron diffraction (SAED) pattern shows white spot rings indicating the polycrystalline structure of CoFe2O4 NPs, Figure  7b. SAED results matched well with the XRD patterns.

Roughness Measurements
Profilometer is one of the most commonly used devices for measuring the roughness (Ra) and 3D images for the nanocomposite. Generally, the roughness of the nanocomposite surface depends on the structure of the organic matrix and the content of the inorganic filler. The surface topography of PET-PAni shows a relatively uniform and smooth structure compared to PET-PAni-CoFe2O4 (50%) in Figure 8. The mean surface roughness of the PET-PAni and PET-PAni-CoFe2O4 (50%) samples were found to be 1.15 and 5.3 μm, respectively. This increase in Ra value lead to augmented polarity and surface area that results in extra growth sites and buildup of adhesion between PAni and CoFe2O4 NPs.   Figure 9a,b. The degradation of CoFe 2 O 4 occurred in two stages having an insignificant loss: the first step was up to 600 • C that is attributed to the loss of moisture, decarbonation and removal of hydroxyl group associated with the NPs (0.21%) while the second step at higher temperature was up to 900 • C (0.18%) [44]. The TGA thermogram confirms the high thermal stability of CoFe 2 O 4 NPs. For pure PAni, there are three main stages of pyrolysis, the first between 30 to 140 • C that is attributed to loss of adsorbed water, unreacted monomer and free acid remaining after polymerization, 8.54% [45]. The second stage is found in a range of 140 to 325 • C due to the degradation of low molecular weight oligomers formed during the synthesis of PAni, 11.49% and residue 7.73% [46]. The third and last stage was in a temperature range 350 to 900 • C due to the structural breakdown of PAni molecules, 69.3% degradation and residue 14.5% [47]. PAni-CoFe 2 O 4 (50%) nanocomposite have shown the same thermal degradation behavior as PAni, as they have a somewhat high thermal stability with a residue (33.2%). Moreover, the thermal stability of plastic films coated with nanocomposite thin film was also examined. The TG curves reveal that the decomposition of PET substrate occurred in one step in a temperature range of 300-520 • C, related to the random degradation of ester groups into carbonyl and vinyl ester which were subsequent converted to acetaldehyde by tautomerization effect [48] with a weight loss of 94.86% and char residue of 5.15% at 900 • C. The PET-PAni film showed typical behavior of PET but with more weight loss of 96.4% and residue of 3.6%, which may be attributed to the catalytic effect of PAni during the decomposition of PET film. The PET film coated with PAni-CoFe 2 O 4 (50%) showed higher thermal stability compared to all other films with weight loss of 92.7% and residue of 7.3% due to the high thermal stability of CoFe 2 O 4 embedded in the PET film. ated with the NPs (0.21%) while the second step at higher temperature was up to 900 °C (0.18%) [44]. The TGA thermogram confirms the high thermal stability of CoFe2O4 NPs. For pure PAni, there are three main stages of pyrolysis, the first between 30 to 140 °C that is attributed to loss of adsorbed water, unreacted monomer and free acid remaining after polymerization, 8.54% [45]. The second stage is found in a range of 140 to 325 °C due to the degradation of low molecular weight oligomers formed during the synthesis of PAni, 11.49% and residue 7.73% [46]. The third and last stage was in a temperature range 350 to 900 °C due to the structural breakdown of PAni molecules, 69.3% degradation and residue 14.5% [47]. PAni-CoFe2O4 (50%) nanocomposite have shown the same thermal degradation behavior as PAni, as they have a somewhat high thermal stability with a residue (33.2%). Moreover, the thermal stability of plastic films coated with nanocomposite thin film was also examined. The TG curves reveal that the decomposition of PET substrate occurred in one step in a temperature range of 300-520 °C, related to the random degradation of ester groups into carbonyl and vinyl ester which were subsequent converted to acetaldehyde by tautomerization effect [48] with a weight loss of 94.86% and char residue of 5.15% at 900 °C. The PET-PAni film showed typical behavior of PET but with more weight loss of 96.4% and residue of 3.6%, which may be attributed to the catalytic effect of PAni during the decomposition of PET film. The PET film coated with PAni-CoFe2O4 (50%) showed higher thermal stability compared to all other films with weight loss of 92.7% and residue of 7.3% due to the high thermal stability of CoFe2O4 embedded in the PET film.

Differential Scanning Calorimetry (DSC)
The interactions of PET film with PAni and CoFe 2 O 4 during the in situ polymerization reaction were monitored, which were responsible for the nanocomposite phase transitions (see Figure 10). One-step DSC scanning is performed from ambient conditions to 300 • C. The glass transition (T g ) of pristine PET, PET-PAni, and PET-PAni-CoFe 2 O 4 (50%) were found to be 81 • C, 81.3 • C, and 82.7 • C, respectively. The slight increase in T g may be attributed to the interaction between the PET substrate and nano-fillers that resulted in a reduction in the polymer segmental motion. To understand the effect of the coated nano-fillers on polymer structural characteristics, the polymer crystallinity was studied using the heat of fusion obtained from DSC thermograms and the degree of crystallinity, Xc%, was determined by using Equation (2) [49].
where ∆H is the PET melting enthalpy and ∆H 0 is the 100% crystalline PET melting enthalpy, considered to be 140 jg −1 [50]. The PET crystallinity degree was found to be 30.6%, which shifted to higher values for PET-PAni and PET-PAni-CoFe 2 O 4 (50%) to 32.5% and 35.7%, respectively. This increase in crystallinity may be attributed to the creation of segments of small chains, which are capable of crystallization and realigning easily, as indicated by TGA and FT-IR.

XPS Spectra
The chemical composition and the oxidation state of PAni-CoFe2O4 (50%) nanocomposite was elucidated by XPS measurements (Figure 11). The XPS spectrum confirms the presence of Co, Fe, N, O and C in the nanocomposite, Figure 11a. The core level of C1s (Figure 11b) deconvoluted into four distinct peaks at 283.8 eV, 284.7 eV and 287.3 eV, which belongs to -C=C, C-N, and C=O bands, respectively [51,52]. The peak at 285.7 eV is related to C-O [53]. Figure 11c shows the N1s' core level and they fit well into three peaks located at 398.8 eV, 400.5 eV and 402.6 eV that can be attributed to quinoid immine (-N=), benzenoid amine (-NH-) and (N + ) of PAni chain, respectively [54]. At lower binding energy, there are two peaks situated at 529.6 and 532 eV for O1s, Figure  11d. The peak at 529.6 eV confirms Co-O, while the peak at 532 eV is attributed to (OH) group and defect sites of oxygen [55]. In Figure 11e, the main peak Fe 2p3/2, with a satellite peak at 716.8 eV, is fitted into two peaks of Fe 2p3/2 and Fe 2p1/2 at binding energies 710.5 and 712.7, respectively. These peaks indicate the presence of Fe species in two different

XPS Spectra
The chemical composition and the oxidation state of PAni-CoFe 2 O 4 (50%) nanocomposite was elucidated by XPS measurements (Figure 11). The XPS spectrum confirms the presence of Co, Fe, N, O and C in the nanocomposite, Figure 11a. The core level of C1s (Figure 11b) deconvoluted into four distinct peaks at 283.8 eV, 284.7 eV and 287.3 eV, which belongs to -C=C, C-N, and C=O bands, respectively [51,52]. The peak at 285.7 eV is related to C-O [53]. Figure 11c shows the N1s' core level and they fit well into three peaks located at 398.8 eV, 400.5 eV and 402.6 eV that can be attributed to quinoid immine (-N=), benzenoid amine (-NH-) and (N + ) of PAni chain, respectively [54]. At lower binding energy, there are two peaks situated at 529.6 and 532 eV for O1s, Figure 11d. The peak at 529.6 eV confirms Co-O, while the peak at 532 eV is attributed to (OH) group and defect sites of oxygen [55]. In Figure 11e, the main peak Fe 2p 3/2 , with a satellite peak at 716.8 eV, is fitted into two peaks of Fe 2p 3/2 and Fe 2p 1/2 at binding energies 710.5 and 712.7, respectively. These peaks indicate the presence of Fe species in two different lattice positions, the peak at 710.3 eV from Fe 3+ ions in octahedral sites while the peak at 712.7 eV from Fe 3+ ions in tetrahedral sites [56]. Figure 11f shows two major peaks which can be attributed to Co 2p 3/2 at 780 eV and Co 2p 1/2 at 796.1 eV. Where Co 2p 3/2 is well fitted into two peaks, at 779.8 eV for Co 2+ in octahedral sites and 781.5 eV for Co 2+ in tetrahedral sites with satellite peak at 786 eV, while Co 2p 1/2 is well fitted into one peak at 796.2 eV for Co 2+ in octahedral sites with satellite peak at 803.2 eV [57]. Thus, the analysis of XPS confirms the PAni-CoFe 2 O 4 (50%) nanocomposite formation. Gas sensing selectivity is a critical parameter for evaluation any chemi-resistive gas sensor performance. Different gases were used to test the selectivity of

Selectivity of PET-PAni-CoFe 2 O 4 Film
Gas sensing selectivity is a critical parameter for evaluation any chemi-resistive gas sensor performance. Different gases were used to test the selectivity of PET-PAni-CoFe 2 O 4 flexible film at 50 ppm of each gas and the bar charts of selectivity towards NH 3 , CO 2 , methanol and ethanol are shown in Figure 12a. The study clearly demonstrates the selectivity of the PET-PAni and PET-PAni-CoFe 2 O 4 flexible films for NH 3 compared to other gases. This selectivity may be due to the intense interactions between the sensing layers of flexible films and the adsorbed molecules of NH 3 gas. Moreover, the PET-PAni-CoFe 2 O 4 (50%) showed the highest value of response (118.3%) towards 50 ppm of NH 3 compared to PET-PAni (10.16%). The response using the PET-PAni-CoFe 2 O 4 (10%) of PET-PAni-CoFe 2 O 4 was found to be 30.12% while it was 56.6% for the PET-PAni-CoFe 2 O 4 (30%) (Figure 12b). The higher response value at PET-PAni-CoFe 2 O 4 (50%) is mainly attributed to the porous structure [58], as noticed by FE-SEM. Hence, the PET-PAni-CoFe 2 O 4 (50%) was selected for further analysis of its selectivity at room temperature sensing of NH 3 gas.

Response-Dependent Characteristics of PET-PAni-CoFe 2 O 4 (50%) Film
The gas response time-dependent profile of PET-PAni-CoFe 2 O 4 (50%) sensor towards 1-50 ppm of NH 3 is shown in Figure 12c. The dynamic response profile revealed that the flexible sensor is sensitive to 1 ppm NH 3 concentration with response of (6.1%). Moreover, the increase in NH 3 gas concentration led to an increase in the sensor response that reaches its maximum response of 118.3% at 50 ppm NH 3 gas. At higher NH 3 concentration, the molecules of gas cover the sensor active sites and involved in surface interactions giving even higher response. Additionally, the relative humidity (RH) effect on the NH 3 gas sensing of the PET-PAni-CoFe 2 O 4 (50%) sensor was monitored for 50 ppm NH 3 at different RH, and data is plotted in Figure 12d. The PET-PAni-CoFe 2 O 4 (50%) sensor displayed a maximum response value of 124.8% at 20% RH, while the response decreased to 118.3% at 40% RH. Further increase in RH leads to a decrease in the sensor response, hence, the response is greatly affected by RH. Obviously, when the sensor film is subjected to high concentrations of RH, the molecules of water occupy some active sites of the sensor and overlap with the adsorbed molecules of the target gas that is probably reason of reduced response at higher RH [59,60]. The resistance dynamic change of PET-PAni-CoFe 2 O 4 (50%) sensor when exposed to different concentrations of NH 3 gas (1-50 ppm) is shown in Figure 12e.

Reproducibility, Response-Recovery Times and Flexibility of the Sensor
The reproducibility and stability of the sensor are imperative characteristics to show its reliability. The reproducibility of PET-PAni-CoFe 2 O 4 (50%) sensor was evaluated by repeating the exposure cycles for four times at 10 ppm NH 3 and the response values are shown in Figure 13a. The PET-PAni-CoFe 2 O 4 (50%) response is almost the same for four cycles. Thus, PET-PAni-CoFe 2 O 4 (50%) sensor has excellent reproducibility and can be utilized repetitively for the room temperature and lower concentration detection of NH 3 gas. Figure 13b represents the times of response and recovery, which are measured from the dynamic response curves of PET-PAni-CoFe 2 O 4 (50%) sensor at different gas concentrations shown in Figure 12c. The response and recovery times were inversely changed with NH 3 gas concentrations, the sensor at 50 ppm of NH 3 gas showed lowest response time (24.3 s). The effect is due to large availability of porous sites on the surface of the sensor for adsorption of gas requiring a short response time while the recovery time increased due to decrease in reactive species desorption rate after NH 3 gas removal [58]. Furthermore, the response of PET-PAni-CoFe 2 O 4 (50%) sensor toward very low NH 3 concentrations (25-100 ppb) has also been evaluated and the response curve is shown in Figure 13c. It is clear that the developed PET-PAni-CoFe 2 O 4 (50%) sensor is very sensitive to low concentrations and practically can detect as low as 25 ppb of NH 3 gas that effectively meets the requirement of health and environmental issues. The flexibility of PET-PAni-CoFe 2 O 4 (50%) sensor was evaluated after 500 bending cycles at 50 ppm NH 3 and data is displayed in Figure 13d. An insignificant change in the sensor response (from 118.3% to 114.9%) is observed, indicating the excellent stability of PET-PAni-CoFe 2 O 4 (50%) sensor after repeated cycles of bending.  There are several reports in the literature for NH3 sensors. A comparison of the sensing performance of PET-PAni-CoFe2O4 (50%) developed in current study with the reported method is presented in Table 1. The PET-PAni-CoFe2O4 (50%) sensor developed in this study exhibits ultra-low detection limit, high response, and excellent flexibility, which shows its potential to be used in the portable NH3 sensing device development.  There are several reports in the literature for NH 3 sensors. A comparison of the sensing performance of PET-PAni-CoFe 2 O 4 (50%) developed in current study with the reported method is presented in Table 1. The PET-PAni-CoFe 2 O 4 (50%) sensor developed in this study exhibits ultra-low detection limit, high response, and excellent flexibility, which shows its potential to be used in the portable NH 3 sensing device development. Protonation and deprotonation phenomenon resulting from NH 3 gas adsorption and desorption is responsible for the response in pure PAni sensor. When NH 3 gas is introduced to the sensor surface, the PAni emeraldine salt (ES) is converted to PAni emeraldine base (EB). Consequently, the PAni hole density decreases which leads to an increase in the resistance [64,65]. The gas sensing in the nanocomposite film predominantly depends on NH 3 gas trapping that leads to the change in resistance. Figure 14 shows the schematic sensing model of PAni-CoFe 2 O 4 flexible sensor at ambient. The n-type CoFe 2 O 4 NPs were wrapped in the p-type PAni emeraldine salt to obtain porous nanocomposite due to integration of CoFe 2 O 4 in the PAni matrix as observed in FE-SEM images which leads to formation active centers on the film surface with donor and acceptor states. Thus, it could be concluded that the p-n junctions are established at PAni-CoFe 2 O 4 interface. When the sensor film is exposed to NH 3 , the molecules of gas would capture holes from -NH 2and =NH + -groups of PAni [66] and converts from emeraldine salt to emeraldine base as shown in Figure 14a, resulting in a decrease in PAni conductivity [14]. The adsorption of NH 3 as a reducing gas leads to decrease in the concentration of PAni holes and p-n junctions depletion regions are widened as shown in shown in Figure 14b. The interaction between NH 3 gas released free electrons, and hence neutralize the holes found on PAni surface due to electron-hole combination. This leads to a decrease in the concentration of hole and heterojunctions, as a result resistance of the nanocomposite sensor increases.

Conclusions
In the present work, a flexible gas sensor composed of a thin film of PAni-CoFe2O4 nanocomposites on PET substrate by using simple in situ chemical oxidative polymerization technique with different CoFe2O4 NPs concentrations is reported. The developed sensor is subsequently applied successfully for room temperature NH3 gas sensing. The morphological analyses reveal porous structure the PAni-CoFe2O4 flexible film. The formation of PAni-CoFe2O4 nanocomposites confirmed by XPS analysis. The gas sensing data showed that the PET-PAni and PET-PAni-CoFe2O4 sensors have highest values of

Conclusions
In the present work, a flexible gas sensor composed of a thin film of PAni-CoFe 2 O 4 nanocomposites on PET substrate by using simple in situ chemical oxidative polymerization technique with different CoFe 2 O 4 NPs concentrations is reported. The developed sensor is subsequently applied successfully for room temperature NH 3 gas sensing. The morphological analyses reveal porous structure the PAni-CoFe 2 O 4 flexible film. The formation of PAni-CoFe 2 O 4 nanocomposites confirmed by XPS analysis. The gas sensing data showed that the PET-PAni and PET-PAni-CoFe 2 O 4 sensors have highest values of selectivity when exposed to NH 3 gas at room temperature compared to other environmental gases. The PET-PAni-CoFe 2 O 4 (50%) flexible sensor demonstrated a maximum response value of 118.3%, excellent response time of (24.3 s) at 50 ppm NH 3 gas. The sensor has good reproducibility, ultra-low detection limit (25 ppb) and excellent flexibility with insignificant response change after repeated cycles of process and bending. Therefore, this paper highlights that the as-fabricated flexible PET-PAni-CoFe 2 O 4 (50%) sensor provides a promising platform for trace-level NH 3 detection of NH 3 gas on chemicals production field and environmental testing.