Introduction

The increasing global emphasis on sustainable development has intensified the demand for environmentally friendly materials in optoelectronic technologies. In this context, biodegradable polymers with tunable optical and structural properties are gaining considerable attention due to their low environmental impact and versatility in applications ranging from flexible electronics to biomedical devices. Among these, polyvinyl alcohol (PVA) has emerged as a leading candidate owing to its excellent film-forming ability, biodegradability, biocompatibility, chemical stability, and mechanical flexibility, making it suitable for diverse applications in UV-shielding films, smart packaging, flexible sensors, and wound dressings1,2. However, a key limitation of pristine PVA lies in its wide optical band gap (~ 6.0 eV), which significantly restricts its light-harvesting efficiency and charge transport capability, especially in applications requiring strong absorption in the visible or near-infrared regions3,4,5.

Furthermore, its limited inherent antimicrobial activity poses challenges for its use in biomedical and food-contact materials, where microbial resistance is crucial.

To address these challenges, various doping strategies have been employed to tailor the electronic and functional properties of PVA films6. Conventional methods involve the incorporation of metal oxides (e.g., TiO₂, ZnO), quantum dots, or synthetic conductive fillers to enhance optical behavior and mechanical strength7,8,9. While effective, these approaches are often associated with significant drawbacks, including toxicity concerns for biomedical and food-contact applications, high production costs and energy-intensive synthesis, limited biodegradability, and the potential for cytotoxic effects arising from metal ion leaching10,11.

As a result, natural and renewable alternatives are increasingly being explored as eco-safe modifiers. Among them, plant-based dyes derived from agro-waste present a promising, sustainable solution. These pigments often feature π-conjugated systems that provide strong light absorption and can effectively modulate the host polymer’s band structure12,13. Despite the annual global generation of over 1.2 million tons of eggplant (Solanum melongena) particularly peels14,15, their valorization for advanced material development remains underutilized. Eggplant peel is rich in anthocyanins, notably nasunin, delphinidin-3-rutinoside, and cyanidin-3-glucoside16,17,18 which possess acylated, water-soluble structures with strong antioxidant activity, natural chromophore systems, and chemical stability19,20,21. These molecules make eggplant peel-derived dye (EPPD) a compelling candidate for eco-friendly optical doping. However, their use in tuning the band gap and structural modification in polymer matrices like PVA remains largely unexplored. In parallel, chitosan, a natural polysaccharide derived from chitin, offers excellent antibacterial activity, film-forming properties, and biocompatibility, making it suitable for enhancing the microbial resistance of bio-based films. The integration of such multifunctional bio-additives enables the development of advanced materials that meet both optical and hygienic requirements22,23.

In this work, we introduce an environmentally benign, scalable approach for tailoring the optical and structural properties of PVA films via doping with eggplant peel-derived dye (EPPD), extracted through a green aqueous process, and reinforced with chitosan as a natural antibacterial agent. The films were fabricated using an ultrasonic-assisted solution casting method, which ensured homogeneous dispersion of EPPD and minimized dye aggregation. Comprehensive characterization using FTIR, UV-Vis spectroscopy, XRD, and FESEM confirmed the successful incorporation of EPPD into the PVA matrix and revealed substantial modifications in the polymer’s physicochemical properties. The optical band gap of the doped films was significantly reduced from 6.314 eV to 1.8 eV, accompanied by enhanced light absorption, an increased refractive index, and a bathochromic shift extending into the near-infrared region. Structural analysis showed a reduction in both crystallinity and thermal transition temperatures, which are attributed to disrupted polymer chain ordering and weakened hydrogen bonding interactions between PVA chains, induced by the incorporation of EPPD. This study presents a scalable and sustainable approach for fabricating biodegradable, optically active, and antimicrobial PVA-based films by valorizing agricultural waste as a functional dopant source. The films, composed of PVA, chitosan, and anthocyanin-rich extracts, are biocompatible and non-toxic, with demonstrated potential in wound healing, drug delivery, packaging, and energy-efficient optoelectronics. Their multifunctionality supports broader efforts in green and circular material design.

Experimental section

Materials

The EPPD was obtained from eggplant peels sourced from the Kurdistan Region of Iraq. PVA (MW = 89,000–98,000) and CS of high molecular weight were acquired from Sigma-Aldrich (St. Louis, MO, USA). Distilled water (D.W.) was utilized as the solvent for dissolving and extracting the EPPD dye. All chemicals were used without further purification. In addition to the primary reagents, the following materials were also used in this study: analytical-grade potassium bromide (KBr) for FTIR pellet preparation, Whatman® 90 mm filter paper for Buchner filtration during dye purification, and high-purity gold used as a sputtering target to coat non-conductive samples prior to FESEM imaging.

Instrumentals

Fourier-transform infrared (FT-IR) spectra data was collected via a Perkin-Elmer spectrophotometer (Waltham, Massachusetts, USA) in the range of 4000–400 cm⁻¹ using the KBr pellet method, with a resolution of 4 cm⁻¹ and 8 scans per sample. Ultraviolet-visible (UV–Vis) absorption measurements were carried out using a Cary 60 Spectrophotometer (Agilent Technologies, USA). X-ray diffraction (XRD) analyses were conducted on a Panalytical Empyrean X-ray diffractometer and carried out over a 2θ range of 10°–80° at a scanning speed of 10°/min. Thermal analysis was recorded using a Differential Scanning Calorimeter (DSC131 EVO, France) under an air environment, with samples heated from 20 to 600 °C at a rate of 20 °C min⁻¹. Morphological characterization was performed using Hitachi SU8010 field emission scanning electron microscopy (FESEM) operating at 3 kV accelerating voltages and point resolution of 50 nm. Non-conductive samples were sputter-coated with gold using a Hitachi MC1000 to enhance conductivity for FESEM imaging.

