Spin-Coating and Aerosol Spray Pyrolysis Processed Zn1−xMgxO Films for UV Detector Applications

A series of Zn1−xMgxO thin films with x ranging from 0 to 0.8 were prepared by spin coating and aerosol spray pyrolysis deposition on Si and quartz substrates. The morphology, composition, nano-crystalline structure, and optical and vibration properties of the prepared films were studied using scanning electron microscopy (SEM), energy dispersive X-ray analysis (EDX), X-ray diffraction (XRD), and optical and Raman scattering spectroscopy. The optimum conditions of the thermal treatment of samples prepared by spin coating were determined from the point of view of film crystallinity. The content of crystalline phases in films and values of the optical band gap of these phases were determined as a function of the chemical composition. We developed heterostructure photodetectors based on the prepared films and demonstrated their operation in the injection photodiode mode at forward biases. A device design based on two Zn1−xMgxO thin films with different x values was proposed for extending the operational forward bias range and improving its responsivity, detectivity, and selectivity to UV radiation.

An important feature required for optoelectronic applications, e.g., in photodetectors and light emitting devices, is the possibility of controlling the material band gap for tuning the spectral range of emission or the optical sensitivity. One versatile way to achieve this function is alloying zinc oxide with Mg, since the band gap of ZnMgO solid solutions covers a wide ultraviolet (UV) spectral region ranging from the direct band gap of 3.36 eV in ZnO to that of 7.8 eV in MgO at room temperature.

Sample Preparation and Experimental Details
Zn 1−x Mg x O films with various x-values were deposited on quartz and p-Si substrates using two technological methods, namely, spin coating and aerosol spray pyrolysis. Solutions of zinc acetate dihydrate with 99.999% purity and magnesium acetate tetrahydrate with purity ≥99% purchased from Sigma-Aldrich (Sigma-Aldrich Chemie GmbH, Taufkirchen, Munich, Germany) were used in both approaches. 0.35 M zinc acetate and magnesium acetate solutions with various Mg/Zn ratios were dissolved in 20 mL of 2methoxyethanol +0.5 mL of diethanolamine (DEA) for spin coating, or in ethanol for aerosol spray pyrolysis deposition. The prepared solutions were mixed for 30 min at the temperature of 50-60 • C in an ultrasonic bath before the deposition process.
Spin coating was performed at room temperature at a rotation speed of 3000 rpm in multiple coating cycles, with the rotation lasting 30 s for each cycle followed by drying the coated layer at 180 • C for 10 min. After the deposition of a certain number of layers, which determines the film thickness, the samples were treated at a temperature of 500 • C in air or in a mixture of air and argon (80:20%) for one hour.
The prepared solution was sprayed onto the substrate using a homemade sprayer with an O 2 gas flow in the case of aerosol spray pyrolysis. The solution was injected into the oxygen gas flow by means of a syringe controlled by a stepper motor via a computer interface. The distance between the sprayer and the heated substrate was kept at 18 cm to produce a uniform coverage of the film on the substrate. The substrate temperature was 500 • C during the deposition process, the thickness of the film being determined by the duration of deposition and by the rate of precursor solution injection in the process.
The morphology investigation and chemical composition microanalysis of the produced films were performed by a FEI Helios Nanolab 600 Scanning Electron Microscope (SEM) equipped with an Ametek model ELECT PLUS X-ray detector (EDX) purchased from FEI Company (Field Electron and Ion Company, FEI), Hillsboro, OR, USA.
A Bruker AXS D8 DISCOVER X-ray diffractometer (Bruker Corporation, Billerica, MA, USA) with Cu Kα1 radiation (λ = 0.15406 nm) operated at 40 kV beam voltage and 40 mA beam current was used for X-ray diffraction measurements.
Raman scattering (RS) spectra were recorded at room temperature with a Renishaw InVia Qontor confocal microscope (Renishaw plc, Wotton-under-Edge, Stroud district of Gloucestershire, England, UK) equipped with a laser excitation source of 532 nm (50 mW). A (100×) microscope objective lens was selected to focus the light on the sample surface. The system calibration was performed on a monocrystalline Si wafer with a main peak measured at 521 cm −1 . A total of 10 spectra were collected at 5 s exposure time and 5% laser power for each measurement.
Optical transmission spectra were measured at room temperature with a Jasco V-670 spectrometer (Jasco International CO., LTD., Tokyo, Japan).
Heterostructure photodetectors were prepared by deposition of one or two Zn 1−x Mg x O thin films with different compositions on p-Si substrates, with subsequent deposition of the Al ohmic contact by thermal evaporation on the backside of the Si substrate, and the Ag front-side contact on the surface of the upper Zn 1−x Mg x O film through a special mask, followed by sample annealing at the temperature of 300 • C in vacuum. The current-voltage characteristics and the photocurrent of the photodetector structures were measured using a Keithley 2400 Source Meter Unit (SMU) under radiation from a xenon DKSS-150 lamp passed through different optical filters. Figure 1 shows the morphology of Zn 0.5 Mg 0.5 O films with thickness around 100 nm prepared by spin coating and annealed in air at 500 • C for various durations ranging from 15 to 60 min. One can see that the films consist of crystallites with basically a uniform distribution over the film surface, while the mean size of crystallites increases from around 30 nm to around 70 nm with increasing annealing time.

