Aiming at the problems of huge Printed Circuit Board(PCB)detection parameters and high manual error detection rate,this paper proposes an improved YOLOv5 detection model.Firstly,the Cross Stage Partial Bottle Neck Mudule(C3)structure is replaced by Real-Time Control Systems(RCS)module,and the feature extraction ability of the network is enhanced by re parameterized convolution;Then,add One-Shot Aggregation(OSA)structure to aggregate multiple feature cascades at one time;Finally,RCS-OSA modules are stacked to ensure feature reuse and strengthen information flow between different layers.Experimental results show that the detection accuracy of the improved algorithm reaches 94.6%,which is 2.2%higher than the original model.The algorithm can efficiently detect a variety of defect types of PCB,and has practical application value for PCB quality detection.