Fabrication and Characterization of Eco-Friendly Thin Films as Potential Optical Absorbers for Efficient Multi-Functional Opto-(Electronic) and Solar Cell Applications

The necessity for reliable and efficient multifunctional optical and optoelectronic devices is always calling for the exploration of new fertile materials for this purpose. This study leverages the exploitation of dyed environmentally friendly biopolymeric thin films as a potential optical absorber in the development of multifunctional opto-(electronic) and solar cell applications. Uniform, stable thin films of dyed chitosan were prepared using a spin-coating approach. The molecular interactivity between the chitosan matrix and all the additive organic dyes was evaluated using FTIR measurements. The color variations were assessed using chromaticity (CIE) measurements. The optical properties of films were inspected using the measured UV-vis-NIR transmission and reflection spectra. The values of the energy gap and Urbach energy as well as the electronic parameters and nonlinear optical parameters of films were estimated. The prepared films were exploited for laser shielding as an attenuated laser cut-off material. In addition, the performance of the prepared thin films as an absorbing organic layer with silicon in an organic/inorganic heterojunction architecture for photosensing and solar energy conversion applicability was studied. The current-voltage relation under dark and illumination declared the suitability of this architecture in terms of responsivity and specific detectivity values for efficient light sensing applications. The suitability of such films for solar cell fabrications is due to some dyed films achieving open-circuit voltage and short-circuit current values, where Saf-dyed films achieved the highest Voc (302 mV) while MV-dyed films achieved the highest Jsc (0.005 mA/cm2). Finally, based on all the obtained characterization results, the engineered natural cost-effective dyed films are considered potential active materials for a wide range of optical and optoelectronic applications.


Introduction
Despite the dependence of global economic growth on rapid industrial development supported by continuous experimental and laboratory research results, global public awareness has ignored the negative effects and hazards on the environment and human health resulting from the overreliance on fuel-based manufacturing processes of synthetic plastics. In this context, over the last few years, many countries have resorted to the exploitation of eco-friendly materials and sustainability concepts for supporting economic growth along with social requirements, in addition to tackling climate change and environmental protection. This can be achieved by replacing harmful toxic chemical materials for manufacture with eco-friendly natural materials for industry [1][2][3]. Therefore, we adopted the idea of dyeing chitosan films to improve their optical absorption properties and study the effect of the dyeing process on the color and optical constants of films, in addition to studying the optical shielding properties of the prepared films as an initial step for their adoption as eco-friendly materials for windows, sterile places, and food preservation. In addition, we investigated the effect of the dyeing process on the photosensing properties of the engineered films in a hybrid heterojunction configuration. The dyeing process was carried out using eleven different organic dyes, ranging from violet to red, to cover the entire visible spectrum.

Materials
Chitosan powder, Cs, of molecular weight 300-350 kDa, purchased from Spectrum Chemical Co., New Brunswick, NJ, USA, was utilized as the main material for the present study. All the utilized organic dyes were purchased from Sigma Aldrich, St. Louis, MO, USA. The molecular structure as well as the molecular weight of each organic dye are illustrated in Table S1 (Supporting Information).

Preparation of Thin Films
The preparation approach that was employed to fabricate the dyed thin films is shown in Figure 1. Firstly, 2 g of chitosan powder was dissolved in 200 mL of (2%) acetic acid through magnetic stirring at room temperature for 8 h. The obtained solution was left for 1 h to confirm that the solution was clear and agglomerate-free. Then, the organic dye solutions were prepared by dissolving 0.005 g of each dye in 10 mL of deionized water at room temperature for 2 h. Secondly, the dyed chitosan solutions were fabricated by adding 15 mL of the pure chitosan solution (virgin) to the dissolved dye solution under magnetic stirring for another 1 h. The estimated viscosity coefficient values of the prepared solutions using BROOKFIELD AMETEK DV1 Digital Viscometer under 100 rpm and 27 • C are listed in Table S2 (Supporting Information). The virgin and dyed thin films were deposited using the spin-coating technique at 3000 rpm on glass, quartz, and p-type silicon substrates. The spinning time for each film was 70 s under quasi-static spinning mode at room temperature. The deposited films were left in the open air until the solvent was vaporized. Finally, the deposited polymeric films on the pre-etched p-type <100> silicon were placed in an Edwards coating unit for depositing aluminum and silver as bottom ohmic and upper Schottky electrodes, respectively, at base pressure 3 × 10 −8 bar for implementation of metal/polymer/semiconductor (MPS) heterojunction, as shown in Figure S1 (Supporting Information) for light sensing applications.

Characterization Techniques
The molecular structures of the pure and dyed chitosan films were investigated using Bruker ALPHA FTIR spectrophotometer in a spectral range (400-4000) cm −1 . Furthermore, optical transmission and reflection spectra of the fabricated thin films in the UV-visible-NIR were assessed using a Jasco V-770 double-beam spectrophotometer in a range of (190-2500) nm. The influence of the dyeing of pure chitosan thin films on its emission spectrum was inspected using a Shimadzu RF-5301 PC spectrofluorophotometer under a 350 nm excitation source. The shielding characteristics of the designed films for visible light were tested under a green laser diode (532 nm). The colorimetric parameters of the engineered films were identified using UltraScan Pro. (HunterLab, Reston, VA, USA). All color measurements were taken under the conditions of the standard illuminant D65 and 10 • observers, as described by the Commission Internationale de L'éclairage (CIE L* a* b* standard).
Eventually, the light sensitivity of the designed metal/polymer/semiconductor (MPS) architectural junctions employing silver as a rectifier metal electrode, virgin and dyed chitosan as a polymeric film, and p-type silicon as a semiconductor was evaluated under halogen light of irradiance 100 mW/cm 2 under forward and reverse bias of driving voltage in the range ±3 volts using Keithley 6516B electrometer.

