1 Introduction

Conducting polymers have got substantial recognition in recent years due to their wide variety of applications in many fields like sensors, electrochemical applications, energy storage devices, and antistatic and anti-corrosion coatings. Amidst of all conducting polymers, polyaniline (PAni), a hetero-atomic-type conducting polymer, got the maximum attention due to its good transport properties and novel electronic features. Polyaniline has different chemical forms that differ in their physical and chemical properties [1, 2]. The protonated emeraldine salt form of polyaniline has conductivity near the semiconductor region and it is significantly higher than other polymers but lower compared to metals. The conductivity of polyaniline can be inversely controlled by using an appropriate filler doping or by protonation. The thermal characteristics, better environmental stability, and tunable electrical and optical properties can be varied by the protonation of amine groups present in the polymer chain. PAni can be used for sensing VOCs by observing and recording the variations in resistance of the sensing layer on exposure to target VOCs during response and recovery at room temperature [3]. The VOC molecules react more effectively in polymeric matrixes and their high dielectric constant interacts with the amine groups of polyaniline causing variation in electric resistance [4]. Conducting polymer nanocomposite doped with filler elements is generally used in chemiresistive sensors to achieve improved sensitivity of the sensors. Among all available conducting polymers, PAni is the most suitable polymer for biosensor design due to its excellent electrochemical properties and easy processability. Many literatures are available on biosensing of clinically significant VOCs using PANI-based biosensors [5]. The infectious disease malaria in humans is caused by the microorganisms of Plasmodium species. Some recent research on the Plasmodium falciparum infection has shown that these pathogens produce four specific thioethers in the breath of infected persons [6]. The research using a plasmodium falciparum culture has revealed that these parasites follow plant-like metabolic pathways and generate special odor VOCs called terpenes which are generally considered as mosquito attractant VOCs used by the malaria parasite to get transmitted between hosts with the help of Anopheles mosquitos [7]. The latest study on the breath samples of malaria-infected patients revealed that the exhaled breath samples consist of six specific compounds along with an increased level of two monoterpenes, α-Pinene and 3-Carene, which act as mosquito attractant VOCs in these infected patients [8]. So an efficient sensing of these biomarkers using a biosensor can be utilized for effective malaria detection. A chemiresistive sensor array using polythiophene and polyaniline was reported to detect different terpenes emitted by plants. The sensor array was fabricated micro-electronically and was able to distinguish a set of VOCs including γ-terpene and α-pinene with a detection limit of 100 ppm [9]. Gold nanoparticle multilayers are used in localized surface plasmon resonance (LSPR) sensor in a self-assembled way on a glass substrate to detect terpenes emitted during the growth of plants. The sensor optical characteristics were studied and the self-assembled layer with four deposition cycles showed maximum sensitivity with a minimum detection limit of 500 ppm for α-pinene. The real-time operation of the LSPR sensor to changes in concentration of terpene vapor was found to be rapid, reversible, and reproducible [10]. In another research non-imprinted polymer (NIP) and molecular imprinted polymer (MIP) coated with gold nanoparticles-based sensors were employed to detect α-pinene vapor. The thickness of the sensing layer coated using spin coating was in the nanometer range. The refractive index sensitivity of the MIP sensor was found to be higher than the NIP sensor. The sensor was rapid, reversible, and reproducible with a minimum detection limit of 450 ppm for α-pinene [11]. A study about MIP-coated gold nanoparticle LSPR sensor to detect α-pinene vapor showed a detection limit of 315 ppm and its real-time sensing of α-pinene vapors was observed to be rapid, reversible, selective, and reproducible [12]. A MIP was mixed or coated with conducting polymer, polyaniline, to fabricate a terpene sensor array using an interdigitated electrode pattern to detect α-pinene vapor. The polymer-coated sensor exhibited better sensitivity than the polymer mixed MIP sensor at a terpene concentration of 500 ppm [13]. A biomimetic gas sensor using tungsten oxide (WO3) nanoparticles with alumina substrate and interdigitated Pt electrodes were reported with a good sensitivity and selectivity for α-pinene with a concentration of 50 ppm. But the sensor needed a prior heating to a temperature of about 450 °C [14]. A recent work on α-pinene detection has used a QCM sensor with MIP modified by chitosan and α-pinene using spin coating technique. The sensor exhibited good sensitivity and selectivity with various concentrations of α-pinene starting from 1000 ppm [15].