Extraction of EPPD

The extraction of EPPD was carried out using a water-based, ultrasound-assisted method involving sonication, filtration, centrifugation, and rotary evaporation. This green approach is consistent with established methods for extracting anthocyanins from eggplant peel, as reported by Fu et al. (2021), who demonstrated that ultrasound-assisted extraction significantly improves yield and efficiency by accelerating cell wall disruption and facilitating dye release24. Our procedure was carried out as follows: 30 g of dried eggplant peel was ground using an electrical blender and then mixed with 1 L of D.W. The mixture was subjected to sonication twice (10 min each) to enhance solubility and facilitate dye extraction. The solution was first passed through a fine mesh filter to eliminate larger impurities and subsequently subjected to centrifugation at 4,000 rpm for 10 min, performed twice, to remove residual coarse particulates. The supernatant was further purified using Buchner filtration with 90 mm filter paper to obtain a clear solution. The solvent was evaporated by rotary evaporation under reduced pressure, and the extracted dye was dried in an oven at 40 °C. From the initial 30 g of eggplant peel, approximately 10 g of EPPD was obtained (≈ 33.3% yield). The extracted EPPD was characterized and stored at room temperature for subsequent use, as illustrated in Scheme 1a.

Synthesis of EPPD-doped PVA films

EPPD-doped polyvinyl alcohol (PVA) composite films were synthesized via an ultrasonic-assisted solution casting technique, adapted from established protocols for dye- and nanomaterial-doped polymer systems, as demonstrated by Mohammed et al. (2024)25. To investigate the effect of EPPD concentration on the physicochemical characteristics of the films, five distinct films were prepared, as illustrated in Scheme 1b. They include (1) 1 g pure PVA, (2) 1 g PVA + 0.2 g CS, (3) 1 g PVA + 0.2 g CS + 0.2 g EPPD, (4) 1 g PVA + 0.2 g CS + 0.4 g EPPD, and (5) 1 g PVA + 0.2 g CS + 0.6 g EPPD. Each solution was adjusted to a final volume of 70 mL with distilled water (D.W.). Ultrasonic-assisted solution casting ensured a uniform distribution of EPPD throughout the PVA matrix, reducing aggregation issues commonly observed in natural dye-doped polymer systems3,21.

To prepare the PVA solution, 1 g of PVA was dissolved in 40 mL of D.W. under ultrasonic irradiation at 40 °C for 30 min, until a clear solution was obtained. Separately, three concentrations of EPPD (0.2 g, 0.4 g, and 0.6 g) were each dissolved in 30 mL of D.W. and sonicated at 40 °C for 10 min to achieve homogeneous solutions. For each film formulation, the respective dye solution (5 mL for 0.2 g, 10 mL for 0.4 g, and 15 mL for 0.6 g) was added to a mixture containing 1 g of PVA (40 mL) and 0.2 g of CS, which acted as an antibacterial agent to prevent fungal growth26. The mixtures were stirred thoroughly using a magnetic stirrer at room temperature for 10 min to ensure homogeneity. The resulting homogeneous solutions were then poured into glass Petri dishes and dried at ambient conditions for 72 h, forming uniform films.

The prepared films were labeled as follows: pure PVA (without CS or EPPD), PVA-C (PVA with CS only), and PVA-D1, PVA-D2, and PVA-D3 (PVA with CS and 0.2 g, 0.4 g, and 0.6 g of EPPD, respectively). Representative photographs of these films, illustrating variations in EPPD concentration, are presented in Scheme 1c.

Scheme 1
scheme 1

Synthesis of EPPD-doped PVA films. (a) Extraction and purification of EPPD dye from eggplant peel. (b) Synthesis of EPPD-doped PVA films. (c) Photographs of pure PVA, PVA-C, PVA-D1, PVA-D2, and PVA-D3.

Results and discussion

FT-IR analysis

FTIR spectroscopy was employed to investigate the structural characteristics and functional group interactions present in pure PVA, CS, EPPD, and the EPPD-doped PVA composite films. The spectra provide insight into hydrogen bonding, molecular interactions, and the effect of EPPD incorporation on the polymer matrix (Fig. 1(a-g)).

Fig. 1
figure 1

FTIR spectra for (a) pure PVA, (b) chitosan, (c) EPPD, (d) PVA-C, (e) PVA-D1, (f) PVA-D2, and (g) PVA-D3.

The FTIR spectrum of pure PVA (Fig. 1a) reveals a broad absorption band around 3290 cm⁻¹, attributed to O–H stretching vibrations associated with strong intra- and intermolecular hydrogen bonding27,28. This region is sensitive to external doping and structural rearrangements. Peaks at 2936 cm⁻¹ and 2929 cm⁻¹ correspond to the asymmetric and symmetric CH₂ stretching vibrations, respectively29. An absorption band at 1666 cm⁻¹ is assigned to residual C = C or absorbed water30. The CH₂ bending vibration appears at 1431 cm⁻¹, while the peak at 1335 cm⁻¹ is attributed to OH rocking coupled with CH wagging modes31,32. A prominent spectrum at 1091 cm⁻¹ assigned to the C–O stretching vibration combined with OH bending, reflecting the amorphous sequence of PVA33,34. Additional peaks at 915 cm⁻¹ and 885 cm⁻¹ are corresponding to CH₂ rocking and C–C stretching vibrations, respectively35. A minor peak at 1715 cm⁻¹, arising from C = O stretching, indicates the presence of residual acetate groups from incomplete hydrolysis6,36,37and the peak at 1565 cm⁻¹ is assigned to the bending vibration of adsorbed water molecules35,38,39.

