A PCB pre-drilling hole intelligent correction system and method

By using an intelligent correction system for pre-drilled PCBs, which combines offset detection and hole position risk detection, compensation parameters are generated to adjust the drilling actuator, solving the problem of inaccurate correction in existing technologies and improving the accuracy and quality of pre-drilled PCBs.

CN121223913BActive Publication Date: 2026-05-29BRAIN POWER (QING YUAN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BRAIN POWER (QING YUAN) CO LTD
Filing Date
2025-10-14
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In the existing technology, the pre-drilling process of PCB boards relies solely on the overall offset for correction, resulting in inaccurate correction and difficulty in balancing production efficiency and product quality.

Method used

A pre-drilled intelligent correction system for PCB boards is adopted. The offset detection module calculates the deviation of the reference point position, and the hole position risk detection module quantifies the proximity distance between the hole to be drilled and the circuit. The system generates compensation parameters for the correction decision module, and the execution control module adjusts the position of the drilling execution mechanism. The effect verification module performs secondary detection to ensure the hole position accuracy.

Benefits of technology

It enables dual-dimensional assessment of PCB board misalignment and hole position risks, ensuring accurate correction, reducing PCB board scrap rate, and improving the yield and reliability of pre-drilling processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121223913B_ABST
    Figure CN121223913B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of PCB processing monitoring, and particularly relates to a PCB pre-drilling hole intelligent correction system and method. The present application accurately calculates the position deviation of the reference point and determines the PCB offset degree through the PCB offset detection module, quantifies the proximity distance between the to-be-drilled hole and the circuit and the hole risk level in combination with the hole risk detection module, realizes two-dimensional evaluation of offset and risk, provides comprehensive and accurate data support for subsequent correction decision, effectively avoids the limitations brought by making decisions according to a single dimension, and ensures the accuracy of PCB pre-drilling hole correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of PCB board processing monitoring technology, specifically to an intelligent correction system and method for pre-drilled holes in PCB boards. Background Technology

[0002] Pre-drilling of PCB boards is a critical step in electronic product manufacturing, and its drilling accuracy directly determines the soldering quality of components and the reliability of circuit signal transmission.

[0003] In actual production, PCB boards are fixed to the drilling machine's worktable using fixtures. Due to factors such as operator placement errors and uneven clamping force, there will inevitably be a positional deviation between the actual position of the PCB board and its theoretical design position. If drilling is performed directly based on the design coordinates, it will lead to hole position deviations, which can easily cause quality problems such as circuit damage, excessively thin hole rings, or even short circuits, resulting in the scrapping of the PCB board.

[0004] Meanwhile, the proximity of the hole to be drilled to the surrounding circuitry is also a key factor affecting drilling quality. If the hole is too close to the circuitry, even with a small PCB offset, the drilling process may still cause the hole to touch the circuitry, leading to circuit damage or short circuits due to equipment vibration or other factors.

[0005] Traditional correction methods only focus on the overall positional offset of the PCB board, ignoring the inherent risk differences of different hole positions due to the different layout of surrounding circuits. This results in a lack of specificity in the correction strategy, and problems such as over-correction or under-correction are prone to occur. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a PCB board pre-drilling intelligent correction system and method to solve the problem that the prior art relies solely on the overall offset of the PCB board for correction, resulting in inaccurate correction and difficulty in balancing production efficiency and product quality.

[0007] The technical solution adopted by this invention to solve its technical problem is: a PCB board pre-drilling intelligent correction system, comprising: a PCB board offset detection module, used to identify the position coordinates of the reference points based on the acquired PCB board reference point images, calculate the X-axis deviation value and Y-axis deviation value of each reference point; calculate the arithmetic mean of the X-axis deviation value and Y-axis deviation value of all reference points respectively, to obtain the X-axis translational offset and Y-axis translational offset of the PCB board; determine the rotational offset angle of the PCB board based on the pair of reference points with the largest Euclidean distance among the reference points, and calculate the PCB board offset degree by combining the X-axis translational offset and Y-axis translational offset.

[0008] The hole location risk detection module is used to form a circular detection area with the hole location to be drilled as the center and a preset pixel length as the radius based on the acquired image of the area to be drilled; extract the edge pixels of the PCB board circuit within the detection area, calculate the Euclidean distance between each edge pixel and the image coordinates; take the minimum value of all Euclidean distances as the proximity distance between the hole location to be drilled and the PCB board circuit, and determine the hole location risk level accordingly.

[0009] The correction decision module is used to analyze and determine whether correction is needed based on the PCB board offset and hole position risk level; if so, it generates compensation parameters for performing correction.

[0010] The execution control module is used to adjust the position of the drilling actuator according to the compensation parameters and perform a correction operation.

[0011] The effect verification module is used to acquire images of the target hole area after one correction, analyze the positional deviation of the target hole and its proximity to the PCB board circuit, and determine whether a second correction or drilling is required based on the analysis results.

[0012] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention accurately calculates the deviation of the reference point position and fits to determine the PCB offset degree by using the PCB offset detection module, and combines the hole position risk detection module to quantify the proximity distance between the hole to be drilled and the line and the hole position risk level, thereby realizing the dual-dimensional assessment of offset and risk, providing comprehensive and accurate data support for subsequent correction decisions, and effectively avoiding the limitations of making decisions based on only a single dimension, ensuring the accuracy of PCB pre-drilling hole correction.

[0013] (2) The present invention uses the total compensation parameters in the X and Y directions as compensation parameters for correction, which can effectively offset translational and rotational offsets and avoid problems such as short circuits and out-of-tolerance hole positions caused by offsets. At the same time, the hole position accuracy is further guaranteed by secondary detection through the effect verification module, which greatly reduces the scrap rate of PCB boards and significantly improves the yield and reliability of PCB board pre-drilling. Attached Figure Description

[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 This is a schematic diagram of the system module connections of the present invention.

[0016] Figure 2 This is a flowchart for determining whether correction is needed according to the present invention.

[0017] Figure 3 This is a flowchart illustrating the process of determining whether secondary correction or drilling is required in this invention.

[0018] Figure 4 This is a flowchart of the correction method of the present invention. Detailed Implementation

[0019] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the invention. Furthermore, it should be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale.

[0020] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use. Techniques, methods, and apparatus known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and apparatus should be considered part of the specification.

[0021] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0022] Please see Figure 1 As shown, a pre-drilled PCB board intelligent correction system includes a PCB board offset detection module, a hole position risk detection module, a correction decision module, an execution control module, and an effect verification module; the correction decision module is connected to the PCB board offset detection module, the hole position risk detection module, and the execution control module, respectively, and the execution control module is connected to the effect verification module.

[0023] The data flow sequence in the above modules is as follows: the PCB offset detection module and the hole position risk detection module work in parallel, and their output data are synchronously input to the correction decision module. The correction decision module outputs the decision result to the execution control module. The execution control module drives the drilling mechanism to perform correction and then triggers the effect verification module for verification.

[0024] The PCB offset detection module is used to identify the position coordinates of the reference points based on the acquired PCB reference point images, calculate the position deviation of each reference point, and determine the PCB offset by fitting the position deviation.

[0025] The PCB board offset mentioned in this step mainly stems from two aspects. Firstly, when the operator or automated robot places the PCB board into the machine tool fixture, it is impossible to achieve a theoretically perfect alignment, resulting in an initial placement deviation. Secondly, uneven clamping force of the fixture on the PCB board can cause it to undergo slight displacement under external forces during pre-drilling or drilling processes, potentially introducing translational or rotational deviations.

[0026] PCB board offset will directly cause the actual drilling position to deviate from the design standard hole position. If the offset is ignored and drilling is carried out directly, it may cause short circuits between the drilled hole and the PCB board circuit, damage to the circuit, or the hole position may be outside the specified area, making it impossible to solder subsequent components properly, ultimately causing product failure or scrap.

[0027] By precisely controlling the offset of the PCB board, the problem of drilling position deviation caused by PCB board offset can be directly solved.

[0028] In the implementation of the above scheme, the specific process of identifying the position coordinates of the reference points and calculating the position deviation of each reference point is as follows: target segmentation is performed on the PCB board reference point image to obtain multiple candidate contours.

[0029] In this invention, the Canny algorithm can be used for edge detection, and the Otsu method can be used for adaptive threshold segmentation to extract multiple candidate contours from the PCB board reference point image.

[0030] Calculate the area and perimeter of each candidate contour, and then calculate the roundness based on the area and perimeter using the roundness formula.

[0031] The area of ​​each candidate contour is obtained by multiplying the total number of pixels contained in each candidate contour by the physical area of ​​a single pixel; the perimeter of each candidate contour is obtained by accumulating the Euclidean distance between adjacent edge pixels along the edge trajectory of each candidate contour.

[0032] The formula for roundness is: ,in The area of ​​the candidate contour. Let be the perimeter of the candidate contour. Pi is the mathematical constant for circumference. The value of circularity ranges from 0 to 1; when the candidate contour is a perfect circle, the value of circularity is 1; the more the contour shape deviates from a circle, such as an ellipse or polygon, the closer the value of circularity is to 0.

[0033] The area, perimeter, and roundness of each candidate contour are compared with the corresponding standard values. The sum of squares of the deviation values ​​is calculated, and the candidate contours whose sum of squares is less than the set threshold are determined as the contours corresponding to the reference point.

[0034] The standard values ​​for area and perimeter can be determined based on the nominal dimensions of the reference points in the PCB board design drawings and the pixel resolution of the image acquisition system; the standard value for roundness can be determined based on the design shape of the reference points.

[0035] In this invention, for example, when the reference point of the PCB board design is a circle with a diameter of 2mm and the pixel resolution of the image acquisition system is 100 pixels / mm, the actual area of ​​the reference point is approximately 3.1416 based on the circle area calculation formula and the circumference calculation formula. The actual perimeter is approximately 6.2832mm, which translates to a pixel area of ​​31416. If the pixel perimeter is 628 pixels, then the standard area value is set to 31416 pixels for example. The standard value for the perimeter is set to 628 pixels for example. If the design shape is a standard circle based on the reference point, the standard value for roundness is set to 1 for example.

[0036] The threshold is determined based on a combination of the manufacturing tolerance of the PCB board reference point and the optical error of the image acquisition system. In this invention, for example, a circular reference point with a diameter of 2mm typically allows a manufacturing tolerance of... 0.05mm, then the area deviation is approximately 0.628 Perimeter deviation approximately 3.14 pixels; the area deviation caused by optical errors in an image acquisition system with 100 pixels / mm is approximately 10 Perimeter deviation approximately 5 pixels, circularity deviation approximately 0.03. Considering the cumulative effect of the above errors, the threshold value can be set to a range of 450-700, preferably 550.

[0037] In addition to the reference points, PCB board images also contain non-reference point contours such as dust, scratches, and rectangular pads. These non-reference point contours may be close to the reference point standard value in a single parameter, but the sum of squares of the combined deviations of multiple parameters will far exceed the set threshold. By judging the sum of squares of multiple parameters, such interference can be effectively filtered out, ensuring that the screening results are only the true reference point contours, thereby ensuring the accuracy of subsequent PCB board offset calculations.

[0038] The average pixel coordinates of the reference point contour are calculated as the center coordinates in the image coordinate system and then transformed to the actual measured coordinates in the machine tool coordinate system.

[0039] Calculate the difference between the actual measured coordinates and the standard coordinates of each reference point in the X and Y directions to obtain the X-axis deviation value and the Y-axis deviation value.

[0040] Among them, the image coordinate system is a pixel-level coordinate system established based on the image acquisition device. Its coordinate values ​​only represent the relative position of the reference point in the image, and do not directly correspond to the physical position of the PCB board in the actual processing equipment; while the machine tool coordinate system is the reference physical coordinate system for the movement of the drilling machine's actuator. Its coordinate values ​​directly reflect the actual physical dimensions of the processing position.

[0041] Standard coordinates refer to the theoretical physical location of each reference point clearly marked by the designer during the PCB design stage, based on the accuracy requirements of the pre-drilled hole positions and the circuit layout plan. Standard coordinates will not be elaborated further in this embodiment.

[0042] In the implementation of the above scheme, the step of determining the PCB board offset by fitting the deviation of each position is as follows: calculate the arithmetic mean of the X-axis deviation value and the Y-axis deviation value of all reference points respectively, and obtain the X-axis translational offset and the Y-axis translational offset of the PCB board.

[0043] Calculate the Euclidean distance between any two reference points in the actual measured coordinates, and select the pair of reference points with the largest Euclidean distance as the reference point pair.

[0044] Based on the standard coordinates and actual measured coordinates of the reference points, calculate the standard angle and actual angle of the line connecting them in the machine tool coordinate system.

[0045] It should be noted that when a PCB board rotates, the closer two reference points are, the smaller the change in the angle of the line connecting them under the same rotation angle. This change is easily masked by measurement errors, leading to distortion in the calculation of the rotation offset angle. On the other hand, the two reference points with the largest Euclidean distance show a more significant change in the angle of the line connecting them under the same rotation angle. This amplifies the characteristics of the rotation offset and reduces the interference of measurement errors on the calculation of the rotation offset angle.

[0046] For example, for a circular PCB board, the reference points at both ends of the diameter can be selected as the reference point pair, and for an irregularly shaped PCB board, the reference points at the diagonal of the circumscribed rectangle can be selected as the reference point pair.

[0047] The standard angle refers to the angle of the line connecting the reference points in their unoffset state, representing the theoretical orientation of the PCB board. The actual angle refers to the angle of the line connecting the reference points after offset, representing the actual orientation of the PCB board. Without distinguishing between the standard angle and the actual angle, it is impossible to determine whether the change in the angle of the line connecting the reference points is caused by rotational offset.

[0048] Calculate the difference between the actual angle and the standard angle as the rotation offset angle of the PCB board; calculate the offset of the PCB board based on the X-axis translation offset, Y-axis translation offset, and rotation offset angle.

[0049] In a specific embodiment of the present invention, the formula for calculating the PCB board offset is as follows: .

[0050] in, For PCB board offset, This is the translational offset along the X-axis. This is the translational offset along the Y-axis. This is the rotation offset angle; Rotational offset influence coefficient It can be set according to the PCB board size, for example, the diagonal length of the PCB board is 200mm. Take half the length of the PCB board's diagonal, that is It is 100mm, used to convert angular offset into equivalent linear offset; For translation offset weights, For rotation offset weights, and , and It can be set according to the actual machining accuracy requirements. For example, when the effects of translation and rotation are equally important, and Both are 0.5.

[0051] In the above formula, This represents the comprehensive translational offset value, used to quantify the overall linear displacement of the PCB board within the plane. This represents the equivalent linear offset of the rotation offset, expressed by the rotation offset influence coefficient. The angular deviation is converted into a physical quantity of the same dimension as the translational offset for easier comprehensive evaluation. Finally, a weighted summation method is used to unify the translational and rotational offsets into a single offset index: PCB board offset. The larger the value, the greater the overall positional deviation of the PCB board, and the more significant the impact on the accuracy of pre-drilling.

[0052] It should be noted that translational offset is the overall displacement of the PCB board in the XY plane, unlike a single weighted summation. This invention determines the PCB board offset through the above calculation method, which can accurately quantify the overall impact of translation on drilling accuracy. Furthermore, converting rotational offset and translational offset into equivalent linear values ​​allows for evaluation of both in the same dimension. The selection of the reference point with the maximum Euclidean distance reflects the actual impact of rotation on drilling. This ensures accurate subsequent judgment of whether correction is needed, achieving drilling accuracy control.

[0053] The hole location risk detection module is used to calculate the proximity distance between the hole location to be drilled and the PCB board circuit based on the collected image of the area to be drilled, and determine the hole location risk level accordingly.

[0054] It should be noted that the core risk of pre-drilling holes on PCB boards lies in the possibility of damaging the circuitry during the drilling process. The proximity of the hole to be drilled to the circuitry directly determines the level of this risk: the closer the distance, the greater the probability of accidentally touching the circuitry during drilling due to factors such as equipment vibration and positioning deviation; if the distance is too close, it may even directly cause the hole to overlap with the circuitry, resulting in short circuits caused by drilling through the circuitry, or damage to the circuitry affecting signal transmission.

[0055] The risk level of a hole is determined by its proximity to the PCB traces. This risk level is then used to quantitatively assess the inherent risk of each hole, and combined with the overall PCB offset, a comprehensive judgment is made as to whether correction is necessary. This avoids over-correction or under-correction based solely on offset. Furthermore, differentiated processing is achieved through risk level classification: high-risk holes are corrected first, while low-risk holes have simplified procedures, ensuring drilling quality while avoiding unnecessary operations that impact processing efficiency.

[0056] In the implementation of the above scheme, the step of calculating the proximity distance between the hole to be drilled and the PCB board circuit based on the collected image of the area to be drilled specifically involves converting the standard coordinates of the hole to be drilled in the machine tool coordinate system into image coordinates.

[0057] A circular detection area is formed with the image coordinates of the hole to be drilled as the center and a preset pixel length as the radius.

[0058] It should be noted that the circular detection area can uniformly cover the area around the hole to be drilled from a 360° direction, avoiding the possibility of omissions in detection in a certain direction in square or rectangular areas. For example, the corners of a square area may easily exceed the influence range of the drilling.

[0059] The preset pixel length can be determined comprehensively based on the safety spacing standard of the PCB board and the tolerance of the hole diameter process, ensuring that the detection area can completely cover the line range around the hole to be drilled that may have risks.

[0060] Among them, the hole diameter process deviation allowance refers to the maximum deviation value that the actual drilling radius may exceed the designed drilling radius due to factors such as equipment vibration, drill bit wear, and slight positioning deviation during the drilling process. This value can be determined based on historical processing data.

[0061] In this invention, for example, the aperture process deviation margin is 0.05mm, the PCB board line safety spacing standard is 0.2mm, and the pixel resolution of the image acquisition system is 100 pixels / mm. Then, the physical radius of the detection area is the sum of the aperture process deviation margin and the line safety spacing standard. The physical radius is then multiplied by the pixel resolution to convert it into a pixel length of 45 pixels. Therefore, the preset pixel length is set to 45 pixels for example.

[0062] Extract the edge pixels of the PCB board lines within the detection area, and calculate the Euclidean distance between each edge pixel and the image coordinates; use the minimum value among all Euclidean distances as the proximity distance between the hole to be drilled and the PCB board lines.

[0063] The smaller the shortest distance, the higher the probability of touching the line due to factors such as deviation and vibration during drilling, and the higher the risk level. If the average value or other values ​​are taken, it will mask the high risk of the shortest distance being too close, leading to misjudgment of the risk level. For example, a hole to be drilled may be far away from most lines, but extremely close to a certain line. The average value may show that the distance is acceptable, but the actual risk is extremely high.

[0064] In the implementation of the above scheme, the specific process of determining the risk level of the hole location is as follows: the ratio of the proximity distance between the hole location to be drilled and the PCB board circuit to the preset hole diameter value of the hole location to be drilled is used as the first risk factor.

[0065] It should be noted that the larger the preset hole diameter value at the drilling location, the greater the range of hole diameter deviation caused by equipment precision errors and vibrations during the actual drilling process. Under the same approach distance, the probability of a large-diameter hole touching the line is much higher than that of a small-diameter hole. By using the ratio of the approach distance to the preset hole diameter value, the approach distance can be correlated with the drilling size, thereby achieving standardized quantification of the risks associated with drilling different hole diameters.

[0066] The preset hole diameter value is determined based on the nominal hole diameter parameter of the hole to be drilled in the PCB design drawing. For example, if the PCB design drawing indicates that a hole to be drilled is used to solder a component pin with a diameter of 0.3mm, and the nominal hole diameter is set to 0.5mm, then the preset hole diameter value is set to 0.5mm for example.

[0067] The ratio of the proximity between the hole to be drilled and the PCB board trace to the standard value of the safe clearance between the hole and the trace is used as the second risk factor.

[0068] It should be noted that the closer the approach distance is to the standard value of the line's safe clearance, the closer the borehole location is to a critical safety state, and the higher the risk. If the approach distance is less than the standard value of the line's safe clearance, the borehole location is directly in an unsafe state. The ratio of the approach distance to the standard value of the line's safe clearance can be converted into a relative safety factor; the smaller the ratio, the higher the risk.

[0069] The standard value for the safety distance between lines can be determined based on industry-standard practices and the application scenario of the PCB board. For example, for conventional consumer electronics PCB boards, the standard value for the safety distance between lines is typically set to 0.15mm; for PCB boards used in high-voltage power modules, the standard value for the safety distance between lines is typically set to 0.3mm.

[0070] The first risk factor and the second risk factor are weighted and summed to obtain the pore location risk level.

[0071] The weights of the first and second risk factors can be determined based on the PCB manufacturing requirements. For example, for conventional consumer electronics PCBs, where compliance and size adaptability are balanced, the weight of the second risk factor can be set to 0.6, and the weight of the first risk factor can be set to 0.4, prioritizing that hole positions meet safe spacing requirements. For industrial control PCBs with multi-sized drill holes, the weight of the first risk factor can be set to 0.6, and the weight of the second risk factor can be set to 0.4, focusing on controlling the risks associated with large-diameter drill holes.

[0072] The correction decision module is used to analyze and determine whether correction is needed based on the PCB board offset and hole position risk level; if so, it generates compensation parameters for performing correction.

[0073] Using PCB offset as the trigger condition for correction can lead to correction being performed even when the offset exists but poses no real risk, such as when there are no lines around the hole and the offset does not affect the drilling quality. This increases unnecessary processing time and mechanical wear, and reduces production efficiency.

[0074] Using only the risk level of the hole position as the trigger condition for correction will fail to distinguish the source of the risk. If the high risk level of the hole position is caused by PCB board misalignment, failure to perform correction will directly lead to the scrapping of the drilled hole.

[0075] Combining hole position risk level and PCB board offset can achieve accurate judgment of offset that needs to be corrected and that correction can reduce risk, avoiding product quality problems caused by missed risk sources, ensuring drilling quality while also taking into account processing efficiency.

[0076] Please see Figure 2 As shown, in the implementation of the above scheme, the process of determining whether correction is needed based on the PCB board offset and hole position risk level analysis includes: calculating the X-axis translational offset. Y-axis translation offset The Euclidean norm is used to obtain the comprehensive value of translation and offset. The formula for calculating the Euclidean norm is: .

[0077] The ratios of the comprehensive translational offset value and the rotational offset angle to the corresponding preset allowable offset values ​​are used as the translational influence coefficient and the rotational influence coefficient, respectively.

[0078] The preset allowable values ​​for both the translational offset and the rotational offset angle can be set based on the precision requirements of the PCB drilling process. For example, for conventional consumer electronics PCBs, the preset allowable value for the translational offset can be set to 0.1mm, and the preset allowable value for the rotational offset angle can be set to 0.05°. For high-precision automotive electronics PCBs, which require stricter precision control, the preset allowable value for the translational offset can be set to 0.05mm, and the preset allowable value for the rotational offset angle can be set to 0.02°.

[0079] The translational influence coefficient, rotational influence coefficient, and hole location risk level are weighted and summed to obtain the comprehensive correction assessment value.

[0080] It should be noted that the weights of the translation influence coefficient, rotation influence coefficient, and hole position risk level can all be set according to the accuracy requirements of the PCB board processing scenario.

[0081] For example, for conventional consumer electronics PCBs, hole position risk is a more direct cause of scrap, so the hole position risk level has the highest weight and can be set to 0.5. The weights of the translational influence coefficient and the rotational influence coefficient can be set to 0.3 and 0.2, respectively. For high-precision automotive electronics PCBs, even a slight offset can lead to hole position deviations or circuit damage, so the weights of the translational influence coefficient and the rotational influence coefficient are significantly increased and can be set to 0.4 and 0.3, respectively. The weight of the hole position risk level is 0.3.

[0082] If the comprehensive correction assessment value is greater than or equal to the correction trigger threshold, then correction is required, and compensation parameters for performing the correction are generated.

[0083] The magnitude of the comprehensive correction assessment value directly reflects the probability that deviation will lead to borehole scrapping. However, directly using it to determine whether correction is needed may result in oversensitivity and increased processing time, even when the comprehensive correction assessment value is high but the risk is controllable. Alternatively, it may fail to trigger correction when the comprehensive correction assessment value is close to the risk threshold, resulting in delayed response and borehole scrapping. By setting a single correction trigger threshold, the boundary between correction and non-correction can be accurately defined, balancing processing quality and efficiency.

[0084] The threshold for triggering a single correction can be determined based on historical processing data of similar PCB boards. For example, in this invention, for conventional consumer electronics PCB boards, when the overall correction assessment value is less than or equal to 0.7 and the percentage of qualified drilled holes remains stable at 96%, no correction is required; when the overall correction assessment value is higher than 0.7 and the percentage of qualified drilled holes drops below 90%, correction is required. Therefore, referring to this historical data, the threshold for triggering a single correction is set to 0.7.

[0085] In the implementation of the above scheme, the specific process of generating the compensation parameters for performing the correction is as follows: the opposite of the X-axis translation offset is used as the X-axis translation compensation parameter; the opposite of the Y-axis translation offset is used as the Y-axis translation compensation parameter.

[0086] Based on the negative of the rotation offset angle, calculate its rotation compensation components on the X and Y axes in the machine tool coordinate system, and use them as the X-axis rotation compensation parameters and Y-axis rotation compensation parameters, respectively.

[0087] Taking X-axis translation offset as an example: If the PCB board deviates in the positive X-axis direction, the drilling actuator needs to be moved in the negative X-axis direction to return to the standard position. Therefore, the X-axis translation compensation parameter must be the opposite of the X-axis translation offset.

[0088] The X-axis translation compensation parameters and X-axis rotation compensation parameters are added together to obtain the total X-axis compensation parameters; the Y-axis translation compensation parameters and Y-axis rotation compensation parameters are added together to obtain the total Y-axis compensation parameters. These total X-axis and total Y-axis compensation parameters are used as the compensation parameters for performing the correction.

[0089] It should be noted that the X-axis translation offset, Y-axis translation offset, and rotation offset are not independent. Translation offset will directly cause the hole to be drilled to deviate in the X or Y axis direction, while rotation offset will cause the hole to be drilled to have additional offset in both the X and Y axes. For example, when rotating clockwise, the holes at different positions on the PCB board will be offset in the negative X-axis direction and the positive Y-axis direction.

[0090] Using translational or rotational compensation alone can only counteract the effect of one type of offset; the remaining offset will still cause inaccurate positioning of the borehole. By adding the X-axis translational compensation parameters to the X-axis rotational compensation parameters, and by adding the Y-axis translational compensation parameters to the Y-axis rotational compensation parameters, full-dimensional offset cancellation can be achieved.

[0091] The effects of translation and rotation on the X and Y axes can be combined and quantified by using the total compensation parameters in the X and Y directions, and the total distance that the drilling actuator needs to adjust on the X and Y axes can be directly output without the need for additional calculations by the actuator.

[0092] The execution control module is used to adjust the position of the drilling actuator according to the compensation parameters and perform a correction operation; the specific process is to obtain the current X-axis position coordinates and Y-axis position coordinates of the drilling actuator in the machine tool coordinate system.

[0093] Add the X-axis position coordinates to the X-axis total compensation parameter to obtain the adjusted X-axis target position coordinates of the drilling actuator; add the Y-axis position coordinates to the Y-axis total compensation parameter to obtain the adjusted Y-axis target position coordinates of the drilling actuator.

[0094] Generate a position adjustment command containing the target position coordinates on the X-axis and Y-axis; send the position adjustment command to the drilling actuator to move it from its current position to the target position.

[0095] The actual position coordinates of the drilling actuator are acquired in real time, and the deviations between the actual position and the target position in the X and Y axes are calculated.

[0096] When both the X-axis deviation and the Y-axis deviation are less than the preset accuracy threshold, it is determined that one correction operation is completed; otherwise, a position adjustment command is regenerated to control the drilling actuator to perform position correction.

[0097] The preset accuracy threshold can be determined by combining the process accuracy requirements of the pre-drilled holes on the PCB board with the actual positioning capability of the drilling actuator. For example, the design drawings of conventional consumer electronics PCB boards require allowable deviations in hole position accuracy. The repeatability of the drilling actuator is 0.03mm. If the accuracy is 0.008mm, the preset accuracy threshold is set as follows: The 0.01mm precision not only meets the requirements of process accuracy but also allows for a reasonable margin of error.

[0098] It should be noted that if no accuracy threshold is set, the drilling actuator will repeatedly make fine adjustments near the target position, reducing processing efficiency. If the correction is judged to be completed when the X-axis deviation or Y-axis deviation is greater than the accuracy threshold, the drilling actuator will not reach the target position, and the hole position deviation of the subsequent drilling will exceed the allowable range of the process, causing circuit damage.

[0099] Please see Figure 3 As shown, the effect verification module is used to acquire an image of the target hole area after one correction, analyze the positional deviation of the target hole and its proximity distance to the PCB board circuit, and determine whether a second correction or drilling is required based on the analysis results. The specific process is as follows: acquire an image of the target hole area after correction; similarly, obtain the positional deviation and proximity distance of the target hole based on the method of obtaining the positional deviation of the reference point and the proximity distance between the hole to be drilled and the PCB board circuit.

[0100] Calculate the Euclidean norm of the positional deviation of the target hole position as the comprehensive value of the positional offset.

[0101] If the overall position offset value is greater than or equal to the secondary correction position threshold, or the proximity distance between the target hole and the PCB board trace is less than or equal to the correction safety threshold, then secondary correction is required; otherwise, drilling is performed.

[0102] It should be noted that after the first correction, factors such as equipment positioning errors and minor deviations in compensation parameters may cause significant offsets in the target hole positions, or the PCB board and the circuit may be too close. If drilling is performed directly, it may cause problems such as hole position deviations and circuit damage. Therefore, it is necessary to use a dual threshold judgment of position and risk to screen out the target hole positions that still need optimization for a second correction.

[0103] The threshold value for the secondary correction position follows these criteria: it should not exceed 80% of the final hole position accuracy requirement of the PCB design, and it must be less than the comprehensive position offset value triggered by the first correction. For example, the allowable deviation for hole position accuracy in typical consumer electronics PCB designs... The position offset after the first correction is less than or equal to 0.02 mm, and the position threshold for the second correction is set to 0.015 mm for example.

[0104] The correction safety threshold can be set based on the standard value of the safety spacing of PCB board lines. For example, for a typical consumer electronics PCB board, the standard value of the safety spacing of lines is 0.15mm, so the correction safety threshold can be set to 0.1mm.

[0105] Please see Figure 4 As shown, a method for intelligent correction of pre-drilled holes on a PCB board includes the following steps: S1. Based on the PCB board reference point image, identify the position coordinates of the reference points and calculate the X-axis deviation value and Y-axis deviation value of each reference point; calculate the arithmetic mean of the X-axis deviation value and Y-axis deviation value of all reference points to obtain the X-axis translational offset and Y-axis translational offset of the PCB board; determine the rotational offset angle of the PCB board based on the pair of reference points with the largest Euclidean distance among the reference points, and calculate the PCB board offset degree by combining the X-axis translational offset and Y-axis translational offset.

[0106] S2. Based on the image of the area to be drilled, form a circular detection area with the hole to be drilled as the center and a preset pixel length as the radius; extract the edge pixels of the PCB board circuit within the detection area, and calculate the Euclidean distance between each edge pixel and the image coordinates; take the minimum value among all Euclidean distances as the proximity distance between the hole to be drilled and the PCB board circuit, and determine the hole location risk level accordingly.

[0107] S3. Analyze the PCB board offset and hole position risk level to determine whether correction is needed; if so, generate compensation parameters for performing correction.

[0108] S4. Adjust the position of the drilling actuator according to the compensation parameters and perform a correction operation.

[0109] S5. After the first correction, acquire an image of the target hole area, analyze the positional deviation of the target hole and its proximity to the PCB board circuit, and determine whether a second correction or drilling is required based on the analysis results.

[0110] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0111] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, in the form of a computer program product.

