Printed board assembly defect automatic detection method and system based on AOI technology

Through AOI technology combining image processing and component information comparison and recognition, the problem of defect category identification and component relationship in PCB defect detection is solved, the detection accuracy and efficiency are improved, and the needs of high-density and high-precision PCB are adapted.

CN120563404APending Publication Date: 2025-08-29SHANGHAI AEROSPACE EQUIPMENTS MANUFACTURER CO LTD

Patent Information

Application Number
CN202510516462.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

The existing PCB defect detection methods cannot accurately identify defect categories and components, and the detection efficiency is low, so they cannot meet the needs of high-density and high-precision PCBs.

Method used

The automatic detection method of defects of printed board components based on AOI technology is adopted, PCB images are collected through CCD industrial cameras, and components and pads are positioned using image processing algorithms. Comparison and identification are combined with component effective identification information and empirical data to extract defect information.

Benefits of technology

It realizes accurate positioning of defect categories, improves detection accuracy and efficiency, and can conduct targeted detection according to different defect types, providing adaptability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120563404A_ABST
    Figure CN120563404A_ABST
Patent Text Reader

Abstract

The invention provides a printed board assembly defect automatic detection method and system based on an AOI technology. The method comprises the following steps: obtaining a complete image of an actual production PCB through a printed board assembly image acquisition system; correcting the complete image to be detected; positioning and acquiring a component image and a component bonding pad image; analyzing the obtained component image, and extracting effective identification information of the component; and according to the effective identification information of the component, comparing and identifying the defect by using empirical data, and feeding back a result. According to the method, the effective identification information of the component is combined, the detection result is compared with the empirical data and the effective identification information of the component, the detection precision is improved, and the category of the defect is determined, so that the specific affiliation relationship between the defect and the component on the PCB is pointed out, and the detection of different defect conditions can be more targeted; and the method has certain self-adaptability and flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of PCB surface mounting technology, and specifically relates to a method and system for automatically detecting defects in printed circuit board components based on AOI technology, and more particularly to an automatic defect detection method based on AOI technology for use in the production inspection process of PCB boards after surface mounting. Background Art

[0002] Common defects on printed circuit boards (PCBs) include solder paste printing, incorrect soldering, missing solder joints, and defective solder joints. PCB defect detection is an essential part of the PCB assembly process. Early on, it relied primarily on manual visual inspection. However, human vision has limitations, making missed and false detections prone to occur and inefficiencies are low. Furthermore, with the continuous advancement of PCB manufacturing technology, larger sizes, higher densities, and higher precision are becoming the trends in PCB manufacturing. Manual visual inspection of these PCBs is becoming increasingly difficult, or even impossible.

[0003] For example, solder pad leak detection can cause components' electrical connections to fail to meet the basic requirements for normal circuit operation, directly impacting the lifespan and safety of electronic devices. Therefore, timely detection and resolution of component solder pad leaks and insufficient tin are crucial during PCB assembly.

[0004] To meet increasingly stringent inspection requirements and promptly detect defects during the soldering process, automated optical inspection (AOI) technology has become a major focus of current PCB defect detection research. Most AOI technologies identify PCB defects by comparing the image being inspected with a reference image. However, this method can only identify the presence of a defect, but cannot determine the defect type or the specific relationship between the defect and the components on the PCB.

[0005] Therefore, a new method for defect detection of printed circuit board assemblies is needed. Summary of the Invention

[0006] In view of the defects in the prior art, the present invention aims to provide a method and system for automatically detecting defects in printed circuit board assemblies based on AOI technology.

[0007] According to the present invention, a method for automatically detecting defects of printed circuit board components based on AOI technology is provided, comprising:

[0008] Step S1: obtaining a complete image of the actual produced PCB through a printed circuit board assembly image acquisition system;

[0009] Step S2: Correcting the complete image to be inspected;

[0010] Step S3: Locate and acquire component images and component pad images based on the complete image;

[0011] Step S4: Analyze the acquired component image and extract effective component identification information;

[0012] Step S5: Using the empirical data to compare and identify defects based on the effective component identification information, and feeding back the results.

[0013] Preferably, the printed circuit board assembly image acquisition system includes a CCD industrial camera, a camera frame, a ring light source, a light source frame, a light source controller and a servo platform.

[0014] The CCD industrial camera is placed on the camera stand, directly above the printed circuit board to be inspected, with the center of the field of view and the axis of the ring light source in a straight line; the ring light source is fixed on the light source stand, directly below the lens of the CCD industrial camera, and the light source controller is responsible for powering the light source; the camera stand and light source stand are fixed on the servo platform.