The FTIR spectrum of chitosan (Fig. 1b) displays a broad band at 3420 cm⁻¹, corresponding to overlapping O–H and N–H stretching vibrations40,41. Peaks at 2925 cm⁻¹ and 2877 cm⁻¹ are assigned to the C-H stretching of CH₂ groups42. A sharp band at 1660 cm⁻¹ is related to C = O stretching of amide I groups, while the peak at 1590 cm⁻¹is attributed to N–H bending of amide II and C–N stretching43. Additional bands at 1427, 1380, and 1320 cm⁻¹ are assigned to CH₂ bending modes, and the peaks at 1161 cm⁻¹ and 1080 cm⁻¹ arise from C–O–C stretching vibrations in glycosidic linkages44.

The FTIR spectrum of EPPD extract (Fig. 1c) confirms the presence of anthocyanin compounds, with spectral features consistent with nasunin, the major anthocyanin component of eggplant peel. Ghosh et al. (2022) highlighted anthocyanins as essential water-soluble pigments in plant coloration and biochemical processes45. Subsequent studies by Florio et al. (2021) and Noda et al. (2000) identified nasunin as a predominant anthocyanin in eggplant peel, characterized by strong antioxidant activity46,47. Ichiyanagi et al. (2005) further demonstrated that nasunin exists as a mixture of cis-trans isomers of delphinidin derivatives, enhancing its stability and bioavailability48. Alighadri et al. (2024) emphasized the potential of eggplant peel as a sustainable and underutilized source of nasunin49. The broad absorption peak at 3428 cm⁻¹ is associated with the O–H stretching vibrations of phenolic groups50. Distinct peaks observed at 2932 cm⁻¹ and 2853 cm⁻¹ are assigned to asymmetric and symmetric C–H stretching vibrations of methyl (CH₃) and methylene (CH₂) groups, respectively51.The absorption at 1615 cm⁻¹ corresponds to C = O stretching vibrations, indicative of tautomeric anthocyanin forms52,53,54,55. Additional absorption peaks at 1416 cm⁻¹ and 1266 cm⁻¹ are attributed to aromatic ring stretching and = C–O–C linkages56,57. Meanwhile, the peak at 1070 cm⁻¹ is assigned to C–O–C bending vibrations51. These functional groups play a central role in hydrogen bonding and are responsible for the observed changes in optical and structural behavior when doping into the polymer matrix.

Figure 1(d–g) shows the FTIR spectra of the composite films (PVA-C, PVA-D1, PVA-D2, and PVA-D3). The spectrum of PVA-C (Fig. 1d) indicates that the incorporation of chitosan, intended primarily to impart antimicrobial properties52,58induces minimal changes in the PVA matrix. A slight shift in the O–H/N–H stretching region from 3130 to 3530 cm⁻¹ to 3110–3530 cm⁻¹ suggests limited hydrogen bonding interactions between chitosan and PVA59,60. The C = O stretching band of non-hydrolyzed vinyl acetate units appears at 1707 cm⁻¹, consistent with the previous report61.

Doping with EPPD resulted in minor spectral changes being observed. In PVA-D1 (Fig. 1e), slight O–H/N–H region shifts indicated initial interactions between PVA and EPPD62. As the dye content increased (PVA-D2, Fig. 1f), the O–H/N–H stretching region shifted to 3088–3530 cm⁻¹, and the C = O stretching band broadened and shifted to 1628 cm⁻¹62,63. The N–H/O–H bending peak at 1558 cm⁻¹ disappeared due to overlap with the C = O stretching band of EPPD, reflecting molecular integration at the polymer interfacee62,63. At the highest dye loading (PVA-D3, Fig. 1g), further shifts were observed: the O–H/N–H stretching band shifted to 3043–3530 cm⁻¹, and the C = O stretching peak moved to 1625 cm⁻¹, with complete disappearance of the N–H/O–H bending band. Peaks at 1417 cm⁻¹ (C–H bending), 1308 cm⁻¹ (C–N bending), and 1085 cm⁻¹ (C–O–C stretching) became more prominent, indicating stronger interactions and increased spectral overlap at higher dye64,65. These systematic spectral changes directly correlate with dye loading and confirm that EPPD interacts robustly with the polymer chains via hydrogen bonding and dipolar interactions66,67,68,69. Thus, FT-IR analysis not only confirms successful incorporation of EPPD into the PVA matrix but also elucidates the strength and nature of intermolecular interactions responsible for the modified optoelectronic behavior70.

Scheme 2
scheme 2

Proposed mechanism for hydrogen bond interactions in EPPD-doped PVA films.

