Technology CAD (TCAD) Simulations of Mg2Si/Si Heterojunction Photodetector Based on the Thickness Effect

Research on infrared detectors has been widely reported in the literature. For infrared detectors, PbS, InGaAs, PbSe, InSb, and HgxCd1-xTe materials are the most widely used and have been explored for photodetection applications. However, these are toxic and harmful substances which are not conducive to the sustainable development of infrared detectors and are not eco-friendly. Mg2Si is a green, healthy, and sustainable semiconductor material that has the potential to replace these toxic and damaging photoelectric materials, making photoelectric detectors (PDs) green, healthy, and sustainable. In this work, we report on the results of our simulation studies on the PN junction Mg2Si/Si heterojunction PD. A model structure of Mg2Si/Si heterojunction PD has been built. The effects of Mg2Si and Si layer thickness on the optical and electrical performance of Mg2Si/Si heterojunction PD are discussed. For the purpose of this analysis, we consider electrical performance parameters such as I–V curve, external quantum efficiency (EQE), responsivity, noise equivalent power (NEP), detectivity, on-off ratio, response time, and recovery time. The simulation results show that the Mg2Si/Si heterojunction PD shows optimum performance when the thickness of Si and Mg2Si layers are 300 nm and 280 nm, respectively. For the optimized structure, the reverse breakdown voltage was found to be −23.61 V, the forward conduction voltage was 0.51 V, the dark current was 5.58 × 10−13 A, and the EQE was 88.98%. The responsivity was found to be 0.437 A/W, the NEP was 6.38 × 10−12 WHz1/2, and the detectivity was 1.567 × 1011 Jones. With the on-off ratio of 1566, the response time was found to be 0.76 ns and the recovery time was 5.75 ns. The EQE and responsivity peak wavelength of PD show a redshift as the thickness of Mg2Si increases. The Mg2Si heterojunction PD can effectively detect infrared light in the wavelength range of 400 to 1400 nm. The simulation results can be utilized to drive the development of green Mg2Si/Si heterojunction PD in the future.


Introduction
Telecommunications, healthcare, security and safety, aerospace, and automobile night vision systems are just a few of the commercial uses for infrared photodiodes that have recently attracted special attention. In comparison to Si photodiodes, Mg 2 Si/Si photodiodes show a spectral response with a longer cutoff wavelength and higher intensity around the photon energy threshold [1]. Mg 2 Si is an indirect bandgap, environmentally friendly semiconductor material which has been extensively studied for use as thermoelectric material [2], battery material [3,4], structural material [5], and composite material [6]. Mg and Si are abundant in nature, non-toxic, and pollution-free, and have eco-friendly characteristics [7]. It has a bandgap of 0.6-0.8 eV and a high absorption coefficient of more than 10 5 cm −1 around 500 nm [8]. Mg 2 Si has recently attracted attention as a suitable candidate for short-wavelength IR(SWIR) sensors. Mg 2 Si/Si could be used as a safe alternative to the poisonous sensors already in use for night vision and SWIR light detection. Due to Mg 2 Si's unique features for IR sensitivity, there are a few reports of such materials being used in IR sensor applications [1,9]. Using magnetron sputtering and thermal evaporation, our research group has previously reported on environmentally friendly Mg 2 Si semiconductor thin films [10][11][12]. In this work, we extend our work towards the modeling of p-Mg 2 Si/n-Si heterojunction PD using the Atlas module of Silvaco TCAD software. The effects of different Mg 2 Si and Si thicknesses on the I-V curve, EQE, responsivity, NEP, detectivity, on-off ratio, response time, and recovery time of Mg 2 Si/Si heterojunction PD are studied, and the simulation results are examined and analyzed. The simulation results are used to create the model. The Mg 2 Si heterojunction PD can effectively detect infrared light in the wavelength range of 400 to 1400 nm. Our results indicate that the Mg 2 Si has significant research value as a potential candidate material for infrared sensing and night vision applications. The simulation results can be utilized for the development of a green Mg 2 Si/Si heterojunction PD in the future.

