1 Introduction

Humidity sensors are fabricated using a variety of materials and are of three types: ceramic type [1], organic [2], and hybrid polymers [3]. Humidity sensors mostly rely on the electrolytic properties of the material and should be manufactured to have high sensitivity, low hysteresis, and quick response and recovery [4]. A wide range of materials have been studied to achieve the desired characteristics of a suitable humidity sensor. Some of these materials are metal oxides [5], ceramics [6], carbon-based materials [7] such as graphene [8], and synthetic and natural polymers [9]. Several modern industries have recognized the need for efficient and low-cost humidity sensors. One of these is the agricultural industry, which requires effective monitoring of moisture content in air and soil. The healthcare sector also requires humidity sensors to monitor the moisture in medical equipment, such as incubators and Intensive Care Units [10].

One of the polymers used is conductive polymers, which are mainly inexpensive to synthesize and highly sensitive, proving excellent materials for humidity sensors [11]. The most widely used conductive polymers are polyaniline(PANI) [12] and polypyrrole (PPY) [13]; however, more recently, PVP and PVA have been used in humidity sensing applications due to their hydrophilic groups causing them to have a high affinity for water [14] due to its environmental stability and good electrical properties [15]. It is also non-toxic and has previously been used together with metal oxides [16], mainly tungsten [17], titanium [18], and zinc [19], for humidity sensing applications. It has, however, not previously been used with carbon dots. This paper uses quaternized PVP to fabricate humidity sensors in interaction with carbon quantum dots.

Carbon quantum dots have been widely used for humidity sensing applications in combination with metals or by themselves [20]. Their increasing popularity is that they have several oxygen-containing functional groups on their surface, enabling them to create hydrogen bonds with water molecules and allow electrons movement between carbon dots and the water molecules [21]. The carbon dots used in this combination have been prepared using graphite waste as the carbon source; hence, they are easy to prepare and highly economical, whereas other methods of graphene quantum dots are traditionally more cost-intensive [22].

This study aims to design hybrid humidity sensors by exploring the synergetic effect of quaternized PVP with carbon quantum dots, as both materials have been used separately or with other combinations. Still, it has never been used together [23]. By carrying out the response, recovery, and hysteresis tests, the aim is to fabricate a humidity sensor with the characteristics of an ideal sensor. This work’s novelty lies in using solid waste from graphite processing and combining it with PVP to create functioning humidity sensors. These sensors fulfill the criteria required for a suitable humidity sensor and help turn process waste into value-added products, increasing the economic benefit and reducing the environmental impact of graphite processing. In this manuscript the PVP–CDs composites properties such as structure, morphology, surface roughness, hydrophilicity were studied. The electrical characterization of the sensors with different concentrations of PVP–CDs nanocomposites was investigated as well.

2 Experiment

2.1 Chemicals and materials

4-Vinyl pyridine, benzoyl peroxide, and hexyl bromide, all used organic solvents, were from analytical grade and purchased from Sigma-Aldrich, and ITO/glass electrode (S161) from Ossila UK.

2.2 Synthesis of the hybrid nanocomposites

2.2.1 PVP polymer preparation

Poly(4-vinylpyridine) PVP was prepared by radical polymerization of 27 ml of 4VP in 250 ml volume of toluene, 0.5 g of benzoyl peroxide was used as the initiator, the mixture was heated at 60 °C for 72 h, then precipitated in ether. The recovered polymer was repeatedly purified by dissolution/precipitation in ethanol/ether, respectively, then dried for several days at 60 °C and stored in a desiccator. The chemical structure of PVP is presented in Fig. 1a. Measurements were conducted in absolute ethanol by an Ubbelhode viscosimeter in a thermostat bath at 25 ± 0.1 °C. The Mv of the polymer was estimated at 1.24 × 105 g/mol using the empirical power law [η] = 6, 0.8 × 10−4 Mv 0.61.

Fig. 1
figure 1

a Poly(4-vinyl pyridine) (PVP) structure, b poly(N-hexyl-4-vinylpyridinium bromide) (PVPC6Br) structure

The quaternization was prepared by refluxing 3 g of PVP in 50 ml of methanol with 0.03 mol of hexyl bromide. The reactions were conducted in thermostated water at 70 °C for 5 days. The copolymer PVPC6Br was dissolved in chloroform and precipitated in hexane many times, then dried at 70 °C until there was no change in weight. The chemical structure of PVPC6Br is shown in Fig. 1b. The quaternization degree of PVP was found to be 65% by conductimetric titration of bromide ions with silver nitrate AgNO3 using a CDM 210 conduct meter (Radiometer, Meter Lab); we confirmed the results by 1H-nuclear magnetic resonance NMR with a Bruker 300 MHz (Rheinstetten, Germany) in CDCl3 solvent at room temperature.

2.3 CDs preparation