[0015] In step S1, AOI technology is used to enable a CCD industrial camera to take pictures of the surface-mounted PCB board through a servo platform to collect complete images of the PCB in parts and in the whole picture.

[0016] In step S2, the complete image of the PCB to be inspected is corrected using the positioning holes on the diagonal lines of the PCB. The center positions of the two marking circles are found through image processing. Based on the coordinates of the two marking circles in the standard template, the proportional relationship between the actual coordinates and the coordinates of the standard template is determined. The collected image is enlarged, reduced, translated, or rotated until the center of the positioning hole in the lower left corner of the PCB is consistent with the reference origin of the PCB component document.

[0017] Preferably, in step S3, the center of the positioning hole in the lower left corner is used as the origin to analyze and locate and obtain the component image and the component pad image, and also obtain the component information file of the PCB;

[0018] The effective component identification information includes the component's unique identification number, packaging information, component pad position information, rotation angle, and component capacity.

[0019] In step S4, the component image saved after component positioning is read, the component image is analyzed by an image processing algorithm, and effective component identification information that can reflect defects is extracted from the image;

[0020] Use the unique identification number of the component as the index to read the package information;

[0021] Combining the component pad location information with the package information, the component image area range and the pad area range are obtained, and the image of the area of ​​interest is extracted.

[0022] In step S5, each actual component image is compared with the empirical data based on the determined component image area range and pad area range to obtain multiple local comparison detection results;

[0023] After integrating and recording multiple local comparison results, a defect detection report is formed and feedback is provided.

[0024] The comparison includes analyzing the effective identification information of the component to obtain the component image where the character information of the patch component is located, and comparing whether the detected character information is consistent with the component capacity in the effective identification information of the component. If the two are inconsistent, the patch is incorrectly soldered, and the incorrect soldering information is recorded as the comparison result. If the two are consistent, the soldering is correct and no information is recorded.

[0025] Preferably, in step S3, the component image saved after component positioning is read, and the effective identification information of the component is loaded, the components are classified according to the package category in the effective identification information of the component, and the number of pads of the component to be inspected is determined.

[0026] In step S4, images of the pads are acquired in sequence, and images of the areas occupied by the pads are obtained using the component sizes and pad dimensions described in the packaging information.

[0027] In step S5, the RGB color components of the pad image are extracted and compared with the empirical values ​​to determine whether the pad has defects such as solder leak or insufficient tin. If a defect exists, the defect corresponding to the pad is recorded and the pad detection is continued. If no defect exists, the pad detection process is repeated until all pads are detected, thereby ending the pad defect detection.

[0028] Preferably, the correction is performed by preprocessing the complete image and performing an improved Hough transform on the binary image obtained after the preprocessing. Specifically, the process includes:

[0029] Step S2.1: Grayscale the RGB image.

[0030] Step S2.2: Median filtering is used to smooth the noise in the image and suppress salt and pepper noise.

[0031] Step S2.3: Select the positioning circle area.

[0032] Step S2.4: Locate the circle edge and extract the edge information of the circle in the image, and convert the complete image into a binary image with edge information.

[0033] Step S2.5: Search and count the pixels with a value of 1 in the binary image, and discard useless pixels.

[0034] Step S2.6: Set the variables and Hough array initial values ​​and allocate storage space. Determine the value range of the smaller radius r (r max , r min ) and a larger step size of θ.

[0035] Step S2.7: Calculate the value of (a, b) according to the circle parameter formula x = a + rcosθ, y = b + rsinθ, and record and count the non-negative integer values ​​of a and b to obtain the Hough index value;

[0036] Where (a, b) represents the center position of the circle;

[0037] r represents the radius of the circle;

[0038] θ represents the angle between the line connecting the point (x, y) and the origin and the x-axis.

[0039] Step S2.8: Based on the Hough index value, construct the Hough array through the accumulator statistics, and the number of array layers is r max -r min .

[0040] Step S2.9: Take the radius corresponding to the layer with the largest cumulative value in the Hough array as the radius r of the positioning circle, where the average value of all (a, b) is the center of the positioning circle.

[0041] According to the present invention, a printed circuit board assembly defect automatic detection system based on AOI technology is provided, comprising:

[0042] Module M1: Get the complete image of the actual PCB through the printed circuit board assembly image acquisition system;

[0043] Module M2: Correct the complete image to be inspected;

[0044] Module M3: locates and obtains component images and component pad images based on the complete image;

[0045] Module M4: Analyze the acquired component images and extract effective component identification information;

[0046] Module M5: Use empirical data to compare and identify defects based on effective component identification information and provide feedback on the results.

[0047] Preferably, the printed circuit board assembly image acquisition system includes a CCD industrial camera, a camera frame, a ring light source, a light source frame, a light source controller and a servo platform.