Method and Model
Silvaco TCAD's Atlas device simulator module software can mimic the electrical, optical, and thermal characteristics of semiconductor devices. Atlas is a simple and extensible platform based on physical modularization that analyses the AC, DC, and time-domain responses of 2D and 3D devices, as well as the properties of opto-electric and electro-optical conversion. The device structure is generated by the device editor or process simulation. After describing the material parameters, physical model, electrical contact type, and calculation method in the device, the device structure's characteristics can be calculated by Atlas. Atlas allows users to input material parameters, such as energy band parameters, dielectric constant, lifetime parameters, mobility parameters, etc. It can also customize the material and change the physical model, all of which provide a technique for simulation calibration.
In the simulation process, the p-Mg 2 Si/n-Si heterojunction PD structure was established on the two-dimensional grid. The schematic diagram is shown in Figure 1. The region, material, doping, and electrode are defined in turn. SRH recombination model, Auger recombination model, conmob mobility model, fldmob electric field dependent model, and Selberherr impact ionization model were selected. A Newton iterative algorithm was used to solve the Poisson and continuity equations, and then the solution of the device was obtained and the optoelectronic characteristics of the device were analyzed. The doping concentration of p-Mg 2 Si was 1 × 10 17 cm −3 , the width was 1 µm, and the thicknesses considered in the simulation were 0.08 µm, 0.13 µm, 0.18 µm, 0.23 µm, 0.28 µm, 0.33 µm, and 0.38 µm, respectively. The doping concentration of n-Si was 1 × 10 15 cm −3 , the width was 1 µm, and the thicknesses considered in the simulation were 0.3 µm, 0.4 µm, 0.5 µm, 0.6 µm, and 0.7 µm, respectively. The anode material was gold (Au), with a width of 0.2 µm and a thickness of 0.2 µm. The cathode material was silver (Ag), with a length of 1 µm and a thickness of 0.2 µm. The Au and Ag electrodes increase the film's average absorption and forward scattering over a broad spectrum, thus significantly reducing its total reflection performance [13,14]. The optical and electrical material parameters for Mg 2 Si and Si used in the simulation are shown in Table 1 [15][16][17][18]. The cross-section of the Mg 2 Si/Si heterojunction PD is shown in Figure 2. The concentration distribution of Mg 2 Si/Si heterojunction PD is shown in Figure 3.

I-V Curves
First, without illumination, the heterojunction PD was reversely biased. The simulated results of the reverse I-V curves of the heterojunction PD with different Mg2Si thicknesses under the condition of 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm Si thicknesses are shown in Figure 4. The thicknesses of Mg2Si were increased from 80 nm to 380 nm, respectively. The effect of thicknesses on the reverse breakdown voltage of heterojunction PD is shown in Figure 4f. The effect of thicknesses on dark current of heterojunction PD is shown in Figure 5.

