## 3 Results and Discussion
The synergistic effect of the substrate temperature during TiN thin film deposition is that a metastable phase is generated in the thin film during deposition at ambient temperature, which results in high tensile stress of 5.9 GPa attributed to the deformation of the lattice and occurrence of defects. The high residual stress formed at ambient temperature WAS decreased the defects in the thin film because the substrate temperature increased from 100 to 300 \({}^{\circ}\)C owing to the thermal effect applied to the substrate and the decrease in stress caused by the relaxation of the lattice strain. AFM can be used to measure the quantitative data on the surface roughness of thin films. Figure 3 shows the roughness of the deposited TiN thin film measured according to the substrate temperature variables. The root mean square (RMS) roughness, which is defined as the standard deviation of the surface height profile from the mean height, is the most commonly reported measure of surface roughness; it is calculated as [4]. \[\text{R}_{\text{RMS}}=\left[\frac{1}{\text{N}}\ \sum_{\text{i}=1}^{\text{N}}( \text{h}_{\text{i}}-<\text{h}>)^{2}\right]^{1/2} \tag{3}\]  
where N, h\({}_{\text{i}}\), and h\({}_{\text{i}}\) denote the number of pixels in the image, the height of the i-th pixel, and the average height of the image, respectively. Thus, information about the vertical direction of the thin film can be obtained. Figure 3 shows the RMS values of the TiN thin films. Figure 3a-d shows images according to the substrate temperatures; the RMS roughness values were measured at 0.90, 0.93, 1.07, and 1.24 nm at ambient temperature, 100, 200, and 300 \({}^{\circ}\)C, respectively. The results and trends are shown in Figure 3e. The RMS roughness value of the TiN thin film increased with an increase in the substrate temperature. A nanoscratch test was conducted using the NanoTest (NTX, Micro Materials, Wrexham, UK). In the nanoscratch test, the load at the point where the thin film falls from the substrate is called the critical load, and the work of adhesion is calculated through this load. The work of adhesion is expressed based on the relationship between the compressive and shear stresses through the energy balance theory as [17]. \[\text{W}_{\text{AD}}=\frac{\sigma^{2}\text{t}}{2\text{E}}+\frac{\gamma^{2} \text{t}}{2\text{G}} \tag{4}\]  
where W\({}_{\text{AD}}\), \(\sigma\), t, E, \(\gamma\), and G denote the work of adhesion, compressive stress, thickness of the thin film, elastic modulus, shear stress, and shear modulus, respectively. In the actual scratch test, the second term in Equation (4) can be neglected because the shear stress that occurs when the thin film falls is very small compared to the compressive stress. Thus, Equation (4) can be rearranged as:  
\[\sigma=\left(\frac{2\text{EW}_{\text{AD}}}{\text{t}}\right)^{1/2} \tag{5}\]  
In the equation \(\sigma=\text{F}/\text{A}\) between the stress and the load, F is expressed as the critical load (\(\text{L}_{\text{C}}\)) under which the thin film falls from the substrate and cross-sectional area A is assumed to be half of the projected area of the indenter; this is expressed as:  
\[\sigma=\frac{8\text{L}_{\text{C}}}{\text{\pi d}^{2}} \tag{6}\]  
where d denotes the width of the scratch. Equations (5) and (6) can be rearranged for the critical load at which the thin film fracture occurs, and this can be expressed as  
\[\text{L}_{\text{C}}=\frac{\text{\pi d}^{2}}{8}\bigg{(}\frac{2\text{EW}_{\text{ AD}}}{\text{t}}\bigg{)}^{1/2} \tag{7}\]  
Since the thickness and elasticity of the thin film are set to the same value in the experiment to be performed, Equation (7) implies a proportional relationship between \(\text{L}_{\text{C}}\) and \(\text{W}_{\text{AD}}\).