Characterization Techniques
The molecular structures of the pure and dyed chitosan films were investigated using Bruker ALPHA FTIR spectrophotometer in a spectral range (400-4000) cm −1 . Furthermore, optical transmission and reflection spectra of the fabricated thin films in the UV-visible-NIR were assessed using a Jasco V-770 double-beam spectrophotometer in a range of (190-2500) nm. The influence of the dyeing of pure chitosan thin films on its emission spectrum was inspected using a Shimadzu RF-5301 PC spectrofluorophotometer under a 350 nm excitation source. The shielding characteristics of the designed films for visible light were tested under a green laser diode (532 nm). The colorimetric parameters of the engineered films were identified using UltraScan Pro. (HunterLab, Reston, VA, USA). All color measurements were taken under the conditions of the standard illuminant D65 and 10° observers, as described by the Commission Internationale de L'éclairage (CIE L* a* b* standard).
Eventually, the light sensitivity of the designed metal/polymer/semiconductor (MPS) architectural junctions employing silver as a rectifier metal electrode, virgin and dyed chitosan as a polymeric film, and p-type silicon as a semiconductor was evaluated under halogen light of irradiance 100 mW/cm 2 under forward and reverse bias of driving voltage in the range ±3 volts using Keithley 6516B electrometer.

FTIR Molecular Structure Characterization
The molecular vibrations and interactions between the chitosan matrix and incorporated organic dyes were probed using the collected FITR spectra shown in Figure 2. Superficially, the shape of the IR spectra of all films may be relatively similar. The IR peak positions and their corresponding molecular vibration identification are illustrated in Table 1. The detected IR peaks of pure Cs are well-defined, with a high degree of deacetylation (DD %) of about 81.25% [28,29]. The observed IR band in the range of (3356-3293) cm −1 is attributed to two overlapped stretching vibrations of -OH and -NH [30,31]. This

FTIR Molecular Structure Characterization
The molecular vibrations and interactions between the chitosan matrix and incorporated organic dyes were probed using the collected FITR spectra shown in Figure 2. Superficially, the shape of the IR spectra of all films may be relatively similar. The IR peak positions and their corresponding molecular vibration identification are illustrated in Table 1. The detected IR peaks of pure Cs are well-defined, with a high degree of deacetylation (DD %) of about 81.25% [28,29]. The observed IR band in the range of (3356-3293) cm −1 is attributed to two overlapped stretching vibrations of -OH and -NH [30,31]. This band was perturbed (hypsochromic and bathochromic) owing to the intermolecular hydrogen bonding between the incorporated organic dyes and the chitosan molecules [29,30]. The IR peaks at 2917 and 2867 cm −1 are ascribed to symmetric and asymmetric stretching vibrations of C-H, respectively, of polysaccharides. The C=O of primary and secondary amides stretch at 1646 and 1583 cm −1 , respectively. In addition, the NH bending and stretching vibrations of amide I overlapped at 1583 cm −1 [28,30]. The features of the C-H chains' side bending and NH 2 wagging appear in the observed IR peak at 1419 cm −1 . The detected IR peak at 1376 cm −1 is assigned to the C=O bending mode and C-H methyl group torsion. The amide III C-N stretching vibration is observed at 1326 cm −1 , while the asymmetric stretching of the C-O-C bridge is observed at 1151 cm −1 [28,30,31]. Furthermore, the glucosamine C-O stretching and glucose C-O bending vibrations are detected at 1063 cm −1 , while the C-N stretching β-glycosidic band peak is located at 895 cm −1 [28,30,31]. The out-of-plane bending of N-H and C-O vibrations are detected at 707 and 559 cm −1 , respectively. The strong IR peak at 1029 cm −1 is relevant to the free amino group at C 2 of glucosamine, where these protonated free amino groups act as active sites for attracting ionic compounds, leading to better miscibility between the chitosan and incorporated organic dyes [29,30]. The hypsochromic and bathochromic shifts in wavenumber values confirm the good interactivity between molecular structures of pure and dyed chitosan films. It should be mentioned that MV, Rhd, and CBB dyes achieved the highest value of IR absorption at 3356, 3292, and 1598 cm −1 , indicating the strongest interaction between NH 3 + groups of chitosan and the dye molecules [28].