[0112] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0113] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0114] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

[0115] Finally, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A pre-drilled intelligent deviation correction system for PCB boards, characterized in that, include: The PCB board offset detection module is used to identify the position coordinates of the reference points based on the acquired PCB board reference point images, calculate the X-axis and Y-axis deviation values ​​of each reference point, calculate the arithmetic mean of the X-axis and Y-axis deviation values ​​of all reference points to obtain the X-axis translational offset and Y-axis translational offset of the PCB board, determine the rotational offset angle of the PCB board based on the pair of reference points with the largest Euclidean distance among all reference points, and calculate the PCB board offset degree by combining the X-axis and Y-axis translational offset values. The hole location risk detection module is used to form a circular detection area with the hole location to be drilled as the center and a preset pixel length as the radius based on the acquired image of the area to be drilled; extract the edge pixels of the PCB board circuit within the detection area, calculate the Euclidean distance between each edge pixel and the image coordinates; take the minimum value of all Euclidean distances as the proximity distance between the hole location to be drilled and the PCB board circuit, and determine the hole location risk level accordingly. The correction decision module is used to analyze and determine whether correction is needed based on the PCB board offset and hole position risk level; if so, it generates compensation parameters for performing correction. The execution control module is used to adjust the position of the drilling actuator according to the compensation parameters and perform a correction operation. The effect verification module is used to acquire images of the target hole area after one correction, analyze the positional deviation of the target hole and its proximity to the PCB board circuit, and determine whether a second correction or drilling is required based on the analysis results.