Scheme 2 illustrates the proposed mechanism of hydrogen bond interactions between PVA–chitosan matrices and EPPD molecules71,72. The hydroxyl (–OH) and amine (–NH₂) functional groups of PVA and chitosan serve as active sites for hydrogen bonding with the oxygen-containing moieties of EPPD, primarily derived from nasunin73. Additionally, residual acetate groups from partially hydrolyzed PVA contribute to the interaction network by forming further hydrogen bonds. This hydrogen bonding mechanism is validated by FTIR spectroscopy in analogous doped polymer systems (Aziz et al., 2025)44,(Sreeja et al., 2013)74and (Rao et al., 2023)75. Thereby enhancing the stability of EPPD within the polymer matrix76. This interaction mechanism facilitates the formation of robust EPPD-doped PVA films, leading to improved dye retention and structural stability. Moreover, strong hydrogen bonding promotes enhanced charge carrier mobility and broadens photon absorption across the UV to near-infrared regions, resulting in a significant reduction in the optical bandgap77.

XRD analysis

The crystalline structure of the materials was examined using X-ray diffraction (XRD), and the data were processed using OriginPro 2024. Peak deconvolution was applied to quantify the areas corresponding to the crystalline (AC​) and amorphous (AA) peaks, the crystallinity index (χc) was then calculated using Eq. (1)78:

$$\:{{\upchi\:}}_c=\frac{{A}_{C}}{{A}_{T}}\times\:100$$
(1)

where AT = AC+AA represents the total area under both crystalline and amorphous regions. The χc​ values for all samples, derived from the AC and AT measurements78,79are summarized in Table 1.

Figure 2a shows the XRD pattern of EPPD dye, which displays a broad hump centered around 2θ = 20°, indicating a predominantly amorphous nature, agreeing with the result reported by Al-Muntaser et al. (2025)80.The low intensity and the lack of sharp, well-defined peaks further confirm the amorphous characteristics of the dye, where the atoms or molecules are arranged in a disordered manner without a repeating crystalline lattice81,82. The dye’s degree of crystallinity is 8.64, as reported, indicating that only a small fraction of the material adopts an ordered, crystalline structure. Such low crystallinity is typical of organic dyes, which often exhibit limited long-range molecular order due to their complex molecular structures and weak intermolecular interactions5,83.

(Fig. 2b) presents the XRD pattern of the pure PVA film, revealing two characteristic peaks at 2θ = 19.59° and 40.64°, indicative of the semi-crystalline nature of the PVA membrane (a crystallinity of ~ 20% is plausible and commonly reported in literature for films cast from aqueous solutions)4,70,84. The semi-crystallinity of PVA arises from intra- and intermolecular hydrogen bonding, which may take place within an individual monomer unit or between different monomer units85.

When CS was incorporated (Fig. 2c), a slight shift in crystalline index from 30.50 to 26.15 was observed, suggesting a minor increase in amorphous character. This shift is consistent with FTIR data, which showed only subtle changes in the O–H and N–H stretching regions, confirming that chitosan interacts weakly with the PVA matrix61,86. Therefore, chitosan primarily acts as an antibacterial agent with negligible influence on the polymer’s structural organization87,88.

Figures 2(d–f) show the XRD patterns of the dye-doped films (PVA-D1, PVA-D2, and PVA-D3), resulting in a decrease in the intensity of the peaks. The reduction in intensity is indicative of a decline in the localized charge density, which is a key factor in the electronic and optical properties of the material, as demonstrated in the work of Sudhakaran et al. (2024)89. Revealing a concentration-dependent reduction in crystallinity. As EPPD content increases, the diffraction peaks broaden and decrease in intensity, indicating increased structural disorder. The corresponding crystallinity values (χc) decrease progressively from 23.1% for PVA-D1 to 21.91% for PVA-D2 and 18.11% for PVA-D3, as shown in Table 1. This phenomenon is attributed to the disruption of the polymer chain packing by the amorphous dye molecules, which interfere with the formation of ordered crystalline domains86,90,91. To further support the reduction in crystallinity, deconvolution of the XRD patterns was carried out as shown in Supplementary Figure S1. Each profile was fitted using multiple Gaussian functions to resolve overlapping components. The sharp peak centered around 2θ ≈ 19.5° was attributed to the crystalline regions of polyvinyl alcohol, reflecting ordered chain packing and intermolecular hydrogen bonding. In contrast, the broad underlying halo spanning approximately 2θ ≈ 25°–35° was assigned to the amorphous phase, corresponding to disordered regions in the polymer matrix. As dye concentration increased, the intensity and sharpness of the crystalline peak decreased while the amorphous contribution became more prominent. This trend confirms the progressive disruption of the semi-crystalline structure due to EPPD incorporation and aligns with the previously reported crystallinity index values92.

Fig. 2
figure 2

XRD patterns of (a) EPPD, (b) pure PVA, (c) PVA-C, (d) PVA-D1, (e) PVA-D2, and (f) PVA-D3.

These findings demonstrate the adjustable crystallinity of doped PVA films through compositional control by simply varying the concentration of EPPD, which enables precise tuning of the film’s crystalline structure: as EPPD loading increases from 0 g (pure PVA) to 0.6 g (PVA-D3), the crystallinity index (χc) decreases from 30.5 to 18.11%. This reduction is attributed to the amorphous nature of EPPD molecules, which interfere with polymer chain packing and disrupt hydrogen-bonded crystalline domains93. Such tunability is a critical feature for tailoring mechanical and optical performance in practical applications including smart packaging, biomedical coatings, sensors, solar filters, and UV-protective materials94. Reduced crystallinity enhances UV-shielding efficiency by improving dye dispersion and promoting stronger interactions between UV light and functional groups within the amorphous regions. Moreover, disordered matrices exhibit broader absorption edges (Urbach tails) as shown in Fig. 5d, extending optical absorption deeper into the UV–visible range. This structure-property relationship is supported by Zhou et al. (2022), who demonstrated that reducing crystallinity in lignin-based PVA films significantly improved their UV-blocking performance95.

