The production of electronic devices relies heavily on the assembly of components on printed circuit boards(PCBs).Standard components can be assembled using surface mount technology,but for irregularly shaped components such as connectors,power devices,and relays,manual insertion is still the primary method due to their complex structure.However,manual labor leads to low production efficiency and high production costs.Therefore,the research and application of irregular component insertion technology have significant importance and broad market prospects.This article focuses on the research of visual inspection and positioning technology during the insertion process.The main research contents are as follows:(1)The overall scheme of the insertion machine system was designed.Based on in-depth research on the current status of research on irregular insertion machines and machine vision at home and abroad,the structure design of the image acquisition system and the mechanical arm motion control system were constructed according to the design requirements and technical indicators of the insertion machine,and the platform of the insertion machine was built.(2)The pin detection algorithm of the component was studied.Pre-processing algorithms such as template matching,gray value stretching,image filtering,and image segmentation were studied for pin images,and the pin region was successfully extracted.The centroid positioning algorithm was used to obtain the centroid of the pin region.The pin coordinate difference was used as the evaluation criterion to achieve the pin detection requirements of the component.(3)The positioning algorithm of Mark points on the PCB board was studied.For the extraction of Mark point coordinates,the threshold segmentation and area feature selection were used to obtain the Mark point area information.The Canny edge detection algorithm was used to extract the edge contour of the region.A least-squares fitting contour algorithm based on statistical improvement was proposed to address the contour deformation caused by uneven illumination,and the fitted center coordinates of Mark were obtained to achieve coordinate positioning of Mark points.(4)Camera calibration,hand-eye calibration,and PCB offset compensation methods were designed for the system.For the upper camera calibration for capturing pins,a calibration board with known information was used as the standard for image size and world size conversion to successfully obtain the conversion relationship between pixel distance and physical distance.Hand-eye calibration and tool calibration were designed for the lower camera for capturing Mark points.To address the PCB offset problem,coordinate rotation and translation were used for offset compensation to achieve accurate component insertion.(5)The software system of the insertion machine was developed.The functions and interfaces of each module of the upper computer were designed,and the system was used for on-site testing.The system testing experiment was designed,and according to the analysis of the system detection results and the insertion effect analysis,the average accuracy of the pin detection was 98%,and the insertion accuracy reached ±0.15 mm.The experimental results show that the system in this article basically meets the requirements of the insertion design. |