[0048] The CCD industrial camera is placed on the camera stand, directly above the printed circuit board to be inspected, with the center of the field of view and the axis of the ring light source in a straight line; the ring light source is fixed on the light source stand, directly below the lens of the CCD industrial camera, and the light source controller is responsible for powering the light source; the camera stand and light source stand are fixed on the servo platform.

[0049] The module M1 uses AOI technology to enable a CCD industrial camera to take pictures of the PCB board after surface mounting through a servo platform, thereby collecting complete images of the PCB in parts and in the whole picture.

[0050] In the module M2, the complete image of the PCB to be inspected is corrected through the positioning holes on the diagonal lines of the PCB, and the center positions of the two mark circles are found through image processing. According to the coordinates of the two mark circles in the standard template, the proportional relationship between the actual coordinates and the standard template coordinates is determined, and the collected image is enlarged, reduced, translated or rotated until the center of the positioning hole in the lower left corner of the PCB is consistent with the reference origin of the PCB component document.

[0051] Preferably, the module M3 uses the center of the positioning hole in the lower left corner as the origin to analyze and locate and obtain component images and component pad images, and also obtains the component information file of the PCB;

[0052] The effective component identification information includes the component's unique identification number, packaging information, component pad position information, rotation angle, and component capacity.

[0053] The module M4 reads the component image saved after component positioning, analyzes the component image through an image processing algorithm, and extracts effective component identification information that can reflect defects in the image;

[0054] Use the unique identification number of the component as the index to read the package information;

[0055] Combining the component pad location information with the package information, the component image area range and the pad area range are obtained, and the image of the area of ​​interest is extracted.

[0056] In the module M5, each actual component image is compared with the empirical data according to the determined component image area range and pad area range to obtain multiple local comparison detection results;

[0057] After integrating and recording multiple local comparison results, a defect detection report is formed and feedback is provided.

[0058] The comparison includes analyzing the effective identification information of the component to obtain the component image where the character information of the patch component is located, and comparing whether the detected character information is consistent with the component capacity in the effective identification information of the component. If the two are inconsistent, the patch is incorrectly soldered, and the incorrect soldering information is recorded as the comparison result. If the two are consistent, the soldering is correct and no information is recorded.

[0059] Preferably, the module M3 reads the component image saved after component positioning, loads the component effective identification information, classifies the components according to the package category in the component effective identification information, and determines the number of pads of the component to be inspected.

[0060] The module M4 sequentially acquires images of the pads, and uses the component size and pad size described in the packaging information to obtain an image of the area occupied by the pads.

[0061] The module M5 extracts the RGB color components of the pad image, compares them with the empirical values, and determines whether the pad has defects such as solder leaks or insufficient tin. If defects exist, the corresponding defects of the pad are recorded and the pad detection continues. If defects do not exist, the pad detection process is repeated until all pads are detected, and the pad defect detection ends.

[0062] Preferably, the correction is performed by preprocessing the complete image and performing an improved Hough transform on the binary image obtained after the preprocessing. Specifically, the process includes:

[0063] Module M2.1: Grayscale RGB image.

[0064] Module M2.2: Median filtering, which smoothes the noise in the image and suppresses salt and pepper noise.

[0065] Module M2.3: Select the positioning circle area.

[0066] Module M2.4: Locate circle edge extraction, extract the edge information of the circle in the image, and convert the complete image into a binary image with edge information.

[0067] Module M2.5: Search and count the pixels with a value of 1 in the binary image and discard useless pixels.

[0068] Module M2.6: Set the variables and Hough array initial values ​​and allocate storage space, and determine the value range of the smaller radius r according to the actual situation of the PCB positioning circle (r max , r min ) and a larger step size of θ.

[0069] Module M2.7: Calculate the value of (a, b) according to the circle parameter formula x = a + rcosθ and y = b + rsinθ, and record and count the non-negative integer values ​​of a and b to obtain the Hough index value;

[0070] Where (a, b) represents the center position of the circle;

[0071] r represents the radius of the circle;

[0072] θ represents the angle between the line connecting the point (x, y) and the origin and the x-axis.

[0073] Module M2.8: Based on the Hough index value, the Hough array is constructed through the accumulator statistics, and the number of array layers is r max -r min。

[0074] Module M2.9: Take the radius corresponding to the layer with the largest cumulative value in the Hough array as the radius r of the positioning circle, where the average value of all (a, b) is the center of the positioning circle.

[0075] Compared with the prior art, the present invention has the following beneficial effects:

[0076] 1. The present invention determines the category of defects by combining effective component identification information, thereby pointing out the specific relationship between defects and components on the PCB.

