Ultraviolet (UV) photodetectors are used in various industries and fields of research, including optical communication, flame sensing, missile plume detection, astronomical studies, biological sensors, and environmental research. However, general UV detectors that employ Schottky junction diodes and p-n junctions have high fabrication cost and low quantum efficiency. In this study, we investigated the characteristics of materials used to manufacture UV photodetectors in a low-cost solution process that requires easy fabrication of flexible substrates. We fabricated p-type NiO and n-type ZnO substrates with wide band gap by the sol-gel method and compared the characteristics of substrates prepared under different spin-coating and heat-treatment conditions.