A circuit board solder joint quality evaluation method
Patent Information
- Application Number
- CN202511209086.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2045-08-27
AI Technical Summary
采集电路板表面焊点三维点云数据,分析焊点高度差值和高度分布均匀性,生成原始点云特征矩阵,分解所述原始点云特征矩阵,获取表征焊料分布不均和焊点形状异常的高度异常模式特征向量;针对所述高度异常模式特征向量,分析焊料分布不均、焊料体积缺失和焊料堆积过量,判断焊点体积异常位置,生成焊点异常位置集合;根据所述焊点异常位置集合,分析焊点高度梯度突变和表面平整偏差,生成包含局部应力集中和板面形变程度的高度梯度分布图;根据所述高度梯度分布图,划分高度梯度突变和表面平整偏差区域,确定包含焊料润湿不良的焊点高度异常区域边界;针对所述焊点高度异常区域边界,获取焊点接触面积和焊料流动方向,调整高度异常判定标准,生成动态高度检测规则;从所述动态高度检测规则中提取焊点高度一致性特征,判断信号传输延迟风险;根据所述信号传输延迟风险,标记焊点异常位置集合中的缺陷,生成包含焊点形状异常和焊料润湿不良的缺陷分布图,生成标记后的焊点数据集;根据所述标记后的焊点数据集,结合焊点接触面积和板面形变程度,优化分拣路径,剔除缺陷焊点,生成剔除后的焊点数据集
本发明公开了一种电路板焊点质量评估方法,解决了焊点高度异常、焊料分布不均及信号传输延迟风险等关键业务问题。通过采集焊点三维点云数据,本发明采用主成分分析分解特征矩阵,提取高度异常模式特征向量,精准识别焊料体积缺失与堆积过量区域。针对异常位置,本发明通过高度梯度分布图和聚类分析,划分润湿不良区域边界,自适应调整高度检测规则,生成动态高度一致性特征,结合局部应力集中分析机械强度薄弱环节,评估信号传输延迟风险。对高风险焊点,本发明利用图像分割生成缺陷分布图,标记形状异常与润湿不良点,并结合接触面积与板面形变优化分拣路径,剔除缺陷焊点。本发明显著提升焊点质量检测精度与分拣效率,保障电路板可靠性与信号传输稳定性,适用于高精度电子制造场景。
Smart Images