3-Carene is not only a biomarker for malaria, but also an aromatic agent in ripened mangoes. There are very few researches done for sensing of 3-Carene from fruit VOCs. The major aroma components in most of the mangoes are mainly monoterpenes and sesquiterpenes with 3-Carene as the dominant VOC terpene hydrocarbon detected for the flavor characteristics [16]. GC–MS and GC- FID analysis are common techniques used for analyzing 3-Carene quantities in fruit volatiles which are not portable and also need trained experts for the operation [17]. The very first work to detect 3-Carene from mangoes used a QCM sensor with a poly- dimethyl siloxane (PDMS) sensing layer to act as an imprinted polymer-based QCM sensor with a proper response at a concentration of 200 ppm [18]. The aroma component of fruits consists of different types of VOCs, a sensor with good sensitivity and selectivity is needed to sense a specific VOC among them. To achieve this goal, a MIP technique combined with a QCM sensor is used to detect 3-Carene, in a recent research work. Compared to the previously reported PDMS-QCM sensor for 3-Carene, this sensor exhibited a better sensitivity and selectivity with a minimum detection limit of 0.8 ppm. The MIP-QCM sensor developed by this team has shown a good selectivity for 3-Carene with a sensitivity of 90.96% compared to α-pinene, furaneol, and β- caryophyllene, the other terpene VOCs used in the study, for 1000 ppm concentration. But α-pinene sensitivity by the sensor for 1000 ppm concentration was found to be 2.92% [19]. So the works reported so far on 3-carene and α- pinene sensing mainly used MIP-based QCM sensors for detection. The polymer-based chemiresistive sensor reported for α-pinene had a higher detection limit. A chemiresistive sensor using drop-casting of conducting polymer nanocomposite using polyaniline and WO3 reported with a detection limit of 3 ppm for both 3-Carene and α-Pinene [20].

In this work, a chemiresistive sensor using polyaniline-WO3 nanocomposite for detecting the monoterpenes 3-Carene and α-Pinene, the breath-based biomarkers for the endemic disease malaria, is proposed. The room temperature sensing characteristics of the conducting polymer nanocomposite-based sensor are motivated to propose a portable handheld device for malaria biomarker detection. The graphical abstract of the proposed sensor-based IoT system is represented in Fig. 1. For the proposed application, room temperature sensing is an important criterion along with sensitivity, selectivity, and stability. Even though there are some sensors available for the detection of α-pinene and 3-Carene separately, there are no studies reported to sense these two VOCs together. The sensing of α-pinene and 3-Carene together using a sensor with good sensitivity and repeatability can be a good solution for malaria biomarker detection.

Fig. 1
figure 1

Schematic diagram of the proposed system

2 Experimental procedure

2.1 Synthesis of polyaniline-WO3 nanocomposite

All the chemicals used for the synthesis of the polyaniline nanocomposite were of analytical grade and used in the synthesis procedure without further purification. 3-Carene and α-Pinene VOCs in liquid form were procured from TCI Chemicals (India) Pvt. Ltd. The emeraldine salt form of polyaniline doped by using WO3 nanoparticles is synthesized in an acidic medium using highly concentrated Nitric acid. This nanocomposite synthesis used a 1 M Nitric (HNO3) acid solution prepared using distilled water. To the prepared acidic medium, 4 ml of Aniline monomer was added and stirred continuously. The temperature was maintained below 5 °C using an ice bath. WO3 nanoparticles of the required weight percentage are added directly into the solution and stirred vigorously. The oxidizing agent selected for the conducting polymer nanocomposite synthesis was ammonium persulphate [(NH4)2S2O8]. The ammonium persulphate solution with 1 M concentration was added in a drop by drop manner to the Aniline monomer in acid media while continuing the stirring process. The solution becomes dark green after adding the oxidizing agent and that indicates that the polymerization process has started. The solution was continuously stirred for 24 h and during the whole process temperature was kept below 5 °C. After 24 h, the solution was filtered to obtain a dark green precipitate and that was washed using de-ionized water for removing the oligomers. The precipitate obtained after filtration was dehydrated in a hot air oven at 60 °C for 3 h. The polymer nanocomposite was powdered, weighed, and stored for further studies. Protonated polyaniline synthesized through in situ chemical polymerization is doped with WO3 nanoparticles at weight percentages of 5%, 10%, 15%, and 20% to produce polyaniline-WO3 nanocomposites.

2.2 Characterization

The structural and morphological characterization of the polyaniline-WO3 nanocomposite synthesized were done using XRD, FESEM (Field Emission Scanning Electron Microscopy), High-Resolution Transmission Electron Microscopy (HR-TEM) with Selected Area Electron Diffraction (SAED), and Fourier-transform infrared spectroscopy (FTIR) analysis. The FESEM with EDAX results confirmed the sheet-like structure of polymer matrix with WO3 nanoparticles distributed non-uniformly above and below the polyaniline matrix for polyaniline doped with 15% of WO3 nanoparticles. HR-TEM with SAED analysis done by using a Jeol/JEM 2100 TEM instrument with 200 kV accelerating voltage confirmed the non-uniform distribution and crystalline properties of the polyaniline-WO3 nanocomposite. The XRD spectra obtained using the XPERT-3 X-ray diffractometer confirmed the crystalline and amorphous structure of the polyamine-WO3 nanocomposite. The detailed analysis of the XRD spectra showed that the interchain separation length of the polyaniline-WO3 nanocomposite with a WO3 weight percentage of 15% is small compared to all the other nanocomposites prepared. This confirmed the highly conducting nature of the 15% WO3-doped nanocomposite. FTIR spectra, using PerkinElmer FTIR spectrometer using KBr medium, of the composites confirmed the protonated emeraldine salt state of the polyaniline due to the presence of characteristic peak corresponding to Q = NH+  − B bonds, and this also ensured the existence of polarons and bipolarons present in the material. The nanocomposite synthesized with 15% doping concentration got the maximum intensity for this characteristic peak and this ensured the high conductivity of this material. The transport studies of the polymer nanocomposites synthesized were in good agreement with the structural and morphological characterization results [20]. The Ultraviolet–Visible spectroscopy (UV–Vis) absorption spectra of the polyaniline-WO3 nanocomposites prepared were calculated in the 200 nm–1000 nm wavelength range using Agilent Cary 5000 Spectrophotometer.