I-V Curves
First, without illumination, the heterojunction PD was reversely biased. The simulated results of the reverse I-V curves of the heterojunction PD with different Mg 2 Si thicknesses under the condition of 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm Si thicknesses are shown in Figure 4. The thicknesses of Mg 2 Si were increased from 80 nm to 380 nm, respectively. The effect of thicknesses on the reverse breakdown voltage of heterojunction PD is shown in Figure 4f. The effect of thicknesses on dark current of heterojunction PD is shown in Figure 5.
The direction of the built-in electric field of p-Mg 2 Si/n-Si PD is from the Si layer to Mg 2 Si. It can be seen from Figure 4 that with the increase in Mg 2 Si thickness, the reverse breakdown voltage of Mg 2 Si/Si heterojunction PD first increases and then decreases. The thickness of the Mg 2 Si layer corresponding to the peak value of the reverse breakdown voltage is Wpmax. To improve the reverse voltage endurance of the heterojunction, the thickness of the absorption layer can be increased to avoid the punch-through between the space charge region and the electrode under higher reverse bias. Wpmax is the critical thickness of punch-through between the space charge region and the electrode of the heterojunction PD, which is about 200 nm. When Wp < Wpmax, the space charge region and the electrode are in punch-through states, resulting in the widening of the depletion region. The avalanche effect increases, so the reverse breakdown voltage increases. When Wp > Wpmax, the space charge region and the electrode cannot be punched through, resulting in a narrowing of the depletion region. The avalanche effect is reduced, so the reverse breakdown voltage is reduced.
The simulation results of forward I-V curves when the Mg 2 Si/Si heterojunction PD was forward biased are shown in Figure 6. With the increase in Mg 2 Si thickness, the forward conduction voltage of Mg 2 Si/Si heterojunction PD was almost stable in the voltage range of 0.51-0.52 V. The forward voltage of the heterojunction does not change with the thickness of Mg 2 Si. Its value is less than the forward conduction voltage of ordinary silicon diode 0.6-0.8 V.   The direction of the built-in electric field of p-Mg2Si/n-Si PD is from the Si layer to Mg2Si. It can be seen from Figure 4 that with the increase in Mg2Si thickness, the reverse breakdown voltage of Mg2Si/Si heterojunction PD first increases and then decreases. The thickness of the Mg2Si layer corresponding to the peak value of the reverse breakdown voltage is Wpmax. To improve the reverse voltage endurance of the heterojunction, the thickness of the absorption layer can be increased to avoid the punch-through between the space charge region and the electrode under higher reverse bias. Wpmax is the critical thickness of punch-through between the space charge region and the electrode of the heterojunction PD, which is about 200 nm. When Wp < Wpmax, the space charge region and the electrode are in punch-through states, resulting in the widening of the depletion region. The avalanche effect increases, so the reverse breakdown voltage increases. When Wp > Wpmax, the space charge region and the electrode cannot be punched through, resulting in a narrowing of the depletion region. The avalanche effect is reduced, so the reverse breakdown voltage is reduced.
The simulation results of forward I-V curves when the Mg2Si/Si heterojunction PD was forward biased are shown in Figure 6. With the increase in Mg2Si thickness, the forward conduction voltage of Mg2Si/Si heterojunction PD was almost stable in the voltage range of 0.51-0.52 V. The forward voltage of the heterojunction does not change with the thickness of Mg2Si. Its value is less than the forward conduction voltage of ordinary silicon diode 0.6-0.8 V.
(a) (b) Figure 5. The effect of thicknesses on the dark current.

EQE
The quantum efficiency can be divided into EQE and internal quantum efficiency (IEQ). In this paper, the quantum efficiency refers to the EQE, that is, the number of charge carriers generated by each incident photon. The quantum efficiency reflects the sensitivity of the photoelectric device to photons and can be expressed as [19]: In the equation, I p is the average optical current output of the heterojunction PD, φ = p/hν is the optical flux, and p is the incident optical power. Figure 7 shows the EQE curves of heterojunction PD with different thicknesses of Mg 2 Si under the conditions of Si thicknesses of 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively. The effect of thicknesses on EQE of heterojunction PD is shown in Figure 7f. When the thicknesses of the Si and Mg 2 Si layers are 300 nm and 280 nm, respectively, the EQE of the Mg 2 Si/Si heterojunction PD reached the maximum of 88.98%. Sharma et al. [20] calculated the photoelectric properties of ZnO/Si heterojunction diodes and obtained 93% of the EQE, which is equivalent to the maximum EQE in this paper. The direction of the built-in electric field of p-Mg2Si/n-Si PD is from the Si layer to Mg2Si. It can be seen from Figure 4 that with the increase in Mg2Si thickness, the reverse breakdown voltage of Mg2Si/Si heterojunction PD first increases and then decreases. The thickness of the Mg2Si layer corresponding to the peak value of the reverse breakdown voltage is Wpmax. To improve the reverse voltage endurance of the heterojunction, the thickness of the absorption layer can be increased to avoid the punch-through between the space charge region and the electrode under higher reverse bias. Wpmax is the critical thickness of punch-through between the space charge region and the electrode of the heterojunction PD, which is about 200 nm. When Wp < Wpmax, the space charge region and the electrode are in punch-through states, resulting in the widening of the depletion region. The avalanche effect increases, so the reverse breakdown voltage increases. When Wp > Wpmax, the space charge region and the electrode cannot be punched through, resulting in a narrowing of the depletion region. The avalanche effect is reduced, so the reverse breakdown voltage is reduced.
The simulation results of forward I-V curves when the Mg2Si/Si heterojunction PD was forward biased are shown in Figure 6. With the increase in Mg2Si thickness, the forward conduction voltage of Mg2Si/Si heterojunction PD was almost stable in the voltage range of 0.51-0.52 V. The forward voltage of the heterojunction does not change with the thickness of Mg2Si. Its value is less than the forward conduction voltage of ordinary silicon diode 0.6-0.8 V.