[0077] 2. The present invention improves detection accuracy by comparing the detection results with empirical data and effective component identification information, and can detect different defect conditions more specifically.

[0078] 3. The present invention solves the problems of low accuracy and poor efficiency of manual defect detection, can adjust specific detection information according to different defect types, and has certain adaptability and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:

[0080] Figure 1 The figure is a flow chart of the automatic detection method for printed circuit board components. DETAILED DESCRIPTION

[0081] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.

[0082] According to the present invention, a method for automatically detecting defects of printed circuit board components based on AOI technology is provided, which is used in the process of PCB production inspection. Figure 1 For example, the following steps are included:

[0083] Step S1: Acquire an image of the actual produced PCB board through AOI technology.

[0084] The printed circuit board assembly image acquisition system includes a CCD industrial camera, a camera frame, a ring light source, a light source frame, a light source controller and a servo platform.

[0085] Using AOI technology, an industrial CCD camera is used to take pictures of the PCB board after surface mounting under the movement of the two-dimensional workbench, so as to capture local and panoramic images of the PCB and obtain a complete image of the actual PCB board.

[0086] In more preferred examples, the CCD industrial camera is placed on a camera stand, directly above the PCB to be inspected, and the center of the camera's field of view is in the same straight line as the axis of the annular light source; the annular light source is fixed on the bracket frame of the light source stand, and directly below the lens of the CCD industrial camera, and the matching light source controller is responsible for powering the light source; the camera stand and the light source stand are fixed on a one-dimensional servo platform to realize the movement of the industrial camera, lens and light source, and complete the acquisition of a panoramic image of the PCB.

[0087] Step S2: Correcting the image of the PCB to be inspected through the positioning holes on the diagonal lines of the PCB;

[0088] The image of the PCB to be inspected is corrected using positioning holes on the PCB diagonal line to resolve varying degrees of geometric distortion that may occur during image acquisition. The center of the positioning hole in the lower left corner of the PCB is aligned with the reference origin of the PCB component document.

[0089] After image processing, the centers of the two marker circles are located. Based on the coordinates of the two marker circles in the standard template, the ratio between the actual coordinates and the standard template coordinates can be determined. Finally, based on this ratio, the captured image is zoomed in, out, translated, and rotated to achieve matching positioning with the standard template.

[0090] PCB image correction is one of the key steps in automatic PCB defect detection. Whether the positioning circle parameters can be obtained efficiently and accurately directly affects the subsequent PCB image correction effect and is the prerequisite for the smooth progress of defect detection.

[0091] In more preferred embodiments, an improved Hong transform is proposed to detect circles in images, thereby improving the detection speed. In order to further improve the detection speed, the image to be tested is preprocessed by grayscale conversion and median filtering before performing the Hough transform. Specifically, the following steps are performed:

[0092] Step S2.1: Grayscale the RGB image. Since the PCB image acquired by the image acquisition system is an RGB color image, the PCB image must be grayscaled before performing the Hough transform.

[0093] Step S2.2: Median filtering is used to smooth the noise in the image, suppress salt and pepper noise, reduce the computational complexity of the subsequent Hough transform, and protect the edge information of the positioning circle;

[0094] Step S2.3: Select the positioning circle area. PCB positioning hole information is determined at the beginning of printed circuit board design, including the radius of the positioning circle and the relative position information on the PCB. This further narrows the range of images to be inspected. Selecting the positioning circle area is essential to significantly reduce unnecessary calculations, reduce system resource usage, and improve inspection efficiency.

[0095] Step S2.4: Locating and extracting circle edges is a key step in the preprocessing process. This process extracts the edge information of the circle in the image, reducing the number of useless pixels in the image and shortening the detection time. After edge extraction, the image is converted into a binary image with edge information.

[0096] After image preprocessing, the edge information with prominent features has been extracted from the original image. The preprocessed image is subjected to Hough transform. Specifically, it includes:

[0097] Step S2.5: Search and count the pixels with a pixel value of 1, that is, extract the pixels containing edge information and discard useless pixels, thereby reducing the number of calculations and improving the operation speed;

[0098] Step S2.6: Set initial values ​​for variables and Hough arrays, allocate storage space for them, and determine the value range of radius r (r max , r min ) Without affecting the detection effect, taking the smallest possible range can improve the detection efficiency to a certain extent; θ selects an appropriate step size and takes the largest possible step size without affecting the detection effect;

[0099] Step S2.7: Calculate the value of (a, b) according to the circle parameter formula and record the statistical effective value to determine the index value of the Hough array. The effective values ​​of a and b are non-negative integers. The circle parameter formula is:

[0100] x=a+rcosθ

[0101] y=b+rsinθ

[0102] Where (a, b) represents the center position of the circle;