2. The PCB board pre-drilling intelligent correction system according to claim 1, characterized in that, The specific process for calculating the X-axis and Y-axis deviation values ​​of each reference point is as follows: Target segmentation is performed on the PCB board reference point image to obtain multiple candidate contours; Calculate the area and perimeter of each candidate contour, and calculate the roundness based on the area and perimeter and the roundness formula; The area, perimeter, and roundness of each candidate contour are compared with the corresponding standard values, and the sum of squares of the deviation values ​​are calculated. Candidate contours whose sum of squares is less than a set threshold are determined as the contours corresponding to the reference point. Calculate the average pixel coordinates of the reference point contour as the center coordinates in the image coordinate system, and then transform them to the actual measured coordinates in the machine tool coordinate system; Calculate the difference between the actual measured coordinates and the standard coordinates of each reference point in the X and Y directions to obtain the X-axis deviation value and the Y-axis deviation value.

3. The PCB board pre-drilling intelligent correction system according to claim 2, characterized in that, The process for determining the rotation offset angle of the PCB board is as follows: Calculate the Euclidean distance between any two reference points in the actual measured coordinates, and select the pair of reference points with the largest Euclidean distance as the reference point pair; Based on the standard coordinates and actual measured coordinates of the reference point pair, calculate the standard angle and actual angle of the line connecting them in the machine tool coordinate system; Calculate the difference between the actual angle and the standard angle, and use it as the rotation offset angle of the PCB board.

