With the continuous development of electronic technology, the electrical equipment used in people's daily life needs better power supply to drive, so the switching power supply came into being. The switching power supply has its own advantages of high efficiency, small size, low power consumption, and high economic benefits. It stands out among many power supplies, so its research potential is huge. Now the switching power supply industry is also booming and has become a hot spot of research by many scientists. Our main task in this paper is to study the switching power supply and design the switching power supply needed in daily life. The essence of switching power supply is to convert alternating current into direct current. The conversion process consists of five parts: input circuit, power conversion, output circuit, control circuit, and protection circuit. The input circuit we use is a bridge rectifier filter circuit, and EMI is used at the same time. Anti-interference technology, the output circuit first uses a half-wave finishing circuit for secondary rectification, and then input to the LC circuit for filtering, and finally the desired DC voltage will be obtained, and the feedback circuit is a combined circuit using TL431 and an optocoupler, and the feedback current will control the input the control terminal of the chip, which will adjust the duty cycle to achieve voltage regulation. This control feedback circuit has changed the habit of using UC3842 for traditional switching power supplies, so it is also a development and breakthrough, and it can also achieve good performance.