Table 1 Values of χс obtained through deconvoluted XRD analysis.

Morphological studies

FESEM was conducted to examine the surface morphology and compatibility of pure PVA and composite films96,97,98. Figure 3(a–e) presents the FESEM micrographs of the films, illustrating notable morphological differences resulting from the addition of EPPD.

The surface of the pure PVA film (Fig. 3a) appears relatively smooth and featureless, indicative of its homogeneous and amorphous nature99,100. In contrast, the PVA-C film (Fig. 3b) exhibits a slightly roughened texture due to the incorporation of chitosan101,102,103which introduces minor surface heterogeneities. Upon doping with EPPD, distinct changes in surface topography are observed. FESEM images of PVA-D1, PVA-D2, and PVA-D3 (Figs. 3(c–e)) reveal progressively increasing surface roughness and the appearance of discrete EPPD particles embedded within the polymer matrix104. White granules and granular aggregates were observed randomly distributed on the sample surfaces. The FESEM pictures of the filled polymer samples indicated an increase in porosity following the incorporation of EPPD105. At higher dye concentrations (PVA-D2 and PVA-D3), larger aggregates and more prominent particle clustering are evident, suggesting increased filler loading and possible agglomeration of EPPD within the matrix101. These morphological changes correspond with FTIR findings that confirmed the presence of hydroxyl (–OH) and carbonyl (–C = O) functional groups on the EPPD surface46,47,50. These groups are capable of forming hydrogen bonds with PVA chains, enhancing interfacial adhesion and promoting dye dispersion at lower concentrations101,106,107. However, at elevated loading levels, the likelihood of particle agglomeration increases, potentially leading to localized inhomogeneities108.

The observed increase in surface roughness with higher EPPD content indicates underlying structural modifications that can affect the films’ optical, dielectric, and mechanical performance109. Similar morphology-related trends have been reported in other biopolymer-based composite systems, disrupted polymer packing, and enhanced amorphous behavior (Hanash et al., 2025)105. These structural disruptions are in line with the reduced crystallinity observed in the XRD analysis and the bathochromic shifts in UV-Vis absorption spectra. Such modifications are consistent with the decreased crystallinity observed in XRD analysis and the bathochromic shifts in optical absorption spectra. Overall, the FESEM results confirm the successful incorporation of EPPD into the PVA matrix and highlight the influence of dye concentration on surface morphology and microstructure.

Fig. 3
figure 3

FESEM images of composite films (a) Pure-PVA, (b) PVA-C, (c) PVA-D1, (d) PVA-D2, and (e) PVA-D3.

Optical properties

The optical characteristics of polymeric materials an essential role in determining their suitability for optoelectronic and photonic applications110,111. To assess the effect of EPPD dye doping on the optical behavior of PVA films, UV–Vis spectroscopy was employed. Key parameters evaluated include the absorption characteristics, absorption edge, refractive index, optical dielectric constant, and optical band gap.

Investigation of absorption characteristics

The UV–Vis absorption spectra of pure PVA, PVA-C, and EPPD-doped PVA films (PVA-D1, PVA-D2, PVA-D3) are shown in Fig. 4. Pure PVA and PVA-C display absorption bands around 189–200 nm, attributed to π–π* transitions112 and at 275–283 nm, ascribed to n–π* transitions113. The latter are likely due to residual carbonyl (C = O) groups in partially hydrolyzed polyvinyl acetate segments and from chitosan113,114. These results indicate minimal optical changes due to chitosan addition.

With increasing EPPD content, a noticeable bathochromic (red) shift occurs in the absorption edge, indicating enhanced π-conjugation and electronic interaction between the dye and the PVA matrix115. The most prominent effect is observed in the PVA-D3 film, which shows a strong absorption peak at 554 nm. This extended absorption into the visible region signifies the formation of new localized states within the band structure, likely due to aromatic and phenolic compounds present in EPPD116,117.

The bathochromic shift confirms successful electronic integration of the EPPD within the PVA matrix, enhancing light absorption across a broader spectral range. This improvement is essential for potential optoelectronic applications such as UV-blocking coatings, photodetectors, and optical data storage. Additionally, since EPPD is derived from a biodegradable, non-toxic source, the resulting films are both eco-friendly and potentially biocompatible118. However, future studies are required to assess long-term optical stability and cytotoxicity for biomedical or packaging applications.

Fig. 4
figure 4

The absorption spectra of all the films show a clear shift to higher wavelengths with increasing dye concentration in the PVA.

Absorption edge

The absorption edge is a critical parameter in evaluating a material’s electronic structure and optical band behavior119. It represents the minimum photon energy necessary to promote electrons from the valence band to the conduction band and is directly associated with the optical band gap. The absorption coefficient (α) was calculated using Eq. (2), derived from the transmittance and reflectance spectra of the films120:

$${\text{\varvec{\upalpha}}}=\left( {\frac{1}{t}} \right)*{\text{ln}}\left( {\frac{{\left( {1 - R} \right)}}{T}} \right)$$
(2)

where t, T, and R correspond to the thickness, transmittance, and reflectance of the sample, respectively.

Figure 5a presents the variation of the absorption coefficient on photon energy for pure PVA and EPPD-doped films. Pure PVA exhibits an absorption edge at 6.128 eV, whereas the edge progressively shifts to lower energies with increasing EPPD content, reaching 1.983 eV for PVA-D3. This pronounced red shift (bathochromic shift) indicates a significant reduction in the band gap energy (Eg)121. Similar results were reported by Al-Muntaser et al. (2024)6.