Transmission and Reflection Spectra
To examine the optical properties of the prepared films, the transmission, T(λ), and reflection, R(λ), of the prepared thin films dyed with different dyes were measured in the spectrum range extending from UV to NIR, as shown in Figure 3. As for the T(λ) profile, all the prepared films exhibit the same behavior in the infrared region (800-2500) nm since all the prepared films achieve high values of transparency (90 < T(λ) <100%). However, in contrast, in the visible and UV spectral bands, the pigmentation process resulted in many noticeable changes, the first of which is that the fundamental absorption edge of pure Cs thin films at 299 nm was related to the light absorption by amino acids and was red shifted to different values regarding the impregnating dye, but the NGB dye achieved the highest blue shift in the fundamental absorption edge at 665 nm [32,33]. The neglected observance of interference fringes in the spectral profile of transmittance is conclusive evidence for the uniformity of the films' thicknesses [34]. In addition, the tendency of transmittance, in some cases (e.g., MB, ENB, NGB, and Rhd), to vanish suggests the fabricated dyed films can be used for eco-friendly optical shielding materials. According to the transmission spectra, the deposited films' thicknesses were determined using a point-wise unconstrained minimization approach (PUMA) and retrieved to be 393 ± 13 nm for all films. Table S3 (Supporting Information) lists the film thickness of each film. On the other side, the R(λ) profiles are significantly different for the dyed and virgin Cs thin films, but on the whole, all the films exhibit low reflection values, especially in the NIR region R(λ) ≤ 10%. In the NIR, for some of the samples, T and R sum up to more than 100%. This may be due to employing an aluminum mirror as a reference during reflection measurements, which yield appreciably varied reflectance values. of interference fringes in the spectral profile of transmittance is conclusive evidence for the uniformity of the films' thicknesses [34]. In addition, the tendency of transmittance, in some cases (e.g., MB, ENB, NGB, and Rhd), to vanish suggests the fabricated dyed films can be used for eco-friendly optical shielding materials. According to the transmission spectra, the deposited films' thicknesses were determined using a point-wise unconstrained minimization approach (PUMA) and retrieved to be 393 ± 13 nm for all films.   Interference fringes in transmission and reflection spectra arise in the case of a relatively high film thickness, and they are a good indicator of the uniformity of film thickness. Mathematical treatments can be resolved using the dependence of absorption coefficient and refractive index on T, R, k, or depending on the Swanepoel algorithm. Owing to the absence of interference fringes of some films rather than others, we used the following equations for calculating α and n to unify the mathematical calculation approach.

Absorption Coefficient, Energy Gap, and Urbach Energy
The spectral functionalities of the engineered thin films depend mainly on their absorption features; thereby, the absorption coefficient, α (λ), of the fabricated thin films was calculated as follows [35]: where t is the thin film's thickness. Figure 4 reveals the photon energy reliance of the absorption coefficient in all the prepared thin films. It can be noticed that pure chitosan possesses a single UV absorption peak (Soret band) at 4.17 eV, which is attributed to π-π * electronic transition of the chromophoric C=O [36,37]. Upon dyeing chitosan with different dyes, the values of absorption were enhanced exceeding (α > 10 5 cm −1 for MB, ENB, NGB, and Rhd), and new sharp absorption bands developed in the visible spectral region. The developed absorption peaks in the visible region are attributed to the electronic transitions between the non-boding molecular orbital and the anti-bonding molecular orbitals (n→π * ) of the dyes [38,39]. The astonishing visible and UV absorption features of the dyed thin films increase their potentiality for light harvesting utility in solar cells and light sensing applications.
Conspicuously, a strong molecular interaction was achieved between the chitosan molecules and added dyes, which rationalizes the variation in the shape of the characteristic Soret band of pure chitosan [36,40]. This change in the Soret band's shape is represented either in the splitting of the absorption peak, as observed in the case of MV, Rhd, and RBB, or the appearance of a shoulder attached to it, as observed in the case of MB, ENB, CBB, BG, NGB, and FSS. The splitting of the Soret band is an indicator of a strong interaction, which can be interpreted via Davydov splitting phenomena, where the coupling of the vibronic state would result in a split in the excitation states when the Cs and (MV, Rhd, and RBB) molecules interact. This splitting depends on the inert molecular separation as well as transition dipole moment orientation [41]. On the other side, the appearance of a shoulder in the case of MB, ENB, CBB, BG, NGB, and FSS may be either owing to the absorption of free charge carriers or activation of the (n→π * ) electronic transitions of chitosan [36][37][38][39][40][41]. Regarding the solar spectrum that extends from UV to IR regions, the fabricated films' absorption features covered the visible region extending from the violet to red region, in addition to the UV absorption features of chitosan. Hence, referring to the solar spectrum, the intense wavelength (500 nm) may provide enough energy to be absorbed by many prepared dyed films, the closest of which is dyed by CBB, FSS, AO, Rhd, and Saf. Meanwhile, chitosan-dyed films with MV, MB, ENB, AO, Saf, and RBB achieve the highest absorption coefficient in the spectral regions of the solar spectrum, which may yield a better photo-energy conversion performance.
For unveiling the impact of the dyeing of the electronic structure of the designed Cs thin films, the Tauc relation was employed for estimating the values of the inter-band energy gap, E g , as follows [34,35,39]: where hν is photon energy, while m is a constant that indicates the type of electronic transition near the band edge (m = 1 2 and 2 for direct and indirect, respectively).
where hν is photon energy, while m is a constant that indicates the type of electronic transition near the band edge (m = ½ and 2 for direct and indirect, respectively).  Figure S2 (Supporting Information) depicts the Tauc plot for a direct energy gap estimation of the prepared films. Extrapolating the linear region of the (αhν) 2 data to null, the corresponding energy is related to the energy gap. The obtained Eg1 of the virgin Cs thin film is about 3.82 eV, which is smaller than that reported previously in a search of the literature, such as (~4.23 eV [14]), (~5.31 eV [37]), (~5.2 [42]), and theoretical HOMO-LUMO gap (5.876 eV) but higher than others (~3.36 eV [14]) and (~3.4 eV [26]). This discrepancy may arise from the difference in the molecular weight of chitosan in each study. As observed in Table 2, after dyeing, the fundamental energy gap decreased, where NGB achieved the lowest value (2.88 eV). Meanwhile, the dyeing induced the formation of subband energy levels that enhance the photoexcitation process via the electronic inter-band transitions, leading to another Eg2, as listed in Table 2.
For a more detailed inspection of the influence of the dyeing process on the chitosan's electronic structure and how its structural disorder and compositional irregularities affect its electronic band structure, Urbach energy, Eu, which represents the tail state width of the fabricated thin films, was calculated as follows [35]:   Figure S2 (Supporting Information) depicts the Tauc plot for a direct energy gap estimation of the prepared films. Extrapolating the linear region of the (αhν) 2 data to null, the corresponding energy is related to the energy gap. The obtained E g1 of the virgin Cs thin film is about 3.82 eV, which is smaller than that reported previously in a search of the literature, such as (~4.23 eV [14]), (~5.31 eV [37]), (~5.2 [42]), and theoretical HOMO-LUMO gap (5.876 eV) but higher than others (~3.36 eV [14]) and (~3.4 eV [26]). This discrepancy may arise from the difference in the molecular weight of chitosan in each study. As observed in Table 2, after dyeing, the fundamental energy gap decreased, where NGB achieved the lowest value (2.88 eV). Meanwhile, the dyeing induced the formation of sub-band energy levels that enhance the photoexcitation process via the electronic inter-band transitions, leading to another E g2 , as listed in Table 2.
For a more detailed inspection of the influence of the dyeing process on the chitosan's electronic structure and how its structural disorder and compositional irregularities affect its electronic band structure, Urbach energy, E u , which represents the tail state width of the fabricated thin films, was calculated as follows [35]: Regarding the slope of the relation between lnα versus hν that is sketched in Figure S3 (Supporting Information), the values of E u were estimated. Accordingly, the virgin Cs thin films achieved E u of about 243 meV, which is smaller than those determined in the literature (2450 meV [26]), (930 meV [37]), and (1250 meV [42]). The difference between the estimated Urbach energy in the present study and other reports may reflect the high quality, lower structural imperfections, and polycrystallinity of the fabricated chitosan films. In addition, the small value of E u is a good factor in the case of using chitosan in solar cells to reduce the process of the recombination of charge carriers due in those tail states. As can be observed in Table 2, the dyeing of chitosan achieved obvious alternations in tail energy, where NGB, FSS, CBB, and RBB achieved the highest tailing states' energy, declaring the highest perturbation of the electronic structure, resulting in denser localized states in the gap in these cases.