2.3 Sensor fabrication and device development

The VOC sensor, for detecting 3-Carene and α-Pinene, using polyaniline-WO3 nanocomposite was fabricated by using the spin coating technique. The sensing layer using polyaniline nanocomposite with 15% doping concentration was coated on non-conducting substrates since the WO3 doping with 15% was found to be the best among the synthesized nanocomposites in the previous study [20]. Taconic substrate with an area of 1 cm2 was chosen and interdigitated Cu electrode patterns with 6 mm length, 0.1 μm thickness, and 0.3 μm width were designed using CST Microwave Studio Software. The interdigitated electrodes were attached to the substrates through a chemical etching procedure. Before spin coating with polymer nanocomposite, the substrates were cleaned using Acetone. The polyaniline-WO3 nanocomposite was mixed with Polyvinylidene fluoride (PVDF) in a ratio of 5:1 to get proper binding on the substrate surface and this also improves the conductivity [21]. This WO3-doped PAni-PVDF nanocomposite was then mixed with 0.2 ml of NMP (N-Methyl-2-Pyrrolidone) to make a thick gel-type solution for spin coating. This solution is used for spin coating of the PAni-WO3 composite on Taconic substrates with an interdigitated electrode pattern attached. The spin coating of the polyaniline-WO3 nanocomposite was done using Holmarc spin coater (Model: HO-TH-05S). The substrate was fixed on a substrate holder chuck and 0.25 ml of polymer nanocomposite solution was dropped on it and spin-coated at a speed of 500 rpm for a time duration of 30 s and the same procedure was repeated for 3 cycles to get a complete coating on the interdigitated electrode pattern. The spin-coated substrates were then dried at 60 °C in a hot air oven for removing the NMP content from the sensing layer. The surface morphological characterizations of the fabricated sensing layer were measured using Scanning Electron Microscopy (SEM) using TESCAN Vega3 Scanning Electron Microscope. The dried sensors were attached with electrical leads for measuring resistance variations that occur during target VOC sensing. Picotest M3510A 61/2 digit multimeter is used for measuring and recording the resistance values of the sensing layer on exposure to different concentrations of α-Pinene and 3-Carene. The spin-coated sensor output is given to a NodeMCU microcontroller-unit-based IoT (Internet of Things) system. The IoT-based device transmits the sensor output details to a health care provider for better disease diagnosis in a real-time scenario using the proposed point of care malaria diagnosing device.

3 Results and discussions

3.1 Structural and morphological characterization

3.1.1 XRD

The crystalline structure of the polyaniline-WO3 nanocomposite synthesized was analyzed using X-ray diffraction on XPERT-3 X-ray diffractometer with Cu Kα-radiation (λ = 1.54060 Å), with diffraction angle 2θ range from 10 to 80 degree and a step size of 0.0300 per 0.8 s. The XRD spectra of HNO3-doped polyaniline, polyaniline-WO3 nanocomposite with 15% doping concentration, and WO3 nanoparticles are shown in Fig. 2. The peaks obtained in the XRD spectra of polyaniline WO3 nanocomposite with a doping concentration of 15% correspond to the standard (h k l) planes (12–4), (211), (004), (12–2), (10–2), (02–2), (120),(111), (02–1), (002), (020), and (100) according to the ICDD DATA CARD 98–001-5905. The lattice parameter values calculated from XRD spectra were found to be exceptionally close to the values reported for the monoclinic WO3 structure. The average crystallite size of Polyaniline-WO3 nanocomposite doped with 15% WO3 nanoparticles was calculated with the help of Debye–Scherrer’s formula shown in Eq. (1); from the XRD data, the average crystallite size was found to be 20 nm.

Fig. 2
figure 2

XRD patterns of a HNO3-Doped PAni, b PAni—HNO3/WO3 -15%, c WO3 nanoparticles

$$D=\frac{K\lambda }{\beta \rm {cos}\theta }$$
(1)

where, D is the average crystallite size, K represents the crystallite shape factor (0.9), λ is the wavelength of X-ray radiation, and β represents the Full width half maximum corresponding to Bragg’s angle 2θ. Also, the interchain separation length (R) is calculated using Eq. (2), for all the synthesized nanocomposites.

$$R= \frac{5\lambda }{8Sin\theta }$$
(2)

In polymer nanocomposites, the amorphous regions exhibited less conductivity, while the regions with crystallinity showed better conductivity behavior. Generally, the conductivity of a polymer nanocomposite depends on the amount of crystallinity present in the material [22]. Average interplanar spacing decreased with doping by WO3 nanoparticles. Also when the interchain separation length and average d-spacing reduces, there will be an increased chance for interchain hopping, and due to that conductivity increases [23].

From the interchain separation length calculated for the polyaniline-WO3 nanocomposites synthesized, the nanocomposite with 15% doping has the lowest value of R, and it is 0.28 nm, while the undoped protonated polyaniline emeraldine salt has an interchain separation value of 0.50 nm. So the conductivity of WO3-doped polyaniline nanocomposite will be higher compared to the undoped polyaniline. Crystallite dislocation density calculated by using Williamson–Smallman relation and microstrain present in the crystal lattice computed by using Williamson–Hall (W–H) relation were found to be decreased on doping with WO3 nanoparticles [24, 25]. The average values of the crystalline parameters computed for the WO3-doped polyaniline nanocomposite are tabulated in Table 1.