EQE
The quantum efficiency can be divided into EQE and internal quantum efficiency (IEQ). In this paper, the quantum efficiency refers to the EQE, that is, the number of charge carriers generated by each incident photon. The quantum efficiency reflects the sensitivity of the photoelectric device to photons and can be expressed as [19]: In the equation, Ip is the average optical current output of the heterojunction PD, ϕ = p/hν is the optical flux, and p is the incident optical power. Figure 7 shows the EQE curves of heterojunction PD with different thicknesses of Mg2Si under the conditions of Si thicknesses of 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively. The effect of thicknesses on EQE of heterojunction PD is shown in Figure 7f. When the thicknesses of the Si and Mg2Si layers are 300 nm and 280 nm, respectively, the EQE of the Mg2Si/Si heterojunction PD reached the maximum of 88.98%. Sharma et al. [20] calculated the In the beginning, with the increase in Mg 2 Si thickness, the Mg 2 Si layer provides more photogenerated carriers which are conducive to the improvement of EQE. However, with the further increase in Mg 2 Si thickness, more photogenerated carriers are concentrated near the surface of the Mg 2 Si layer, and there is not enough photon energy to reach the interface of the Mg 2 Si/Si heterojunction PD so that the EQE of the device decreases. The EQE peak wavelength of PD shows a redshift as the thickness of Mg 2 Si increases. When the Mg 2 Si layer is thin, most of the long wavelengths pass directly through the Mg 2 Si absorption layer without absorption. At this time, these long wavelengths of light do not contribute to the generation of photogenerated carriers. Longer wavelength light needs to penetrate a greater depth to be fully absorbed [21]. Some longer wavelength light is absorbed as the thickness of the Mg 2 Si layer increases, so the EQE peak wavelength of PD shows a redshift as the thickness of Mg 2 Si increases. The peak EQE of heterojunction PD with different Mg 2 Si thickness decreases when the thickness of Si increases because the increase in the thickness of Si substrate hinders the transport of part of the photogenerated carriers. photoelectric properties of ZnO/Si heterojunction diodes and obtained 93% of the EQE, which is equivalent to the maximum EQE in this paper. In the beginning, with the increase in Mg2Si thickness, the Mg2Si layer provides more photogenerated carriers which are conducive to the improvement of EQE. However, with the further increase in Mg2Si thickness, more photogenerated carriers are concentrated near the surface of the Mg2Si layer, and there is not enough photon energy to reach the interface of the Mg2Si/Si heterojunction PD so that the EQE of the device decreases. The EQE peak wavelength of PD shows a redshift as the thickness of Mg2Si increases. When  Figure 8 shows the responsivity curves of heterojunction PD with different thicknesses of Mg 2 Si under the conditions of Si thicknesses of 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively. The responsivity of a heterojunction PD is the ratio of the output signal to the incident light power. It is defined as the ratio of the heterojunction PD's output photocurrent to the incident light power P under incident light illumination, which may be represented as [22]: (2) may be represented as [22]:

Responsivity
In the formula, λ is the wavelength (μm) and η is the EQE. The effect of thicknesses on responsivity of heterojunction PD is shown in Figure 8f. The responsivity of Mg2Si/Si heterojunction PD reached the maximum value of 0.437 A/W when the thickness of Si and Mg2Si layers were 300 nm and 280 nm, respectively. Liu et al. [23] reported a p-ZnO/n-Si heterojunction PD and obtained a responsivity value of 0.206 A/W. The responsivity peak wavelength of PD shows a redshift as the thickness of Mg2Si increases. The Mg2Si layer supplies more photogenerated carriers and transfers them to the Si layer as the thickness of the Mg2Si layer increased, thus increasing the photocurrent and responsivity. The more photogenerated carriers are concentrated on the surface of the Mg2Si layer, the more difficult they are to collect by an electric field, resulting in a decrease In the formula, λ is the wavelength (µm) and η is the EQE. The effect of thicknesses on responsivity of heterojunction PD is shown in Figure 8f. The responsivity of Mg 2 Si/Si heterojunction PD reached the maximum value of 0.437 A/W when the thickness of Si and Mg 2 Si layers were 300 nm and 280 nm, respectively. Liu et al. [23] reported a p-ZnO/n-Si heterojunction PD and obtained a responsivity value of 0.206 A/W. The responsivity peak wavelength of PD shows a redshift as the thickness of Mg 2 Si increases.
The Mg 2 Si layer supplies more photogenerated carriers and transfers them to the Si layer as the thickness of the Mg 2 Si layer increased, thus increasing the photocurrent and responsivity. The more photogenerated carriers are concentrated on the surface of the Mg 2 Si layer, the more difficult they are to collect by an electric field, resulting in a decrease in photocurrent and responsivity as the thickness of the Mg 2 Si layer increases. Only the carriers for a particular thickness near the Mg 2 Si/Si interface are injected into the circuit under the action of the built-in electric field. When the thickness reaches a given level, the carriers far away from the interface are compounded before reaching the Mg 2 Si/Si interface [24]. Therefore, when the thickness of the Mg 2 Si layer continues to increase, the current response and responsivity of the heterojunction do not change much. If the thickness of the Mg 2 Si layer is too thick, most of the light energy is absorbed by the Mg 2 Si layer and there is not enough photon energy to reach the surface of the Mg 2 Si/Si heterojunction which reduces the response current of the heterojunction.
When the wavelength of incident light was increased from 400 nm to 1400 nm, the responsivity first increased and then decreased with the increase in wavelength. The responsivity reaches its maximum near the incident light at 600 nm. The shorter the wavelength, the more energy it has. Therefore, high-energy photons will lose a lot of energy as they strike the device's surface, and absorption by the device's front surface will be considerably reduced, resulting in a reduction in current responsiveness and EQE [25]. When the wavelength is larger than 600 nm, the quantum efficiency and responsivity decrease rapidly because the Mg 2 Si layer absorbs less light at long wavelengths. If the diffusion length of carriers is too long, they may be recombined before they are separated by the built-in electric field, thus reducing the current response.