4. The PCB board pre-drilling intelligent correction system according to claim 1, characterized in that, Convert the standard coordinates of the hole to be drilled in the machine tool coordinate system into image coordinates; use the image coordinates of the hole to be drilled as the center of the detection area.

5. The intelligent PCB board pre-drilling hole correction system according to claim 1, characterized in that, The specific process for determining the risk level of a borehole location is as follows: The ratio of the proximity between the hole to be drilled and the PCB board trace to the preset hole diameter value is used as the first risk factor. The ratio of the proximity between the hole to be drilled and the PCB board trace to the standard value of the safe clearance between the hole and the trace is used as the second risk factor. The first risk factor and the second risk factor are weighted and summed to obtain the pore location risk level.

6. The intelligent PCB board pre-drilling hole correction system according to claim 3, characterized in that, The process of determining whether correction is needed based on the PCB board offset and hole position risk level analysis includes: Calculate the Euclidean norms of the X-axis translation offset and the Y-axis translation offset to obtain the combined translation offset value; The ratios of the comprehensive translational offset value and the rotational offset angle to the corresponding preset allowable offset values ​​are respectively used as the translational influence coefficient and the rotational influence coefficient. The translational influence coefficient, rotational influence coefficient and hole location risk level are weighted and summed to obtain the comprehensive correction assessment value; If the comprehensive correction assessment value is greater than or equal to the correction trigger threshold, then correction is required, and compensation parameters for performing the correction are generated.