Dispersion Behavior and Dispersive Parameters
To assess the suitability of the designed films for optical applications, such as optical communication waveguides and optical windows, it is worth discussing the interactivity in the incident electromagnetic waves and the designed films in terms of wave dispersion, which depends mainly on the microstructure of the films. Consequently, the linear refractive index, n, was calculated using the following relation [34,35,38,39,43]: where λ is the wavelength of the incident electromagnetic wave. The dispersion behavior of the calculated refractive indices of the prepared films that are revealed in Figure S4 (Supporting Information) comprises two behaviors; one is the anomalous dispersion in the spectral range λ < 850 nm, while the other is the normal dispersion behavior (2500 > λ > 850) nm. The normal dispersion behavior was analyzed following the assumptions of the Wemple-DiDomenico model of the singularity in the oscillator responsible for the dispersion, where the refractive index is interrelated to the incident photon energy as follows [34,35,38,39,43]: where E d and E o are the dispersion and oscillator energies, respectively.
Thereby, the relation between (n 2 − 1) −1 versus (hν) 2 that is plotted in Figure 5 can be exploited for estimating the dispersive parameters. The estimated values of E d and E o of the virgin Cs films are about 19.3 and 9.36 eV, respectively, which are higher than those in previous studies [26,37]. Meanwhile, the addition of colorful dyes resulted in significant variations in the E d and E o of the virgin thin films, as shown in Table 2. Furthermore, the static refractive index, n o , and infinite dielectric constant, ε ∞ , can be deduced using the following relation [34,35,38,39,43]: Without regarding the extinction coefficient values in the transparent region, the slope of intercept of the relation between λ 2 and n 2 that is drawn in Figure S5 (Supporting Information) would give rise to the values of εL and N/m*, as observed in Table 2. The dyed chitosan thin films from ENB, BG, AO, and Rhd recorded the highest free charge carriers' density per effective mass.
Regarding the superposition between the hypothesis of the single oscillator model and classical free electron model, some featured electronic parameters of the engineered films can be derived, including plasma frequency, the plasma energy of the valance electrons, Fermi energy, and Penn energy (i.e., average energy gap), as follows [35,45]: It should be noted that the static refractive index of pure Cs is larger than that obtained in previous work, which may be due to the difference in molecular weight [26,32,33,37,44]. The tailored behavior of the refractive index of Cs thin films upon dyeing, as observed in Table 2, opens the way for the effective exploitation of these materials as a sustainable source for designing and implementing controllable non-lossy optical fibers and anti-reflective coatings.
Otherwise, the whole dielectric behavior of such films consists of two contributions; one arises from the lattice, ε L , and the other is due to the free charge carriers of the number per unit effective mass, N/m*, as follows [34,35,38,39,43]: Without regarding the extinction coefficient values in the transparent region, the slope of intercept of the relation between λ 2 and n 2 that is drawn in Figure S5 (Supporting Information) would give rise to the values of ε L and N/m*, as observed in Table 2. The dyed chitosan thin films from ENB, BG, AO, and Rhd recorded the highest free charge carriers' density per effective mass.
Regarding the superposition between the hypothesis of the single oscillator model and classical free electron model, some featured electronic parameters of the engineered films can be derived, including plasma frequency, the plasma energy of the valance electrons, Fermi energy, and Penn energy (i.e., average energy gap), as follows [35,45]: where ω P , ψ, E P , and E F stand for plasma frequency, valance electron plasma energy, Penn energy, and Fermi energy, respectively. The calculated values of the mentioned parameters are listed in Table 2 and showed a significant variation upon using different organic dyes. This confirms that the incorporation of the organic dyes into the chitosan structure effectively tuned its electronic structure for tailored optical and electrical properties.