Morphology, Composition, and Crystal Structure Characterizations of the Prepared Films
Gloucestershire, England, UK) equipped with a laser excitation source of 532 nm ( A (100×) microscope objective lens was selected to focus the light on the sample The system calibration was performed on a monocrystalline Si wafer with a ma measured at 521 cm −1 . A total of 10 spectra were collected at 5 s exposure time laser power for each measurement.
Optical transmission spectra were measured at room temperature with a Jas spectrometer (Jasco International CO., LTD., Tokyo, Japan).
Heterostructure photodetectors were prepared by deposition of one Zn1−xMgxO thin films with different compositions on p-Si substrates, with subsequ osition of the Al ohmic contact by thermal evaporation on the backside of the Si su and the Ag front-side contact on the surface of the upper Zn1−xMgxO film through mask, followed by sample annealing at the temperature of 300 °C in vacuum. The voltage characteristics and the photocurrent of the photodetector structures wer ured using a Keithley 2400 Source Meter Unit (SMU) under radiation from a xeno 150 lamp passed through different optical filters. Figure 1 shows the morphology of Zn0.5Mg0.5O films with thickness around prepared by spin coating and annealed in air at 500 °C for various durations rangi 15 to 60 min. One can see that the films consist of crystallites with basically a distribution over the film surface, while the mean size of crystallites increas around 30 nm to around 70 nm with increasing annealing time.  The XRD analysis ( Figure 2) suggests that concomitantly with increasing the crystallite sizes, the crystal quality of the deposited films improves with increasing the annealing time, as indicated by the enhancement of the intensity of XRD reflexes from the wurtzite phase indexed according to the PDF Card No. 01-078-3032. At the same time, the (200) reflex from the rock salt phase appears at annealing durations longer than 45 min. of Zn0.5Mg0.5O in Figures 1 and 2. On the other hand, as previously reported [37], degradation of the film morphology and their cracking occurs with further increase of these technological parameters. Moreover, deviation from stoichiometry towards an excess of oxygen was observed at higher annealing temperatures and longer annealing durations, when the films were thermal treated in air. Similar trends have been observed for other film compositions.   The annealing temperature of 500 • C and the annealing duration of 1 h were found to constitute optimum conditions of thermal treatment, since the crystallite sizes and the crystal quality of the film improves with the increase of the annealing temperature up to 500 • C and the duration of annealing up to 1 h, as illustrated for the film with composition of Zn 0.5 Mg 0.5 O in Figures 1 and 2. On the other hand, as previously reported [37], degradation of the film morphology and their cracking occurs with further increase of these technological parameters. Moreover, deviation from stoichiometry towards an excess of oxygen was observed at higher annealing temperatures and longer annealing durations, when the films were thermal treated in air. Similar trends have been observed for other film compositions. Figure 3 illustrates the evolution of the morphology of Zn 1−x Mg x O films deposited by spin coating as a function of the Mg content in the films (x value). One can see that the crystallites with hexagonal shape are evidenced in films with low x value. Note that the crystallites become shapeless with the increase of the Mg content in the deposited films.

Morphology, Composition, and Crystal Structure Characterizations of the Pr Films
The results of the EDX analysis summarized in Table 1 suggest that the compositions of the Zn 1−x Mg x O films are stoichiometric within the ±2% accuracy of the instrument, and they correspond to the x-values set in the zinc acetate-magnesium acetate solutions.
The XRD pattern of the Zn 1−x Mg x O films (0 < x < 0.8) prepared by spin coating is shown in Figure 4.
The XRD investigations suggest that the wurtzite phase is present in films up to the x value of 0.8. At the same time, (002) and (202) reflexes from the rock salt phase emerge in the pattern at x values higher than 0.4.  The results of the EDX analysis summarized in Table 1 suggest that the comp of the Zn1−xMgxO films are stoichiometric within the ±2% accuracy of the instrum they correspond to the x-values set in the zinc acetate-magnesium acetate solutio The XRD pattern of the Zn1−xMgxO films (0 < x < 0.8) prepared by spin co shown in Figure 4.  The gradual shift of the (002) reflex to larger refraction angles with increase of the x value suggests an efficient incorporation of Mg atoms into the wurtzite lattice. The position of this reflex approaches the position of a peak, which represents a superposition of the (101) reflex from the wurtzite phase and the (111) reflex from the rock salt phase.
The XRD data are corroborated by the results of Raman scattering spectroscopy, which are indicative of efficient incorporation of the Mg atoms into the wurtzite lattice of Zn 1−x Mg x O alloy films ( Figure 5). Wurtzite ZnO belongs to the C 6v space group (P6 3 mc). According to group theory, the corresponding zone center optical phonons are of the following symmetry modes: A 1 + 2B 1 + E 1 + 2E 2 [41], of which the A 1 , E 1 , and 2E 2 modes are the first-order Raman active, while the 2B 1 phonons are silent. The A 1 and E 1 modes are split into LO and TO components.  The XRD investigations suggest that the wurtzite phase is present in films up to the x value of 0.8. At the same time, (002) and (202) reflexes from the rock salt phase emerge in the pattern at x values higher than 0.4.
The gradual shift of the (002) reflex to larger refraction angles with increase of the x value suggests an efficient incorporation of Mg atoms into the wurtzite lattice. The position of this reflex approaches the position of a peak, which represents a superposition of the (101) reflex from the wurtzite phase and the (111) reflex from the rock salt phase.
The XRD data are corroborated by the results of Raman scattering spectroscopy, which are indicative of efficient incorporation of the Mg atoms into the wurtzite lattice of Zn1−xMgxO alloy films ( Figure 5). Wurtzite ZnO belongs to the C6v space group (P63mc). According to group theory, the corresponding zone center optical phonons are of the following symmetry modes: A1 + 2B1 + E1 + 2E2 [41], of which the A1, E1, and 2E2 modes are the first-order Raman active, while the 2B1 phonons are silent. The A1 and E1 modes are split into LO and TO components. All the Raman active phonon modes are clearly identified in the measured spectrum ( Figure 5a). The peaks at around 100 cm −1 and 438 cm −1 are attributed to ZnO nonpolar optical phonon E 2 (low) and E 2 (high) modes, respectively. The peaks at 379 cm −1 and 410 cm −1 correspond to the A 1 (TO) and E 1 (TO) modes, respectively. The band at 583 cm −1 comes from a combination of A 1 (LO) and E 1 (LO) modes. Apart from that, the peak at 332 cm −1 is usually observed in the spectrum, it being attributed to second order Raman processes involving acoustic phonons [42].
The low frequency E 2 mode is predominantly associated with the non-polar vibration of the heavier Zn sublattice, while the high frequency E 2 mode predominantly involves the displacements of lighter oxygen atoms. Therefore, the incorporation of Mg atoms into the wurtzite lattice substituting the Zn atoms leads to shifting of the E 2 (low) mode to higher wavenumbers (Figure 5b), while the position of the E 2 (high) mode is basically stable (Figure 5c). All the Raman active phonon modes are clearly identified in the measured spectrum ( Figure 5a). The peaks at around 100 cm −1 and 438 cm −1 are attributed to ZnO nonpolar optical phonon E2(low) and E2(high) modes, respectively. The peaks at 379 cm −1 and 410 cm −1 correspond to the A1(TO) and E1(TO) modes, respectively. The band at 583 cm −1 comes from a combination of A1(LO) and E1(LO) modes. Apart from that, the peak at 332 cm −1 is usually observed in the spectrum, it being attributed to second order Raman processes involving acoustic phonons [42].
The low frequency E2 mode is predominantly associated with the non-polar vibration of the heavier Zn sublattice, while the high frequency E2 mode predominantly involves the displacements of lighter oxygen atoms. Therefore, the incorporation of Mg atoms into the wurtzite lattice substituting the Zn atoms leads to shifting of the E2(low) mode to Furthermore, similar to the results of XRD analysis, the Raman spectra suggest that the wurtzite phase is present in films up to the x value of 0.8, since the E 2 (low) and E 2 (high) modes persist in the spectrum. At the same time, the intensity of RS modes coming from the wurtzite phase gradually decreases with increase of the x value, indicating the formation of the rock salt Raman inactive phase.
The morphology of Zn 1−x Mg x O alloy films prepared by aerosol spray pyrolysis also changes with the increase of the Mg content in films, similarly to that of the films prepared by spin coating (Figure 6). Crystallites with hexagonal shape are also present in films prepared by aerosol spray pyrolysis with low x value. However, their shape is more complex, with hexagonal platelets deposited on each other, therefore forming some kind of flower. Similar to films prepared by spin coating, the shape of these structures deteriorates with the increase of the x value, which results in the formation of shapeless crystallites. the wurtzite phase gradually decreases with increase of the x value, indicating the formation of the rock salt Raman inactive phase.
The morphology of Zn1−xMgxO alloy films prepared by aerosol spray pyrolysis also changes with the increase of the Mg content in films, similarly to that of the films prepared by spin coating (Figure 6). Crystallites with hexagonal shape are also present in films prepared by aerosol spray pyrolysis with low x value. However, their shape is more complex, with hexagonal platelets deposited on each other, therefore forming some kind of flower. Similar to films prepared by spin coating, the shape of these structures deteriorates with the increase of the x value, which results in the formation of shapeless crystallites. The results of the EDX analysis summarized in Table 2 suggest that the compositions of the Zn1−xMgxO films prepared by aerosol spray pyrolysis are stoichiometric within the ±2% accuracy of the instrument, and they correspond to the x-values set in the zinc acetatemagnesium acetate spray solutions. The results of the EDX analysis summarized in Table 2 suggest that the compositions of the Zn 1−x Mg x O films prepared by aerosol spray pyrolysis are stoichiometric within the ±2% accuracy of the instrument, and they correspond to the x-values set in the zinc acetate-magnesium acetate spray solutions. The XRD data for Zn 1−x Mg x O alloy films prepared by aerosol spray pyrolysis reveal the same trends as those observed in films deposited by spin coating (Figure 7). The XRD data for Zn1−xMgxO alloy films prepared by aerosol spray pyrolysis reveal the same trends as those observed in films deposited by spin coating (Figure 7). The (002) reflex is gradually shifted to larger diffraction angles when increasing the x value. The intensity of reflexes coming from the wurtzite phase decreases as the x value increases higher than 0.4, with a concomitant emerging of (002) and (202) reflexes from the cubic rock salt phase. Nevertheless, reflexes from the wurtzite phase persist in the pattern registered for the x value of 0.8, suggesting that the wurtzite phase is present in films up to an x value of 0.8. The (002) reflex is gradually shifted to larger diffraction angles when increasing the x value. The intensity of reflexes coming from the wurtzite phase decreases as the x value increases higher than 0.4, with a concomitant emerging of (002) and (202) reflexes from the cubic rock salt phase. Nevertheless, reflexes from the wurtzite phase persist in the pattern registered for the x value of 0.8, suggesting that the wurtzite phase is present in films up to an x value of 0.8. Similar to samples prepared by spin coating, the XRD data collected on samples prepared by aerosol spray pyrolysis are corroborated by the results of RS spectroscopy presented in Figure 8. The intensity of Raman modes coming from the wurtzite phase decreases with the increase of the x value in Zn 1−x Mg x O films, and the E 2 low mode shifts to higher wavenumbers. Similar to samples prepared by spin coating, the XRD data collected on samples prepared by aerosol spray pyrolysis are corroborated by the results of RS spectroscopy presented in Figure 8. The intensity of Raman modes coming from the wurtzite phase decreases with the increase of the x value in Zn1−xMgxO films, and the E2 low mode shifts to higher wavenumbers.

Optical Properties and Band Gap Analysis of the Prepared Films
The Zn1−xMgxO alloy films prepared by both the spin coating and aerosol spray pyrolysis methods proved to be highly transparent, with a transparency level greater than 80% in the visible spectral range up to 3.3 eV. In accordance with the Tauc formula [43,44], the optical band gap of the films was determined from the point of intersection of the

Optical Properties and Band Gap Analysis of the Prepared Films
The Zn 1−x Mg x O alloy films prepared by both the spin coating and aerosol spray pyrolysis methods proved to be highly transparent, with a transparency level greater than 80% in the visible spectral range up to 3.3 eV. In accordance with the Tauc formula [43,44], the optical band gap of the films was determined from the point of intersection of the linear segment of the plot presented in Figure 9 with the photon energy axis. The deviation of curves from the linear dependence at lower value of the absorption coefficient can be explained taking into account the local compositional fluctuations and rock salt phase inclusions in the wurtzite phase, leading to the formation of deep band tails in the band gap, as discussed in a previous paper [37]. The optical band gap deduced from the Tauc plot is presented in Figure 10 as a function of the Mg content in the films (x). The obtained data are compared with previously reported data in the literature for films prepared by PLD [29,30,45,46]. The experimental data are also fitted to the standard bowing equation corresponding to the rock salt phase (upper curve) and to the wurtzite phase (lower curve). According to [30], the band gap is fitted to the wurtzite phase up to the x value of 0.27, and to the cubic phase down to the x value of 0.4. On the other hand, the data of the present work show that the band gap of the films prepared by both the spin coating and the spray pyrolysis methods are fitted by the curve corresponding to the wurtzite phase up to the x value of 0.6. These data suggest that, in spite of the fact that the films represent a mixture of wurtzite and cubic phases at x values higher than 0.4, as indicated by the The optical band gap deduced from the Tauc plot is presented in Figure 10 as a function of the Mg content in the films (x). The obtained data are compared with previously reported data in the literature for films prepared by PLD [29,30,45,46]. The experimental data are also fitted to the standard bowing equation corresponding to the rock salt phase (upper curve) and to the wurtzite phase (lower curve). The optical band gap deduced from the Tauc plot is presented in Figure 10 as a function of the Mg content in the films (x). The obtained data are compared with previously reported data in the literature for films prepared by PLD [29,30,45,46]. The experimental data are also fitted to the standard bowing equation corresponding to the rock salt phase (upper curve) and to the wurtzite phase (lower curve). According to [30], the band gap is fitted to the wurtzite phase up to the x value of 0.27, and to the cubic phase down to the x value of 0.4. On the other hand, the data of the present work show that the band gap of the films prepared by both the spin coating and the spray pyrolysis methods are fitted by the curve corresponding to the wurtzite phase up to the x value of 0.6. These data suggest that, in spite of the fact that the films represent a mixture of wurtzite and cubic phases at x values higher than 0.4, as indicated by the According to [30], the band gap is fitted to the wurtzite phase up to the x value of 0.27, and to the cubic phase down to the x value of 0.4. On the other hand, the data of the present work show that the band gap of the films prepared by both the spin coating and the spray pyrolysis methods are fitted by the curve corresponding to the wurtzite phase up to the x value of 0.6. These data suggest that, in spite of the fact that the films represent a mixture of wurtzite and cubic phases at x values higher than 0.4, as indicated by the XRD analysis, the wurtzite phase is a predominant one and it determines the optical band gap of films with x value up to 0.6. This observation hints to the possibility of extending the band gap of the wurtzite-type ZnMgO films grown by spin coating or aerosol spray pyrolysis towards the solar-blind-region. Up to now, a solar-blind 4.55 eV band gap of a wurtzite type Zn 1−x Mg x O film with the x value of 0.55 was achieved by RF-plasma assisted MBE growth using quasi-homo buffers on a suitable substrate [47][48][49].

Heterostructure Photodetectors Characterization
The design of n-Zn 1−x Mg x O/p-Si heterostructure photodiodes is shown in Figure 11a

Heterostructure Photodetectors Characterization
The design of n-Zn1−xMgxO/p-Si heterostructure photodiodes is shown in Figure 11a  Note that the current-voltage characteristics plotted with linear voltage axis and logarithmic voltage axis do not fit the classical formula for a p-n junction, where IS is the saturation current, q is the elementary charge, k is the Boltzmann constant, T is the temperature, and n is the ideality factor of a classical diode [37]. The plot should be a straight line in such semi-logarithmic coordinates. How- Note that the current-voltage characteristics plotted with linear voltage axis and logarithmic voltage axis do not fit the classical formula for a p-n junction, I = I S exp qU nkT − 1 , where I S is the saturation current, q is the elementary charge, k is the Boltzmann constant, T is the temperature, and n is the ideality factor of a classical diode [37]. The plot should be a straight line in such semi-logarithmic coordinates. However, this is not the case for the prepared diode structures. On the contrary, the characteristics fit a straight line in doublelogarithmic coordinates, as deduced from Figure 11b-d, which means that it corresponds to a power function I ∝ U n , according to the Lampert theory [50].
The n value under illumination is about 2, which corresponds to the space charge limited (SCL) current injection according to the Mott-Gurney (MG) law [51,52]. The fact that the investigated heterojunctions work at forward bias with MG law characteristics while classical diodes work at reverse bias suggests that the prepared heterojunctions work as injection photodiodes. Similar devices have been previously demonstrated on Si-CdS [40], CdS-CdTe [53], and CdS-CdSTe-ZnCdTe [39] heterostructures.
The n value for the dark current characteristics in Figure 11  The parameters of these devices are overall low because the ratio of the photocurrent to the dark current decreases with increasing bias voltage, and the operation of devices at voltages higher than 1 V becomes ineffective. A device structure with two Zn 1−x Mg x O films with different x values was proposed to overcome this drawback, as shown in Figure 12a. A more complex band diagram is inherent to such a device, and the Zn 0.60 Mg 0.40 O upper layer with a wider band gap plays the role of absorption layer, which protects the base layer with the composition of Zn 0.90 Mg 0.10 O and is expected to reduce the density of surface states. The parameters of these devices are overall low because the ratio of the photocurrent to the dark current decreases with increasing bias voltage, and the operation of devices at voltages higher than 1 V becomes ineffective. A device structure with two Zn1−xMgxO films with different x values was proposed to overcome this drawback, as shown in Figure 12a. A more complex band diagram is inherent to such a device, and the Zn0.60Mg0.40O upper layer with a wider band gap plays the role of absorption layer, which protects the base layer with the composition of Zn0.90Mg0.10O and is expected to reduce the density of surface states. The current-voltage characteristic of the photodiode fits a straight line in the double logarithmic coordinates at bias voltages up to 5 V in the dark with a power function index n of around 2, while the characteristic under illumination has a more complex shape, with three segments fitting a straight line. The second segment in the voltage range of (0.7-2) V has a power function index n value higher than 3, leading to the increase of the ratio of the photocurrent to the dark current at biases higher than 1 V. The ratio Iphoto/Idark reaches a value of 13 at the voltage of 5 V, which improves the parameters of the device.
The n-Zn90Mg10O film plays the role of device base. Since the diode works at forward The current-voltage characteristic of the photodiode fits a straight line in the double logarithmic coordinates at bias voltages up to 5 V in the dark with a power function index n of around 2, while the characteristic under illumination has a more complex shape, with three segments fitting a straight line. The second segment in the voltage range of (0.7-2) V has a power function index n value higher than 3, leading to the increase of the ratio of the photocurrent to the dark current at biases higher than 1 V. The ratio I photo /I dark reaches a value of 13 at the voltage of 5 V, which improves the parameters of the device.
The n-Zn 90 Mg 10 O film plays the role of device base. Since the diode works at forward bias and the main portion of the bias is applied on this film, the p-n junction injects minority charge carriers through the direct current flow. An equivalent number of the majority carriers flow to the semiconductor from the upper contact via the Zn 60 Mg 40 O film to compensate for the space charge in the Zn 90 Mg 10 O film. When increasing the injection current, the concentration of the non-equilibrium carriers significantly exceeds the concentration of equilibrium ones, and the non-equilibrium carriers determine the conductivity of the base region. The applied bias is distributed between the p-n junction and the base region. Since the resistance of the base region decreases as a result of injection, the portion of the bias voltage on the p-n junction increases, therefore leading to the increase of the injection in the base and to a further decrease of its resistance. A similar redistribution of the applied bias voltage occurs under illumination. Therefore, an effect of intrinsic injection amplification of the primary photocurrent occurs. On the other hand, the generation of photo-carriers occurs in the upper Zn 60 Mg 40 O film, which has a significant impact on the current-voltage characteristic under illumination, which results in an increase of the power function index n at voltages higher than 0.7 V, thus improving the I photo /I dark ratio as compared to devices with single Zn 1−x Mg x O films. Apart from that, the upper film improves the selectivity of the device to UV radiation.
The  35 O heterojunction has been discussed in a previous paper [33].  Figure 13). The ratio Iphoto/Idark reaches a value of 36 at the voltage of 5 V for such a device structure. The energy band diagram of the p-Si/n-Zn85Mg15O/n-Zn65Mg35O heterojunction has been discussed in a previous paper [33]. The parameters of the photodetectors (responsivity and detectivity) were calculated from the experimental data according to Formulas (1) and (2), respectively [54]: where Iphoto is the current under illumination, Idark is the dark current, Pill is the illumination power (63 mW), A is the active area of the photodetector (0.125 cm 2 ) and e is the elementary charge. The parameters of the prepared photodetectors are summarized in Table 3. The parameters of the photodetectors (responsivity and detectivity) were calculated from the experimental data according to Formulas (1) and (2), respectively [54]: where I photo is the current under illumination, I dark is the dark current, P ill is the illumination power (63 mW), A is the active area of the photodetector (0.125 cm 2 ) and e is the elementary charge. The parameters of the prepared photodetectors are summarized in Table 3. The design with two Zn 1−x Mg x O films also improves the selectivity of devices, as illustrated in (Figure 14). Such devices are practically not sensitive to infrared (IR) radiation, in contrast to devices with a single Zn The design with two Zn1−xMgxO films also improves the selectivity of devices, as illustrated in (Figure 14). Such devices are practically not sensitive to infrared (IR) radiation, in contrast to devices with a single Zn1−xMgxO film. The device based on n-Zn85Mg15O/n-Zn65Mg35O films is less sensitive to visible radiation as compared to UV radiation by a factor of 9, while this ratio is 4.5 for the device with the n-Zn90Mg10O/n-Zn60Mg40O films and is around 3 for the device with a single Zn80Mg20O film. Figure 14. Relaxation of photocurrent measured at 300 K with illumination at different wavelengths for a photodetector with a Zn80Mg20O film (a), a photodetector with n-Zn90Mg10O/n-Zn60Mg40O films (b), and a photodetector with n-Zn85Mg15O /n-Zn65Mg35O films (c).