NEP
The NEP is defined as the incident light power within the 1 Hz output bandwidth when the signal-to-noise ratio of the device is equal to 1. It is shown as follows [26]: In the formula, NEP is the noise equivalent power and the unit is WHz 1/2 . I noise is the noise current. This article only considers the noise caused by dark current. R is the responsivity. The smaller the NEP, the smaller the incident light power effectively detected by the device and the better the detector performance. The NEP curves of heterojunction PD with different Mg 2 Si thicknesses are shown in Figure 9 under the condition of 300 nm, 400 nm, 500 nm, 600 nm, 500 nm, and 700 nm thicknesses of Si, respectively. As shown in Figure 9f, the NEP values of Mg 2 Si/Si heterojunction PD with different thicknesses are 10 −11 -10 −12 WHz 1/2 . An et al. [26] reported Graphene/Si heterojunctions and found that its minimum NEP was 0.92 × 10 −12 WHz 1/2 .
When the thickness of the Si substrate is constant, the NEP value of heterojunction PD decreases with the increase in Mg 2 Si thickness. It can be seen from Equation (3) that when the responsivity value changes little with the increase in Mg 2 Si thickness, the NEP is related to the dark current value. Dark current mainly includes reverse saturation current, recombination current in the barrier region, and surface leakage current. In the case of no illumination and a small reverse bias voltage (−3 V), the increase in Mg 2 Si thickness effectively decreases the surface leakage current of the heterojunction [27], thus reducing the dark current and NEP. the device and the better the detector performance. The NEP curves of heterojunction PD with different Mg2Si thicknesses are shown in Figure 9 under the condition of 300 nm, 400 nm, 500 nm, 600 nm, 500 nm, and 700 nm thicknesses of Si, respectively. As shown in Figure 9f, the NEP values of Mg2Si/Si heterojunction PD with different thicknesses are 10 −11 -10 −12 WHz 1/2 . An et al. [26] reported Graphene/Si heterojunctions and found that its minimum NEP was 0.92 × 10 −12 WHz 1/2 . When the thickness of the Si substrate is constant, the NEP value of heterojunction PD decreases with the increase in Mg2Si thickness. It can be seen from Equation (3) that when the responsivity value changes little with the increase in Mg2Si thickness, the NEP is related to the dark current value. Dark current mainly includes reverse saturation current, recombination current in the barrier region, and surface leakage current. In the case of no illumination and a small reverse bias voltage (−3 V), the increase in Mg2Si thickness

Detectivity
The detectivity and NEP are reciprocal to each other. The higher the detectivity, the better the detection performance of the device. Considering the difference in the effective detection area of the device, the detection measure is defined as follows [28]: where D* is the detectivity and the unit is cmHz 1/2 W −1 (Jones). A is the effective working area of heterojunction PD and its unit is cm 2 . Figure 10 shows the D* curves of heterojunction PD with different thicknesses of Mg 2 Si for fixed thicknesses of Si at 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively. As shown in Figure 10f, the D* values of Mg 2 Si/Si heterojunction PD with different thicknesses are 10 10 -10 11 Jones. Xu et al. [29] reported SnS 2 /Si vertical heterostructure and obtained a maximum detectivity of~10 11 Jones. Hun et al. [30] fabricated a PD based on (CH 3 NH 3 ) 3 Sb 2 Br 9 (MA 3 Sb 2 Br 9 ) and displayed a high detectivity of 4.32 × 10 11 Jones. When the thickness of the Si substrate is kept constant, the D* value of the heterojunction detector increases with the increase in Mg 2 Si layer thickness. It can be seen from Equation (4) that D* and NEP are reciprocal to each other. NEP value decreases with the increase in Mg 2 Si layer thickness, while the D* value increases with the increase in Mg 2 Si layer thickness.