Nonlinear Optical Parameters
The optical nonlinearity arises from the linearity deviation in the relation between the probed electric field and the resulting polarization. The deviation in polarization away from the linearity can be enhanced by the incorporation of many more donor and acceptor function groups and by improving the molecular π-conjugation length. The noncentrosymmetric structure with a high conjugation of the incorporated dyes allows for the transportation of charge from donor to acceptor units, which, in turn, can result in higher nonlinearity [46]. The versatility of the designed thin films for nonlinear applications as modulators, optical filters, waveguides, and optical storing devices can be deduced from the calculated nonlinear parameters, such as third-order nonlinear optical susceptibility, χ (3) , and nonlinear refractive index, n 2 . These parameters can be extracted using the Miller rule and Wemple-DiDomenico model for photon energy trends to vanish as follows [34,35,46]: where χ (1) is the first-order linear optical susceptibility and A is a constant (~1.7 × 10 −10 esu). The thin films of dyed Cs by ENB achieved the highest nonlinear parameters but, in contrast, the films of chitosan dyed by Saf achieved the lowest nonlinear optical parameters.

Photoluminescence and Color Chromaticity Characterizations
Certainly, the shape of the photoluminescence spectral curve and its intensity is a clear indication of the extent of the interaction between the chitosan matrices and the added dyes. The intermolecular interaction between the incorporated conjugated dyes and the main chains of chitosan would enhance the π-electron delocalization, which, in turn, alters the PL intensity. Figure 6a-i emphasize the resolved PL spectra of the virgin and dyed chitosan films with sub-band vibrational molecular contributions to the whole spectrum [47]. Obviously, the virgin Cs film displays a violet emission peak at 417 nm. Interestingly, upon incorporating the different dyes into the chitosan matrix, the PL declared new strong emission peaks in addition to the native emission peak of chitosan, as in the case of FSS (524 nm), AO (570 nm), Rhd (592 nm), and Saf (582 nm), as envisioned in Figure 6h-k, respectively. Meanwhile, the PL emission spectra of chitosan were enhanced because of the emission of the impregnating dye, such as BG (456 nm), CBB (418 nm), and MV (408 nm), showing overlapped convoluted spectra. Otherwise, the PL emission was quenched upon the incorporation of other dyes, such as MB, ENB, NGB, and RBB. The PL deterioration may be owing to either the complexation between the hydroxyl groups of chitosan and metal ions, as in the case of RBB and NGB, which change the electron-hole recombination annihilation or electrostatic interaction between the protonated amine groups of chitosan (polycationic character) and the incorporated dyes bearing anionic character, such as MB and ENB. Indeed, the coordinate shift in emission color is significantly observed in the 1931 CIE gamut diagram shown in Figure S6 (Supporting Information). In addition, the CIE XY coordinates of each color were calculated, as listed in Table 3. To qualify the effectiveness of designed films to be employed as filters, the color strength shown in Figure S7 (Supporting Information) and the estimated color parameters provided in Table 3 were evalu- Indeed, the coordinate shift in emission color is significantly observed in the 1931 CIE gamut diagram shown in Figure S6 (Supporting Information). In addition, the CIE XY coordinates of each color were calculated, as listed in Table 3. To qualify the effectiveness of designed films to be employed as filters, the color strength shown in Figure S7 (Supporting Information) and the estimated color parameters provided in Table 3 were evaluated. The lowest lightness value, L*, was observed under the RBB dyeing of chitosan, owing to its black color, while the highest change in color, dE*, was observed when Rhd dye was incorporated into the chitosan matrix. The increment in the a* value from −0.81 for virgin chitosan to 17.07 and −9.39 upon dying by Rhd and NGB illustrates the reinforcement of reddish and greenish tones, respectively. Meanwhile, the elevation of b* values from −1.34 for virgin chitosan film to 16.97 and −12.17 upon dying by AO and MV illustrates the reinforcement of yellowish and bluish tones, respectively. These features increase the potentiality of the engineered films for spectral selective filtering and shielding applications.

Laser Cut-Off Filter Performances
Confirming the ability of the prepared dyed films to be used as an effective filter and cut-off for visible light, the shielding behavior of the dyed chitosan films for a green laser of incident intensity (7.46 W/cm 2 ) was tested. Figure 7a represents the transmitted light intensity from each film. It can be noticed that the virgin chitosan film exhibited low attenuation for the incident green light with transmittance (I T /I o~4 4.4%), while Rhd-dyed chitosan films showed the lowest transmittance (I T /I o~2 .68%). These results agree with the discussed colorimetric and optical measurement results. Evaluating the stability and activity of the fabricated films as visible light filters, the experiment was repeated after keeping the fabricating films under ambient dark conditions for 6 months, as shown in Figure 7b. The pure and dyed films exhibited high stability with very low variations in the transmittance after 6 months. As observed in the inset in Figure 7b, the highest transmittance enhancement was observed in the case of the RBB-dyed chitosan film by 7.82%, while the highest transmittance deterioration was observed in the Saf-dyed chitosan film by −13%.