Figure CN121053106B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a method for evaluating the quality of circuit board solder joints. Background Technology
[0002] Circuit board manufacturing is a core component of the electronics industry, and its quality directly determines product performance and reliability. Solder joint quality is a critical factor, affecting circuit stability and lifespan. In mass production, solder joint height consistency is a crucial quality assessment indicator; any deviation can lead to circuit failure or performance degradation. However, existing testing methods have significant limitations in handling dynamic changes in complex production environments. Traditional techniques often rely on static thresholds or fixed rules, making it difficult to adapt to solder joint height fluctuations caused by changes in materials, equipment, or process parameters during production. These methods often fail to effectively distinguish between systematic deviations and random fluctuations, leading to missed detections or misjudgments, especially in the manufacturing of high-precision electronic products, where they struggle to meet increasingly stringent quality consistency requirements. The uneven distribution of solder joint height is a primary challenge. During production, localized deficiencies or excesses of solder volume can cause height anomalies, affecting the overall flatness of the circuit board. For example, in high-speed circuit board production, insufficient solder in one area may cause signal transmission delays, while excessive solder in another area may lead to short circuit risks. This inconsistency in height distribution not only affects the quality of individual solder joints but also has a cascading effect on the performance stability of the entire circuit board. A deeper challenge lies in the need for the inspection system to dynamically identify patterns of height anomalies. Current technologies struggle to quickly adjust inspection strategies when faced with complex height distribution patterns, especially in mass production where variations in solder joint location and process conditions lead to highly variable anomaly patterns. Traditional fixed algorithms cannot accurately capture these dynamic changes. Therefore, developing a technology capable of dynamically identifying solder joint height anomaly patterns in mass production and adjusting the inspection strategy in real time based on solder volume changes and height gradient effects has become a key issue in ensuring consistent solder joint quality and accurate automatic defect sorting. Summary of the Invention
[0003] This invention provides a method for evaluating the quality of solder joints on a circuit board, mainly including: Three-dimensional point cloud data of solder joints on the circuit board surface are collected. The height difference and height distribution uniformity of the solder joints are analyzed to generate an original point cloud feature matrix. The original point cloud feature matrix is decomposed to obtain height anomaly pattern feature vectors representing uneven solder distribution and abnormal solder joint shapes. Based on the height anomaly pattern feature vectors, uneven solder distribution, missing solder volume, and excessive solder accumulation are analyzed to determine the locations of abnormal solder joint volumes and generate a set of abnormal solder joint locations. Based on the set of abnormal solder joint locations, abrupt changes in solder joint height gradient and surface flatness deviations are analyzed to generate a height gradient distribution map that includes local stress concentration and board surface deformation. Based on the height gradient distribution map, regions of abrupt height gradient changes and surface flatness deviations are defined. The system defines the boundary of an abnormal solder joint height region containing poor solder wetting. For this region boundary, it acquires the solder joint contact area and solder flow direction, adjusts the height anomaly judgment criteria, and generates dynamic height detection rules. It extracts solder joint height consistency features from these rules to assess signal transmission delay risk. Based on this risk, it marks defects in the abnormal solder joint location set, generating a defect distribution map containing abnormal solder joint shape and poor solder wetting, thus generating a marked solder joint dataset. Based on this dataset, and considering the solder joint contact area and board surface deformation, it optimizes the sorting path, removes defective solder joints, and generates a removed solder joint dataset.
[0004] Furthermore, the process involves acquiring three-dimensional point cloud data of solder joints on the circuit board surface, analyzing the height difference and height distribution uniformity of the solder joints, generating an original point cloud feature matrix, decomposing the original point cloud feature matrix, and obtaining height anomaly pattern feature vectors characterizing uneven solder distribution and abnormal solder joint shapes, including: The three-dimensional spatial coordinates of solder joints on the circuit board surface are obtained to generate an original point cloud dataset containing solder joint location information. For each solder joint in the original point cloud dataset, the height difference between the solder joint and its adjacent solder joints is calculated. Point cloud data of solder joint regions where the height difference exceeds a preset threshold are extracted. The actual volume and surface curvature value of the solder are calculated to construct a point cloud feature matrix containing height distribution and shape features. The point cloud feature matrix is decomposed to obtain feature values and corresponding feature vectors. Feature vectors representing the main direction of change in solder joint height distribution are selected to extract height anomaly patterns of solder distribution non-uniformity. Based on the height anomaly patterns, the locations of solder joints with abrupt changes in feature vector values are identified. Solder joints with similar feature vectors are clustered to generate a set of feature vectors for solder joint height anomaly patterns.
[0005] Furthermore, the analysis of the feature vector of the highly abnormal pattern, including uneven solder distribution, missing solder volume, and excessive solder accumulation, determines the location of abnormal solder joint volume and generates a set of abnormal solder joint locations, including: Based on the feature vector of the highly abnormal pattern, the distance between each feature vector and the average feature vector of normal solder joints is calculated, and the three-dimensional coordinate position and volume data of solder joints whose distance exceeds a preset threshold are extracted; for the volume data, the deviation from the standard solder volume is calculated, and it is determined whether the solder volume is missing or excessive, and the abnormal value and corresponding coordinate position are recorded; based on the coordinate position and abnormal value, adjacent abnormal solder joints are identified, and the coordinates and abnormal types of solder joints in the abnormal area are summarized to generate a set of abnormal solder joint positions.
[0006] Furthermore, the step of dividing the height gradient abrupt change and surface flatness deviation areas according to the height gradient distribution map, and determining the boundary of the solder joint height abnormality area containing poor solder wetting, includes: Based on the height gradient distribution map, the coordinates of data points with gradient values exceeding a preset threshold are extracted. The distance and gradient difference between the data points and their neighbors are calculated, and spatial clustering is performed to obtain clusters and the density of points within each cluster. For each cluster, the contact angle between the solder surface contour and the pad plane is calculated, and areas with poor wetting due to contact angles greater than a preset threshold are marked. Surface roughness data is recorded. Based on the poor wetting areas and surface roughness data, the outer contour of the clusters is extracted, adjacent clusters are merged, and an abnormal region range is generated. The boundary points within the abnormal region range are processed, a minimum convex polygon is constructed, the boundary is smoothed, and the boundary of the abnormal solder joint height region containing poor solder wetting is determined.
[0007] Furthermore, for the cluster, the contact angle between the solder surface contour and the pad plane is calculated, poor wetting areas with contact angles greater than a preset threshold are marked, and surface roughness data is recorded, including: For the cluster, fit the solder edge curve, and calculate the angle between the tangent of the curve at the contact point and the pad plane as the contact angle; based on the contact angle, mark the area greater than a preset threshold as the poor wetting area; for the poor wetting area, calculate the roughness value of the surface sampling point, and record the roughness value and the corresponding area coordinates.
[0008] Furthermore, the step of obtaining the solder joint contact area and solder flow direction for the boundary of the abnormal solder joint height region, adjusting the height anomaly judgment criteria, and generating dynamic height detection rules includes: For solder joints within the boundary of the abnormal solder joint height area, the solder joint contour is extracted, the overlap area between the solder joint contour and the pad contour is calculated, and the contact area ratio is obtained. Based on the contact area ratio and the solder joint height distribution, the height difference vector is calculated to determine the solder flow direction. Based on the flow direction and the contact area ratio, a dynamically adjusted judgment threshold is generated. Based on the judgment threshold, judgment criteria corresponding to the solder joint size are set according to categories, and integrated to form dynamic height detection rules.
[0009] Furthermore, the step of extracting solder joint height consistency features from the dynamic height detection rules to determine signal transmission delay risk includes: Extract the solder joint height value and judgment threshold range from the dynamic height detection rules, calculate the standard deviation of solder joint height within the same functional area, and identify solder joint groups whose deviation exceeds the preset range; for the solder joint groups, calculate the solder joint stress value by combining the stress peak value of local stress concentration data, and identify weak links that exceed the material yield strength; based on the weak links, calculate the signal transmission path impedance change and determine the delay risk caused by the impedance change.
[0010] Furthermore, based on the signal transmission delay risk, defects in the set of abnormal solder joint locations are marked, a defect distribution map containing abnormal solder joint shape and poor solder wetting is generated, and a marked solder joint dataset is generated, including: Based on the signal transmission delay risk, the coordinates and risk values of abnormal solder joints are extracted from the set of abnormal solder joint locations. A marking type is set and color markings are added to the image. The marked image is segmented to determine the solder joint contour boundary, the shape feature parameters of the contour are calculated, and solder joints with abnormal shapes are identified. For the solder joints with abnormal shapes, the grayscale gradient value and direction are calculated, the gradient direction distribution is statistically analyzed, and wetting defects are identified. Based on the defect category, a pixel label matrix is constructed, and the solder joint coordinates and defect descriptions are integrated to generate a marked solder joint dataset.
[0011] Furthermore, the step of optimizing the sorting path based on the marked solder joint dataset, combined with the solder joint contact area and the degree of board surface deformation, and removing defective solder joints to generate a discarded solder joint dataset includes: Based on the labeled solder joint dataset, the contact area and defect code of the solder joint are extracted, the contact area ratio and the degree of board surface deformation are calculated, and the flatness value is calculated. For areas where the flatness value is lower than a preset threshold, the shortest path for the sorting equipment to access the defective solder joint is calculated, the sorting priority is determined, and a sorting path sequence is generated. Based on the sorting path sequence, the defective solder joint records are deleted, the pass rate of the remaining solder joints is calculated, and a discarded solder joint dataset is generated.
[0012] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention discloses a method for evaluating the quality of circuit board solder joints, solving key business problems such as abnormal solder joint height, uneven solder distribution, and signal transmission delay risks. By collecting 3D point cloud data of solder joints, this invention uses principal component analysis to decompose the feature matrix, extract feature vectors of height anomaly patterns, and accurately identify areas with missing solder volume and excessive accumulation. For abnormal locations, this invention uses height gradient distribution maps and cluster analysis to delineate the boundaries of poor wetting areas, adaptively adjusts height detection rules, generates dynamic height consistency features, and combines local stress concentration analysis to identify weak points in mechanical strength, assessing the risk of signal transmission delay. For high-risk solder joints, this invention uses image segmentation to generate defect distribution maps, marks points with abnormal shapes and poor wetting, and optimizes the sorting path by combining contact area and board surface deformation to eliminate defective solder joints. This invention significantly improves the accuracy of solder joint quality inspection and sorting efficiency, ensuring the reliability of circuit boards and the stability of signal transmission, and is suitable for high-precision electronic manufacturing scenarios. Attached Figure Description
[0013] Figure 1 This is a flowchart of a circuit board solder joint quality assessment method according to the present invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0015] like Figure 1 This embodiment of a circuit board solder joint quality assessment method may specifically include: S101. Collect three-dimensional point cloud data of solder joints on the surface of the circuit board, analyze the height difference and height distribution uniformity of the solder joints, and obtain the height anomaly pattern feature vector of uneven solder distribution and abnormal solder joint shape.
[0016] A structured light scanner is used to scan the circuit board surface line by line to obtain the three-dimensional spatial coordinates of the solder joints. The X, Y, and Z coordinate values of each sampling point are recorded at a sampling interval of 0.05 mm. Through coordinate translation and rotation transformations, all scanned data are unified to the circuit board reference coordinate system, generating an original point cloud dataset containing solder joint location information. For each solder joint in the original point cloud dataset, the height difference between the solder joint and its eight adjacent solder joints is calculated. If the height difference exceeds a preset threshold, the point cloud data of the solder joint area is extracted. The actual volume of the solder is obtained by calculating the volume of the bounding volume of the point cloud. The missing or excessive solder state is determined by comparing it with the standard solder volume. At the same time, the curvature value of each sampling point on the solder joint surface and the height gradient between adjacent points are calculated to construct a point cloud feature matrix containing height distribution and shape features. Principal component analysis is performed on the point cloud feature matrix to calculate the covariance matrix of the feature matrix. Eigenvalues and corresponding eigenvectors are obtained through eigenvalue decomposition. Principal components with a cumulative contribution rate of 85% are selected according to the size of the eigenvalues. The eigenvectors corresponding to the principal components represent the main change direction of the solder joint height distribution, and the height anomaly pattern of solder distribution non-uniformity is extracted. Based on the feature vector distribution in the high anomaly pattern, the solder joint locations with abrupt changes in feature vector values are identified. The gradient direction angle and radius of curvature at the abrupt change locations are calculated. The K-means clustering method is used to group solder joints with similar feature vectors, determine the typical feature combinations of solder accumulation and missing solder, and generate a feature vector set for the high anomaly pattern of solder joints.
[0017] For example, in one implementation, a structured light scanner uses phase-shifting grating projection technology to scan the surface of a circuit board. During the scanning process, the projector projects multiple sets of sinusoidal grating fringes with different phases onto the circuit board surface, and the camera captures the deformed grating image from another angle. Depth information corresponding to each pixel is obtained through phase calculation, thereby reconstructing the three-dimensional topography of the solder joint surface. The coordinate translation and rotation transformation refers to converting the local coordinate system data obtained from the scan to the circuit board reference coordinate system. The transformation process includes calculating the offset between the center point of the scanned area and the origin of the circuit board, determining the angle between the scanning direction and the reference axis, and achieving coordinate unification through a rotation matrix and a translation vector.
[0018] Specifically, when calculating the solder joint height difference, an eight-neighborhood search window is established for the target solder joint, and the window size is adaptively adjusted according to the solder joint spacing. For BGA packaged circuit boards, the solder joints are distributed in a regular array, and adjacent solder joints are defined as the eight solder joints closest to each other in the horizontal, vertical, and diagonal directions. The height difference between the highest point of the target solder joint and the highest point of each adjacent solder joint is calculated to form a height difference vector. When the height difference exceeds a preset threshold, it indicates that there may be an abnormal solder distribution in that area. The preset threshold is set according to the requirements for solder joint height consistency in the IPC-A-610 standard, and is typically 15% of the standard solder joint height.
[0019] For example, the solder volume is calculated using a point cloud bounding volume method. First, all point cloud data for the target solder joint area is extracted. A minimum bounding volume of the point cloud is constructed using a convex hull algorithm. Then, a Monte Carlo integration method is used to estimate the actual volume within the bounding volume. Specifically, a large number of sampling points are randomly generated within the bounding volume. It is determined whether each sampling point is below the solder joint surface. The proportion of sampling points below the surface is counted and multiplied by the total volume of the bounding volume to obtain the actual solder volume. The calculated actual volume is compared with a standard solder volume, which is pre-calculated based on the pad size and solder paste printing thickness. A deviation exceeding 20% is considered as insufficient or excessive solder.
[0020] In one possible implementation, the curvature value is calculated based on a local quadratic surface fitting of the solder joint surface. For each sampling point on the solder joint surface, point cloud data within its neighborhood is selected, and the quadratic surface equation z = ax² + bxy + cy² + dx + ey + f is fitted using the least squares method, where a, b, c, d, e, and f are fitting coefficients. The principal curvature and mean curvature of that point are calculated by solving the second-order partial derivatives of the surface equation. The height gradient is obtained by dividing the height difference between adjacent sampling points by the horizontal distance, with the gradient direction pointing in the direction of the fastest increase in height.
[0021] It should be noted that the application principle of principal component analysis in solder joint anomaly detection is based on data dimensionality reduction and feature extraction. Each row of the point cloud feature matrix represents a solder joint, and each column represents a feature attribute, including height, curvature, gradient, etc. The covariance matrix of the feature matrix is calculated, and its elements reflect the correlation between different features. Eigenvalues are obtained through eigenvalue decomposition. and the corresponding feature vectors The eigenvalue represents the magnitude of the data variance along the direction of the principal component, and the eigenvector represents the direction of the principal component. The top k principal components with a cumulative contribution rate of 85% are selected, and the contribution rate is calculated using the following formula: , where i ranges from 1 to k, and j ranges from 1 to n. The eigenvectors corresponding to these principal components constitute the dimensionality-reduced feature space, in which the non-uniformity of solder distribution manifests as a specific distribution pattern.
[0022] Preferably, the implementation process of the K-means clustering algorithm includes three stages: initializing cluster centers, iterative optimization, and convergence judgment. During initialization, the number of clusters k is set according to the type of solder joint anomaly, typically set to 3 classes, corresponding to normal solder joints, missing solder, and excessive solder, respectively. k vectors are randomly selected from the feature vector set as initial cluster centers. During iteration, the Euclidean distance from each solder joint feature vector to each cluster center is calculated, and the solder joint is assigned to the closest class. The mean of all feature vectors within each class is recalculated as the new cluster center. The iteration is repeated until the cluster centers no longer change significantly or the maximum number of iterations is reached.
[0023] In one embodiment, the gradient direction angle and radius of curvature are calculated to accurately locate abrupt changes in solder joint shape. The gradient direction angle is defined as the angle between the gradient vector and the horizontal plane, calculated using the arctangent function. The radius of curvature is the reciprocal of the curvature, reflecting the degree of curvature of the solder joint surface. When the gradient direction angle changes drastically or the radius of curvature is less than a threshold, the location is identified as a shape abrupt change point. These abrupt changes typically occur at the edges of solder build-ups or in depressions where solder is missing.
[0024] For example, when processing fine-pitch QFP packaged circuit boards, where the solder joint spacing is only 0.4 mm, even minute variations in solder joint height can affect soldering quality. The extracted feature vectors can accurately reflect the subtle differences in solder joint height distribution, and the clustering results group solder joints with similar defect characteristics into one category.
[0025] S102. Based on the feature vector of the high anomaly pattern, determine the abnormal location of the solder joint volume and generate a set of abnormal solder joint locations.
[0026] Based on the feature vectors of highly abnormal patterns, the Euclidean distance between each feature vector and the mean of the feature vectors of normal solder joints is calculated. The mean of the feature vectors of normal solder joints is obtained by statistical analysis of qualified circuit board samples. If the Euclidean distance exceeds a preset abnormal threshold, the three-dimensional coordinate position and volume data of the solder joint are extracted, where the volume data is obtained by point cloud enclosing volume components. For the volume data, the difference between the volume data and the standard solder volume is calculated to obtain the volume deviation value. When the volume deviation value is negative and the absolute value exceeds 20% of the standard volume, it is determined that the solder volume is missing, and the missing value is recorded. When the volume deviation value is positive and exceeds 30% of the standard volume, it is determined that the solder is over-accumulated, and the excess value is recorded. The determination result is associated with the corresponding three-dimensional coordinate position and stored. Based on the determination result and the three-dimensional coordinate position, the distance threshold method is used to identify adjacent abnormal solder joints. When the distance between two abnormal solder joints is less than twice the standard spacing between solder joints, they are determined to be in the same abnormal area. The coordinate positions and abnormal types of all solder joints in the abnormal area are summarized to generate a set of abnormal solder joint positions.
[0027] For example, in one implementation, the Euclidean distance is calculated based on a multi-dimensional feature space. The feature vector of each solder joint's height anomaly pattern contains multiple dimensions, each representing a feature attribute. The mean feature vector of normal solder joints is obtained by collecting samples from at least 100 qualified circuit boards. The feature vectors of all solder joints on each circuit board are statistically analyzed, outliers are removed, and the average value of each dimension is calculated. The Euclidean distance is calculated as the square root of the sum of the squares of the differences between each dimension, reflecting the degree of deviation between the tested solder joint and normal solder joints in the feature space.
[0028] Specifically, the anomaly threshold is set using statistical methods. By statistically analyzing the Euclidean distances between the feature vectors of all solder joints in the qualified samples and the mean, the standard deviation σ of the distance distribution is calculated. The anomaly threshold is then set to the mean plus 3σ, conforming to the 3σ principle of a normal distribution. When the Euclidean distance of a solder joint exceeds this threshold, it indicates that its characteristics significantly deviate from the normal range.
[0029] It should be noted that volume data is obtained through point cloud-enclosed volume integrals. The point cloud of the solder joint area is triangulated to form a closed 3D surface model, and the volume enclosed by the closed surface is calculated using the divergence theorem. The standard solder volume is predetermined based on the pad diameter, solder paste thickness, and reflow soldering process parameters; different component models correspond to different standard volume values. The volume deviation value is equal to the measured volume minus the standard volume, and the deviation percentage is equal to the deviation value divided by the standard volume.
[0030] Preferably, a tiered threshold is used to determine solder deficiency and excessive buildup. Slight deficiency is defined as a negative deviation between 10% and 20%, while severe deficiency exceeds 20%. Slight excess is defined as a positive deviation between 15% and 30%, while severe excess exceeds 30%. Different levels of abnormality correspond to different handling strategies; severe abnormalities are directly marked as unqualified, while minor abnormalities proceed to the re-inspection process.
[0031] In one possible implementation, the distance threshold method is achieved by constructing a solder joint adjacency graph. Each anomalous solder joint is treated as a node, and the Euclidean distance between nodes is calculated. An edge is established when the distance is less than twice the standard solder joint spacing. Through graph connectivity analysis, connected nodes are grouped into the same anomalous region. The standard solder joint spacing is determined according to the circuit board design specifications; it is typically 0.8 mm for BGA packages and 0.5 mm for QFP packages.
[0032] For example, the data structure of the solder joint anomaly location set includes three elements: coordinate information, anomaly type, and anomaly level. The coordinate information records the X and Y positions of the solder joints in the circuit board coordinate system, the anomaly type is identified as missing or excessive, and the anomaly level is divided into minor and severe.
[0033] S103. If the solder volume is missing or the solder accumulation exceeds the preset threshold at the abnormal location of the solder joint volume, analyze the abrupt change in solder joint height gradient and surface flatness deviation, and generate a height gradient distribution map that includes local stress concentration and the degree of board surface deformation.
[0034] If the solder volume is missing or excessive at an abnormal solder joint location, exceeding a preset threshold, height sampling is performed at 0.02 mm intervals at this abnormal location. The gradient value is calculated by dividing the height difference between adjacent sampling points by the horizontal distance. When the difference between adjacent gradient values exceeds a preset abrupt change threshold, it is marked as a gradient abrupt change location, and the height difference data of the gradient abrupt change location is extracted. Based on the height difference data, the vertical deviation distance of each sampling point on the solder joint surface relative to the fitted reference plane is calculated as the flatness deviation value. The stress value generated at each deviation point is calculated using the material mechanics formula F=E×ε, where E is Young's modulus and ε is the strain. Regions where the stress value exceeds a preset stress threshold are identified as local stress concentration areas. For the local stress concentration area, the angle between the surface normal vector of this region and the reference plane normal vector is extracted as the torsion angle, and the deformation direction vector is calculated. The deformation direction vector is obtained by weighted averaging of the displacement vectors of adjacent points. The maximum deviation between the actual position and the theoretical position of the board surface is calculated based on the deformation direction vector as the deformation amplitude, and the coordinates of the region where the deformation amplitude exceeds the preset deformation threshold are recorded. Bilinear interpolation is used to spatially map the gradient abrupt change location data, stress concentration area data, and deformation area coordinates. A three-dimensional data matrix containing gradient values, stress values, and deformation amplitude is constructed according to the grid division method. Contour maps are drawn based on the three-dimensional data matrix, and data from each layer are superimposed to generate a height gradient distribution map containing local stress concentration and plate surface deformation degree.
[0035] For example, in one implementation, the height sampling process employs the principle of laser triangulation for precise measurement. A laser projects a linear beam of light onto the solder joint surface at a fixed angle, and a CCD camera captures the reflected light from another angle. The height value of each sampling point is calculated based on triangulation relationships. The sampling interval of 0.02 mm is set based on the Nyquist sampling theorem to ensure the capture of minute undulations on the solder joint surface. The gradient value is calculated by dividing the height difference between two adjacent points by the horizontal distance, reflecting the degree of surface tilt. The determination of gradient abrupt changes uses a difference method to calculate the rate of change of adjacent gradient values. When the rate of change exceeds a preset threshold, it indicates that there is a sharp change in shape at that location.
[0036] It should be noted that fitting the reference plane is a crucial prerequisite for stress calculation. By fitting the point cloud of the normal area around the weld joint to the plane using the least squares method, the equation z = ax + by + c is obtained, where a, b, and c are the fitting coefficients. The vertical distance from each sampling point to this plane is the flatness deviation value. This deviation reflects the local deformation of the weld joint surface; a larger deviation indicates a higher likelihood of quality problems in that area.
[0037] Specifically, stress values are calculated based on Hooke's Law and the theory of materials mechanics. Young's modulus E is an inherent property of the material, typically 20 GPa for FR-4 circuit board substrates. Strain ε is calculated by dividing the deviation distance by the solder joint thickness, representing the relative degree of deformation of the material. The stress value F = E × ε reflects the internal stress state of the material. When there are height anomalies on the solder joint surface, stress concentration occurs within the material. Stress concentration zones are identified by setting a threshold, typically a certain proportion of the material's yield strength, to prevent fatigue failure during normal use. Stress concentration not only affects the mechanical strength of the solder joint but can also lead to the generation and propagation of microcracks, thus affecting the long-term reliability of the circuit.
[0038] Preferably, the torsion angle is calculated using a vector analysis method. First, the surface normal vector of the local area is calculated. By fitting a microplane to multiple sampling points within this area, the normal vector of the plane equation is solved. Then, the angle between this normal vector and the normal vector of the reference plane is calculated. The size of the angle reflects the degree of surface torsion. A torsion angle exceeding 15 degrees usually indicates a serious welding defect.
[0039] In one possible implementation, determining the deformation direction vector involves displacement field analysis. The displacement vector at each sampling point is calculated by comparing the actual shape of the weld joint with its theoretical shape. A weighted average of the displacement vectors within a local region is then performed, with the weight inversely proportional to the distance from the center point, to obtain the dominant deformation direction for that region. The deformation magnitude is obtained by calculating the magnitude of the displacement vector, reflecting the severity of the deformation.
[0040] For example, the application of bilinear interpolation in spatial mapping ensures data continuity. For any point in the grid, its value is calculated by weighted averaging of the values of four surrounding known points. The interpolation formula is f(x,y)=(1-u)(1-v)f00+u(1-v)f10+(1-u)vf01+uvf11, where u and v are normalized coordinates, and f00, f10, f01, and f11 are the values of the four corner points. This interpolation method guarantees a smooth transition of the gradient distribution. Furthermore, the construction of the three-dimensional data matrix adopts a hierarchical storage structure. The first layer stores gradient values, the second layer stores stress values, and the third layer stores deformation amplitude. Each layer of data is organized according to a unified grid coordinate system, which facilitates subsequent data fusion and visualization processing. The grid resolution is adaptively adjusted according to the weld point size, with a typical value of 0.1 mm.
[0041] Understandably, contour maps are drawn using a tracking algorithm. All points with specific values are extracted from the data matrix, and the precise positions of the contour lines on the grid boundaries are determined through linear interpolation. These points are then connected to form closed or open contour lines. Contour lines with different values are represented by different colors or line styles, visually demonstrating the distribution patterns of the height gradient.
[0042] For example, when processing solder joints of high-power devices, stress concentration often occurs around the solder joints due to thermal stress. The height gradient distribution map constructed using the above method can clearly show the location and range of stress concentration areas, with red areas representing high-stress areas and blue areas representing low-stress areas. After superimposing deformation data, the overall warping trend of the board surface can also be observed.
[0043] S104. Based on the height gradient distribution map, divide the areas of height gradient abrupt change and surface flatness deviation, and determine the boundary of the circuit board solder joint height abnormality area containing poor solder wetting.
[0044] Based on the gradient peak data in the height gradient distribution map, the coordinates of data points with gradient values exceeding a preset threshold are extracted. The distance and gradient difference between each data point and other points in its neighborhood are calculated as a similarity metric. The DBSCAN clustering algorithm is used to perform spatial clustering based on the similarity metric, with the neighborhood radius and minimum number of points as algorithm parameters, resulting in multiple clusters and their corresponding intra-cluster point densities. For each cluster, the contact angle between the solder surface contour and the pad plane is calculated. The contact angle is obtained by fitting the solder edge curve and calculating the angle between its tangent at the contact point and the pad plane. If the contact angle is greater than a preset wetting angle threshold, it is marked as a poor wetting area, and the surface roughness data of this area is recorded. Based on the poor wetting area and surface roughness data, dilatation and corrosion morphology operations are performed to extract the outer contour of each cluster. The shortest distance between adjacent clusters is calculated. When the shortest distance is less than a preset merging threshold, adjacent clusters are merged to obtain the merged abnormal area range. The convex hull algorithm is used to process all boundary points within the abnormal region, and a minimum convex polygon containing all abnormal points is constructed. The boundary of the convex polygon is smoothed by spline curve fitting, and the boundary of the abnormal region of circuit board solder joint height containing poor solder wetting is determined.
[0045] For example, in one implementation, the application of the DBSCAN clustering algorithm requires the reasonable setting of two key parameters: the neighborhood radius ε and the minimum number of points MinPts. The neighborhood radius is determined based on the resolution of the height gradient distribution map, typically set to 2-3 times the average distance between adjacent data points. The minimum number of points is calculated based on the typical size and sampling density of the solder joint, ensuring that a single solder joint region contains at least enough sampling points. The similarity metric uses a hybrid distance function, comprehensively considering the spatial distance d_spatial² and the gradient difference d_gradient, calculated as d=√(α×d_spatial²+β×d_gradient²), where α and β are weighting coefficients, adjusted according to actual detection requirements. During algorithm execution, starting from any unvisited point, all points within its ε-neighborhood are searched. If the number of points in the neighborhood is not less than MinPts, a new cluster is created and recursively expanded; otherwise, it is marked as a noise point.
[0046] It should be noted that the contact angle measurement is based on Young's equation and wetting theory. The wetting process of solder on the pad surface is affected by surface tension, interfacial tension, and gravity. The contact angle reflects the wetting performance between the solder and the pad; the smaller the angle, the better the wetting performance. In actual measurement, the contour curve of the solder edge is first fitted using the least squares method to obtain the polynomial equation. y is the ordinate of a point on the solder edge profile curve. x is the abscissa of a point on the solder edge profile curve. These are the coefficients to be fitted. At the contact point between the solder and the pad, the first derivative of the curve is calculated to obtain the slope of the tangent, thus determining the direction of the tangent. The contact angle is the angle between the tangent and the pad plane. When the contact angle exceeds a preset threshold, it indicates that the solder has not spread sufficiently, resulting in poor wetting. Poor wetting can be caused by pad oxidation, insufficient flux activity, or improper reflow temperature profile settings. This defect can lead to reduced mechanical strength of the solder joint, making it prone to fatigue failure under temperature cycling stress.
[0047] Specifically, surface roughness data is obtained by calculating the standard deviation of height values within a local area. For each poorly wetted area, a 5×5 sampling window is selected, and the average height and standard deviation of all points within the window are calculated. The roughness value Ra is defined as the arithmetic mean of the height deviations, reflecting the degree of microscopic unevenness of the surface.
[0048] Preferably, the dilation operation in the morphological operations uses a circular structuring element with a radius set to one-tenth of the minimum solder joint size. The dilation process expands the boundaries of the clusters outward, filling in small holes and disconnected areas. The erosion operation uses the same structuring element to remove burrs and isolated points from the boundaries. By performing a closing operation that combines dilation and erosion, the region is smoothed and normalized.
[0049] In one possible implementation, the merging of adjacent clusters is based on the shortest distance criterion. The Euclidean distances between all point pairs in each pair of adjacent clusters are calculated, and the minimum value is taken as the inter-cluster distance. The merging threshold is dynamically set based on the standard spacing between solder joints, typically one-quarter of the standard spacing. When the distance between two clusters is less than this threshold and they have similar anomalous characteristics, they are merged into a larger anomalous region.
[0050] For example, the convex hull algorithm uses the Graham scan method for efficient computation. First, the point with the smallest y-coordinate among all boundary points is found as the starting point. Then, the remaining points are sorted according to the polar angle of the line connecting them to the starting point. The sorted points are processed sequentially, and the cross product of vectors is used to determine the direction of rotation. Points forming counter-clockwise rotations are retained, while those forming clockwise rotations are deleted, ultimately yielding the sequence of convex hull vertices. Further, spline curve fitting is used to smooth the convex hull boundary. A cubic B-spline curve is used, and the curve shape is adjusted using control points. The positions of the control points are determined based on the convex hull vertices and curvature changes. The density of control points is increased at locations with higher curvature to ensure that the smoothed boundary retains its original shape characteristics while eliminating jagged, irregular edges. The smoothed boundary more accurately reflects the actual extent of the abnormal region.
[0051] Understandably, the final identified boundary of the anomaly area is represented by a closed curve, with each point on the curve having a specific coordinate value. All solder joints inside the boundary are marked as having a high degree of anomaly and require further quality assessment or rework.
[0052] For example, when processing high-density BGA packaged circuit boards, there may be hundreds of solder joints under a single chip. The abnormal area boundaries identified by the above method can accurately delineate groups of solder joints with poor wetting issues.
[0053] S105. For the boundary of the abnormal solder joint height area of the circuit board, obtain the contact area of the solder joint and the direction of solder flow, adaptively adjust the height abnormality judgment standard with an adaptive threshold, and generate dynamic height detection rules.
[0054] For solder joints within the boundary of abnormal solder joint height areas on the circuit board, the solder joint contour is extracted through image binarization processing. The overlap area between the solder joint contour and the pad contour is calculated, and the overlap area is divided by the total pad area to obtain the contact area ratio. The contact area ratio value of each solder joint is recorded. Based on the contact area ratio value and solder joint height distribution data, the height difference vector between adjacent sampling points is calculated. The main direction of solder flow is determined by the gradient descent direction of the vector field. When the angle of the flow direction deviating from the geometric center of the pad exceeds a preset threshold, the solder joint is marked as a flow abnormality solder joint. Based on the distribution density and contact area ratio value of the flow abnormality solder joints, an adaptive threshold adjustment function is constructed. ,in Let ρ be the baseline threshold, ρ be the density of abnormal solder joints, and α be the adjustment coefficient. The value of α is determined through statistical analysis of historical batch data, resulting in a dynamically adjusted height anomaly judgment threshold. Using this dynamically adjusted height anomaly judgment threshold, different judgment criteria are set according to solder joint size classification. Large-sized solder joints use a more lenient threshold range, while small-sized solder joints use a more stringent threshold range. The judgment criteria for various types of solder joints are integrated to form a dynamic height detection rule that includes threshold ranges and judgment conditions.
[0055] For example, in one implementation, the contact area is calculated using digital image processing technology. First, the optical image of the solder joint area is converted to grayscale, and then the Otsu thresholding method is used to automatically determine the binarization threshold. In the binarized image, white areas represent solder joints, and black areas represent the background. The solder joint contour and pad contour are extracted using an edge detection algorithm, and the contours are smoothed using a polygon approximation method. The overlapping area is calculated using Boolean operations, performing a logical AND operation on the two contour areas and counting the number of pixels in the resulting area. The contact area ratio is equal to the number of pixels in the overlapping area divided by the total number of pixels in the pad area; this ratio reflects the degree of solder coverage on the pad.
[0056] It should be noted that the analysis of solder flow direction is based on the gradient theory of the height field. The solder joint surface can be regarded as a continuous height field h(x,y), where x and y are planar coordinates, and h is the height value at that point. The height difference vector is obtained by calculating the height difference between adjacent sampling points. The direction of flow is the direction of the fastest increase in height. During reflow soldering, solder, under the influence of gravity and surface tension, tends to flow from high to low, thus the flow direction is opposite to the gradient direction. The principal direction of flow is obtained by integrating the difference vector over the entire solder joint area. The principal direction is represented by a unit vector, and the angle between it and the line connecting it to the geometric center of the solder pad reflects the degree of flow deviation. When the deviation angle is too large, it indicates that the solder is not evenly distributed, and voids or off-center soldering may exist.
[0057] Specifically, the construction of the adaptive threshold adjustment function involves a statistical learning process. Baseline threshold. Statistical analysis of qualified product samples determines the initial range, typically using the mean of the normal solder joint height distribution plus or minus three standard deviations. Abnormal solder joint density ρ is defined as the number of abnormal solder joints per unit area, reflecting the quality status of a local area. Determining the adjustment coefficient α requires collecting historical data from multiple production batches to establish a model relating abnormal density to the final product pass rate. Regression analysis yields the optimal value of α, ensuring the adjusted threshold balances detection sensitivity and false alarm rate. When the abnormal density in a certain area is high, it indicates a potential systemic problem, requiring a wider threshold to avoid excessive alarms; conversely, when the abnormal density is low, the threshold can be tightened to improve detection accuracy. This dynamic adjustment mechanism adapts to normal fluctuations during production, avoiding over- or under-detection issues caused by fixed thresholds.
[0058] Preferably, the solder joint size classification is automatically completed using a clustering method. Solder joints are categorized into three types—large, medium, and small—based on pad diameter and solder joint volume. Large solder joints are typically used in power devices that carry high currents and have relatively relaxed requirements for height consistency; small solder joints are mostly used for precision signal transmission and are more sensitive to height deviations.
[0059] In one possible implementation, the judgment criteria are set considering the functional characteristics of the solder joints. The threshold range for power pin solder joints is set to ±20% of the standard height, the threshold range for signal pin solder joints is set to ±10%, and the threshold range for ground pin solder joints is set to ±15%. This differentiated setting is based on the failure mechanisms and reliability requirements of different types of solder joints.
[0060] For example, the dynamic height detection rules are organized using a decision tree structure. The root node determines the solder joint size, the second layer determines the function type, and the third layer determines the specific height threshold. Each leaf node contains a set of decision conditions, including height range, contact area requirements, and flow deviation angle limits. Furthermore, the rule update mechanism employs incremental learning. After each production batch is completed, the batch's detection data and final quality results are collected, and the detection accuracy and recall are calculated. If the accuracy is lower than the set standard, the threshold range for the corresponding category is adjusted; if the recall is insufficient, new decision conditions are added.
[0061] Understandably, the execution process of dynamic detection rules includes two stages: rule matching and result output. For a solder joint to be inspected, the corresponding leaf node is first found in the decision tree based on its attributes. Then, the judgment conditions of that node are applied for evaluation, and finally, a judgment result of "qualified," "unqualified," or "re-inspection required" is output.
[0062] For example, when dealing with mixed-package circuit boards, there may be components with multiple package specifications such as 0402, 0603, and 0805 on the same board.
[0063] S106. Extract the weld joint height consistency feature from the dynamic height detection rules, combine it with local stress concentration data to analyze the weak points in the mechanical strength of the weld joint, and judge the risk of signal transmission delay.
[0064] The height values and corresponding threshold ranges of each solder joint are extracted from the dynamic height detection rules. The standard deviation of solder joint heights within the same functional area is calculated as a consistency value. Based on this consistency value, solder joint groups with height deviations exceeding a preset range are identified, and the coordinate positions and deviation degrees of each solder joint within the group are recorded. For the coordinate positions and deviation degrees of the solder joint groups, combined with the stress peak distribution in local stress concentration data, the stress value borne by the solder joint is calculated using the material mechanics formula σ=F / A, where F is the applied force and A is the area of force application. Locations where the stress value exceeds a preset proportion of the material's yield strength are identified as weak points in mechanical strength, and the specific coordinates of these weak points are determined. Based on the specific coordinates of these weak points, the impedance change when the signal transmission path passes through this location is calculated. This impedance change is obtained by summing the increase in solder joint contact resistance and the change in parasitic inductance. When the increase in signal propagation time caused by the impedance change exceeds a preset delay threshold, a signal transmission delay risk is identified.
[0065] For example, in one implementation, the calculation of the height consistency value is based on statistical principles. Functional areas are divided according to the electrical functions of the circuit board, such as power supply areas, analog signal areas, digital signal areas, and grounding areas. Solder joints within each area should have similar height characteristics. The standard deviation is calculated using the formula σ = √(Σ(xi-μ)² / n), where xi is the height value of each solder joint, μ is the average height, and n is the number of solder joints. The smaller the standard deviation, the more consistent the solder joint heights within the area. When the standard deviation exceeds a preset threshold, it indicates that abnormal solder joints are affecting overall consistency.
[0066] It should be noted that the mechanical strength assessment uses stress concentration theory. When a solder joint is subjected to external forces, stress concentration may occur at certain locations due to irregular geometry or material discontinuities. The stress value σ is calculated using the material mechanics formula σ=F / A, where F is the force exerted on the solder joint, and A is the effective stress-bearing area. The force F includes the superposition of thermal stress, mechanical vibration stress, and electromagnetic stress. When the calculated stress value approaches or exceeds the yield strength of the solder, that location becomes a potential failure point. These weak points are prone to fatigue cracking during long-term use, leading to open-circuit failure of the solder joint.
[0067] Specifically, the calculation of impedance changes involves the parasitic parameters of the circuit. The contact resistance of a solder joint is determined by the contact area and contact pressure. When there are defects in the solder joint, the effective contact area decreases, and the contact resistance increases. Parasitic inductance is related to the geometry of the solder joint; abnormal solder joint height will change the current path length, thus affecting the parasitic inductance value.
[0068] Preferably, the signal transmission delay is determined using transmission line theory. The signal propagation time on the transmission path is t = l / v, where l is the transmission path length and v is the signal propagation speed. The propagation speed v = c / √εr, where c is the speed of light and εr is the relative permittivity of the medium. When the solder joint impedance changes, signal reflection and attenuation occur at that location, leading to a reduction in the effective propagation speed.
[0069] In one possible implementation, the delay threshold is determined based on the signal frequency and system timing requirements. For high-speed digital signals, the delay threshold is typically set to 5% of the clock period; for analog signals, the delay threshold is set based on phase margin requirements.
[0070] For example, when dealing with the solder joints of DDR memory modules, the signal transmission rate reaches several GHz, and even a delay of picoseconds can affect the correct transmission of data.
[0071] S107. If the risk of signal transmission delay is higher than the preset threshold, perform defect marking on the set of abnormal solder joint locations, generate a defect distribution map containing abnormal solder joint shape and poor solder wetting, and generate a marked solder joint dataset.
[0072] If the signal transmission delay risk exceeds a preset threshold, the coordinates and risk values of each abnormal solder joint are extracted from the set of abnormal solder joint locations. A marking type is set based on the risk value: high risk values are marked in red, medium risk values in yellow, and low risk values in blue. Color markings are added to the corresponding coordinate positions in the original image to obtain a preliminary marked image. A region growing segmentation algorithm is executed on the preliminary marked image. Starting from each color-marked point as a seed point, the algorithm expands outwards based on the condition that the gray-level difference between adjacent pixels is less than a preset threshold to determine the solder joint contour boundary. The roundness value, aspect ratio value, and edge roughness value of the contour are calculated as shape feature parameters. When the shape feature parameters deviate from the standard range, the solder joint is determined to have a shape abnormality. For the contour boundary of the shape abnormality solder joint, the gray-level gradient value and gradient direction of each point on the boundary are calculated. The distribution frequency of the gradient direction within the range of 0 to 360 degrees is statistically analyzed. When the standard deviation of the gradient direction distribution exceeds a preset threshold, it is determined to be a poor wetting condition. A defect category code is assigned based on the combination of shape abnormality and poor wetting. A pixel label matrix is constructed using the defect category encoding. The number of rows and columns of the matrix corresponds to the number of pixels in the image. Each element stores the defect code of the corresponding pixel. The pixel label matrix, solder joint coordinate information, and defect category description are integrated and organized according to a data structure that includes index number, coordinate value, and defect type to generate a labeled solder joint dataset.
[0073] For example, in one implementation, the color coding of risk levels uses a heatmap principle. Red corresponds to high-risk areas, indicating signal transmission delays exceeding 10% of the clock cycle; yellow corresponds to medium risk, with delays between 5% and 10%; and blue corresponds to low risk, with delays between 2% and 5%. Color coding not only provides intuitive visual feedback but also contains quantitative risk information. During the coding process, the pixel area occupied by each abnormal solder joint in the image is determined based on its actual size to avoid information loss due to overlapping coding. The coded image uses the RGB color space, with the red channel value proportional to the risk level, facilitating subsequent automatic identification and processing.
[0074] It's important to note that the core of the region growing segmentation algorithm lies in the selection of seed points and the setting of growth criteria. A seed point is the center pixel of a color marker, with a clearly defined coordinate position. The growth criterion is based on gray-level similarity and is defined as the absolute value of the gray-level difference between the current pixel and the seed point. Starting from the seed point, the algorithm checks its eight neighboring pixels. If the gray-level difference of a neighboring pixel is less than a preset threshold and it has not been visited, then that pixel is added to the current region as a new growth point. This process is repeated recursively until no pixel meeting the criteria can be added. During the growth process, the coordinates of all included pixels are recorded, forming the complete outline of the solder joint. The choice of threshold affects the segmentation accuracy; too small a threshold leads to undersegmentation and incomplete solder joint outlines; too large a threshold leads to oversegmentation, misclassifying the background as a solder joint area. In practical applications, the threshold is typically set to 0.5-1.5 times the standard deviation of the image gray levels, dynamically adjusted according to image quality.
[0075] Specifically, the calculation of shape characteristic parameters involves geometric morphological analysis. Roundness is defined as 4π × area / perimeter², with a roundness value of 1 for a perfect circle and less than 1 for an ellipse or irregular shape. Aspect ratio is calculated using the minimum bounding rectangle, i.e., the ratio of the longer side to the shorter side of the rectangle. Edge roughness is characterized using fractal dimension, calculated through box counting. The fractal dimension of smooth edges is close to 1, while the fractal dimension of rough edges is between 1.2 and 1.5.
[0076] Preferably, the determination of wetting state is based on solder diffusion theory. Good wetting is characterized by uniform solder spread and smooth edge transition. From an image processing perspective, this transition manifests as a gradual change in grayscale. The gradient value and direction of each pixel on the boundary are calculated. The gradient value reflects the drastic change in grayscale, and the gradient direction points in the direction of the fastest increase in grayscale. Ideally, the gradient direction should be evenly distributed near the normal direction at the wetting edge.
[0077] In one possible implementation, the gradient direction histogram is constructed using a 360-degree metric. The 0-360 degree range is divided into 36 intervals, each 10 degrees, and the number of gradient directions within each interval is counted. For well-wetting solder joints, the histogram shows a unimodal or bimodal distribution; for poorly wetting solder joints, the histogram shows a multimodal or uniform distribution. The standard deviation of the histogram is used to assess the central tendency of the distribution; a larger standard deviation indicates less uniform wetting.
[0078] For example, the defect category coding adopts a hierarchical design. The first bit represents the main category: 1 represents shape abnormality, 2 represents poor wetting, and 3 represents compound defects. The second bit represents the subcategory: for shape abnormality, 1 represents bridging, 2 represents void, and 3 represents offset; for poor wetting, 1 represents cold solder joint, 2 represents excessive wetting angle, and 3 represents solder crawling. The third bit represents the severity: 1 represents minor, 2 represents moderate, and 3 represents severe. This coding method includes both qualitative information and quantitative assessment of the defect. Furthermore, the pixel label matrix is constructed using a sparse matrix storage strategy. Since most pixels belong to the background and do not contain defect information, using a sparse matrix can significantly reduce storage space. The matrix only records the row and column indices of non-zero elements and the defect code value. This storage method improves data processing efficiency while maintaining information integrity.
[0079] Understandably, the dataset's organizational structure comprises three layers. The first layer is the index layer, which assigns a unique identifier to each solder joint. The second layer is the attribute layer, which stores static information such as the solder joint's coordinates, dimensions, and defect type. The third layer is the association layer, which establishes a mapping relationship between the solder joint and the image region and detection results.
[0080] For example, when processing high-density interconnect circuit boards, a single board may contain thousands of solder joints. The constructed dataset not only records the defect information of each solder joint but also preserves their spatial relationships. The defect distribution map visually illustrates the spatial distribution patterns of defects; the concentrated appearance of red areas may indicate abnormalities in local process parameters, requiring close attention and adjustment.
[0081] S108. Based on the marked solder joint dataset, evaluate the impact on the overall flatness of the circuit board, optimize the sorting path of the automatic sorting equipment, remove defective solder joints, generate a dataset of removed solder joints, and complete the circuit board solder joint quality assessment.
[0082] Based on the labeled solder joint dataset, the contact area data and defect code of each solder joint are extracted. The ratio of the contact area to the standard area is calculated as the contact ratio. Combined with the board surface deformation data, the flatness value P is calculated using the formula P=α×contact ratio+(1-α)×(1-deformation degree / maximum allowable deformation), where α is a weighting coefficient with a value of 0.6. When the flatness value is lower than the preset qualified threshold, the corresponding area coordinates are recorded. For the distribution of defective solder joints within the area coordinates, the traveling salesman algorithm is used to calculate the shortest path for the sorting equipment to access each defective solder joint. The sorting priority is determined according to the severity bit in the defect code, with solder joints of higher severity being processed first. A sorting path sequence containing the access order and coordinate position is generated. According to the sorting path sequence, a rejection mark is added to the corresponding solder joints. Solder joint records with rejection marks are deleted from the original dataset. The pass rate of the remaining solder joints is calculated. The pass rate is equal to the number of defect-free solder joints divided by the total number of remaining solder joints. A discarded solder joint dataset is generated, and the circuit board solder joint quality evaluation result is output.
[0083] For example, in one implementation, the flatness value is calculated by comprehensively considering the electrical connection performance and mechanical stability of the solder joint. The contact ratio reflects the effective connection between the solder and the pad; a higher ratio indicates a more reliable electrical connection. The degree of deformation affects the mechanical stress distribution of the circuit board; excessive deformation can cause the solder joint to bear additional tensile or compressive stress. The weighting coefficient α is set to 0.6, indicating that the contact area has a 60% weighting on the overall quality, while the degree of deformation has a 40% weighting. This weighting allocation is based on statistical analysis of a large amount of production data, ensuring both electrical performance and mechanical reliability.
[0084] It should be noted that the Traveling Salesman Algorithm (TSA) can significantly reduce the travel distance and time of sorting equipment in sorting path optimization. The algorithm treats each defective solder joint as a node that must be visited, and finds the shortest path traversing all nodes through dynamic programming or heuristic search. In practical applications, the nearest neighbor strategy is used as the initial solution, and then 2-opt local optimization is used to improve path quality. The sorting priority setting considers the risk of defect propagation; severe defects such as bridging short circuits may affect adjacent solder joints in subsequent processing, and therefore are preferentially rejected.
[0085] Specifically, the addition of rejection flags is implemented using bit flags. A status byte is allocated to each solder joint in the data structure, where the highest bit indicates whether rejection is required. This design facilitates batch processing and fast querying while preserving the integrity of the original data.
[0086] Preferably, the yield calculation considers not only the quantity ratio but also a location weighting factor. Solder joints on critical signal paths are given higher weights, while solder joints in edge areas are given lower weights. The weighted yield rate more accurately reflects the actual usability of the circuit board.
[0087] In one possible implementation, the quality assessment results employ a multi-dimensional indicator system. In addition to the overall pass rate, this includes the distribution density, severity distribution, and spatial clustering of various defects. These indicators collectively constitute the quality assessment report, providing data support for process improvement.
[0088] For example, when inspecting solder joints on server motherboards, the solder joints in the CPU socket area have extremely high quality requirements; the failure of a single solder joint can prevent the entire system from booting. The method described above can accurately identify and prioritize the handling of defective solder joints in this area, while optimizing the sorting path to reduce processing time. The output quality assessment results provide a reliable basis for real-time adjustments to the production line.
[0089] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for evaluating the quality of solder joints on a circuit board, characterized in that, The method includes: The process involves: acquiring 3D point cloud data of solder joints on the circuit board surface; analyzing the height difference and height distribution uniformity of the solder joints; generating an original point cloud feature matrix; decomposing the original point cloud feature matrix to obtain height anomaly pattern feature vectors representing uneven solder distribution and abnormal solder joint shapes; acquiring the 3D spatial coordinates of solder joints on the circuit board surface to generate an original point cloud dataset containing solder joint location information; for each solder joint in the original point cloud dataset, calculating the height difference between the solder joint and its adjacent solder joints; extracting point cloud data of solder joint regions where the height difference exceeds a preset threshold; calculating the actual volume and surface curvature value of the solder; constructing a point cloud feature matrix containing height distribution and shape features; decomposing the point cloud feature matrix to obtain feature values and corresponding feature vectors; and selecting feature vectors representing solder joint height anomalies. The feature vectors representing the main changing directions of the solder distribution are used to extract height anomaly patterns of solder distribution non-uniformity. Based on these height anomaly patterns, the locations of solder joints with abrupt changes in feature vector values are identified, and solder joints with similar feature vectors are clustered to generate a set of feature vectors representing solder joint height anomaly patterns. For these feature vectors, uneven solder distribution, missing solder volume, and excessive solder accumulation are analyzed to determine the locations of solder joint volume anomalies, generating a set of solder joint anomaly locations. Based on this set of anomaly locations, abrupt changes in solder joint height gradient and surface flatness deviations are analyzed to generate a height gradient distribution map containing local stress concentrations and board surface deformation. Based on this height gradient distribution map, regions of abrupt height gradient changes and surface flatness deviations are defined to identify areas containing poor solder wetting. The boundary of the abnormal solder joint height region; for the boundary of the abnormal solder joint height region, the contact area of the solder joint and the direction of solder flow are obtained, the height abnormality judgment criteria are adjusted, and dynamic height detection rules are generated; the solder joint height consistency characteristics are extracted from the dynamic height detection rules to judge the signal transmission delay risk, including: extracting the solder joint height value and judgment threshold range from the dynamic height detection rules, calculating the standard deviation of the solder joint height in the same functional area, and identifying solder joint groups with deviations exceeding a preset range; for the solder joint group, the stress value of the solder joint is calculated by combining the stress peak value of local stress concentration data, and weak links exceeding the material yield strength are identified; based on the weak links, the change in signal transmission path impedance is calculated, and the delay risk caused by the impedance change is judged; if If the signal transmission delay risk exceeds a preset threshold, defect marking is performed on the set of abnormal solder joint locations to generate a defect distribution map containing abnormal solder joint shapes and poor solder wetting, and a marked solder joint dataset is generated. This includes: if the signal transmission delay risk exceeds a preset threshold, extracting the coordinates and risk values of abnormal solder joints from the set of abnormal solder joint locations, setting the marking type and adding color markers to the image; performing segmentation on the marked image to determine the solder joint contour boundaries, calculating the shape feature parameters of the contours, and identifying solder joints with abnormal shapes; for the solder joints with abnormal shapes, calculating the grayscale gradient values and directions, statistically analyzing the gradient direction distribution, and identifying poor wetting; constructing a pixel label matrix according to the defect category, integrating the solder joint coordinates and defect descriptions, and generating a marked solder joint dataset.Based on the marked solder joint dataset, and considering the solder joint contact area and board surface deformation, the sorting path is optimized to remove defective solder joints, generating a discarded solder joint dataset.
2. The circuit board solder joint quality evaluation method according to claim 1, characterized in that, The feature vector of the highly abnormal pattern is analyzed to determine the locations of solder joint volume anomalies, including uneven solder distribution, missing solder volume, and excessive solder accumulation. A set of anomaly locations is generated, comprising: Based on the feature vector of the highly abnormal pattern, the distance between each feature vector and the average feature vector of normal solder joints is calculated, and the three-dimensional coordinate position and volume data of solder joints whose distance exceeds a preset threshold are extracted; for the volume data, the deviation from the standard solder volume is calculated, and it is determined whether the solder volume is missing or excessive, and the abnormal value and corresponding coordinate position are recorded; based on the coordinate position and abnormal value, adjacent abnormal solder joints are identified, and the coordinates and abnormal types of solder joints in the abnormal area are summarized to generate a set of abnormal solder joint positions.
3. The method for evaluating the quality of circuit board solder joints according to claim 1, characterized in that, The step of dividing the height gradient abrupt change and surface flatness deviation areas according to the height gradient distribution map, and determining the boundary of the solder joint height abnormality area containing poor solder wetting, includes: Based on the height gradient distribution map, the coordinates of data points with gradient values exceeding a preset threshold are extracted. The distance and gradient difference between the data points and their neighbors are calculated, and spatial clustering is performed to obtain clusters and the density of points within each cluster. For each cluster, the contact angle between the solder surface contour and the pad plane is calculated, and areas with poor wetting due to contact angles greater than a preset threshold are marked. Surface roughness data is recorded. Based on the poor wetting areas and surface roughness data, the outer contour of the clusters is extracted, adjacent clusters are merged, and an abnormal region range is generated. The boundary points within the abnormal region range are processed, a minimum convex polygon is constructed, the boundary is smoothed, and the boundary of the abnormal solder joint height region containing poor solder wetting is determined.
4. The method for evaluating the quality of circuit board solder joints according to claim 3, characterized in that, For the cluster, the contact angle between the solder surface contour and the pad plane is calculated, poor wetting areas with contact angles greater than a preset threshold are marked, and surface roughness data is recorded, including: For the cluster, fit the solder edge curve, and calculate the angle between the tangent of the curve at the contact point and the pad plane as the contact angle; based on the contact angle, mark the area greater than a preset threshold as the poor wetting area; for the poor wetting area, calculate the roughness value of the surface sampling point, and record the roughness value and the corresponding area coordinates.
5. The method for evaluating the quality of circuit board solder joints according to claim 1, characterized in that, The process involves obtaining the contact area and solder flow direction of the solder joint at the boundary of the abnormal solder joint height region, adjusting the height anomaly judgment criteria, and generating dynamic height detection rules, including: For solder joints within the boundary of the abnormal solder joint height area, the solder joint contour is extracted, the overlap area between the solder joint contour and the pad contour is calculated, and the contact area ratio is obtained. Based on the contact area ratio and the solder joint height distribution, the height difference vector is calculated to determine the solder flow direction. Based on the flow direction and the contact area ratio, a dynamically adjusted judgment threshold is generated. Based on the judgment threshold, judgment criteria corresponding to the solder joint size are set according to categories, and integrated to form dynamic height detection rules.
6. The method for evaluating the solder joint quality of a circuit board according to claim 1, characterized in that, The step of optimizing the sorting path based on the marked solder joint dataset, combined with the solder joint contact area and the degree of board surface deformation, and removing defective solder joints to generate a discarded solder joint dataset includes: Based on the labeled solder joint dataset, the contact area and defect code of the solder joint are extracted, the contact area ratio and the degree of board surface deformation are calculated, and the flatness value is calculated. For areas where the flatness value is lower than a preset threshold, the shortest path for the sorting equipment to access the defective solder joint is calculated, the sorting priority is determined, and a sorting path sequence is generated. Based on the sorting path sequence, the defective solder joint records are deleted, the pass rate of the remaining solder joints is calculated, and a discarded solder joint dataset is generated.
Citation Information
Patent Citations
Printed circuit board welding spot three-dimensional shape high-precision analysis method and system
CN120298605A
Motor detection method and system based on machine vision
CN120543504A