The new carbon dots (CDs) were prepared from graphitic waste via hydrothermal treatment in the presence of ammonia. This process yields outstanding photoluminescent, monodispersed carbon dots with an average size smaller than 5 nm (Fig. 1a, b). The quantum yield of CDs was calculated by measuring the integrated PL. The intensity in aqueous dispersion (refractive index η = 1.33) against quinine sulfate in 0.1 (M) H2SO4 (refractive index η = 1.33) as a standard one having a quantum yield of 54%, and calculation of Quantum Yield Was estimated to 28.7% (Table S1). CDs were used to make fluorescent bentonite clay via a hydrothermal process (Fig. 1b, c); the bentonite clay was used hereafter as a hybrid platform for heavy metal removal. The as-obtained CDs are nitrogen-doped and exhibit remarkable photoluminescent properties.

2.4 PVP–CDs (HOW)

The interaction between the negatively charged carbon dots and quaternized PVP is summarized in Fig. 2.

Fig. 2
figure 2

Electrostatic interaction and Molecular view of PVP–CDs

2.5 PVP–CDs films preparation

The PVP–CDs-based humidity sensor was prepared in three different concentrations of 0.25 wt%, 0.5 wt%, and 1 wt% by dispersing the PVP–CDs in DMF. Spin coating was used to deposit the solution (PVP–CDs in DMF) onto the ITO/Glass electrode purchased from Ossila UK. The ITO cleaning process involved sonicating the electrode with soap water, immersion in distilled water, and further sonicating in acetone for 10 min. The ITO was dried with nitrogen gas and attached to the spin coater for coating. The rotation speed was optimized at 5000 rpm for the 50 s. After fabrication, the PVP–CDs impedance sensor was placed in a sealed chamber to investigate the electrical response of the humidity sensor. A humidifier was connected through a control valve to the sealed chamber to raise the humidity level. The Drierite-based desiccant was attached to the humidity chamber through an inlet valve to decrease the humidity level. The PVP–CDs-based humidity sensor impedance response was measured by an MS5308 LCR meter. The humidity meter RS-6109 was used as a reference humidity to observe the humidity level. Figure 3 shows the complete fabrication process and the experimental setup employed to analyze the humidity sensing properties of the PVP–CDs-based humidity sensor.The fabrication process is illustrated in Fig. 3.

Fig. 3
figure 3

Graphical illustration of PVP–CDs-based humidity sensor prepared by the spin-coating method and humidity sensor setup used during this work

2.6 PVP–CDs characterization

To track the morphological changes of used materials and sensing films, scanning electron microscopy (SEM, FEI NOVA Nano-450, and the Netherlands), and atomic force microscopy (AFM, MFP-3D, Asylum Research, USA) machine, X-ray photoelectron spectra (XPS) were obtained using an Axis Ultra apparatus (Kratos, Manchester, UK) instrument fitted with a monochromatic Al Kα X-ray source. Water drop contact angles were measured by Data physics apparatus (OCA 35, Germany); the drop volume was 5 μL.

3 Results and discussion

3.1 Contact angle measurement analysis:

Based on humidity sensors, the Sessile drop method is used to contact the angle of the PVP–CDs (0.25 wt%, 0.5 wt%, and 1 wt%). The contact angle values are shown in Table 1. A low contact angle value indicates higher hydrophilicity compared to other samples. The contact angle of 0.25 wt% PVP–CDs is measured as 51.9°, which shows the hydrophilic nature of the humidity sensor. After increasing the concentration to 0.5 wt%, the contact angle decreases to 48.72°, indicating the sensor’s rising hydrophilicity with growing PVP–CDs. The contact angle of 1wt% PVP–CDs observes this as it is measured to be 39° as the surface becomes super hydrophilic. The super hydrophilic surface traps more water molecules, increasing the conductivity of the composite film [24]. The increase in hydrophilicity causes an enhancement of water vapor absorption, making the film more sensitive; increase in CDs concentration induced the increase of hydrophilic groups, present on the prepared sensing films. Indeed, the used CDs are very hydrophilic and rich in COO–, OH, S, and NH functional groups, as previously confirmed by our team [24], detailed functional groups of both CDs and PVP, were added in the Figure.SI.1

Table 1 Nanocomposite film’s contact angle measurements of PVP–CDs (0.25 wt%, 0.5 wt%, and one wt%)

3.2 Morphological studies

The AFM results (Fig. 4d), the roughness of the films increases with the increasing concentration of PVP–CDs particles. The increased roughness also increases the hydrophilicity of the movie and improves the sensitivity. Moreover, the SEM of 0.5 wt% PVP–CDs composite, at different magnifications, 500 nm and 1 µm, (Figure SI.2c, d) and at (Figure SI.2a, b) 1 µm, show smooth, uniform particle size distribution with an average particle size of (200) nm and irregular spherical shapes. The AFM and SEM images agree with the contact angle results and the electrical response.

Fig. 4
figure 4

a XPS general survey and (bd) AFM image of PVP–CDs nanocomposite films (0.25%, 0.5%, and 1%), respectively