Table 1 Various XRD parameters for the PAni-WO3 nanocomposite

3.1.2 FESEM

The morphology and nanostructures of the synthesized polyaniline-WO3 nanocomposite are characterized using FESEM (JEOL JSM-7100F Field Emission Scanning Electron Microscope) as depicted in Fig. 3a and b. The polymer nanocomposite exhibited a morphology containing a heterogeneous mixture of fibers and sheet-shaped particles in agglomerated form. The HNO3-doped polyaniline emeraldine salt morphology consists of nanofibers that are in agglomerated state. The WO3 nanoparticles are distributed non-uniformly and in a loosely bound manner over the agglomerated sheet-like structure of polyaniline matrix in polyaniline nanocomposite with 15% WO3doping concentration. On increasing the doping concentration further, the crystallinity increased and the amorphous nature of the material is found to be decreased. The crystallite size estimated from the FESEM was nearly equal to 20 nm and they are stacked together to form a sheet-type morphology. The non-uniform distribution of WO3 nanoparticles in the matrix created a porous structure and EDAX confirmed the non-uniform weight distribution of WO3 in the polyaniline matrix.

Fig. 3
figure 3

FESEM of a HNO3 acid-Doped PAni, b PAni—HNO3/WO3 -15%

3.1.3 HR-TEM and SAED

The crystalline structural variations present in the polymer nanocomposite due to the addition of WO3 nanoparticles are also studied and analyzed by using HR-TEM characterization, as shown in Fig. 4. The TEM images confirm the sheet structure of polyaniline protonated by using HNO3 acid and non-uniform distribution of WO3 nanoparticles above and below the layered polyaniline matrix in the synthesized nanocomposite with a doping concentration of 15%. Also, the WO3 nanoparticles are found to be in an agglomerated state with a 15% doping concentration. The protonated polyaniline exhibited an agglomerated layered sheet morphology and hence the individual particle size calculation was not possible. The WO3 nanoparticles were found in an agglomerated form and dispersed non-uniformly in a polyaniline matrix. The particle dimensions of WO3-doped polyaniline nanocomposite with 15% doping concentration were calculated with the help of ImageJ software and analyzed by using Origin software. The average particle size calculated using the particle size distribution histogram is found to be 23.38 nm, which is very close to the average particle size computed using the XRD data. The slight variation in particle size can be due to the presence of polyaniline over the WO3 nanoparticles and this also confirms the joint presence of WO3 crystalline particles and amorphous polyaniline in the synthesized polymer nanocomposite [26].

Fig. 4
figure 4

HR-TEM of a HNO3 acid-Doped PAni, b PAni—HNO3/WO3 -15%

The lattice fringes and bright spots were not present in the HR-TEM and SAED diffraction pattern of protonated polyaniline shown in Fig. 5a, and hence this confirms the amorphous nature of the synthesized polyaniline emeraldine salt. But distinct lattice fringes and non-uniformly distributed bright spots were observed in the HR-TEM and SAED diffraction patterns of the 15% WO3-doped polyaniline nanocomposite in Fig. 5b. This confirms the presence of crystallinity due to WO3 nanoparticles present in a layered polyaniline matrix. The identified lattice spacing in the SAED pattern is 0.33 nm corresponding to the (0.2–1) plane of monoclinic crystalline structure of WO3, and it is in good agreement with the lattice planes and interplanar spacing computed from the XRD data [27].

Fig. 5
figure 5

SAED of a HNO3 acid-Doped PAni, b PAni—HNO3/WO3 -15%

3.1.4 FTIR

FTIR analysis of synthesized polyaniline-WO3 nanocomposite with a filler weight percentage of 15% was done using PerkinElmer FTIR spectrometer using potassium bromide medium. Figure 6 shows the FTIR spectra of polyaniline-WO3 nanocomposite with a doping of 15% and HNO3-doped polyaniline, with major characteristic peaks marked between 900 – 1600 cm−1 wavelength range. The peaks at 1100 cm−1 and 1200 cm−1 correspond to Q = NH+  − B bonds and C–H bond in benzenoid or quinonoid rings of the polymer nanocomposite. The semi-quinoid lattice peaks of polyaniline emeraldine salt are observed at wavenumbers of 1114 cm−1, 1564 cm−1, and 1481 cm−1. The 1114 cm−1 is the characteristic peak of emeraldine salt, formed due to protonation using strong nitric acid, containing Q = NH+  − B bonds with loosely bound polarons or bipolarons which determine the electrical conductivity of the polymer nanocomposite [28]. The transmittance peak intensity at 1114 cm−1 for all the synthesized nanocomposites was compared and the nanocomposite with 15% doping concentration has exhibited a maximum intensity with a value of 48.98 A°. This is almost double than that of all other synthesized nanocomposites and HNO3-doped polyaniline with a value of 7.1 A°. Hence this confirmed maximum polaron or bi-polaron concentration in 15%-doped nanocomposite and due to that this nanocomposite exhibited higher electrical conductivity [20]. The secondary amine group stretching vibration in the polymer nanocomposite is represented by the peak at 3443 cm−1. The O–W–O bond stretching mode is represented by the peak at 616 cm−1. Deformations resulted in the benzene and quinonoid rings are represented by the peak at 801 cm−1. The out-of-plane bending vibration of the C − H bond is indicated by the absorption peak at 502 cm−1. The C–N bond stretching vibrations of the quinonoid rings of the polyaniline nanocomposites are represented by the absorption peak at 1383 cm−1. Also, the stretching vibration in the C–N bonds of secondary amines present in the benzenoid ring of the polyaniline nanocomposite is shown by the peak at 1299 cm−1; this also shows the π-electron delocalization in the polymer backbone caused by protonation [28]. The synthesized polyaniline-WO3 nanocomposites have a slight shift in the absorption spectra with an increase in FTIR wavelength

