In quasi-resonant (QR) controller, sensing the current of the power switch and using a delay time are commonly used to achieve valley-voltage-switching. However, the accuracy of valley-voltage switching instant in both methods are affected by the components variations during manufacturing. A primary-side QR-control IC for flyback converter with a novel valley detector is proposed to solve this problem. By sensing the auxiliary winding voltage, the controller estimates the quarter of the resonant period. And the time which the voltage across the power switch decreasing to valley is estimated accurately. Additionally, the primary-side control is adopted to reduce the size and cost of circuit. Finally, this controller is fabricated with TSMC 0.25 μm CMOS high voltage mixed-signal general purpose process, and applied to an input voltage of 90-264 Vrms, output voltage of 12 V, and output power of 30 W flyback converter to verify the feasibility of proposed control.