On/Off Ratio
The on/off ratio is the ratio of the output signal of the heterojunction PD with light and without light. This reflects the response properties of the heterojunction PD to incident light. The formula for the computation of the on/off ratio is as follows [31,32]: where I light is the output current with illumination and I dark is the output current without illumination. Figure 11 shows the on/off curves of heterojunction PD with different thicknesses of Mg 2 Si for the thicknesses of Si at 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively. The bias voltage was −25 V. As shown in Figure 11f, the on/off ratio values of Mg 2 Si/Si heterojunction PD with different thicknesses are 5.33 × 10 2 -3.45 × 10 3 Jones. The CuO/Si NW array heterojunction PD were fabricated by Hong et al. [33], and a 10 2 on/off ratio was obtained. Li et al. [34] fabricated InSb/Si heterojunction PD with an on/off ratio of 2.9 × 10 3 . When the thickness of the Si substrate is kept constant, the on/off ratio value of the heterojunction detector increases with the increase in Mg 2 Si thickness. The photocurrent first increases and then decreases as the thickness of Mg 2 Si increases. The dark current decreases as the thickness of Mg 2 Si increases. It is observed from Equation (5) that the on/off ratio value increases with the increase in Mg 2 Si thickness.
heterojunction PD with different thicknesses of Mg2Si for fixed thicknesses of Si at 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively. As shown in Figure 10f, the D* values of Mg2Si/Si heterojunction PD with different thicknesses are 10 10 -10 11 Jones. Xu et al. [29] reported SnS2/Si vertical heterostructure and obtained a maximum detectivity of ~10 11 Jones. Hun et al. [30] fabricated a PD based on (CH3NH3)3Sb2Br9 (MA3Sb2Br9) and displayed a high detectivity of 4.32 × 10 11 Jones. where Ilight is the output current with illumination and Idark is the output current without illumination. Figure 11 shows the on/off curves of heterojunction PD with different thicknesses of Mg2Si for the thicknesses of Si at 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively. The bias voltage was −25 V. As shown in Figure 11f, the on/off ratio values of Mg2Si/Si heterojunction PD with different thicknesses are 5.33 × 10 2 -3.45 × 10 3 Jones. The CuO/Si NW array heterojunction PD were fabricated by Hong et al. [33], and a 10 2 on/off ratio was obtained. Li et al. [34] fabricated InSb/Si heterojunction PD with an on/off ratio of 2.9 × 10 3 .
(a) (b)  When the thickness of the Si substrate is kept constant, the on/off ratio value of the heterojunction detector increases with the increase in Mg2Si thickness. The photocurrent first increases and then decreases as the thickness of Mg2Si increases. The dark current decreases as the thickness of Mg2Si increases. It is observed from Equation (5) that the on/off ratio value increases with the increase in Mg2Si thickness.

Response Time and Recovery Time
The response time and recovery time curves of heterojunction PD with different thicknesses of Mg2Si for Si thicknesses of 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively, are shown in Figure 12. The response time and recovery time are used to represent the parameters of the transient characteristics of the heterojunction PD. The response time is defined as the time it takes the heterojunction PD to respond from 10% to

Response Time and Recovery Time
The response time and recovery time curves of heterojunction PD with different thicknesses of Mg 2 Si for Si thicknesses of 300 nm, 400 nm, 500 nm, 600 nm, and 700 nm, respectively, are shown in Figure 12. The response time and recovery time are used to represent the parameters of the transient characteristics of the heterojunction PD. The response time is defined as the time it takes the heterojunction PD to respond from 10% to 90% of the peak value. The time to fall back from 90% of the peak to 10% is the recovery time of the PD [35]. As shown in Figure 12f, the response time values of Mg 2 Si/Si heterojunction PD with different thicknesses are 0.685-0.802 ns. As shown in Figure 12g,   As the thickness of the Mg2Si layer increases, both the response time and recovery time of the heterojunction PD increase. This is because the Mg2Si layer becomes thicker and longer wavelength light is absorbed, but the long wavelength light needs to penetrate deeper to be fully absorbed [21]. At the same time, under a certain reverse bias voltage and with the increase in Mg2Si layer thickness, the resistance of heterojunction PD will decrease, the electric field intensity will increase, the barrier region will expand to a certain extent, and the carrier transit time in the depletion layer will increase [36]. Photogenerated carriers have to experience a long distance from being generated to being swept out by the electric field and the response time will increase. When the light is removed, the photogenerated carriers are completely swept to both ends of the heterojunction by the electric field, which will also take a long time, and the recovery time will increase. With the increase in the thickness of the Si layer, the response time and recovery time show a decreasing trend when the Mg2Si layer is thin and an increasing trend when the Mg2Si layer is thick. When the thickness of the Mg2Si layer is moderate, the change of the response time and recovery time is very small which indicates that the thickness of the Si layer has little influence on the response time and recovery time.