7. The PCB board pre-drilling intelligent correction system according to claim 3, characterized in that, The specific process for generating the compensation parameters for performance correction is as follows: The negative value of the X-axis translation offset is used as the X-axis translation compensation parameter; the negative value of the Y-axis translation offset is used as the Y-axis translation compensation parameter. Based on the negative of the rotation offset angle, calculate its rotation compensation components on the X and Y axes in the machine tool coordinate system, and use them as the X-axis rotation compensation parameters and Y-axis rotation compensation parameters, respectively. Add the X-axis translation compensation parameters to the X-axis rotation compensation parameters to obtain the total X-axis compensation parameters; add the Y-axis translation compensation parameters to the Y-axis rotation compensation parameters to obtain the total Y-axis compensation parameters. The total compensation parameters in the X and Y directions are used as compensation parameters for performing correction.

8. The intelligent deviation correction system for pre-drilled holes on a PCB board according to claim 1, characterized in that, The process of adjusting the position of the drilling actuator based on compensation parameters to perform one correction is as follows: Obtain the current X-axis and Y-axis position coordinates of the drilling actuator in the machine tool coordinate system; Add the X-axis position coordinates to the total X-axis compensation parameters to obtain the adjusted X-axis target position coordinates of the drilling actuator; Add the Y-axis position coordinates to the total Y-axis compensation parameters to obtain the adjusted Y-axis target position coordinates of the drilling actuator; Generate a position adjustment command containing the target position coordinates on the X-axis and Y-axis; send the position adjustment command to the drilling actuator to move it from its current position to the target position; The actual position coordinates of the drilling actuator are acquired in real time, and the deviations between the actual position and the target position in the X and Y axes are calculated. When both the X-axis deviation and the Y-axis deviation are less than the preset accuracy threshold, it is determined that one correction operation is completed; otherwise, a position adjustment command is regenerated to control the drilling actuator to perform position correction.