The shift is attributed to the integration of EPPD molecules into the PVA matrix, introducing π-conjugated structures and localized states within the band gap122. These new electronic states facilitate transitions at lower photon energies, thereby modifying the optical absorption profile of the material121. Such behavior is characteristic of doped amorphous polymers, where enhanced disorder and molecular interaction broaden the absorption tail and reduce the effective optical gap123.

These findings confirm that EPPD doping induces meaningful changes in the electronic structure of PVA, supporting its potential use in optoelectronic and light-harvesting applications.

Refractive index and optical dielectric constant studies

The refractive index (n) is a key optical parameter that governs light propagation through materials and is particularly important for applications in photonics, waveguides, and sensors124. In polymeric systems, the refractive index reflects the polarizability and electronic structure of the material, both of which are altered by the presence of dye molecules125,126.

The refractive index of pure PVA and EPPD-doped films was calculated using the extinction coefficient (k) and reflectance (R), based on Eq. (3)127:.

$$\:n=\left[\frac{(1+R)}{(1-R)}\right]+\sqrt{\frac{4\times\:R}{(1-R{)}^{2}}-{K}^{2}}$$
(3)

The extinction coefficient was derived from the absorption coefficient ɑ and the wavelength λ, using the expression Eq. (4)128:

$$\:K\:=\:\frac {\alpha\lambda}{4\pi\text{t}}$$
(4)

Additionally, reflectance (R) can be mathematically derived from absorption (A) and transmittance (T) values using the expression R = 1− (A + T). T values are typically calculated based on Beer’s law as T = 10−A, which relates the attenuation of light to the material’s absorption properties, providing a comprehensive framework for analyzing the optical properties of materials129,130,131.

As shown in Fig. 5b, the refractive index increases with higher EPPD content, rising from 1.169 for pure PVA to 1.270 for PVA-D3. This enhancement is attributed to the introduction of π-conjugated systems and polar functional groups (e.g., –OH, –COOH) in EPPD, which increase the polarizability and electron density of the composite matrix. According to the Lorentz–Lorenz model, this leads to an overall rise in refractive index, consistent with the observed data132. High refractive index materials, like those developed in this study, are essential for advanced optical and optoelectronic applications, such as waveguides, light-emitting diodes (LEDs), and antireflective coatings133.

Furthermore, all doped films exhibit significant refractive index dispersion across the visible to near-infrared range, in contrast to the behavior of pure PVA films. This wavelength-dependent behavior underscores their potential for tailored optical applications. A similar dispersion trend has been reported by Allwin Sudhakaran et al. (2024)128 where the refractive index decreased with increasing wavelength and stabilized over a broad spectral range. In such systems, changes in composition were found to alter the electronic structure and crystallinity, leading to an increase in refractive index—consistent with the behavior observed in the EPPD-doped PVA films in this study. The optical dielectric constant (ε₁), which corresponds to the real part of the complex dielectric function, was calculated using Eq. (5)70:

$${\text{\varvec{\upvarepsilon}}}~{\text{1}}\,=\,{{\text{n}}^{\text{2}}}\, - \,{{\text{k}}^{\text{2}}}$$
(5)

This equation demonstrates that ε₁ depends directly on the refractive index (n) and the extinction coefficient (k)70,134,135.

Figure 5c depicts the variation in ε₁ as a function of wavelength for all samples. A clear trend is observed, with ε₁ increasing from 1.366 (pure PVA) to 1.609 (PVA-D3), indicating a higher density of localized electronic states in the doped films70,136. These states are likely a result of interfacial charge-transfer interactions between the polymer chains and EPPD molecules, as supported by FTIR and XRD results showing structural reorganization and reduced crystallinity70.

The imaginary part of the dielectric function (ε₂), which accounts for absorption losses, was calculated using (ε2 = 2nk), where n denotes the refractive index and k represents the extinction coefficient44.

The combined increase in both ε₁ and ε₂ with dye loading confirms that EPPD incorporation enhances light–matter interactions, increasing both energy storage and dissipation within the films137. This behavior is favorable for optoelectronic devices requiring tunable optical constants. At longer wavelengths, the static dielectric constant (ε₀) correlates inversely with the band gap as described by the Penn model Eq. (6)137:

$${{\varepsilon }}_{0} \approx 1 + ({\bar{h}}{{\omega }}_{{\text{p}}} ~/E_{0} )^{2}$$
(6)

Here, ωp represents the plasma frequency. Since the refractive index (n) is related to the dielectric constant (ε = n²), the Penn model is effectively expressed in terms of n139.

This relation emphasizes the observed trend: as the optical band gap narrows with increasing EPPD content, the dielectric constant rises accordingly, supporting the potential of these films for electro-optical applications140.

Urbach energy analysis

To investigate the degree of disorder and structural imperfections in polymeric materials, the Urbach energy (Eu) can be evaluated using the absorption coefficient (α) as described by the following exponential relation141:

$$\:\alpha\:={\alpha\:}_{0}{exp}^{\frac{hv}{{E}_{u}}}$$
(7)

Eu reflects the width of the exponential tail of localized states within the band gap, often associated with structural disorder. It is generally considered a temperature-independent parameter or only weakly temperature-dependent. The constant α₀ represents the absorption at the interface between the optical medium and incident light142.