Laser Cut-Off Filter Performances
Confirming the ability of the prepared dyed films to be used as an effective filter and cut-off for visible light, the shielding behavior of the dyed chitosan films for a green laser of incident intensity (7.46 W/cm 2 ) was tested. Figure 7a represents the transmitted light intensity from each film. It can be noticed that the virgin chitosan film exhibited low attenuation for the incident green light with transmittance (IT/Io~44.4%), while Rhd-dyed chitosan films showed the lowest transmittance (IT/Io~2.68%). These results agree with the discussed colorimetric and optical measurement results. Evaluating the stability and activity of the fabricated films as visible light filters, the experiment was repeated after keeping the fabricating films under ambient dark conditions for 6 months, as shown in Figure  7b. The pure and dyed films exhibited high stability with very low variations in the transmittance after 6 months. As observed in the inset in Figure 7b, the highest transmittance enhancement was observed in the case of the RBB-dyed chitosan film by 7.82%, while the highest transmittance deterioration was observed in the Saf-dyed chitosan film by −13%.

Photosensing Performance
In a completely different way, to unravel the photosensing capability of the engineered films, the prepared films were used to remediate the spectral deficiencies in silicon to manufacture a photosensor in the form of a metal/insulator/semiconductor (MIS) heterojunction. The spectral selectivity of the designed photosensor of the architecture shown in Figure 8 can be tailored according to the absorption features of the deposited dyed chitosan on a silicon substrate, which may enhance the light-harvesting leverage [38,48]. Since the incorporated polymeric interlayer can be considered as a Schottky barrier height modifier of MS Schottky junction, the current-voltage (I-V) measurements of the designed photosensors were recorded under dark and illumination conditions. The photosensing capability of these fabricated devices was evaluated from the semilogarithmic currentvoltage relations, as shown in Figure 9. It is worth noting that all the fabricated devices exhibit a linear current-voltage dependence relation in the forward low-bias region, but in high-biasing regions, the high parasitic series resistance, R s , makes the relation deviate from linearity. Meanwhile, under reverse biasing, the reverse current increases monotonically as the reverse bias voltage increases, but in some devices (i.e., MV, MB, ENB, CBB, BG, NGB, FSS, AO, Saf, and RBB), the reverse current shows a quasi-voltage independence behavior, revealing the efficient passivation of the Si surface by the spin-coated dyed chitosan films.

