ZnMgO films were prepared at room temperature on freestanding diamond (FSD) substrates by co-sputtering with different sputtering power of MgO target. The effect of sputtering power of MgO target on the property of ZnMgO films was investigated. The PL spetra of ZnMgO films revealed that the bandgap of ZnMgO was approximately linear related to the sputtering power of MgO target. The ZnMgO film was also applied to be fabricating UV detectors. Finally, we studied the photoelectric property of the UV detector.© (2010) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.