[0103] r represents the radius of the circle;

[0104] θ represents the angle between the line connecting the point (x, y) and the origin and the x-axis;

[0105] Step S2.8: Construct a Hough array based on the Hough index value, which is specifically achieved through the accumulator. The number of layers of the array is r max -r min ;

[0106] Step S2.9: Calculate the radius of the positioning circle. Find the layer with the largest cumulative value from the Hough array, which is the circle with the most pixels in the image space corresponding to the parameter space. The radius corresponding to the layer array is the circle radius r; calculate the center of the positioning circle. The average value of all (a, b) in the layer with the largest value is the center of the circle.

[0107] The classic Hough transform uses a three-dimensional structure, which increases the complexity of the operation. The improved algorithm uses Hough arrays to replace multiple loops, reducing the loop operations in the statistical extreme value process and further improving the detection efficiency.

[0108] Step S3: Locate and acquire component images and component pad images;

[0109] Analyze the relevant information of the components in the file, use the center of the positioning hole in the lower left corner as the origin, locate and obtain the component image and component pad image, and load the component information file of the PCB.

[0110] The component information file, i.e., the effective identification information of the component, includes the component unique identification number (Designator), packaging information (Footprint), component pad position information (Mid_X, Mid_Y), rotation angle (Rotation), and component capacity (Value) and other effective identification information.

[0111] The component's unique ID (Designator) is the only ID used to distinguish different components on the PCB. Footprint information, component pad location information (Mid_X, Mid_Y), and rotation angle (Rotation) serve as data for image positioning. Leveraging this component information allows for component image positioning, including pad and component position, and target image extraction.

[0112] During the detection of solder pad leakage and insufficient tin, the components are classified according to the package category in the PCB component information file. Different packaged components have different numbers of solder feet, which means that the number of pads that need to be detected is different. Ultimately, the number of pads of the components to be inspected can be determined through the package information.

[0113] During the solder pad leak detection process, the component image saved after component positioning is first read and the PCB component information file is loaded.

[0114] Step S4: Analyze the acquired component-related images and extract effective identification information of components in the images that can reflect defects;

[0115] The image processing algorithm is used to specifically analyze the component-related images obtained in the previous step, and effective identification information of components in the image that can reflect defects is extracted.

[0116] Use the unique identification number as an index to read the component packaging information;

[0117] Combining the component pad location information with the package information, the component image area range and the pad area range are obtained, and the image of the area of ​​interest is extracted.

[0118] In more preferred embodiments, for patch mis-soldering detection, component images saved after component positioning are read and loaded into a PCB component information file.

[0119] During the detection of solder pad leaks and insufficient tin, images of each pad are acquired in sequence. It is necessary to make full use of the component size and pad size described by the component package information to obtain an image of the area occupied by the pad.

[0120] Step S5: Use the empirical data to compare and identify defects, and after obtaining the results, feedback is given on the defects and detection status of the actual produced PCB boards.

[0121] The empirical data, as a judgment standard, is the same as the standard pattern and is obtained by collecting and storing previously acquired images of component pads that are normal and have no defects.

[0122] Automatically determine the image area of ​​components and component pads, compare each actual component image with empirical data, and obtain multiple local comparison detection results to improve the accuracy of defect detection;

[0123] After integrating and recording multiple local comparison results, a defect detection report is formed and feedback is provided.

[0124] In more preferred embodiments, after analyzing the component information file, a body image containing the character information of the patch component is obtained, and the image is required to contain complete character information.

[0125] Character recognition is a key step in detecting incorrect soldering of SMD components. Only by accurately identifying the character information on the SMD can incorrect soldering detection be effectively achieved. The detected character information is compared with the capacity (Vatue) in the component information file to see if they are consistent. If the two are inconsistent, it means that the SMD is incorrectly soldered and the incorrect soldering information is recorded.

[0126] For solder pad leak detection, the RGB color components of the pad image are extracted and compared with the empirical value to determine whether the pad is leaking or lacking tin. If a defect exists, the corresponding defect condition of the pad is recorded; the pad detection process is repeated until all pads of the component are inspected, and the pad defect detection of the component is completed.

[0127] The present invention also provides an automatic detection system for printed circuit board assembly defects based on AOI technology. The automatic detection system for printed circuit board assembly defects based on AOI technology can be implemented by executing the process steps of the automatic detection method for printed circuit board assembly defects based on AOI technology, that is, those skilled in the art can understand the automatic detection method for printed circuit board assembly defects based on AOI technology as a preferred implementation of the automatic detection system for printed circuit board assembly defects based on AOI technology.

[0128] According to the present invention, a printed circuit board assembly defect automatic detection system based on AOI technology is provided, comprising:

[0129] Module M1: Obtaining a complete image of the actual produced PCB through the printed circuit board assembly image acquisition system based on AOI technology as described in claim 1;

[0130] Module M2: Correct the complete image to be inspected;

[0131] Module M3: locates and obtains component images and component pad images based on the complete image;

[0132] Module M4: Analyze the acquired component images and extract effective component identification information;

[0133] Module M5: Use empirical data to compare and identify defects based on effective component identification information and provide feedback on the results.

[0134] In more preferred examples, the module M1 uses AOI technology to take pictures of the PCB board after surface mounting, and collects local and panoramic images of the PCB.

[0135] In the module M2, the complete image of the PCB to be inspected is corrected through the positioning holes on the diagonal lines of the PCB, and the center positions of the two mark circles are found through image processing. According to the coordinates of the two mark circles in the standard template, the proportional relationship between the actual coordinates and the standard template coordinates is determined, and the collected image is enlarged, reduced, translated or rotated until the center of the positioning hole in the lower left corner of the PCB is consistent with the reference origin of the PCB component document.

[0136] In the module M3, the center of the positioning hole in the lower left corner is used as the origin to analyze and locate and obtain the component image and the component pad image, and also obtain the component information file of the PCB;

[0137] The effective component identification information includes the component's unique identification number, packaging information, component pad position information, rotation angle, and component capacity.

[0138] The module M4 reads the component image saved after component positioning, analyzes the component image through an image processing algorithm, and extracts effective component identification information that can reflect defects in the image;

[0139] Use the unique identification number of the component as the index to read the package information;

[0140] Combining the component pad location information with the package information, the component image area range and the pad area range are obtained, and the image of the area of ​​interest is extracted.

[0141] In more preferred embodiments, the module M5 compares each actual component image with the empirical data according to the determined component image area range and pad area range, and obtains multiple local comparison detection results;

[0142] After integrating and recording multiple local comparison results, a defect detection report is formed and feedback is provided.

[0143] The comparison includes analyzing the effective identification information of the component to obtain the component image where the character information of the patch component is located, and comparing whether the detected character information is consistent with the component capacity in the effective identification information of the component. If the two are inconsistent, the patch is incorrectly soldered, and the incorrect soldering information is recorded as the comparison result. If the two are consistent, the soldering is correct and no information is recorded.

[0144] In more preferred examples, the module M3 reads the component image saved after component positioning, loads the component effective identification information, classifies the components according to the package category in the component effective identification information, and determines the number of pads of the component to be inspected.

[0145] The module M4 sequentially acquires images of the pads, and uses the component size and pad size described in the packaging information to obtain an image of the area occupied by the pads.

[0146] The module M5 extracts the RGB color components of the pad image, compares them with the empirical values, and determines whether the pad has defects such as solder leaks or insufficient tin. If defects exist, the corresponding defects of the pad are recorded and the pad detection continues. If defects do not exist, the pad detection process is repeated until all pads are detected, and the pad defect detection ends.

[0147] According to the present invention, a computer-readable storage medium storing a computer program is provided. When the computer program is executed by a processor, the steps of the method for automatically detecting defects of printed circuit board assemblies based on AOI technology are implemented.

[0148] Those skilled in the art will appreciate that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in purely computer-readable program code, it is entirely possible to implement the same functions of the system and its various devices, modules, and units provided by the present invention in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules implementing the method and structures within the hardware component.

[0149] In the description of this application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.

[0150] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.

Claims

1. A method for automatically detecting defects in printed circuit board components based on AOI technology, characterized in that: include: Step S1: obtaining a complete image of the actual produced PCB through a printed circuit board assembly image acquisition system; Step S2: Correcting the complete image to be inspected; Step S3: Locate and acquire component images and component pad images based on the complete image; Step S4: Analyze the acquired component image and extract effective component identification information; Step S5: Using the empirical data to compare and identify defects based on the effective component identification information, and feeding back the results.

2. The method for automatically detecting defects of printed circuit board components based on AOI technology according to claim 1, characterized in that: The printed circuit board assembly image acquisition system includes a CCD industrial camera, a camera frame, a ring light source, a light source frame, a light source controller and a servo platform; The CCD industrial camera is placed on the camera stand, directly above the printed circuit board to be inspected, with the center of the field of view and the axis of the ring light source in a straight line; The ring light source is fixed on the light source frame and is located directly below the lens of the CCD industrial camera. The light source controller is responsible for powering the light source. The camera frame and light source frame are fixed on the servo platform; In step S1, AOI technology is used to enable a CCD industrial camera to take pictures of the surface-mounted PCB board through a servo platform to capture complete images of the PCB in parts and in the whole picture. In step S2, the complete image of the PCB to be inspected is corrected using the positioning holes on the diagonal lines of the PCB. The center positions of the two marking circles are found through image processing. Based on the coordinates of the two marking circles in the standard template, the proportional relationship between the actual coordinates and the coordinates of the standard template is determined. The collected image is enlarged, reduced, translated, or rotated until the center of the positioning hole in the lower left corner of the PCB is consistent with the reference origin of the PCB component document.