Fig. 6
figure 6

FTIR: a HNO3 acid-Doped PAni, b PAni—HNO3/WO3 -15%

3.2 Ultraviolet–visible spectroscopy (UV–Vis) analysis

The UV–visible spectroscopy analysis of the synthesized PAni–WO3 nanocomposites is shown in Fig. 7. Two major peaks are observed at wavelengths around 308 nm and 670 nm and the highest peak is observed at 310 nm in all the nanocomposites prepared. The band around 310 nm is due to the π–π* electron transitions that occur in the benzene rings of the polymer chain [29]. The absorption bands in the regions of 440 nm and 670 nm are assigned as polaron and bi-polaron absorption bands caused by the radical cation and di-cation formations, respectively. A shift in absorption band from 660 to 595 nm is visible in UV–Vis spectra of polyaniline-WO3 nanocomposites compared to the polyaniline emeraldine salt. This is known as blue shift and it represents the positive charge compensation from WO3 that occurred during the in situ polymerization which indicates the presence of heterojunctions between n-type WO3 nanoparticles and p-type polyaniline matrix [30].

Fig. 7
figure 7

UV–Vis absorption spectra of polyaniline-WO3 nanocomposites

A slight increase in absorption band intensity is observed with an increase in weight percentage concentrations of WO3 nanoparticles and found to be decreasing after 10% percentage of doping concentration. The UV–Vis spectra are used to compute the optical band gap of polyaniline-WO3 nanocomposites synthesized with doping concentrations from 5%, 10%, 15%, and 20%. The optical bandgap of the materials is generally measured using the Tauc model shown in Fig. 8 [31]. The direct band gaps in the high absorbance region of the nanocomposites were computed using the equation given below in Eq. (3).

Fig. 8
figure 8

UV–Vis absorption spectra of polyaniline-WO3 nanocomposites with Tauc plot and estimated band gap energy

$$\alpha h\nu =D {( h\nu - {E}_{g})}^{n}$$
(3)

In this Eq. (3) \(h\nu\) represents the incident photon energy, α stands for the coefficient of absorption, \({E}_{g}\) shows the optical band gap value and \(D\) is a constant, the value of n can be 2 for direct transition and ½ for indirect transition materials. The graph plotted between (αhν)2 and energy is called a Tauc plot and it is used for the direct bandgap energy determination using linear extrapolation. The bandgap energy calculated using the Tauc plot method for the polyaniline-WO3 nanocomposites synthesized is shown in Table 2. The calculated band gap energy values are nearly equal to the previously reported values of polyaniline nanocomposites [32]. The value of bandgap energy vary from 3.05 to 2.86 eV and the decrease is due to the decrease in particle size with increased doping concentration.

Table 2 Optical band gap energy values of polyaniline-WO3 nanocomposites

3.3 Dielectric spectroscopy analysis

The changes in dielectric loss (ε”) of the polyaniline-WO3 nanocomposite with frequency variation from 100 Hz to 5 GHz for various doping concentrations at room temperature using a cole–cole plot are shown in Fig. 9. Similar characteristics are observed for 5%, 10%, 15%, and 20% of the nanocomposite samples. The dielectric constant (ε’) is maximum at 100 Hz frequency and exponentially decreased with increase in frequency 1000 kHz. The large value of ε’ at the low-frequency region is due to the interfacial polarization [33]. The reason behind interfacial polymerization can be due to Schottky diode formation at the electrode pellet contact or due to the crystal imperfections present in the material [34, 35]. When frequency is increased from 1 to 10 kHz, the interfacial polarization gets relaxed and ε′ reaches a constant value with frequency due to the hike in bulk polarization and decrease in drift time of the charge carriers [36]. Further decrease in ε′ value at higher frequencies beyond 105 Hz can be due to relaxation of dipolar polarization generated because of the lattice defects in the material, rearrangement of molecular dipoles or impurities, and charge carriers present in the material. At higher frequencies, the constant value of the dielectric constant may be due to short relaxation times of dominating lattice polarization [37]. Dielectric constant value reduced with the increase in doping concentration of WO3 and this may be due to the hike in the number of charge carriers at grain interfaces in the polymer matrix [38]. The decrease in the imaginary value of dielectric constant ε″ in lower frequency can be due to relaxing dipoles in the polymer nanocomposite. The interfacial polarization happens between WO3 nanoparticles and conducting polymer, polyaniline matrix. If the material contains a less conducting matrix and conducting filler there is more chance for interfacial polarization due to the separation of mobile positive and negative charges, when an alternating electric field is applied. Nanoparticle fillers can cause high dipole and electron polarization because of the dipoles, increased defects, and dangling bonds, and also due to their more surface area they can even cause interfacial polarization [39]. Since the size of the WO3 nanoparticle is small, the interaction between the polyaniline matrix and the filler will be more and this may cause Maxwell–Wagner–Sillars polarization [40]. The ε’ value of the protonic acid-doped polyaniline matrix is high compared to the polyaniline-WO3 nanocomposites synthesized. The conductivity of the nanocomposites and their dielectric constants are found to be inversely related. The dielectric constant decreased with an increase in filler concentration [41]. The higher value of dielectric constant in all nanocomposite samples at lower frequency may be due to the interfacial effects or electrode effects. The fast periodic changes during the high frequency cannot be followed by diffusing ions in the material. Hence there will be less polarization due to charge accumulation and due to that ε’ value decreases [42]. Also, the Debye-type relaxation effect can cause large dielectric constant values at lower frequencies [43]. For the nanocomposites with relaxation polarization and ion conductivity, the dielectric loss factor depends on frequency variations. Here the ε″ values are found to be decreasing when frequency values increase and the polyaniline-WO3 nanocomposites have smaller values of ε″ compared to the protonic acid-doped polyaniline matrix.