Photosensing Performance
In a completely different way, to unravel the photosensing capability of the engineered films, the prepared films were used to remediate the spectral deficiencies in silicon to manufacture a photosensor in the form of a metal/insulator/semiconductor (MIS) heterojunction. The spectral selectivity of the designed photosensor of the architecture shown in Figure 8 can be tailored according to the absorption features of the deposited dyed chitosan on a silicon substrate, which may enhance the light-harvesting leverage [38,48]. Since the incorporated polymeric interlayer can be considered as a Schottky barrier height modifier of MS Schottky junction, the current-voltage (I-V) measurements of the designed photosensors were recorded under dark and illumination conditions. The photosensing capability of these fabricated devices was evaluated from the semilogarithmic currentvoltage relations, as shown in Figure 9. It is worth noting that all the fabricated devices exhibit a linear current-voltage dependence relation in the forward low-bias region, but in high-biasing regions, the high parasitic series resistance, Rs, makes the relation deviate from linearity. Meanwhile, under reverse biasing, the reverse current increases monotonically as the reverse bias voltage increases, but in some devices (i.e., MV, MB, ENB, CBB, BG, NGB, FSS, AO, Saf, and RBB), the reverse current shows a quasi-voltage independence behavior, revealing the efficient passivation of the Si surface by the spin-coated dyed chitosan films.  Otherwise, all the fabricated devices show a rectification behavior, where the highest rectification ratio (RR~137) under dark conditions is observed in the case of the Ag/Cs-MV/p-Si device, as shown in Figure S8a (Supporting Information). The difference in the obtained low values of RR compared to the previously reported values of Co/chitosan/p-Si [13] may be ascribed to the difference between the work function of the utilized electrodes [38,49]. Following is the thermionic emission model for estimating the microelectronic parameters of the designed non-ideal junctions (n > 1) of series resistance, R s , where the current-voltage-temperature (I-V-T) is represented as follows [34,38,39,46]: where k B is the Boltzmann constant, A is the active area of the implemented device, A* is the Richardson constant, I s is the reverse saturation current, and Φ B0 is the zero-bias barrier height. As observed in Figure S8b (Supporting Information), all the fabricated devices possess nonideal Schottky diode behavior, since the lowest n-value (~2.16) was observed for Ag/Cs-NGB/p-Si. The nonideality of the fabricated devices may be rationalized because of the formation of a native oxide layer between Si and the spin-coated chitosan film that develops sufficient series resistance in addition to the hypothetical consequences of the existence of variable heights in the Schottky barrier height (SBH) [12][13][14]38,39,46,50]. In addition, the developed interface states density between the chitosan and p-Si as well as the image forces and tunneling mechanism of charges may contribute to the nonideality of the present devices [12][13][14]38,39,46,50]. Likewise, the dark reverse saturation current and barrier height were estimated and plotted, as shown in Figure S8c,d (Supporting Information), respectively. The lowest achieved reverse current (I s = 0.23 nA) was obtained also in the case of the Ag/Cs-NGB/p-Si device. However, the highest barrier height (Φ B0 = 0.87 eV) was observed in the case of Ag/Cs-NGB/p-Si and Ag/Cs-CBB/p-Si devices.
It is worth noting that the insertion of chitosan films between the Ag electrode and the p-type silicon increased the Ag/p-Si barrier significantly by 90 meV for Ag/Cs-NGB/p-Si and 20 meV for Ag/Cs-Rhd/p-Si. The interlayered chitosan film between Ag and Si manipulated the interaction between them by reducing the metal's work function and electron affinity of the semiconductor, which resulted in a higher barrier height. It is well known that the controllability of the barrier height depends on the characteristics of the inserted organic film between the metal/semiconductor interface, such as its HOMO and LUMO energetic position, and their position relative to semiconductor electron affinity and electrode work function. The obtained values of Φ B0 of all the fabricated devices are higher than those previously recorded for Au/Cs/n-Si (~0.73 eV [23]) and Co/Cs/p-Si (~0.68 eV [13]) but lower than those estimated for Ag/Cs/n-Si (~0.94 eV [22] and Ag/Cs/n-Si (~0.88 eV [12]). The values of shunt resistance, R sh , and series resistance, R s , of the fabricated devices were estimated from the junction's resistance, R j , and plotted, as shown in Figure  Otherwise, all the fabricated devices show a rectification behavior, where the highest rectification ratio (RR~137) under dark conditions is observed in the case of the Ag/Cs-MV/p-Si device, as shown in Figure S8a (Supporting Information). The difference in the obtained low values of RR compared to the previously reported values of Co/chitosan/p-Si [13] may be ascribed to the difference between the work function of the utilized electrodes [38,49]. Following is the thermionic emission model for estimating the microelectronic parameters of the designed non-ideal junctions (n > 1) of series resistance, Rs, where It should be considered that the superficial nano-roughness defects, native oxide layer, and lattice mismatch between Si and the chitosan layer are responsible for initiating interface states, which act as recombination trapping centers. These states increase the series resistance of the fabricated heterojunction in addition to the resistances of the undepleted region of silicon and the contact electrode. The interface state density, N ss , of each device was calculated and plotted as a function of its energetic position relative to the valance band maxima, E ss -E v [38,39], as shown in Figure S9 (Supporting Information). It can be noticed that all the devices exhibit a decayed interfacial state density profile as the value of E ss -E v increases. Firstly, the lowest density of these states was observed for the Ag/Cs-MV/p-Si device~3.56 × 10 −13 eV −1 cm −2 , and secondly, the energetic position of these states is 0.5-E v eV, while the energetic position of these states in the other devices shifts to a higher energetic position~0.66-E v eV. Thereby, it can be concluded that the low density of interface trapping states and the short scale of the distribution relative to valance band maxima in the A/Cs-MV/p-Si heterojunction limits its role in the generated e-h pair recombination.
Furthermore, under halogen illumination, the produced reverse current of each device was increased significantly, as observed in Figure 9. For discussing the insight aspects of charge photogeneration and collection in the designed heterojunction in the light of the suggested band diagram, Figure 8 was used for confirmation. The incident photons of energy, hυ, can be absorbed by the organic chitosan layer generating electron-hole (e-h) pairs at the interfacial heterojunction depletion region, which can be split and swept with the help of the junction's built-in voltage. The split holes can be drifted towards the p-Si side overcoming the developed barrier height, while electrons can be drifted towards the chitosan layer collected by the electrodes under the conditions of the reverse bias voltage generating the photocurrent. The interfacial trapping states between the silicon and chitosan organic layer can induce recombination of these charges, impeding the photogeneration process. It should be mentioned that the highly penetrated incident photons may result in generating deep e-h pairs, which would diffuse toward the junction, contributing to the produced photocurrent by slow diffusing charges. Notably, the Ag/Cs-MV/p-Si device achieved the highest photocurrent, J photo = J illumination − J dark , (~0.29 mA/cm 2 ), as observed in Figure S10 Figure S11 (Supporting Information). The maximum observed value of V oc was about 246 mV for the Ag/Cs-NGB/p-Si device, while the maximum J sc was about 0.005 mA/cm 2 for the Ag/Cs-MV/p-Si device. This increases the effectiveness of the prepared devices for exploitation in the field of self-powered photodetection applications and solar cell applications.
In order to ensure the validity of the fabricated devices for photodetection applications, it was necessary to calculate some of the parameters of the photodetectors, such as their ability to sense weak optical signals (i.e., specific detectivity D*), their response to the light falling on them (i.e., responsivity R), strength of the response electrical signal relative to the noise signal (i.e., signal-to-noise ratio SNR), and the linearity of their performance to determine the extent of their ease of compatibility with the rest of the electronic components in the sensor circuits (i.e., linear dynamic range LDR). Considering the dominance of the shot noise mechanism in the noise current, the values of R, D*, SNR, and LDR were calculated as follows [34,38,41,46]: where ∆f is the signal bandwidth, NEP is the noise equivalent power, and q is the electronic charge. Figure 10 reveals the estimated values of R, D*, SNR, and LDR of the fabricated photosensors under 100 mW/cm 2 illumination intensity and at −3 V bias voltage. Clearly, Ag/Cs-MV/p-Si photosensors showed a superior performance relative to the other fabricated photosensors with 3.05 mA/W, 5.79 × 10 8 Jones, 4.5, and 13.1 dB for responsivity, detectivity, signal-to-noise ratio, and linear dynamic range, respectively. Table 4 shows a comparison between the estimated values of the photodetectors' technical parameters relative to other organic/inorganic heterojunction photosensors. The prepared photosensors showed a remarkable improvement in the values of the sensing parameters compared to many previously prepared heterojunction sensors, and this is what may make the fabricated heterojunction during the study a strong nominee in the field of eco-friendly photosensors for wider industrialization. The differences between photoelectrical performance between the fabricated devices and other devices in the literature depend mainly on the device structure in terms of the work function of the utilized electrodes, area of the device, type of silicon substrate, doping concentration, and thickness of the spin-coated polymeric films. Furthermore, the interactivity between the utilized organic layer (pure and dyed chitosan film) and the silicon substrate's surface will play a pivotal role in passivating the native surface defects and dangling bonds of the silicon surface to yield a high-quality junction of lower e-h recombinations and higher efficiency via controlling the interfacial dipole polarization.