3. The method for automatically detecting defects of printed circuit board components based on AOI technology according to claim 1, characterized in that: In step S3, the center of the positioning hole in the lower left corner is used as the origin to analyze and locate and obtain the component image and the component pad image, and also obtain the component information file of the PCB; The effective component identification information includes the component's unique identification number, packaging information, component pad position information, rotation angle, and component capacity; In step S4, the component image saved after component positioning is read, the component image is analyzed by an image processing algorithm, and effective component identification information that can reflect defects is extracted from the image; Use the unique identification number of the component as the index to read the package information; Combining the component pad location information with the package information, the component image area range and the pad area range are obtained, and the image of the area of ​​interest is extracted; In step S5, each actual component image is compared with the empirical data based on the determined component image area range and pad area range to obtain multiple local comparison detection results; After integrating and recording multiple local comparison results, a defect detection report is generated and feedback is provided; The comparison includes analyzing the effective identification information of the component to obtain the component image where the character information of the patch component is located, and comparing whether the detected character information is consistent with the component capacity in the effective identification information of the component. If the two are inconsistent, the patch is incorrectly soldered, and the incorrect soldering information is recorded as the comparison result. If the two are consistent, the soldering is correct and no information is recorded.

4. The method for automatically detecting defects of printed circuit board components based on AOI technology according to claim 3, characterized in that: In step S3, the component image saved after component positioning is read, and the effective identification information of the component is loaded, the components are classified according to the package category in the effective identification information of the component, and the number of pads of the component to be inspected is determined; In step S4, images of the pads are sequentially acquired, and images of the areas occupied by the pads are obtained using the component size and pad size described in the package information; In step S5, the RGB color components of the pad image are extracted and compared with the empirical values ​​to determine whether the pad has defects such as solder leak or insufficient tin. If a defect exists, the defect corresponding to the pad is recorded and the pad detection is continued. If no defect exists, the pad detection process is repeated until all pads are detected, thereby ending the pad defect detection.

5. The method for automatically detecting defects of printed circuit board components based on AOI technology according to claim 1, characterized in that: In the correction, the complete image is preprocessed, and the binary image obtained after the preprocessing is subjected to an improved Hough transform, including: Step S2.1: grayscale the RGB image; Step S2.2: Median filtering is used to smooth the noise in the image and suppress salt and pepper noise; Step S2.3: Select the positioning circle area; Step S2.4: Locate the circle edge and extract the edge information of the circle in the image, and convert the complete image into a binary image with edge information; Step S2.5: Search and count the pixels with a value of 1 in the binary image, and discard useless pixels; Step S2.6: Set the variables and Hough array initial values ​​and allocate storage space. Determine the value range of the smaller radius r (r max , r min ) and a larger step size of θ; Step S2.7: Calculate the value of (a, b) according to the circle parameter formula x = a + rcosθ, y = b + rsinθ, and record and count the non-negative integer values ​​of a and b to obtain the Hough index value; Where (a, b) represents the center position of the circle; r represents the radius of the circle; θ represents the angle between the line connecting the point (x, y) and the origin and the x-axis; Step S2.8: Based on the Hough index value, construct the Hough array through the accumulator statistics, and the number of array layers is r max -r min ; Step S2.9: Take the radius corresponding to the layer with the largest cumulative value in the Hough array as the radius r of the positioning circle, where the average value of all (a, b) is the center of the positioning circle.

6. An automatic detection system for printed circuit board assembly defects based on AOI technology, characterized in that: include: Module M1: Get the complete image of the actual PCB through the printed circuit board assembly image acquisition system; Module M2: Correct the complete image to be inspected; Module M3: locates and obtains component images and component pad images based on the complete image; Module M4: Analyze the acquired component images and extract effective component identification information; Module M5: Use empirical data to compare and identify defects based on effective component identification information and provide feedback on the results.

