PCB (printed circuit board) lamination error detection method
Through X-ray tomography equipment and image analysis algorithm, the accuracy and efficiency of PCB stack error detection are solved, high-precision stack error detection is realized, and the reliability and production efficiency of detection results are improved.
Patent Information
- Application Number
- CN202510059683.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to detect PCB stacking errors quickly and accurately, especially on complex multi-layer PCBs, resulting in signal integrity problems, reduced electrical performance and weakened mechanical strength.
The X-ray tomography device is combined with an image analysis algorithm, and high-precision detection of the PCB stacked structure is achieved through steps such as image acquisition, preprocessing, feature extraction, stack comparison and analysis, error determination and labeling.
Accurate detection of PCB stack errors is achieved, and the detection accuracy reaches the micron level, which greatly improves the detection ability, reduces the influence of human factors, and improves the reliability and production efficiency of the detection results.
Smart Images

Figure CN119880965A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of PCB manufacturing, and in particular to a method for detecting stacking errors of a PCB printed circuit board. Background Art
[0002] PCB, or printed circuit board, is a critical basic component in electronic devices. It connects and fixes electronic components by using specific processes to form conductive patterns, pads, vias and other structures on an insulating substrate, thereby achieving electrical connection and mechanical support. It consists of a substrate (usually an insulating board made of glass fiber, epoxy resin, etc.), a conductive layer (mostly copper foil etched to form a conductive pattern), a solder mask layer (to prevent solder turbulence and protect the conductive pattern), a silk screen layer (to identify component-related information), etc. It has functions such as electrical connection, mechanical support, insulation and signal transmission. It needs to go through design, plate making, printing and welding processes during production, and is widely used in many fields such as consumer electronics, computers and peripheral equipment, and communication equipment.
[0003] In the PCB manufacturing process, the accuracy of the stacking structure is crucial to the performance of the circuit board. Once the stacking is wrong, it is likely to cause signal integrity problems, reduced electrical performance, weakened mechanical strength and other defects, which will seriously affect the quality and reliability of the PCB, and even cause the entire electronic product to fail to operate normally. However, most of the current traditional detection methods rely on manual visual inspection or simple mechanical measurement. These methods are inefficient and are easily interfered by human factors. It is difficult to accurately and quickly detect stacking errors, especially for small stacking deviations on complex multi-layer PCBs, which are even more difficult to effectively identify. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a PCB printed circuit board stacking error detection method, which solves the stacking error problem in the prior art.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a PCB printed circuit board stacking error detection method, the detection method specifically comprises the following steps:
[0006] S1. Image acquisition: Use X-ray tomography equipment to scan the PCB to obtain a tomographic image sequence of each layer structure inside the PCB. The resolution of the equipment can clearly distinguish the contours, circuits, components and other features of each layer of the PCB. The display accuracy is controlled at 10μm to ensure that the subtle stacking structure information is captured;
[0007] S2. Image preprocessing: De-noising the collected X-ray tomographic images, using Gaussian filtering and median filtering or wavelet transform methods to remove noise interference in the images, improve image clarity and signal-to-noise ratio, select different waveforms based on the noise distribution in the images, and adjust the filter kernel size according to the noise level, which is controlled between 3×3 and 7×7 pixels; if there is salt and pepper noise, the median filtering effect will be more obvious, and the filter window size is limited to 5×5 pixels;
[0008] S3. Feature extraction: Extract key features of each layer of the PCB based on the grayscale, texture and edge information of the image, use the Canny edge detection algorithm and Sobel operator method to accurately detect the edge contours of each layer, determine the shape, size and relative position relationship of each layer, and combine the expansion and corrosion operations in morphological operations to further refine and improve the extraction of circuit features for PCB layers with complex circuit patterns, so as to ensure that the parameter information of the direction, width and spacing of the circuit can be accurately obtained;
[0009] S4. Stacking comparison and analysis: Compare the extracted features of each PCB layer with the standard PCB design data pre-stored in the database, compare the key parameters such as the thickness, material properties, circuit layout, and component location of each layer, and calculate the deviation between the actual measured value and the standard value. Compared with the comparison of layer thickness, a more accurate thickness measurement algorithm is used, and the measurement accuracy is limited to ±0.01mm. By analyzing the grayscale changes of each layer in the X-ray tomography image, combined with the known material X-ray attenuation coefficient, the actual thickness of each layer is calculated, and then compared with the standard layer thickness to detect the layer thickness deviation;
[0010] S5. Error judgment and marking: According to the preset error threshold, the various deviation values calculated during the stacking comparison and analysis process are judged. If a certain deviation value exceeds the corresponding threshold, it means that there is a stacking error. Then the error position and type are marked. For the position deviation between circuit layers, if the offset in the X or Y direction exceeds ±0.1mm, it is marked as a circuit layer stacking offset error; for layer thickness deviation, if it exceeds ±10% of the standard layer thickness, it is marked as a layer thickness abnormality error; for component position deviation, if its offset distance from the standard position exceeds 1 / 4 of the component pin spacing, it is marked as a component installation position error.
[0011] Preferably, in S1, a multi-angle and multi-position scanning method is simultaneously adopted to cover all areas of the PCB as comprehensively as possible to prevent missing stacking error information due to scanning blind areas. For PCBs of different sizes, the scanning parameters, scanning step length and exposure time are adjusted;
[0012] For PCBs with smaller side lengths less than 10 cm, the scanning step size is set to 0.5 mm;
[0013] For PCBs with larger side lengths greater than 30cm, the scanning step length is increased to 2mm.
[0014] Preferably, in S2, grayscale correction is performed on the denoised image, and the grayscale value distribution of the image is adjusted by comparing it with a standard grayscale template, so that the grayscales of different images remain consistent, which facilitates subsequent image analysis and processing;
[0015] At the same time, grayscale correction is performed through linear transformation or histogram equalization method. During histogram equalization, the grayscale histogram of the image is stretched to the entire grayscale range, thereby enhancing the contrast of the image.
[0016] Preferably, in S3, the features of components in each layer of the PCB, such as the shape, size, position, and pin distribution of the components, are extracted;
[0017] And by matching templates with the preset component library, different types of components can be identified, and the specific position and posture information in each layer of the PCB can be recorded. In this way, during stacking detection, it can be determined whether the installation of components meets the design requirements, and whether there is any detection failure due to component position offset or direction offset caused by stacking errors.
[0018] Preferably, the image registration technology is used in S4 to accurately register the images of each layer of the PCB, further analyze the relative position relationship between the layers, and determine the actual offset and angle deviation between the layers by calculating transformation parameters such as translation, rotation and scaling. The feature point-based image registration method, such as SIFT algorithm and SURF algorithm, is used to extract feature points with scale and rotation invariance from the images of each layer of the PCB. By matching these feature points, the transformation relationship between the layers is calculated, and accurate monitoring of stacking misalignment and rotation angle is performed.
[0019] Preferably, in S5, the marked error information is displayed on the PCB image in a relatively intuitive manner, using lines, graphics or texts of different colors to highlight the location, type and severity of the stacking error, so that the operator can accurately identify and locate the problem, providing guidance for subsequent PCB repair or adjustment.
[0020] Preferably, the parameter resolution of the X-ray tomography equipment is set to 15 μm, the scanning step length is 1 mm, the exposure time is 100 ms, the multi-angle scanning range is limited to 0° to 360°, and the scanning is performed every 10°, so as to comprehensively obtain the internal structure information of the PCB.
[0021] Preferably, the Gaussian filtering formula is for an image I(x, y), and the calculation formula of the image G(x, y) after Gaussian filtering is:
[0022]
[0023] Where σ is the standard deviation, which determines the width of the Gaussian function, and k is usually set to around 3σ to cover most of the filtering range.
[0024] Preferably, the median filtering formula is:
[0025] For an image I(x, y), the median filter result M(x, y) at point (x, y) is to sort the pixel values in the m×m neighborhood centered at (x, y) and take the middle value, that is:
[0026]
[0027] The present invention provides a PCB printed circuit board stacking error detection method, which has the following beneficial effects:
[0028] (1) The PCB printed circuit board stacking error detection method relies on relatively high-precision X-ray tomography technology and accurate image analysis algorithms to accurately detect small stacking deviations of each layer of the PCB, such as layer thickness deviation, circuit position deviation, and component position deviation. The detection accuracy can reach the micron level, greatly improving the stacking error detection capability and effectively avoiding PCB quality problems caused by stacking errors.
[0029] (2) The PCB printed circuit board stacking error detection method uses an automated image acquisition, processing and analysis process, eliminating the need for manual visual inspection and mechanical measurement. It can quickly complete the comprehensive inspection of the PCB stacking, greatly shortening the inspection time and improving production efficiency. It is particularly suitable for the online inspection needs of large-scale PCB production lines.
[0030] (3) The PCB printed circuit board stacking error detection method is based on advanced image registration technology and strict error threshold judgment method. It can accurately identify stacking errors and intuitively mark the error information, reducing the impact of human factors on the detection results, improving the reliability and consistency of the detection results, and providing reliable data support for PCB quality control. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a structural block diagram of the system principle of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] See also Figure 1 The embodiment of the present invention provides a technical solution: a PCB printed circuit board stacking error detection method, the detection method specifically comprises the following steps:
[0034] S1. Image acquisition: Use X-ray tomography equipment to scan the PCB to obtain the tomographic image sequence of each layer structure inside the PCB. The resolution of the equipment can clearly distinguish the contours, circuits, components and other features of each layer of the PCB. The display accuracy is controlled at 10μm to ensure that the subtle stacking structure information is captured. At the same time, multi-angle and multi-position scanning methods are adopted to cover all areas of the PCB as comprehensively as possible to prevent missing stacking error information due to scanning blind areas. For PCBs of different sizes, adjust the scanning parameters, scanning step length and exposure time;
[0035] For PCBs with smaller side lengths less than 10 cm, the scanning step size is set to 0.5 mm;
[0036] For PCBs with a larger side length than 30cm, the scanning step length is increased to 2mm;
[0037] S2. Image preprocessing: De-noising the collected X-ray tomographic images, using Gaussian filtering and median filtering or wavelet transform methods to remove noise interference in the images, improve image clarity and signal-to-noise ratio, select different waveforms based on the noise distribution in the images, and adjust the filter kernel size according to the noise level, controlled between 3×3 and 7×7 pixels; if there is salt and pepper noise, the median filter effect will be more obvious, and the filter window size is limited to 5×5 pixels. Grayscale correction is performed on the denoised images, and the grayscale value distribution of the images is adjusted by comparing with the standard grayscale template, so that the grayscale between different images is consistent, which is convenient for subsequent image analysis and processing;
[0038] At the same time, grayscale correction is performed through linear transformation or histogram equalization method. During histogram equalization, the grayscale histogram of the image is stretched to the entire grayscale range, thereby enhancing the contrast of the image.
[0039] S3. Feature extraction: Extract key features of each layer of the PCB based on the grayscale, texture and edge information of the image, use the Canny edge detection algorithm and the Sobel operator method to accurately detect the edge contours of each layer, determine the shape, size and relative position relationship of each layer, and combine the expansion and corrosion operations in morphological operations to further refine and improve the extraction of circuit features for PCB layers with more complex circuit patterns, ensure that the parameter information of the direction, width and spacing of the circuit can be accurately obtained, and extract the characteristics of components in each layer of the PCB, the shape, size, position and pin distribution of the components;
[0040] And by matching templates with the preset component library, different types of components can be identified, and the specific position and posture information in each layer of the PCB can be recorded. In this way, during stacking detection, it can be determined whether the installation of components meets the design requirements, and whether there is any detection failure caused by component position offset or direction offset due to stacking errors;
[0041] S4. Stacking comparison and analysis: Compare the extracted features of each PCB layer with the standard PCB design data pre-stored in the database, compare the key parameters such as the thickness, material properties, circuit layout, and component position of each layer, and calculate the deviation between the actual measurement value and the standard value. Compared with the comparison of layer thickness, a more accurate thickness measurement algorithm is used, and the measurement accuracy is limited to ±0.01mm. By analyzing the grayscale changes of each layer in the X-ray tomography image, combined with the known material X-ray attenuation coefficient, the actual thickness of each layer is calculated, and then compared with the standard layer thickness to detect the layer thickness deviation. Using image registration technology, the images of each layer of the PCB are accurately registered, and the relative position relationship between the layers is further analyzed. By calculating the transformation parameters such as translation, rotation, and scaling, the actual offset and angle deviation between the layers are determined. Using feature point-based image registration methods, such as SIFT algorithm and SURF algorithm, feature points with scale and rotation invariance are extracted from the images of each layer of the PCB. By matching these feature points, the transformation relationship between the layers is calculated, and the monitoring of stacking misalignment and rotation angle is accurately determined;
[0042] S5. Error judgment and marking: According to the preset error threshold, the various deviation values calculated during the stacking comparison and analysis process are judged. If a certain deviation value exceeds the corresponding threshold, it means that there is a stacking error. Then the error position and type are marked. For the position deviation between circuit layers, if the offset in the X or Y direction exceeds ±0.1mm, it is marked as a circuit layer stacking offset error; for layer thickness deviation, if it exceeds ±10% of the standard layer thickness, it is marked as an abnormal layer thickness error; for component position deviation, if its offset distance from the standard position exceeds 1 / 4 of the component pin spacing, it is marked as a component installation position error. The marked error information is displayed on the PCB image in a more intuitive way, using different colored lines, graphics or text annotations to highlight the location, type and severity of the stacking error, so that the operator can accurately identify and locate the problem and provide guidance for subsequent PCB repair or adjustment.
[0043] In the present invention, the parameter resolution of the X-ray tomography equipment is set to 15 μm, the scanning step length is 1 mm, the exposure time is 100 ms, the multi-angle scanning range is limited to 0° to 360°, and the scanning is performed every 10°, so as to comprehensively obtain the internal structure information of the PCB.
[0044] Gaussian filter formula For an image I(x, y), the calculation formula for the image G(x, y) after Gaussian filtering is:
[0045]
[0046] Where σ is the standard deviation, which determines the width of the Gaussian function, and k is usually set to around 3σ to cover most of the filtering range.
[0047] The median filtering formula of the present invention is:
[0048] For an image I(x, y), the median filter result M(x, y) at point (x, y) is to sort the pixel values in the m×m neighborhood centered at (x, y) and take the middle value, that is:
[0049]
[0050] When using it, a relatively complex PCB with a 10-layer structure is selected as the test sample. The size of this PCB board is 20cm×30cm. There are several different types of components on the board, such as BGA packaged chips, QFP devices, and precision resistors and capacitors. Use X-ray tomography equipment and set its parameters as follows: resolution 15μm, scanning step 1mm, exposure time 100ms, multi-angle scanning range from 0° to 360°, and scan every 10°. This ensures that the internal structure information of the PCB is fully obtained. According to the preset settings, the PC B performs X-ray tomography to obtain a series of tomographic images, and then performs denoising on the images. A 5×5 pixel median filter is used to remove salt and pepper noise, and then histogram equalization is used to perform grayscale correction to enhance the contrast of the image and make it clearer. The Canny edge detection algorithm is combined with morphological expansion and corrosion operations to extract the circuit and edge features of each layer of the PCB. At the same time, the image registration technology based on the SIFT algorithm is used to accurately register the images of each layer, and then compared and analyzed with the standard design data to calculate the parameters such as the thickness deviation of each layer, the circuit position deviation, and the component position deviation. The calculated deviation value is judged according to the preset error threshold. For example, if the actual thickness of one layer is found to be 0.05mm thinner than the standard thickness, which exceeds the threshold of ±10% of the standard layer thickness, it is judged as an abnormal layer thickness error; at the same time, if the offset of a certain circuit layer in the X direction is 0.15mm, which exceeds the threshold of ±0.1mm, it is marked as a circuit layer stacking offset error. These error messages are displayed on the PCB image in the form of red lines and text annotations, clearly indicating the error location and type.
Claims
1. A PCB printed circuit board stacking error detection method, characterized in that; The detection method specifically includes the following steps: S1. Image acquisition: Use X-ray tomography equipment to scan the PCB to obtain a tomographic image sequence of each layer structure inside the PCB. The resolution of the equipment can clearly distinguish the contours, circuits, components and other features of each layer of the PCB. The display accuracy is controlled at 10μm to ensure that the subtle stacking structure information is captured; S2. Image preprocessing: De-noising the collected X-ray tomographic images, using Gaussian filtering and median filtering or wavelet transform methods to remove noise interference in the images, improve image clarity and signal-to-noise ratio, select different waveforms based on the noise distribution in the images, and adjust the filter kernel size according to the noise level, which is controlled between 3×3 and 7×7 pixels; if there is salt and pepper noise, the median filtering effect will be more obvious, and the filter window size is limited to 5×5 pixels; S3. Feature extraction: Extract key features of each layer of the PCB based on the grayscale, texture and edge information of the image, use the Canny edge detection algorithm and Sobel operator method to accurately detect the edge contours of each layer, determine the shape, size and relative position relationship of each layer, and combine the expansion and corrosion operations in morphological operations to further refine and improve the extraction of circuit features for PCB layers with complex circuit patterns, so as to ensure that the parameter information of the direction, width and spacing of the circuit can be accurately obtained; S4. Stacking comparison and analysis: Compare the extracted features of each PCB layer with the standard PCB design data pre-stored in the database, compare the key parameters such as the thickness, material properties, circuit layout, and component location of each layer, and calculate the deviation between the actual measured value and the standard value. Compared with the comparison of layer thickness, a more accurate thickness measurement algorithm is used, and the measurement accuracy is limited to ±0.01mm. By analyzing the grayscale changes of each layer in the X-ray tomography image, combined with the known material X-ray attenuation coefficient, the actual thickness of each layer is calculated, and then compared with the standard layer thickness to detect the layer thickness deviation; S5. Error judgment and marking: According to the preset error threshold, the various deviation values calculated during the stacking comparison and analysis process are judged. If a certain deviation value exceeds the corresponding threshold, it means that there is a stacking error. Then the error position and type are marked. For the position deviation between circuit layers, if the offset in the X or Y direction exceeds ±0.1mm, it is marked as a circuit layer stacking offset error; for layer thickness deviation, if it exceeds ±10% of the standard layer thickness, it is marked as a layer thickness abnormality error; for component position deviation, if its offset distance from the standard position exceeds 1 / 4 of the component pin spacing, it is marked as a component installation position error.
2. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: In the S1, a multi-angle and multi-position scanning method is adopted to cover all areas of the PCB as comprehensively as possible to prevent missing stacking error information due to scanning blind areas. For PCBs of different sizes, the scanning parameters, scanning step length and exposure time are adjusted; For PCBs with smaller side lengths less than 10 cm, the scanning step size is set to 0.5 mm; For PCBs with larger side lengths greater than 30cm, the scanning step length is increased to 2mm.
3. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: In S2, grayscale correction is performed on the denoised image, and the grayscale value distribution of the image is adjusted by comparing it with a standard grayscale template so that the grayscales of different images remain consistent, which facilitates subsequent image analysis and processing; At the same time, grayscale correction is performed through linear transformation or histogram equalization method. During histogram equalization, the grayscale histogram of the image is stretched to the entire grayscale range, thereby enhancing the contrast of the image.
4. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: In S3, the features of components in each layer of the PCB are extracted, such as the shape, size, position, and pin distribution of the components; And by matching templates with the preset component library, different types of components can be identified, and the specific position and posture information in each layer of the PCB can be recorded. In this way, during stacking detection, it can be determined whether the installation of components meets the design requirements, and whether there is any detection failure due to component position offset or direction offset caused by stacking errors.
5. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: The S4 uses image registration technology to accurately register the images of each layer of the PCB, further analyze the relative position relationship between the layers, and determine the actual offset and angle deviation between the layers by calculating transformation parameters such as translation, rotation and scaling. The image registration method based on feature points, such as SIFT algorithm and SURF algorithm, is used to extract feature points with scale and rotation invariance in the images of each layer of the PCB. By matching these feature points, the transformation relationship between the layers is calculated, and accurate monitoring of stacking misalignment and rotation angle is performed.
6. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: In the S5, the marked error information is displayed on the PCB image in a relatively intuitive manner, using lines, graphics or texts of different colors to highlight the location, type and severity of the stacking error, so that the operator can accurately identify and locate the problem, providing guidance for subsequent PCB repair or adjustment.
7. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: The parameter resolution of the X-ray tomography equipment is set to 15 μm, the scanning step length is 1 mm, the exposure time is 100 ms, the multi-angle scanning range is limited to 0° to 360°, and the scanning is performed every 10°, so as to comprehensively obtain the internal structure information of the PCB.
8. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: The Gaussian filtering formula is for an image I (x, y), and the calculation formula of the image G (x, y) after Gaussian filtering is: Where σ is the standard deviation, which determines the width of the Gaussian function, and k is usually set to around 3σ to cover most of the filtering range.
9. A PCB printed circuit board stacking error detection method according to claim 1, characterized in that: The median filtering formula is: For an image I(x, y), the median filter result M(x, y) at point (x, y) is to sort the pixel values in the m×m neighborhood centered at (x, y) and take the middle value, that is:
Citation Information
Cited By
Printed circuit board surface flaw intelligent detection method and system based on dynamic template
CN120807502A