Conclusions
Mg2Si is an environmentally friendly semiconductor material which is non-toxic, harmless, and abundant in Mg and Si. The Mg2Si/Si heterojunction PD can detect visible and near-infrared wavelengths and has great potential to be a substitute for other toxic heterojunction PD. In this paper, the model of Mg2Si/Si heterojunction photodetectors was built and the performance parameters of Mg2Si/Si heterojunction PD with different thicknesses of Mg2Si and Si were simulated. The simulation results show that when the thickness of the Si layer is 300 nm and the thickness of the Mg2Si layer is 280 nm, the Mg2Si/Si heterojunction PD shows optimum performance. For this structure, the following electrical parameters are found: a reverse breakdown voltage of −23.61 V, a forward conduction voltage of 0.51 V, an EQE of 88.98%, a responsivity of 0.437 A/W, an NEP of 6.38 × 10 −12 WHz 1/2 , a detectivity of 1.567 × 10 11 Jones, an on/off ratio of 1566, a response time of 0.76 ns, and a recovery time of 5.75 ns. The EQE and responsivity peak wavelength of PD show a redshift as the thickness of Mg2Si increases. The Mg2Si heterojunction PD shows As the thickness of the Mg 2 Si layer increases, both the response time and recovery time of the heterojunction PD increase. This is because the Mg 2 Si layer becomes thicker and longer wavelength light is absorbed, but the long wavelength light needs to penetrate deeper to be fully absorbed [21]. At the same time, under a certain reverse bias voltage and with the increase in Mg 2 Si layer thickness, the resistance of heterojunction PD will decrease, the electric field intensity will increase, the barrier region will expand to a certain extent, and the carrier transit time in the depletion layer will increase [36]. Photogenerated carriers have to experience a long distance from being generated to being swept out by the electric field and the response time will increase. When the light is removed, the photogenerated carriers are completely swept to both ends of the heterojunction by the electric field, which will also take a long time, and the recovery time will increase. With the increase in the thickness of the Si layer, the response time and recovery time show a decreasing trend when the Mg 2 Si layer is thin and an increasing trend when the Mg 2 Si layer is thick. When the thickness of the Mg 2 Si layer is moderate, the change of the response time and recovery time is very small which indicates that the thickness of the Si layer has little influence on the response time and recovery time.

Conclusions
Mg 2 Si is an environmentally friendly semiconductor material which is non-toxic, harmless, and abundant in Mg and Si. The Mg 2 Si/Si heterojunction PD can detect visible and near-infrared wavelengths and has great potential to be a substitute for other toxic heterojunction PD. In this paper, the model of Mg 2 Si/Si heterojunction photodetectors was built and the performance parameters of Mg 2 Si/Si heterojunction PD with different thicknesses of Mg 2 Si and Si were simulated. The simulation results show that when the thickness of the Si layer is 300 nm and the thickness of the Mg 2 Si layer is 280 nm, the Mg 2 Si/Si heterojunction PD shows optimum performance. For this structure, the following electrical parameters are found: a reverse breakdown voltage of −23.61 V, a forward conduction voltage of 0.51 V, an EQE of 88.98%, a responsivity of 0.437 A/W, an NEP of 6.38 × 10 −12 WHz 1/2 , a detectivity of 1.567 × 10 11 Jones, an on/off ratio of 1566, a response time of 0.76 ns, and a recovery time of 5.75 ns. The EQE and responsivity peak wavelength of PD show a redshift as the thickness of Mg 2 Si increases. The Mg 2 Si heterojunction PD shows enormous promise for developing high-performance silicon-compatible PD for efficiently sensing infrared light in the wavelength range of 400 to 1400 nm. Our predictive TCAD simulation results may be utilized as a guideline for the development of future eco-friendly Mg 2 Si/Si heterojunction PD.