9. The intelligent PCB board pre-drilling hole correction system according to claim 1, characterized in that, The process of acquiring an image of the target hole area after the first correction, analyzing the positional deviation of the target hole and its proximity to the PCB board traces, and determining whether a second correction or drilling is required based on the analysis results is as follows: Collect images of the target hole area after correction; similarly, obtain the positional deviation and proximity distance of the target hole based on the method of obtaining the positional deviation of the reference point and the proximity distance between the hole to be drilled and the PCB board circuit. Calculate the Euclidean norm of the positional deviation of the target hole position as the comprehensive value of the positional offset; If the overall position offset value is greater than or equal to the secondary correction position threshold, or the proximity distance between the target hole and the PCB board trace is less than or equal to the correction safety threshold, then secondary correction is required; otherwise, drilling is performed.

10. A method for intelligent correction of pre-drilled holes on a PCB board, characterized in that, Includes the following steps: S1. Based on the PCB board reference point image, identify the position coordinates of the reference points and calculate the X-axis and Y-axis deviation values ​​of each reference point; calculate the arithmetic mean of the X-axis and Y-axis deviation values ​​of all reference points to obtain the X-axis translational offset and Y-axis translational offset of the PCB board; determine the rotational offset angle of the PCB board based on the pair of reference points with the largest Euclidean distance among all reference points, and calculate the PCB board offset degree by combining the X-axis and Y-axis translational offsets. S2. Based on the image of the area to be drilled, a circular detection area is formed with the hole to be drilled as the center and a preset pixel length as the radius; the edge pixels of the PCB board circuit within the detection area are extracted, and the Euclidean distance between each edge pixel and the image coordinates is calculated; the minimum value among all Euclidean distances is taken as the proximity distance between the hole to be drilled and the PCB board circuit, and the hole location risk level is determined accordingly. S3. Analyze the PCB board offset and hole position risk level to determine whether correction is needed; if so, generate compensation parameters for performing correction. S4. Adjust the position of the drilling actuator according to the compensation parameters and perform a correction operation; S5. After one correction, analyze the positional deviation of the target hole and the proximity of the PCB circuit to determine whether a second correction or drilling is required.