Fig. 9
figure 9

Complex dielectric cole–cole plots of polyaniline-WO3 nanocomposites

The polyaniline composite with a 15% doping concentration has shown better conductivity because of the sheet-like morphological characteristics and interfacial relaxation. And due to that the ε″ value of this composite has got a higher tanδ response [44]. Hence the dielectric characteristics show that the polyaniline-WO3 nanocomposite is suitable for making nanodevices that need better conductivity in lower-frequency ranges.

3.4 Sensing characteristics

The target VOC-sensing studies using the spin-coated PAni-WO3 nanocomposite sensor with a Taconic substrate was conducted within a specially designed glass chamber in our lab as shown in Fig. 10.

Fig. 10
figure 10

Schematic diagram of the VOC-sensing system

The polyaniline-WO3 nanocomposite with a filler concentration of 15% was used to fabricate the malaria biomarkers VOC sensor using spin coating. The polymer nanocomposite solution made using NMP was spin-coated on a Taconic substrate with an interdigitated copper electrode pattern attached with electrical connections. The layout of the electrode pattern was simulated using CST microwave studio. The pre-calculated volume of VOCs for a particular ppm concentration was kept inside the sensing chamber. The resistance variations that occurred due to the exposure of target VOC on the sensor were measured with the help of Picotest M3510A-61/2 digit multimeter during regular time intervals till it reached a saturation point. For room temperature sensing of 3-Carene and α-Pinene, the polyaniline-WO3 nanocomposite exhibited a hike in resistance of the sensor compared to the resistance value on exposure to air. The same procedure was repeated for different concentrations of the same VOCs at room temperature and the spin-coated sensors were tested many times for the confirmation of the reliability of output obtained. The sensor response was calculated from the resistance variation of the sensor on exposure to target VOCs (Rg) and resistance of the sensor on exposure to air (Ra), using the following equation.

$$\rm {\% Sensitivity }= \frac{{R}_{gas}- {R}_{air}}{{R}_{air}} \times 100\%$$
(4)

The sensing characteristics of the nanocomposites synthesized with different doping concentrations have been studied and the results showed that polyaniline-WO3 nanocomposite with 15% doping concentration has good response factor for 3-Carene and α-Pinene, the malaria biomarker VOCs [20]. Less adsorption due to low surface area made the sensitivity of protonated polyaniline less compared to the WO3-doped polyaniline nanocomposite. The sensitivity of the polyaniline-WO3 nanocomposite improved with an increase in weight percentage of WO3 and the highest sensitivity was exhibited by a doping concentration of 15% because of its large surface and sheet-like morphological characteristics. The non-uniformly distributed n-type WO3 nanoparticles formed p-n heterojunctions with p-type polyaniline matrix and this also aided in achieving better sensing characteristics. In the equilibrium state, the electron–hole diffusion occurs through the heterojunctions and form narrow depletion regions. But on reaction with the target VOCs the equilibrium state changes due to the ion absorption by the VOCs and this results in widening of depletion regions, hence a large value of resistance in the sensing layer [45]. This mechanism aided in a fast response time and recovery time of polyaniline-WO3 nanocomposite with 15% of doping while sensing the target VOCs. The room temperature sensing performance of polyaniline-WO3 nanocomposite with a filler concentration of 15% towards 3-Carene and α-Pinene is shown in Fig. 11. The resistance of the sensing layer is observed to be increasing with an increase in target VOC concentration. Hence the sensitivity of the VOC sensor increased on the increase in concentration of VOC vapor from 1.5 to 4.5 ppm. The minimum detection limit of the spin-coated sensor was found to be 1.5 ppm corresponding to 1 μl of the VOC liquid and it is better than the previously reported drop-casting-based sensors with the detection limit of 3 ppm [20]. The spin coating method helped in achieving sub-ppm level detection of 3-Carene and α-Pinene, the biomarker VOCs of malaria. Resistance of the sensing layer increased on exposure to the target VOC and decreased when exposed to air. The calculated average response time of the sensor for 3-Carene sensing is 108 s and its average recovery time calculated is 60 s. Similarly for α-Pinene sensing, the sensor has shown an average response time of 62 s and an average recovery time of 152 s. The spin-coated sensor exhibited better sensing characteristics than the drop cast sensors. The multiple sensing of target VOCs by the single sensor made with the polyaniline-WO3 nanocomposite created a slow recovery period. But the overall sensing characteristics of polyaniline-WO3-15% indicated that this nanocomposite is a promising polymer nanocomposite to sense malaria-based biomarkers at room temperature.