7. The AOI-based printed circuit board assembly defect automatic detection system according to claim 6, characterized in that: The printed circuit board assembly image acquisition system includes a CCD industrial camera, a camera frame, a ring light source, a light source frame, a light source controller and a servo platform; The CCD industrial camera is placed on the camera stand, directly above the printed circuit board to be inspected, with the center of the field of view and the axis of the ring light source in a straight line; The ring light source is fixed on the light source frame and is located directly below the lens of the CCD industrial camera. The light source controller is responsible for powering the light source. The camera frame and light source frame are fixed on the servo platform; The module M1 uses AOI technology to enable a CCD industrial camera to take pictures of the PCB board after surface mounting through a servo platform, and collects complete images of the PCB in parts and in the whole picture. In the module M2, the complete image of the PCB to be inspected is corrected through the positioning holes on the diagonal lines of the PCB, and the center positions of the two mark circles are found through image processing. According to the coordinates of the two mark circles in the standard template, the proportional relationship between the actual coordinates and the standard template coordinates is determined, and the collected image is enlarged, reduced, translated or rotated until the center of the positioning hole in the lower left corner of the PCB is consistent with the reference origin of the PCB component document.

8. The AOI technology-based printed circuit board assembly defect automatic detection system according to claim 6, characterized in that: In the module M3, the center of the positioning hole in the lower left corner is used as the origin to analyze and locate and obtain the component image and the component pad image, and also obtain the component information file of the PCB; The effective component identification information includes the component's unique identification number, packaging information, component pad position information, rotation angle, and component capacity; The module M4 reads the component image saved after component positioning, analyzes the component image through an image processing algorithm, and extracts effective component identification information that can reflect defects in the image; Use the unique identification number of the component as the index to read the package information; Combining the component pad location information with the package information, the component image area range and the pad area range are obtained, and the image of the area of ​​interest is extracted; In the module M5, each actual component image is compared with the empirical data according to the determined component image area range and pad area range to obtain multiple local comparison detection results; After integrating and recording multiple local comparison results, a defect detection report is generated and feedback is provided; The comparison includes analyzing the effective identification information of the component to obtain the component image where the character information of the patch component is located, and comparing whether the detected character information is consistent with the component capacity in the effective identification information of the component. If the two are inconsistent, the patch is incorrectly soldered, and the incorrect soldering information is recorded as the comparison result. If the two are consistent, the soldering is correct and no information is recorded.

9. The AOI technology-based printed circuit board assembly defect automatic detection system according to claim 8, characterized in that: The module M3 reads the component image saved after component positioning, loads the effective identification information of the component, classifies the component according to the package category in the effective identification information, and determines the number of pads of the component to be inspected; The module M4 sequentially acquires images of each pad and uses the component size and pad size described in the package information to obtain an image of the area occupied by the pad. The module M5 extracts the RGB color components of the pad image, compares them with the empirical values, and determines whether the pad has defects such as solder leaks or insufficient tin. If defects exist, the corresponding defects of the pad are recorded and the pad detection continues. If defects do not exist, the pad detection process is repeated until all pads are detected, and the pad defect detection ends.

10. The AOI technology-based printed circuit board assembly defect automatic detection system according to claim 6, characterized in that: In the correction, the complete image is preprocessed, and the binary image obtained after the preprocessing is subjected to an improved Hough transform, including: Module M2.1: Grayscale RGB image; Module M2.2: Median filtering, which smooths the noise in the image and suppresses salt and pepper noise; Module M2.3: Select the positioning circle area; Module M2.4: Locate circle edge extraction, extract the edge information of the circle in the image, and convert the complete image into a binary image with edge information; Module M2.5: Search and count the pixels with a value of 1 in the binary image, and discard useless pixels; Module M2.6: Set the variables and Hough array initial values ​​and allocate storage space, and determine the value range of the smaller radius r according to the actual situation of the PCB positioning circle (r max , r min ) and a larger step size of θ; Module M2.7: Calculate the value of (a, b) according to the circle parameter formula x = a + rcosθ and y = b + rsinθ, and record and count the non-negative integer values ​​of a and b to obtain the Hough index value; Where (a, b) represents the center position of the circle; r represents the radius of the circle; θ represents the angle between the line connecting the point (x, y) and the origin and the x-axis; Module M2.8: Based on the Hough index value, the Hough array is constructed through the accumulator statistics, and the number of array layers is r max -r min ; Module M2.9: Take the radius corresponding to the layer with the largest cumulative value in the Hough array as the radius r of the positioning circle, where the average value of all (a, b) is the center of the positioning circle.

Citation Information

Patent Citations

  • PCB welding spot defect identification method and system

    CN113744247A

  • AOI (automatic optical inspection) defect detection method and system for special-shaped element of PCB (printed circuit board)

    CN115482194A

  • PCB defect detection method based on AOI

    CN117788412A

  • Training method and system based on circuit board defect detection model

    CN119579593A

  • Crown cap surface defect online inspection method employing image processing

    WO2020248439A1

Cited By

  • PCBA production line intelligent monitoring and closed-loop control system based on Internet of Things sensing and data driving

    CN121998947A