As shown in the ITO–XPS general survey (Fig. 4a), signals of the ITO and PVP–CDs (0.25–1%) (Fig. 4a) coated ITO, one can note the presence of C1 s and O1 s, N1 s, and S2p, indicating the successful formation of PVP–CDs enriched with N and S; moreover, a significant increase was noted in both C1 s and O1 s peaks of compared of the pristine, confirming the presence of PVP–CDs on the ITO surface. Moreover, ITO–XPS showed (In3d and Sn3d core electron level peaks) were detected. It suggests the possible occurrence of In and Sn at the outermost surface due to some sites not fully coated by the PVP–CDs.

The peak corresponding to C1s, O1s, and N1s increases with the increasing concentration of PVP–CDs, and these changes in the chemical composition contribute to the improved sensitivity.

3.3 Electrical response

Hysteresis response is an essential parameter in the sensor’s performance, and it is defined as the maximum change in impedance between the absorption and desorption process of the sensor. We studied the hysteresis response for 0.25 wt%, 0.5 wt%, and 1 wt% PVP–CDs-based humidity sensors shown in Fig. 5a–c. The hysteresis response was normalized for data analysis using the formula (R30–Rch)/(R30), where R30 represented for the baseline impedance at 30% relative humidity (RH) and Rch for the change in impedance resulting from higher humidity levels. Figure 5a shows the PVP–CDS (0.25 wt%) sensor shows a low hysteresis response and a low sensitivity. As the concentration of PVP–CDs increases to 0.5 wt%, the sensitivity increases. The hysteresis response remains low and further increases the concentration of PVP–CDs to 1 wt%; an increasing hysteresis response is observed. This phenomenon happens because as the concentration of PVP–CDs increases, the hydrophilicity increases, which leads to improved absorption and sensitivity. This super hydrophilicity of PVP–CDs (1 wt%) may exhibit a slow desorption process due to strong adhesion between the film surface and water molecules. The high affinity and strong surface and water molecule adhesion may cause slow desorption. The desorption process is slowed as the humidity levels drop within the testing chamber, resulting in increased hysteresis loss. The 0.5 wt% PVP–CDs-based humidity sensor exhibits higher sensitivity and a lower hysteresis response than the PVP–CDs (0.25 wt%) and PVP–CDS (1 wt%) based humidity sensor. The maximum hysteresis loss for 0.5 wt% PVP–CDs based humidity sensor is 7.7%. The process of humidity sensing involves two sequential processes: chemisorption and physisorption [4]. When the PVP–CDs composite film is initially exposed to water molecules, they adhere to the hydrophilic groups and active sites present on both the PVP and CDs. At lower relative humidity (RH) levels, the water molecules chemically adsorb onto the nanocomposite film. As the RH increases, water molecules physically bind to nearby hydroxyl groups through hydrogen bonding, resulting in the formation of a multilayer of water [11]. This physisorbed multilayer exhibits behavior similar to bulk liquid. In this state, (H3O +) can easily dissociate into H2O and H +, resulting in ionic conductivity due to proton hopping transport Under high RH conditions [25, 26], free water can penetrate the PVP interlayer and CDs porous microsphere, leading to a significant improvement in the sensor response.

Fig. 5
figure 5

a Hysteresis response of PVP–CDs (0.25 wt%). b Hysteresis response of PVP–CDs (0.5 wt%). c Hysteresis response of PVP–CDs (1 wt%)

3.4 Response and recovery time

The response and recovery time is another parameter essential to the sensor’s performance; the response time is when the sensor reaches 90% humidity. In contrast, the recovery time is when the sensor reaches initial relative humidity levels. The response and recovery time for the 0.5 wt% PVP–CDs-based humidity sensor is 50 and 65 s, respectively, as shown in Fig. 6.

Fig. 6
figure 6

PVP–CDs (40–90%RH) of PVP–CDs (0.5 wt%)-based humidity sensor

The optimized concentration of 0.5wt% was tested for stability six months after fabrication. The sensor displayed stability over time and resisted change in electrical response. The electrical response slightly increased hysteresis with the sensing range identical to the initial response (Figure SI.3).

3.5 Comparison with other sensors

Table 2 compares our work with previously described carbon nanocomposites-based Humidity sensors. Our newly synthesized material has shown significantly improved response and recovery times compared to the previous study.

Table 2 Summary of caboncnanocomposite-based humidity sensors

4 Conclusion

The study succeeded by preparing sensing films from graphite waste combined with PVP and testing them as potential resistive humidity sensing applications using spin coating on ITO substrates. The surface hydrophilicity and sensing properties were studied. AFM has been performed to investigate the prepared films’ texture, distribution over the surface, and size. The trend in hydrophilicity is seen to increase with PVP–CDs concentration; as a result, the sensor’s sensitivity is improved. The electrical response of the PVP–CDs composite film sensor shows a higher humidity level above 80% RH sensor with an irregular response; however, the concentration of 0.5wt%, higher sensitivity, and linear change in impedance response were noted compared to other engagements. The developed materials show a strong potential for novel humidity sensors. The aim of the study was achieved as the graphite waste was successfully utilized. While a strong trend relating concentration and performance did not emerge, the synthesized material was found to have sensing properties, and further experimentation can be done to find relationships between the concentration of materials and sensing properties.