Conclusions
In this study, thin films of pure chitosan and dyed ones with eleven different colored organic dyes were successfully prepared via the spin-coating method. Then, the molecular changes because of the pigmentation process were studied using FTIR, which showed the complete stability of the molecular structure of chitosan, noting the formation of electrostatic bonding and hydrogen bonding between the molecular structure of the dyes and the molecular structure of chitosan. The optical measurements of the prepared films

Conclusions
In this study, thin films of pure chitosan and dyed ones with eleven different colored organic dyes were successfully prepared via the spin-coating method. Then, the molecular changes because of the pigmentation process were studied using FTIR, which showed the complete stability of the molecular structure of chitosan, noting the formation of electrostatic bonding and hydrogen bonding between the molecular structure of the dyes and the molecular structure of chitosan. The optical measurements of the prepared films showed a clear change in the extent of the absorbance and reflectivity of the prepared films with the change in the type of dye used, which led to a significant change in the gap energy values, where NGB-dyed chitosan films achieved the lowest value (2.88 eV) and Saf-dyed chitosan films achieved the lowest static refractive index (1.58). Regarding the nonlinear applicability, ENB-dyed chitosan films achieved the best performance with 1.21 × 10 −13 esu and 2.65 × 10 −12 e.s.u, for χ (3) , and n 2 , respectively. The photoluminescence and color parameters of all the fabricated films were investigated for evaluating their applicability for visible light filtering and shield applications, which were confirmed by the green-laser blocking experiment. On the scale of the laser cut-off performance, chitosan dyed with Rhd was the best. Eventually, the high absorbance of the prepared films in the UV and visible ranges was exploited in the manufacture of the heterojunction of these films as an absorbance enhancer with silicon for photodetection purposes. By analyzing the electrical results in the dark and light, many of the prepared junctions showed good photodetection behavior with a high response. In addition to that, some junctions experienced photovoltaic behaviors, which are suggested for solar cell applications, specifically chitosan films dyed with Saf and MV, which achieved the highest open-circuit voltage and short-circuit current density. The microelectronic parameters of the designed devices were evaluated, where the Ag/Cs-MV/p-Si device recorded a better performance relative to the other devices. Furthermore, the achieved responsivity and specific detectivity for Ag/Cs-MV/p-Si are considered high relative to many reported devices. Finally, these tunable, echo-friendly, easily processable films can be considered a powered commercialized platform for multifunctional optoelectronic and solar energy applications. This study needs more modifications to enhance the device's performance, which may be induced by incorporating plasmonic nanoparticles to improve the light-harvesting capability and enhancing its conductivity, which will be performed in our future work. In addition, the dyeing level will be optimized and the influ-ence of UV irradiation on the designed films will be studied for assessing the stability of the present films for window material applicability and usability for temperature shielding applications.
Supplementary Materials: The following supporting information can be downloaded at: https:// www.mdpi.com/article/10.3390/ma16093475/s1. Figure S1: Schematic diagram of the designed MPS heterojunction. Figure S2: Tauc plot for energy gap estimation of the pure and dyed chitosan thin films. Figure S3: Urbach plot of the pure and dyed chitosan thin films. Figure S4: Dispersion behavior of pure and dyed chitosan thin films. Figure S5: n 2 versus λ 2 single oscillator model plot of the pure and dyed chitosan thin films. Figure S6: CIE 1931 chromatography of pure and dyed chitosan thin films. Figure S7: Spectral profile of the color strength of the pure and dyed chitosan thin films. Figure S8: (a) rectification ratio, (b) ideality factor, (c) reverse saturation current, (d) zero bias barrier height, (d) shunt resistance, and (d) series resistance of Ag/chitosan/p-Si/Al structured devices under dark conditions. Figure S9: Interface states density profile of the designed devices. Figure S10: Reverse photocurrent density under 100 mW/cm 2 illumination of Ag/chitosan/p-Si/Al structured devices. Figure S11: Open circuit voltage and short circuit current density of Ag/chitosan/p-Si/Al photosensors. Table S1: Chemical information about the utilized organic dyes. Table S2: Viscosity coefficient of pure and dyed chitosan solutions. Table S3: Thickness of the prepared pure and dyed chitosan thin films.

Data Availability Statement:
The data is available upon request from corresponding author.