Fig. 11
figure 11

PAni-WO3-15% nanocomposite sensor response and recovery plot for a 3-Carene and b α-Pinene

Since both the biomarkers will be present together in the breath of malaria patients, an attempt was made to sense these target VOCs together using the same sensor. The response curve of the sensor for combined sensing of 3-Carene and α-Pinene using polyaniline-WO3 nanocomposite sensor with a doping concentration of 15% spin-coated on a Taconic substrate is shown in Fig. 12. In this 1.5 ppm of 3-Carene and 1.5 ppm of α-Pinene together were kept inside the sensing chamber and resistance variations of the sensing layer towards these VOCs are recorded. The % sensitivity calculated from the resistance values is 45.05% with good response and recovery time and it is found to be better than the individual VOC sensitivity % of the sensor. The sensitivity of various sensors used for 3-Carene and α-Pinene are listed in Table 3.

Fig. 12
figure 12

Response and recovery plot of PAni-WO3-15% nanocomposite sensor for combined sensing of 3-Carene and α-Pinene

Table.3 Types of sensors used for α-pinene and 3-carene and their sensing performance

Studies were made to inspect the selectivity characteristics of the fabricated sensor among other VOCs and it is calculated and recorded as shown in Fig. 13 with error bars of a 95% confidence interval. The sensitivity factor of the sensor towards the other VOCs like acetone and ethanol, the other common VOCs in human exhaled breath, is found to be less than that for the target VOCs sensitivity at room temperature. Hence the polyaniline-WO3 nanocomposite with a filler concentration of 15% can be utilized for the sensing of malaria-based biomarker VOCs in a real-time scenario for malaria detection.

Fig. 13
figure 13

Selectivity of PAni-WO3 nanocomposite spin-coated sensor

The average response and recovery time of the polyaniline-WO3 sensor do not show many variations while conducting four cycles of sensing test, this shows that the sensor has a good reproducibility due to the polyaniline WO3 heterojunctions. The stability of the sensor was studied by recording the sensing layer resistance in the presence of air for one week at room temperature. The stability curve of the developed sensor is shown in Fig. 14 with error bars at 95% confidence interval. The resistance was almost constant and stable for the initial three days and it is found to be increasing on each day after that. The increase in resistance of the sensing layer caused a slight decrease in sensitivity of the polyaniline-WO3 nanocomposite sensor due to the absence of unstable adsorption sites [46]. The stability issues have to be addressed while using the sensor at the application level to achieve guaranteed performance.

Fig. 14
figure 14

Stability curve of PAni-WO3 nanocomposite spin-coated sensor

3-Carene and α-Pinene are the two breath-based biomarkers of malaria in humans [8]. The humidity content of human exhaled breath is approximately 95%. So to study the scope of this sensor to use as a breath sensor, the sensitivity has been inspected for various relative humidity values. The resistance variations of the sensor for combined sensing of 3-Carene and α-Pinene, of 5 ppm concentration, in the presence of different values of relative humidity have been recorded and the sensitivity corresponding to the variation in humidity values has been computed and plotted. The relative humidity varied from 35 to 100% and the same is measured using a Hygrometer. The variation of sensitivity concerning humidity variations for the spin-coated polyaniline-WO3 nanocomposite-based VOC sensor is shown in Fig. 15. For the initial humidity values, the sensitivity remained constant. But after 75% of relative humidity, a sudden drop in sensitivity of the sensor is observed. The drop in sensitivity for increased value of relative humidity may be due to the higher affinity of WO3 nanoparticles towards the water molecules [32]. But after 90% relative humidity, the sensitivity saturated to nearly 20%. This shows that the sensor can detect the VOC even in presence of a relative humidity of 100%. Hence it confirms the possibility of the sensor to use as a breath sensor for malaria detection.

Fig. 15
figure 15

Sensitivity of PAni-WO3 nanocomposite spin-coated sensor concerning relative humidity