Eu can be determined by plotting ln(α) versus photon energy (hν), and the value of Eu is derived by calculating the reciprocal of the slope obtained by fitting the linear segment of the curve143(as shown in Fig. 5d). An inverse relationship typically exists between Urbach energy and the optical band gap144,145. The Eu values obtained for all composite samples are summarized in Table 2. Notably, as the concentration of the EPPD within the PVA matrix increases, Eu also rises. This trend indicates a gradual increase in structural disorder within the polymer composites, suggesting the formation of more pronounced energy tails and a less ordered band structure146. This supports amorphization, π-conjugation, and band gap reduction, consistent with XRD and optical data.

Table 2 Eu values of all EPPD doped-PVA films.
Fig. 5
figure 5

(a) Absorption coefficient vs. photon energy for all films, showing a red shift in the absorption edge with increasing EPPD concentration. (b) Refractive index spectra indicating an enhancement from 1.165 (Pure-PVA) to 1.270 with EPPD doping. (c) Optical dielectric constant (ε₁) increases proportionally with EPPD concentration, highlighting improved polarizability. (d) Urbach energy analysis for all films, reflecting changes in structural disorder with doping.

Band gap study

Further investigation into the UV-Visible spectral response was carried out to assess the potential application of the synthesized samples in optoelectronic and energy storage devices141.The optical band gap (Eg) of PVA and EPPD-doped PVA films was comprehensively investigated using both Tauc’s method and optical dielectric loss spectra. These transitions were analyzed using Tauc’s relation, expressed by the following Eq. (8)147.

$$(ahv)\,=\,A{(hv\, - \,{E_g})^\gamma }$$
(8)

where hν is the photon energy, α is the absorption coefficient, A is a constant, and γ is a transition type. The absorption coefficient α was calculated using the following Eq. (9)149:

$$\:\alpha\:=2.303*\frac{Absorbance}{Film\:thickness}$$
(9)

Tauc plots were generated for different transition types by plotting (αhν)γ versus photon energy (hν). γ depends on the nature of the transition, where γ values of 1/2 and 3/2 correspond to allowed and forbidden direct transitions, respectively, and γ = 2 and 3 represent indirect allowed and forbidden transitions113,148. Figures 6(a-d) illustrate the fitting results, while Table 3 summarizes the extracted band gap values.

Pure PVA exhibited a band gap of approximately 6.314 eV with γ = 1/2, indicating a direct allowed transition, consistent with its semi-crystalline nature149. Similarly, PVA-C displayed a slightly reduced band gap (5.712 eV) with the same transition type, suggesting minimal influence from chitosan on the optical transition mechanism.

In contrast, EPPD-doped samples exhibited significant band gap reduction and a shift in transition type. For PVA-D1, D2, and D3, the band gaps were reduced to 3.24 eV, 2.721 eV, and 2.55 eV, respectively, with the best Tauc fit achieved using γ = 3/2, indicating direct forbidden transitions149. This transition change reflects increased structural disorder and the formation of localized states within the band gap, attributed to the incorporation of EPPD’s conjugated and polar functional groups150.

Fig. 6
figure 6

Plot of (αhν)1/γ as a function of photon energy (hν) is presented for all samples. (a) (αhν)² vs. (hν) direct Allowed (b) (αhν)2/3 vs. (hν) direct Forbidden (c) (αhν)2/3 vs. (hν) direct Allowed (d) (αhν)1/2 vs. (hν) indirect forbidden.

Table 3 Displays the band gap values obtained from the ε2 plot and tauc’s method.
$$(\alpha h\nu )\, = \,A(h\nu \, - \,E_{g} )^{\gamma } \leftrightarrow (\alpha h\nu )^{{1/\gamma }} \propto (h\nu \, - \,Eg)$$

To validate these results, the imaginary part of the dielectric constant (ε₂), derived from UV-Vis spectra, was analyzed (Fig. 7). Linear regions at higher photon energies were used to estimate Eg values that were consistent with the Tauc method, confirming the reliability of the dual-approach strategy151.

Fig. 7
figure 7

The variation of optical dielectric loss with photon energy (hv) is presented for all samples. Notably, distinct linear regions are observed at higher photon energy levels, which can serve as a basis for determining the optical band gap.

The progressive narrowing of the band gap with increasing dye concentration is attributed to enhanced amorphization, as supported by XRD data152. The disrupted crystallinity suppresses momentum conservation, thereby favoring forbidden transitions153. Figure 8 compares the band gap energies of various previously reported PVA-based films doped with different materials such as Zinc oxide (ZnO)154Silver Nanoparticles (Ag)155Ferric Citrate (Fe Citrate)156Potassium Chromate (K₂CrO₄)157Rhodamine 6G (R6G)158Crystal Violet (CV)29Turmeric dye159and doped with Sodium Nitrate (NaNO₃)160. Among these, the EPPD–PVA film developed in this study shows the lowest band gap (2.55 eV direct and 1.8 eV indirect), indicating enhanced absorption in the visible region.

Fig. 8
figure 8

Comparison of the band gap energy of various PVA-based films.

This demonstrates the effectiveness of EPPD, a natural dye extracted from eggplant peel waste, in significantly reducing the optical band gap of PVA. The results highlight both the optical superiority and sustainability of using EPPD compared to other dopants, including natural dyes like turmeric and synthetic dyes like R6G.

(Supplementary Figure S6) provides a schematic comparison between the direct and indirect transitions observed in the films. These findings highlight the tunability of optical properties in PVA films through natural dye doping and reinforce the value of EPPD as a sustainable modifier for optoelectronic materials.

Differential scanning calorimetry (DSC)