Conclusions
The results of this study demonstrate the preparation of Zn1−xMgxO thin films by spin coating and aerosol spray pyrolysis on Si substrates with homogeneous morphology over the entire surface of the films. The optimum temperature of thermal treatment of the films prepared by spin coating from the point of view of crystallinity is 500 °C for 1 h. The nanocrystallites become shapeless with increasing Mg content in films. According to the results of XRD analysis, the films prepared by both methods are of wurtzite structure up to an Mg content of around 40%, as demonstrated by the results of XRD analysis. However, the wurtzite phase is present in films up to an Mg content of 80%, forming a composite with the cubic rock salt phase. The efficient incorporation of Mg atoms into the wurtzite lattice is demonstrated by the results of XRD and Raman scattering analysis.
The results of optical measurements demonstrate that the optical bandgap of films prepared by both methods is determined by the wurtzite phase up to the x value of 0.60, in spite of the fact that the films represent a mixture of wurtzite and cubic phases at x values higher than 0.4. This observation hints at the possibility of extending the band gap of the wurtzite-type ZnMgO films grown by spin coating or aerosol spray pyrolysis towards the solar-blind-region.
The analysis of the current-voltage characteristics of photodetectors developed on the basis of the prepared films suggests their operation in the injection photodiode mode

Conclusions
The results of this study demonstrate the preparation of Zn 1−x Mg x O thin films by spin coating and aerosol spray pyrolysis on Si substrates with homogeneous morphology over the entire surface of the films. The optimum temperature of thermal treatment of the films prepared by spin coating from the point of view of crystallinity is 500 • C for 1 h. The nano-crystallites become shapeless with increasing Mg content in films. According to the results of XRD analysis, the films prepared by both methods are of wurtzite structure up to an Mg content of around 40%, as demonstrated by the results of XRD analysis. However, the wurtzite phase is present in films up to an Mg content of 80%, forming a composite with the cubic rock salt phase. The efficient incorporation of Mg atoms into the wurtzite lattice is demonstrated by the results of XRD and Raman scattering analysis.
The results of optical measurements demonstrate that the optical bandgap of films prepared by both methods is determined by the wurtzite phase up to the x value of 0.60, in spite of the fact that the films represent a mixture of wurtzite and cubic phases at x values higher than 0.4. This observation hints at the possibility of extending the band gap of the wurtzite-type ZnMgO films grown by spin coating or aerosol spray pyrolysis towards the solar-blind-region.
The analysis of the current-voltage characteristics of photodetectors developed on the basis of the prepared films suggests their operation in the injection photodiode mode at forward biases. A device design with two Zn 1−x Mg x O thin films with different x values was proposed for extending the operational forward bias range. Such a design proved to significantly improve the responsivity and detectivity, as well as the selectivity of the injection photodiodes to UV radiation. In spite of different morphologies of the films prepared by spin coating and aerosol spray pyrolysis, the photodiodes on demonstrate similar characteristics when fabricated on films with the same thickness. Funding: This research was funded by the National Agency for Research and Development of Moldova under the Grants #20.80009.5007.02 "Advanced nanostructured materials for thermoelectric and sensor applications" and #22.80013.5007.4BL "Nano-and hetero-structures based on zinc oxide and A3B5 compounds for optoelectronics, photonics and biosensorics". The APC was funded by the European Commission under the H2020 grant #810652 "NanoMedTwin".

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
The data presented in this study are available on request from the corresponding authors.