The spin coating of the sensing layer helped in achieving better sensitivity for the VOC sensor. The surface area and cross-section area of the polymer nanocomposite sensors are usually investigated by using an SEM image to study the uniformity of the spin-coated sensing layer. The reduction in sensing layer thickness improves the sensitivity of thin-film sensors by allowing the VOC molecules to pass to the inner layers and produce variation in conductivity. The target VOC may affect the inner sensing layers of the sensor by penetration across the grain boundaries or through direct interactions at exposed edges of the multiple sensing layers [32]. The thickness of the spin-coated polyaniline-WO3 nanocomposite sensor layer is measured using SEM and compared with the thickness of the previously reported drop casted sensor as shown in Fig. 16. The average thickness of the sensing layer spin-coated at 500 rpm is found to be 90 μm and the average thickness of the drop cast sensing layer was nearly 470 μm. The thickness of the film decreases with increases in rotation speed. The resistivity of the sensing layer increases beyond a rotation speed of 3000 rpm [47, 48]. The reduction in cross-section thickness of the sensing layers aids in improving the surface area to volume ratio of the sensing materials and helps in enhancement of the sensitivity of the sensor [49]. The reduction in sensing layer thickness has improved the minimum detection limit of the sensor to 1.5 ppm. SEM image has shown that the polyaniline nanocomposite particles are distributed non-uniformly and the coating is non-uniform, porous, and agglomerated. The sensitivity of various sensors reported for 3-Carene and α-Pinene sensing is listed in Table 3. The chemiresistive sensor developed in this work using spin coating of polyaniline-WO3 nanocomposite has exhibited a better detection limit compared to the previously reported sensors with a minimum level of detection as 1.5 ppm.

Fig. 16
figure 16

SEM of the cross-sectional area of PAni-WO3 nanocomposite: a Spin-coated sensor. b Drop cast sensor

3.5 Device development using the spin-coated sensor

The spin-coated sensor is used to make a prototype of the proposed system using a low-power NodeMCU platform-based IoT device. The power supply to the device will be given through batteries. The microcontroller unit reads the resistance variations corresponding to a particular concentration of the target VOC from the sensor as the analog input. The microcontroller is programmed to process this analog data and display it on the display unit. The integrated Wi-Fi module in the NodeMCU unit helps this point of care system to transmit the same sensor output to remote servers. The data values sent by the IoT-based system are stored by using a free IoT-based cloud server and it also provides access to the same details by a health care expert or doctor for better disease diagnosis in a real-time scenario [52]. The software process flow of the point of care device developed using NodeMCU is shown in Fig. 17.

Fig. 17
figure 17

The software flow diagram for sensing device using the VOC sensor

The MQTT library is used to transfer the sensor output to the assigned IO channel in the cloud service. MQTT is a bandwidth-efficient lightweight messaging protocol used in IoT-based devices to publish data. Figure 17 shows that the Point of Care device developed will initialize the libraries needed for its display functioning, the microcontroller, and server address of the cloud platform after turning on the device. The program will calculate the target VOC concentration according to the sensor output. If the initialization process is a failure, then it loops the steps until a successful completion of the initialization process. After the initialization process, it will check for a successful Wi-Fi connectivity, if it is a failure the program will go back to the initialization state. If the check is successful it will inspect for a proper MQTT connection and in the case of a bad MQTT connection, the device will again return to the initialization state. When the MQTT connection is established successfully the microcontroller starts reading the sensor output through its analog input A0. So if there is a non-zero value in the A0 pin, then the data will be read and processed according to the calibration calculations and this value will be displayed on the display connected to the NodeMCU. And the same will be published through an IoT-based cloud server to the remote user. After publishing the VOC concentration, the device will call for a delay and clear the display unit and will go back to check the MQTT connection once again and the cycle repeats.

4 Conclusion

A chemiresistive sensor to detect both 3-Carene and α-Pinene, the malaria-based biomarker VOCs, at room temperature using spin-coated polyaniline-WO3 nanocomposite with 15% doping concentration on a Taconic substrate was successfully developed. The polyaniline-WO3 nanocomposite was synthesized through an in situ chemical polymerization procedure. Structural and morphological characterizations were done by using XRD and FESEM, TEM with SAED analysis and the results confirmed the combined amorphous and crystalline nature of polymer nanocomposite with non-uniform distribution of WO3 nanoparticles over the sheet-type polymer matrix. The chemical structure of the polyaniline-WO3 nanocomposite was analyzed through FTIR spectroscopy. The UV–Vis spectra were used to study the optical characteristics of all the synthesized nanocomposites and by using the Tauc plot method direct bandgap of all the nanocomposites was calculated. The bandgap energy is found to be decreasing with an increase in doping concentration. The dielectric studies using cole–cole plot indicated superior transport properties of the polyaniline-WO3 nanocomposite with a filler concentration of 15%. The characterization studies confirmed that polyaniline-WO3 nanocomposite with 15% doping has better sensitivity, conductivity, and morphological characteristics among the other nanocomposites synthesized. The 3-Carene and α-Pinene sensing studies were conducted using polyaniline-WO3 nanocomposite with a doping of 15% at room temperature and the minimum detection limit obtained was 1.5 ppm. The sensor fabricated using spin coating of polyaniline-WO3 nanocomposite exhibited good sensitivity and selectivity, better reproducibility with a fast response, and recovery time toward the target VOC sensing. The sensitivity of the fabricated sensor towards detection of 3-Carene is found to be slightly higher than that of sensitivity for α-Pinene. The resistance of the sensing layer varied when the sensor is stored for a longer period, so the stability issues of the developed sensor have to be resolved in future works to obtain a stable sensitivity factor for a long duration. Using the fabricated sensor, a prototype IoT device with NodeMCU platform was also developed. The performance of the sensor under different relative humidity conditions at room temperature was investigated and the sensitivity obtained even at higher relative humidity values confirmed the possibility of using the developed chemiresistive sensor in a breath sensing point of care device to detect the breath-based malaria biomarkers, 3-Carene and α-Pinene, for efficient detection of malaria in humans.