Differential Scanning Calorimetry (DSC) was performed to investigate the effect of EPPD incorporation on the thermal transitions of PVA-based films161. This technique provides insight into the glass transition temperature (Tg) and melting temperature (Tm), which reflect changes in polymer chain mobility and crystallinity162. For studying polymeric materials’ thermal characteristics, DSC is an excellent technique. The thermograms of the pure PVA and composite films revealed endothermic transitions corresponding to the glass transition and melting points. For pure PVA, a Tg of 30.5 °C was observed, followed by a distinct melting peak at 240 °C. These values are consistent with literature reports for semi-crystalline PVA materials163. It is important to note that although the Tg of fully dried, highly crystalline PVA is typically reported in the 75–85 °C range, our observed Tg agrees with studies where solution-cast PVA films retain a small amount of bound water. This bound water acts as a plasticizer, enhancing chain mobility and significantly lowering the Tg. For example, Remiš et al. (2021) reported a Tg of ~ 42 °C for PVA films with ~ 5 wt% water content, as verified through DSC and Thermogravimetric Analysis (TGA)163. Additionally, Song et al. (2020) showed that even ~ 1.8 wt% water can reduce the Tg of PVA from ~ 67 °C to ~ 38 °C. These findings support our measured Tg of 30.5 °C and confirm that moisture plays a dominant role in modulating PVA’s thermal behavior164. A broad endothermic event between 60 °C and 170 °C, observed across all samples, is attributed to the evaporation of absorbed water165,166. As EPPD concentration increased, both Tg and Tm progressively decreased. In PVA-C, Tg dropped slightly to 41.5 °C and Tm to 233 °C, suggesting limited interaction between chitosan and PVA. However, the reductions became more significant in the EPPD-doped samples: PVA-D1 (Tg = 40 °C, Tm = 225 °C), PVA-D2 (Tg = 37 °C, Tm = 220 °C), and PVA-D3 (Tg = 25 °C, Tm = 194 °C). These results are illustrated in the DSC thermograms shown in Fig. 9 (a-e).

Fig. 9
figure 9

Differential Scanning Calorimetry (DSC) Analysis of PVA and EPPD-doped PVA Films: Effect of EPPD on Glass Transition (Tg) and Melting Temperature (Tm).

The progressive decline in both Tg and Tm is attributed to the disruption of PVA’s semi-crystalline structure by EPPD105,167A recent study by Mohammed and El-Sayed (2023) on PVA/polyethylene glycol (PEG) blends demonstrated a notable reduction in the Tg, attributed to the plasticizing effect of the dopant (PEG)168. Singhal et al. (2012) demonstrated that in PVA/indium oxide nanocrystals (In₂O₃) nanocomposites, the Tm decreased systematically with higher In₂O₃ loading (e.g., from 212 °C in pure PVA to 196 °C at 5 wt% In₂O₃), linked to dopant-induced disruption of PVA chain folding and crystal perfection, which lowered overall crystallinity62. XRD data confirm a decrease in crystallinity, correlating with the reduced thermal stability. EPPD molecules, rich in polar and aromatic groups, likely interfere with inter-chain hydrogen bonding and prevent efficient packing of PVA chains169. This leads to a more disordered, amorphous microstructure, allowing greater molecular mobility and reducing the energy required for thermal transitions170.

The decline in Tg suggests enhanced chain flexibility in the doped films, likely due to the plasticizing effect of EPPD and the breakdown of crystalline domains169. The lower Tm values indicate that EPPD not only reduces the size of crystalline regions but may also promote the formation of less perfect or thermally unstable crystals171,This assertion is further supported by the observed decrease in crystallinity (XRD), increased structural disorder (Urbach energy), and morphological irregularities (FESEM), all indicating less perfect crystal formation. These findings collectively confirm that EPPD incorporation disrupts polymer chain packing, reducing thermal stability. The thermal behavior thus reflects the structural reorganization of the polymer matrix induced by dye incorporation. These observations confirm that EPPD doping is an effective strategy for tuning the thermal properties of PVA films, By controlling crystallinity and polymer chain mobility through natural additive incorporation, it is possible to tailor materials for applications that require specific thermal thresholds, such as temperature-sensitive coatings, packaging films, or biomedical substrates171.

Conclusion

This study demonstrates that EPPD, an eco-friendly dye derived from agricultural waste, can significantly enhance the structural and optical performance of PVA films. EPPD doping reduced the optical band gap from 6.314 eV to 1.8 eV, expanded light absorption from UV into the near-infrared region, and introduced new electronic states as confirmed by Tauc and dielectric analyses. FTIR, XRD, and FESEM analyses revealed increased amorphous content and disrupted hydrogen bonding networks, correlating with reduced crystallinity (30.50–18.11%). Thermal analysis via DSC confirmed the structural softening effect of EPPD, with Tg decreasing from 30.5 °C to 25 °C and Tm from 240 °C to 194 °C. Additionally, the refractive index and optical dielectric constant increased with higher dye content, highlighting improved polarizability and light-matter interaction. Notably, the Urbach energy Eu increased from 0.43 eV to 0.62 eV, confirming the rise in structural disorder and the broadening of tail states in the band structure—key indicators of amorphous transformation and enhanced optoelectronic tunability. Collectively, these results position EPPD as a sustainable, multifunctional dopant for tailoring PVA films toward advanced green applications. This approach offers a scalable, sustainable pathway for engineering green materials suitable for UV-blocking films, smart packaging, photonic devices, and biomedical applications.