A method, apparatus and device for detecting a drilling deviation

By employing a dual screening mechanism to detect drilling depth deviations in PCB drilling, the problem of existing technologies being unable to automatically determine drilling depth deviations has been solved. This enables accurate detection and timely discovery during the drilling process, thereby improving processing efficiency and product quality.

CN122432894APending Publication Date: 2026-07-21SUZHOU VEGA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU VEGA TECH CO LTD
Filing Date
2026-03-16
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing PCB drilling equipment cannot automatically calculate and determine whether the actual drilling depth exceeds the theoretical control depth after the drilling process is completed. This results in the drilling depth deviation problem being discovered only in subsequent processes, affecting processing efficiency.

Method used

A dual screening mechanism is used to detect drilling depth deviation. First, a primary screening is performed using a preset tolerance range. Then, a search range is established with the target hole as the center, and a secondary screening is performed by screening neighboring holes to establish a benchmark drilling depth judgment threshold. The detection results are then output.

Benefits of technology

It enables accurate detection of drilling depth deviation, timely identification of problems, improved processing efficiency and product yield, and avoids missed detections and misjudgments caused by traditional single threshold detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432894A_ABST
    Figure CN122432894A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of drilling depth deviation detection method, device and equipment, drilling depth deviation detection method includes the following steps: obtaining the actual drilling depth data after drilling processing, and the theoretical drilling depth data before drilling processing;Based on the tolerance range of pre-set, all drilling is carried out primary screening, the drilling hole with actual drilling depth data in tolerance range is judged as normal hole, and the drilling hole with actual drilling depth data exceeding tolerance range is judged as out-of-tolerance hole;Secondary screening is executed to all normal holes obtained by primary screening;All out-of-tolerance hole information obtained by primary screening and secondary screening is summarized, drilling depth deviation detection is completed and detection result is output.The present application realizes the accurate detection and intelligent determination of drilling depth deviation in drilling process, through the double comparison mechanism of theoretical drilling depth and actual drilling depth, combined with spatial proximity correlation analysis, effectively identifies the implicit deviation hole that traditional single threshold detection is difficult to find, significantly improves the comprehensiveness and accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of borehole inspection technology, and in particular to a method, apparatus and equipment for detecting drilling depth deviation. Background Technology

[0002] During PCB manufacturing, drilling is required, and precise control of the drilling depth affects PCB quality. However, in actual production, drilling depth deviations are common due to factors such as drill bit wear, board thickness variations, and equipment thermal drift. Current PCB drilling equipment lacks the capability to automatically calculate and determine whether the actual drilling depth deviates from the theoretically set control depth after the drilling process. This results in some PCBs having drilling depth issues only being discovered in later processes, impacting the PCB manufacturer's processing efficiency. Summary of the Invention

[0003] This invention aims to solve the technical problems existing in the prior art and provides a drilling depth deviation detection method, device and equipment that can automatically calculate and determine whether the actual drilling depth exceeds the theoretical control depth after the drilling process is completed, promptly detect drilling depth deviation problems and improve processing efficiency.

[0004] To achieve the objectives of this invention, the embodiments of this invention adopt the following technical solutions:

[0005] A method for detecting drilling depth deviation includes the following steps:

[0006] Obtain the actual drilling depth data after drilling, and the theoretical drilling depth data before drilling;

[0007] All boreholes are screened based on a preset tolerance range. Boreholes whose actual drilling depth data is within the tolerance range are identified as normal boreholes, while boreholes whose actual drilling depth data exceeds the tolerance range are identified as out-of-tolerance boreholes.

[0008] A second screening is performed on all normal holes obtained from the first screening. Any normal hole is taken as the target hole and a preset search range is established for it. Within the search range, several normal holes that are closest to the target hole in space are selected as neighboring holes. A benchmark drilling depth judgment threshold is established based on the actual drilling depth data of all neighboring holes. The actual drilling depth data of the target hole is compared with the benchmark drilling depth judgment threshold. If the actual drilling depth data of the target hole exceeds the benchmark drilling depth judgment threshold, the target hole is corrected and judged as an out-of-tolerance hole; if it does not exceed the threshold, the target hole is judged as a qualified hole.

[0009] Summarize all out-of-tolerance hole information obtained from primary and secondary screening, complete the drilling depth deviation detection, and output the detection results.

[0010] In some embodiments, the tolerance range is defined by a first preset tolerance P1. If the actual drilling depth data k of a certain borehole satisfies k < (1-P1) × the theoretical drilling depth data of the borehole, or k > (1+P1) × the theoretical drilling depth data of the borehole, then the borehole is determined to be an out-of-tolerance borehole; wherein, the first preset tolerance P1 is an adjustable parameter in the form of a percentage.

[0011] In some embodiments, the preset search range established for the target hole is a circular planar region with the center coordinates of the target hole as the center and the preset LODI parameter as the radius; the search range is used to filter out a number of normal holes that are closest to the target hole; within the circular planar region, N normal holes that are closest to the center coordinates of the target hole as neighboring holes are selected, where N is a preset positive integer; and during the selection process, all drill holes that are judged to be out of tolerance by the first-level selection are excluded; and a benchmark drilling depth judgment threshold is established by the actual drilling depth data of all neighboring holes.

[0012] In some embodiments, the median or average of the actual drilling depth data of the N neighboring holes is calculated, and the upper and lower limits of the benchmark drilling depth judgment threshold are constructed in combination with the second preset tolerance P2. The lower limit of the benchmark drilling depth judgment threshold is (1-P2)×the median or average, and the upper limit is (1+P2)×the median or average. The second preset tolerance P2 is an adjustable parameter in percentage form. The second preset tolerance P2 and the first preset tolerance P1 are set to the same or different values. The actual drilling depth data of the target hole is compared with the benchmark drilling depth judgment threshold. If the actual drilling depth data of the target hole is less than the lower limit of the benchmark drilling depth judgment threshold or greater than the upper limit of the benchmark drilling depth judgment threshold, the target hole is determined to be an out-of-tolerance hole. If the actual drilling depth data of the target hole is between the upper and lower limits of the benchmark drilling depth judgment threshold, the target hole is determined to be a qualified hole.

[0013] In some embodiments, if the number of valid normal holes that can be screened within a circular search range with a preset LODI parameter as the radius is less than N, an automatic search range expansion operation is performed, increasing the search radius according to a preset search range expansion value and re-performing the neighboring hole screening operation; the search range expansion value is a custom-set adjustable parameter.

[0014] In some embodiments, the search range expansion strategy is divided into two levels: the first level uses LODI parameter r1 and the number of neighboring holes N1, and the second level uses LODI parameter r2 and the number of neighboring holes N2 when the first level fails to obtain enough neighboring holes or the determination result is unstable, where r1 is less than r2 and N1 is less than N2.

[0015] In some embodiments, the theoretical drilling depth data may be one or more, and the actual drilling depth data may be obtained by means of: the software automatically and synchronously acquiring the drilling depth data file after the PCB drilling equipment has finished processing, or manually selecting and importing a drilling depth data file in a preset format.

[0016] In some embodiments, the output detection results include: if there are out-of-tolerance holes after summarization, an immediate warning message is output, and a standardized drilling depth deviation detection report is generated; the output method of the warning message includes any one or more combinations of software pop-up alarm, audible and visual alarm, and equipment shutdown warning.

[0017] A drilling depth deviation detection device, comprising:

[0018] The data acquisition module is used to acquire the actual drilling depth data after drilling and the theoretical drilling depth data before drilling.

[0019] The first-level screening module is used to perform first-level screening of all boreholes based on a preset tolerance range. Boreholes whose actual drilling depth data is within the tolerance range are judged as normal holes, and boreholes whose actual drilling depth data exceeds the tolerance range are judged as out-of-tolerance holes.

[0020] The secondary screening module is used to perform a secondary screening on all normal holes obtained from the primary screening. It takes any normal hole as the target hole and establishes a preset search range for it. Within the search range, it selects several normal holes that are spatially closest to the target hole as neighboring holes. A benchmark drilling depth threshold is established using the actual drilling depth data of all neighboring holes. The actual drilling depth data of the target hole is compared with the benchmark drilling depth threshold. If the actual drilling depth data of the target hole exceeds the benchmark drilling depth threshold, the target hole is corrected and judged as an out-of-tolerance hole; otherwise, the target hole is judged as a qualified hole.

[0021] The parameter configuration module is used to customize the first tolerance P1, the second tolerance P2, the LODI parameter, and the minimum tolerance.

[0022] The number of neighboring points N and the search range expansion value;

[0023] The results output module is used to summarize all out-of-tolerance hole information obtained from the first-level screening and the second-level screening, complete the drilling depth deviation detection, and output the detection results.

[0024] A PCB drilling device includes a worktable and at least one drilling spindle. The drilling spindle is electrically connected to a drilling depth deviation detection device. The worktable is used to support the PCB. After the drilling spindle drills the PCB, the drilling device generates an actual drilling depth data file and executes the drilling depth deviation detection method according to any one of claims 1 to 8.

[0025] In some embodiments, the number of drilling spindles is two or more, and multiple drilling spindles can perform drilling operations individually or simultaneously; the drilling depth deviation detection device performs drilling depth deviation detection on the holes processed by each drilling spindle.

[0026] The present invention has the following main advantages:

[0027] This invention achieves precise detection and intelligent judgment of drilling depth deviation during PCB drilling. Through a dual comparison mechanism of theoretical and actual drilling depth, combined with spatial proximity correlation analysis, it effectively identifies hidden deviation holes that are difficult to detect using traditional single-threshold detection, significantly improving the comprehensiveness and accuracy of detection. It can promptly identify problems and improve product yield. Other advantages of this invention are illustrated in specific embodiments. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0029] Figure 1 This is a flowchart of a drilling depth deviation detection method provided in an embodiment of the present invention.

[0030] Figure 2 This is a schematic diagram of the PCB board provided in an embodiment of the present invention.

[0031] Figure 3 This is a schematic diagram of a back-drilled hole provided in an embodiment of the present invention.

[0032] Figure 4 This is a schematic diagram of a PCB drilling device provided in an embodiment of the present invention. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0034] In this embodiment, "several" and "more than" refer to two or more. In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0035] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0036] <Example 1>

[0037] This embodiment provides a drilling depth deviation detection method, applied to the drilling depth quality inspection in drilling processes. The drilling object is preferably a PCB board (such as...). Figure 2 (As shown), but not limited to this, it can also be used for other plates requiring controlled drilling depth. This method effectively identifies drilling depth anomalies through a dual screening mechanism. First, a global tolerance screening is performed to quickly locate holes that significantly deviate from the theoretical value; then, a local neighbor point comparison strategy is introduced to accurately identify anomalies that, although within the global tolerance range, have significant depth deviations relative to surrounding holes, based on the drilling depth distribution characteristics within the spatial neighborhood. This layered detection architecture balances detection efficiency and accuracy, avoiding the missed detection problems that may be caused by a single threshold judgment. Figure 2 The diagram shown is a schematic of the PCB board provided in this embodiment. The PCB board has several back-drilled areas M, and each back-drilled area M includes several back-drilled holes T. In this embodiment, the holes formed by drilling are back-drilled holes.

[0038] like Figures 1 to 4 As shown, a drilling depth deviation detection method in this embodiment includes the following steps:

[0039] S100: Obtain the actual drilling depth data after drilling and the theoretical drilling depth data before drilling. Obtain the actual drilling depth data for each hole after PCB drilling, and extract the theoretical drilling depth data for each hole from the original PCB drilling tape. Establish a one-to-one mapping between the actual and theoretical drilling depth data for each hole. The theoretical drilling depth data for a hole position can come from the depth control parameters in the original drilling tape file or from a manually pre-set theoretical depth table; the actual drilling depth data is generated during the processing by a CNC drilling device with drilling depth recording function and output as a drilling depth data file.

[0040] S200: Based on a preset tolerance range, all drilled holes undergo primary screening. Drilled holes with actual drilling depth within the tolerance range are classified as normal holes, while those with actual drilling depth exceeding the tolerance range are classified as out-of-tolerance holes. Through these steps, drilled holes that significantly deviate from the theoretical value globally can be quickly identified, achieving first-level coarse-grained anomaly detection. This tolerance range can be flexibly set according to the PCB board type, drilled hole diameter, and process requirements.

[0041] S300: A secondary screening is performed on all normal holes obtained from the primary screening. Any normal hole is selected as the target hole, and a preset search range is established for it. Within this search range, several normal holes spatially closest to the target hole are selected as neighboring holes. A benchmark drilling depth judgment threshold is established using the actual drilling depth data of all neighboring holes. The actual drilling depth data of the target hole is compared with the benchmark drilling depth judgment threshold. If the actual drilling depth data of the target hole exceeds the benchmark drilling depth judgment threshold, the target hole is corrected and judged as an out-of-tolerance hole; otherwise, it is judged as a qualified hole. This technical solution provides refined detection for cases that were not identified in the primary screening but may have local drilling depth anomalies. Specifically, for each normal hole, the system establishes a circular search area centered on it, searches for several spatially closest neighboring normal holes within this area, constructs a local benchmark judgment interval based on the actual drilling depth data of these neighboring holes, and then judges the consistency of the target hole's drilling depth relative to its surrounding holes. This local comparison mechanism can effectively identify drilling depth deviations caused by factors such as uneven local thickness of the plate, regional equipment thermal drift, or progressive wear of the drill bit, thus overcoming the limitations of a single global threshold judgment.

[0042] S400: Summarize all out-of-tolerance hole information obtained from the primary and secondary screenings, complete the drilling depth deviation detection, and output the detection results. Merge all boreholes identified as out-of-tolerance in step S200 with all boreholes identified as out-of-tolerance after secondary screening correction in step S300 to form a complete list of out-of-tolerance holes. Output a detection report containing information such as out-of-tolerance hole location coordinates, actual drilling depth, theoretical drilling depth, and deviation amount for subsequent quality traceability and process optimization.

[0043] The above technical solution enables automatic calculation and analysis of dimensions and positions after drilling is completed on each batch of PCB boards, and real-time detection of any out-of-tolerance issues. Once an anomaly is detected, the system immediately reports the problem and prompts relevant personnel to take corrective measures. This timely problem detection and handling mechanism significantly reduces the flow of defective products in subsequent processes, improving both the overall yield rate of the production line and optimizing the efficiency of the production process. Furthermore, this method achieves comprehensive coverage detection of drilling depth deviations through the synergistic effect of a dual screening mechanism. The first-level screening quickly intercepts abnormal drill holes that significantly deviate from theoretical values ​​from a global perspective, while the second-level screening delves deeper into potential hidden deviations from the perspective of local spatial correlation. The two complement each other, forming a three-dimensional detection system from coarse to fine, from global to local.

[0044] Specifically, the tolerance range is defined by a first preset tolerance P1. If the actual drilling depth k of a certain borehole satisfies k < (1-P1) × the theoretical drilling depth of the borehole, or k > (1+P1) × the theoretical drilling depth of the borehole, then the borehole is determined to be an out-of-tolerance borehole. The first preset tolerance P1 is an adjustable parameter in percentage form. Through the above technical solution, the tolerance range and drilling processing characteristics are adaptively matched through proportional dynamic tolerance, resulting in a significant improvement in detection accuracy and scenario adaptability. For example, suppose the actual drilling depth of a certain borehole is k, and the corresponding theoretical drilling depth is L. If k < (1-P1) × L, or k > (1+P1) × L, then the borehole is determined to be an out-of-tolerance borehole; if k is within the range of (1-P1) × L to (1+P1) × L, then the borehole is determined to be a normal borehole. Taking a theoretical drilling depth of 0.8mm and P1=5% as an example, if a hole's actual drilling depth is 0.75mm, which is less than 0.76mm, it is considered an out-of-tolerance hole; if another hole's actual drilling depth is 0.82mm, which is within the tolerance range, it is considered a normal hole. Operators can set different first preset tolerances P1 according to different areas of the PCB and different spindles of the processing equipment. For example, setting the first preset tolerance P1=5% for area A of the PCB corresponds to a hole with a theoretical drilling depth of 0.8mm, with a tolerance range of 0.76mm-0.84mm; for holes in area B with a theoretical drilling depth of 0.75mm, setting a differentiated first preset tolerance P1=4%, with a tolerance range of 0.72mm-0.78mm; and for holes processed by a specific spindle, setting P1=6%, with a tolerance range of 0.752mm-0.848mm, thus achieving differentiated tolerance configurations for different areas and different spindles.

[0045] Furthermore, the preset search range established for the target hole is a circular planar area with the center coordinates of the target hole as the center and the preset LODI parameter as the radius. Within the search range, several normal holes closest to the target hole are selected. Within the circular planar area, N normal holes with the straight-line distance to the center coordinates of the target hole are selected as neighboring holes, where N is a preset positive integer. During the selection process, all drill holes judged as exceeding tolerance by the first-level selection are excluded. A benchmark drilling depth judgment threshold is established using the actual drilling depth data of all neighboring holes. Since the drilling depth error in PCB drilling is affected by factors such as spindle vibration, tool wear, and board stress, it exhibits a radial attenuation distribution characteristic centered on the target hole (i.e., the closer the holes are, the stronger the correlation of processing errors). The circular area is a geometric shape that ensures "equal distances from the center to the boundary in all directions." The circular range centered on the target hole coordinates ensures that the selected neighboring holes are spatially highly consistent with the processing environment of the target hole (such as the same spindle processing area and the same board stress zone), and their drilling depth data can truly reflect the reasonable drilling depth level that the target hole should have. The N holes that are closest in a straight line have the strongest consistency in processing sequence, spindle running status, and local characteristics of the sheet metal. Fixing the N nearest neighboring holes can ensure that the baseline calculation sample size of all target holes is consistent, avoiding judgment deviations caused by uneven numbers of neighboring holes.

[0046] Specifically, the median of the actual drilling depth data of the N neighboring holes is calculated, and an upper and lower limit of the benchmark drilling depth judgment threshold is constructed by combining it with a second preset tolerance P2. The lower limit of the benchmark drilling depth judgment threshold is (1-P2)×the median, and the upper limit is (1+P2)×the median. The second preset tolerance P2 is an adjustable parameter in percentage form. The second preset tolerance P2 and the first preset tolerance P1 are set to the same or different values. The actual drilling depth data of the target hole is compared with the benchmark drilling depth judgment threshold. If the actual drilling depth data of the target hole is less than the lower limit of the benchmark drilling depth judgment threshold or greater than the upper limit, the target hole is determined to be an out-of-tolerance hole. If the actual drilling depth data of the target hole is between the upper and lower limits of the benchmark drilling depth judgment threshold, the target hole is determined to be a qualified hole. By excluding out-of-tolerance holes selected in the first stage and using median statistics, abnormal data interference is eliminated from the source, significantly improving the accuracy of the second screening. For example: Set secondary filtering parameters: LODI parameter: Search radius, set to 5mm, that is, the search range is a circular planar area with the center coordinates of the target hole as the center and a radius of 5mm; Number of nearest neighbor points N: set to 8, that is, each target hole needs to filter 8 neighboring holes; Second preset tolerance P2: set to 3%, which is less than the first-level filtering P1=5%, to achieve a more stringent local consistency check; Search range expansion parameter: Single expansion step size 2mm, maximum expansion number 3 times, maximum search radius upper limit 15mm.

[0047] Furthermore, if the number of valid normal holes that can be screened within a circular search range with a preset LODI parameter radius is less than N, the search range expansion operation is automatically executed. The search radius is increased according to a preset expansion value, and the neighboring hole screening operation is re-executed. The search range expansion value is a custom-defined adjustable parameter, typically set as an integer multiple of the LODI parameter or a fixed increment, such as 0.5mm or 1.0mm each time, until the neighboring hole number requirement is met or the preset maximum search radius limit is reached. This dynamic expansion mechanism effectively avoids the problem of insufficient neighboring samples due to sparse hole positions in local areas or special process layouts, ensuring that each batch of target holes can obtain a sufficient statistical reference basis. When the search radius is expanded to the maximum limit value and still cannot meet the neighboring hole number requirement, the system triggers an anomaly warning, prompting the operator to manually review or check for process anomalies such as missed drilling or misalignment in that area, thus organically combining the fault tolerance of the detection process with the rigor of quality control.

[0048] Specifically, the secondary screening method is as follows:

[0049] (1) Initial search range construction: With the center coordinates (X0,Y0) of the target hole D0 as the center, and the radius r of the LODI parameter 5mm, construct a circular search area S;

[0050] (2) Preliminary screening of neighboring holes: In this circular area, screen all normal holes judged by the first-level screening, exclude all first-level out-of-tolerance holes, calculate the straight-line distance between the center coordinates of the normal holes and the target hole in the area, sort them from near to far, and take the first 8 normal holes as the neighboring holes of the target hole.

[0051] (3) Automatic expansion of search range: If there are fewer than 8 valid normal holes within the initial 5mm radius search range, the range expansion operation will be performed automatically: the search radius will be expanded to 7mm in a single step of 2mm, and the adjacent hole screening will be performed again; if there are still fewer than 8, the range will be expanded to 9mm, 11mm, until the maximum search radius of 15mm is reached, or 3 expansion operations will be completed.

[0052] (4) Marking of holes to be verified: If the number of valid normal holes is still less than 8 after the search radius is expanded to 15mm, the target hole is marked as a hole to be verified, stored in the data table to be verified, triggering a manual verification prompt, and is not included in the subsequent median calculation and judgment;

[0053] (5) Select 8 effective neighboring holes for the target hole, calculate the median of the actual drilling depth data of the 8 neighboring holes, and combine it with the second preset tolerance P2=3% to construct the upper and lower limits of the benchmark drilling depth judgment threshold:

[0054] Lower limit of the benchmark drilling depth determination threshold: (1-P2)×median = 0.97×median

[0055] Upper limit of the benchmark drilling depth determination threshold: (1+P2)×median = 1.03×median

[0056] Example: The actual drilling depths of eight adjacent holes of a target hole are 0.79mm, 0.80mm, 0.80mm, 0.81mm, 0.81mm, 0.81mm, 0.82mm, and 0.82mm, respectively. The median, which is the average of the two middle holes, is 0.81mm. Combining P²=3%, the threshold range is 0.7857mm-0.8343mm. If the actual drilling depth of the target hole is 0.78mm, which is less than the lower threshold of 0.7857mm, it is corrected and classified as an out-of-tolerance hole. If the actual drilling depth of the target hole is 0.82mm, which is within the threshold range, it is classified as a qualified hole.

[0057] In practical applications, key parameters such as the first preset tolerance P1, the second preset tolerance P2, the LODI parameter, the number of neighboring points N, and the search range expansion value can all be customized according to the specific characteristics of the sheet material, processing accuracy requirements, and historical quality data. This allows the detection strategy to accurately match the needs of different production scenarios. Simultaneously, the dynamic expansion mechanism of the search range ensures that even when the hole distribution is sparse or the number of normal holes in a local area is insufficient, the system can still automatically expand the search radius to obtain enough neighboring samples, maintaining the stability and continuity of the detection.

[0058] In another implementation, during the secondary screening stage, the median actual drilling depth of adjacent holes is replaced with the average value to adapt to processing scenarios with more uniform hole distribution and smaller overall errors. During secondary screening, the difference between the actual drilling depth of the target hole and the average value is compared. If the difference is less than (1-P2)*average value or greater than (1+P2)*average value, the hole is considered out of tolerance; if it falls within the above range, it is considered a qualified hole. Since the average value is sensitive to individual deviations in adjacent holes, this embodiment is suitable for production lines with relatively stable drilling equipment and fewer local anomalies, allowing for more detailed monitoring of minor overall deviations.

[0059] As another implementation, this embodiment performs hierarchical optimization of the search range expansion strategy and parameter configuration to adapt to complex product scenarios with uneven via density distribution and obvious local anomalies. In this embodiment, during the secondary screening, the search range expansion is divided into two levels: the first level uses a smaller LODI parameter r1 and the number of neighboring vias N1; the second level uses a larger search radius r2 and the number of neighboring vias N2 when the first level fails to obtain enough neighboring vias or the judgment result is unstable. By accurately adapting the two-level parameters to complex PCBs with uneven via density and local anomalies, long-distance interference and random errors are filtered out, improving the accuracy of the judgment.

[0060] Specifically, in the first-level search, the target hole Di (i=0, 1, 2...n) is used as the center, the search radius is r1 (e.g., 8mm), and the number of neighboring holes is set to N1=8. In the second-level screening, the 8 nearest holes from the normal hole set are selected as neighboring holes, and their median actual drilling depth M1 and average value A1 are calculated. Then, the actual drilling depth of the target hole is compared with M1 or A1. When the difference is within the tolerance range corresponding to P2_1, the hole is directly judged as qualified, and there is no need to enter the second-level search. When the difference exceeds the range of P2_1 or the number of neighboring holes is less than N1, the second-level search is entered. In the second-level search, the search radius is expanded to r2 (e.g., 20mm), the number of neighboring holes is set to N2 (e.g., 20), and the 20 nearest normal holes are reselected as neighboring holes, and their median actual drilling depth M2 and average value A2 are calculated. In this embodiment, the system can decide whether to use M2 or A2 as the second-level benchmark drilling depth according to the strategy set in the parameter configuration module. For example, it can be set to prioritize the median, and if the sample size is insufficient, the average value can be used.

[0061] Furthermore, the theoretical drilling depth data can be one or more, and the actual drilling depth data can be acquired through methods such as: the software automatically and synchronously acquiring the drilling depth data file after the PCB drilling equipment completes processing, or manually selecting and importing a drilling depth data file in a preset format. After the PCB drilling equipment completes drilling processing, it can automatically generate a standardized format actual drilling depth data file, containing information such as the hole number, center coordinates (X / Y axis), machining spindle number, actual drilling depth value, and processing time for each hole. When the PCB drilling equipment has multiple drilling spindles, it can set multiple theoretical drilling depth data, each corresponding to the theoretical drilling depth configuration of different spindles, to achieve differentiated detection across multiple spindles. For example, a six-axis drilling equipment can set six independent theoretical drilling depth data, corresponding to spindles 1 to 6 respectively. The theoretical drilling depth value of each spindle can be independently set according to its processing characteristics, tool specifications, and process requirements. During actual detection, the system automatically identifies the machining spindle number of each hole and calls the corresponding spindle's theoretical drilling depth data for comparison and analysis, ensuring the accuracy and consistency of detection in multi-spindle parallel processing scenarios.

[0062] Furthermore, the output detection results include: if out-of-tolerance holes are found after summarizing, an immediate warning message is output, and a standardized drilling depth deviation detection report is generated simultaneously. The report content includes: processing batch information, PCB board information, and detailed information on out-of-tolerance holes (hole number, coordinates, actual drilling depth, theoretical drilling depth, deviation value, etc.). The warning message output method includes any one or more combinations of software pop-up alarms, audible and visual alarms, and equipment shutdown warnings. Software pop-up alarms display the number and location distribution of out-of-tolerance holes in a prominent red pop-up window on the equipment's operating interface. After clicking the pop-up, the operator can jump to a detailed visual detection interface to view the specific distribution location of out-of-tolerance holes on the PCB board. Audible and visual alarms provide continuous audible and visual prompts through a buzzer and warning light connected to the equipment, suitable for noisy production line environments or situations where operators temporarily leave their workstations, ensuring that abnormal information can be detected in a timely manner. Equipment shutdown warnings automatically send a shutdown command to the drilling equipment or lock the start permission for the next batch of processing when multiple out-of-tolerance holes are detected consecutively or when serious drilling depth deviations occur, preventing the continuous generation of defective products. The three output methods can be flexibly combined and configured according to production line management requirements to achieve hierarchical response and precise control.

[0063] The drilling depth deviation detection method in this embodiment achieves comprehensive coverage detection of drilling depth deviations through the synergistic effect of a dual screening mechanism. The first-level screening quickly intercepts abnormal boreholes that significantly deviate from theoretical values ​​from a global perspective, while the second-level screening delves deeper into potential hidden deviations from the perspective of local spatial correlation. These two mechanisms complement each other, forming a three-dimensional detection system that progresses from coarse to fine, and from global to local. This layered and progressive detection architecture ensures both detection efficiency and significantly improves detection accuracy, effectively avoiding the missed detections or misjudgments that may occur with single-threshold judgment methods. Furthermore, this method introduces a dynamic parameter configuration mechanism, giving the detection system high flexibility and scalability. Key parameters such as the first preset tolerance P1, the second preset tolerance P2, the LODI parameter, the number of neighboring points N, and the search range expansion value can all be customized according to specific plate characteristics, processing accuracy requirements, and historical quality data, enabling the detection strategy to accurately match the needs of different production scenarios.

[0064] <Example 2>

[0065] In this embodiment, the parts that are the same as in Embodiment 1 are given the same reference numerals, and the same text descriptions are omitted.

[0066] Compared to Embodiment 1, this embodiment provides a drilling depth deviation detection device, including a data acquisition module, a primary screening module, a secondary screening module, a parameter configuration module, and a result output module. These modules interact via a bus to collaboratively complete the drilling depth deviation detection process in software logic. Specifically:

[0067] The data acquisition module is used to acquire the actual drilling depth data after drilling and the theoretical drilling depth data before drilling. The data acquisition module establishes a data interface with the industrial control system of the PCB drilling equipment. After the equipment completes processing, it automatically and synchronously acquires the actual drilling depth data file generated by the equipment. A manual import interface is provided, allowing operators to select locally stored original drill tape files for drilling depth data. The module parses the drilling depth data file and drill tape file to extract information such as the hole number, coordinates, actual drilling depth value, theoretical drilling depth value, and machining spindle number.

[0068] The primary filtering module performs a primary filtering of all boreholes based on a preset tolerance range. Boreholes with actual drilling depth data within the tolerance range are classified as normal boreholes, while boreholes with actual drilling depth data exceeding the tolerance range are classified as out-of-tolerance boreholes. The primary filtering module receives the theoretical and actual drilling depth values ​​for each borehole from the data acquisition module and calculates the tolerance range based on a preset first tolerance P1.

[0069] The secondary screening module performs a secondary screening on all normal holes obtained from the primary screening. It takes any normal hole as the target hole and establishes a preset search range for it. Within this search range, it selects several normal holes that are spatially closest to the target hole as neighboring holes. A benchmark drilling depth threshold is established using the actual drilling depth data of all neighboring holes. The actual drilling depth data of the target hole is compared with this benchmark threshold. If the actual drilling depth data of the target hole exceeds the benchmark threshold, the target hole is corrected and judged as an out-of-tolerance hole; otherwise, it is judged as a qualified hole. In the secondary screening module, normal holes from the primary screening results are used as candidate samples. Any normal hole is taken as the target hole, and the drilling depth is determined according to its center coordinates (X, X) on the PCB plane. i ,Y i The search range is constructed using a preset LODI parameter as the radius, forming a circular search area. Within this area, the nearest normal holes to the target hole are searched, while out-of-tolerance holes already identified in the first-stage screening are excluded, thus obtaining the set of neighboring holes for the target hole. When the second-stage screening module detects that the number of candidate normal holes is less than N, it automatically initiates a search range expansion strategy, adding a preset search range expansion value to the current search radius and performing the neighboring hole search again. This expansion process can be iterated multiple times until N normal holes are found or the preset maximum radius is reached.

[0070] The parameter configuration module is used to customize the first tolerance P1, the second tolerance P2, the LODI parameter, and the minimum tolerance.

[0071] The number of neighboring points N and the search range expansion value. In this embodiment, these parameters can be adjusted by process engineers through a graphical interface according to different plate materials, hole diameters, and equipment stability. It also supports saving commonly used parameter combinations as process templates to quickly switch the result output module between different products. This module is used to summarize all out-of-tolerance hole information obtained from primary and secondary screening, complete the drilling depth deviation detection, and output the detection results.

[0072] <Example 3>

[0073] In this embodiment, the parts that are the same as in Embodiment 1 and Embodiment 2 are given the same reference numerals, and the same text descriptions are omitted.

[0074] like Figure 4 As shown, compared to Embodiments 1 and 2, this embodiment provides a PCB drilling device, including a worktable 1 and at least one drilling spindle 2. The drilling spindle 2 moves along the Z-axis under the control of a CNC system and holds a drilling tool to drill holes in the PCB board 3. The drilling spindle can be a single-axis or multi-axis structure, such as 2-axis, 4-axis, 6-axis, or more. Multiple spindles can drill different processing areas simultaneously or sequentially to improve processing efficiency. The drilling depth deviation detection device detects the drilling depth deviation of each hole drilled by the drilling spindle. The drilling spindle is electrically connected to the drilling depth deviation detection device. The worktable supports the PCB. After the drilling spindle drills the PCB, the drilling depth deviation detection device generates an actual drilling depth data file and executes the drilling depth deviation detection method of Embodiment 1. In this embodiment, the drilling depth deviation detection device is integrated into the industrial control terminal of the PCB drilling equipment in the form of software. It is deeply integrated with the equipment control system of the industrial control terminal and can directly and automatically obtain the actual drilling depth data file and the original drill strip file from the control system. The device executes the drilling depth deviation detection method and, after completing the detection, feeds back the result to the display terminal in real time.

[0075] The above embodiment achieves accurate detection of PCB drilling depth through a two-stage screening mechanism. First, a rapid initial screening is performed using the global tolerance range to identify abnormal hole positions that significantly deviate from the theoretical value. Then, for holes within the normal range, local spatial correlation analysis is introduced for a secondary, refined judgment, effectively identifying potential defective holes that, while within the global tolerance range, exhibit significant local differences from adjacent areas. This layered detection strategy balances detection efficiency and judgment accuracy, avoiding the missed detections or false positives that might result from a single threshold judgment.

[0076] In specific application scenarios, it can flexibly adapt to the processing requirements of PCB boards of different specifications. For products with dense hole positions and stringent precision requirements, such as high-density interconnect boards or arbitrary-layer interconnect boards, drilling depth fluctuations can be captured at a local microscale by adjusting the LODI parameter and the number of adjacent holes N; while for ordinary multilayer boards, the search range can be appropriately widened to improve the detection speed. The independent adjustable characteristics of parameters P1 and P2 allow users to control the leniency of global screening and the sensitivity of local judgment according to the process window requirements, thereby realizing customized configuration of the detection strategy.

[0077] PCB drilling equipment integrates drilling depth deviation detection functionality deep into the manufacturing process. In a multi-spindle configuration, the detection device independently acquires data and analyzes deviations for each spindle. This supports both individual spindle parameter settings to meet mixed-board processing needs and cross-sectional comparisons to ensure consistency across multiple spindles. When an out-of-tolerance hole is detected, the equipment can respond immediately according to a preset strategy, either triggering a shutdown for manual confirmation or marking the defective board and continuing subsequent processing, achieving a dynamic balance between quality assurance and production efficiency.

[0078] In the above embodiments one to three, during the working process, depending on the different working environments, some of the technical implementation methods of embodiments one to three can be combined or replaced.

[0079] The technical principles of the present invention have been described above in conjunction with specific embodiments. However, it should be noted that these descriptions are merely for explaining the principles of the present invention and should not be construed as limiting the scope of protection of the present invention in any way. Based on this explanation, those skilled in the art can conceive of other specific embodiments or equivalent substitutions of the present invention without creative effort, and all such embodiments will fall within the scope of protection of the present invention.

Claims

1. A method for detecting drilling depth deviation, characterized in that, Includes the following steps: Obtain the actual drilling depth data after drilling, and the theoretical drilling depth data before drilling; All boreholes are screened based on a preset tolerance range. Boreholes whose actual drilling depth data is within the tolerance range are identified as normal boreholes, while boreholes whose actual drilling depth data exceeds the tolerance range are identified as out-of-tolerance boreholes. A second screening is performed on all normal holes obtained from the first screening. Any normal hole is taken as the target hole and a preset search range is established for it. Within the search range, several normal holes that are closest to the target hole in space are selected as neighboring holes. A benchmark drilling depth judgment threshold is established based on the actual drilling depth data of all neighboring holes. The actual drilling depth data of the target hole is compared with the benchmark drilling depth judgment threshold. If the actual drilling depth data of the target hole exceeds the benchmark drilling depth judgment threshold, the target hole is corrected and judged as an out-of-tolerance hole. If the value is within the acceptable range, the target hole is considered a qualified hole. Summarize all out-of-tolerance hole information obtained from primary and secondary screening, complete the drilling depth deviation detection, and output the detection results.

2. The drilling depth deviation detection method according to claim 1, characterized in that, The tolerance range is defined by a first preset tolerance P1. If the actual drilling depth data k of a certain borehole satisfies k < (1-P1) × the theoretical drilling depth data of the borehole, or k > (1+P1) × the theoretical drilling depth data of the borehole, then the borehole is determined to be an out-of-tolerance borehole. The first preset tolerance P1 is an adjustable parameter in the form of a percentage.

3. The drilling depth deviation detection method according to claim 1, characterized in that, The preset search range established for the target hole is a circular planar area with the center coordinates of the target hole as the center and the preset LODI parameter as the radius. Within the search range, several normal holes that are closest to the target hole are selected. Within the circular planar area, N normal holes that are closest to the center coordinates of the target hole as neighboring holes are selected, where N is a preset positive integer. During the selection process, all drill holes that are judged to be out of tolerance by the first-level selection are excluded. A benchmark drilling depth judgment threshold is established through the actual drilling depth data of all neighboring holes.

4. The drilling depth deviation detection method according to claim 3, characterized in that, Calculate the median or average of the actual drilling depth data of the N neighboring holes, and construct the upper and lower limits of the benchmark drilling depth judgment threshold in combination with the second preset tolerance P2. The lower limit of the benchmark drilling depth judgment threshold is (1-P2)×the median or average, and the upper limit is (1+P2)×the median or average. The second preset tolerance P2 is an adjustable parameter in percentage form. The second preset tolerance P2 and the first preset tolerance P1 are set to the same or different values. Compare the actual drilling depth data of the target hole with the benchmark drilling depth judgment threshold. If the actual drilling depth data of the target hole is less than the lower limit of the benchmark drilling depth judgment threshold or greater than the upper limit of the benchmark drilling depth judgment threshold, the target hole is judged to be an out-of-tolerance hole. If the actual drilling depth data of the target hole is between the upper and lower limits of the benchmark drilling depth judgment threshold, the target hole is judged to be a qualified hole.

5. The drilling depth deviation detection method according to claim 4, characterized in that, If the number of valid normal holes that can be screened within the circular search range with the preset LODI parameter as the radius is less than N, the search range expansion operation will be automatically executed. The search radius will be increased according to the preset search range expansion value, and the neighboring hole screening operation will be re-executed. The search range expansion value is a custom-set adjustable parameter.

6. The drilling depth deviation detection method according to claim 5, characterized in that, The search range expansion strategy is divided into two levels: the first level uses LODI parameter r1 and the number of neighboring holes N1, and the second level uses LODI parameter r2 and the number of neighboring holes N2 when the first level fails to obtain enough neighboring holes or the judgment result is unstable. r1 is less than r2 and N1 is less than N2.

7. The drilling depth deviation detection method according to claim 1, characterized in that, The theoretical drilling depth data can be one or more, and the actual drilling depth data can be obtained by means of: the software automatically and synchronously acquiring the drilling depth data file after the PCB drilling equipment has finished processing, or manually selecting and importing a drilling depth data file in a preset format.

8. The drilling depth deviation detection method according to claim 1, characterized in that, The output detection results include: if there are out-of-tolerance holes after summarization, an immediate warning message will be output, and a standardized drilling depth deviation detection report will be generated at the same time; the output of the warning message includes any one or more combinations of software pop-up alarm, audible and visual alarm, and equipment shutdown warning.

9. A drilling depth deviation detection device, characterized in that, include: The data acquisition module is used to acquire the actual drilling depth data after drilling and the theoretical drilling depth data before drilling. The first-level screening module is used to perform first-level screening of all boreholes based on a preset tolerance range. Boreholes whose actual drilling depth data is within the tolerance range are judged as normal holes, and boreholes whose actual drilling depth data exceeds the tolerance range are judged as out-of-tolerance holes. The secondary screening module is used to perform a secondary screening on all normal holes obtained from the primary screening. It takes any normal hole as the target hole and establishes a preset search range for it. Within the search range, it selects several normal holes that are spatially closest to the target hole as neighboring holes. A benchmark drilling depth threshold is established using the actual drilling depth data of all neighboring holes. The actual drilling depth data of the target hole is compared with the benchmark drilling depth threshold. If the actual drilling depth data of the target hole exceeds the benchmark drilling depth threshold, the target hole is corrected and judged as an out-of-tolerance hole; otherwise, the target hole is judged as a qualified hole. The parameter configuration module is used to customize the first tolerance P1, the second tolerance P2, the LODI parameter, and the minimum tolerance. The number of neighboring points N and the search range expansion value; The results output module is used to summarize all out-of-tolerance hole information obtained from the first-level screening and the second-level screening, complete the drilling depth deviation detection, and output the detection results.

10. A PCB drilling device, characterized in that, The device includes a worktable and at least one drilling spindle, which is electrically connected to a drilling depth deviation detection device. The worktable is used to support a PCB. After the drilling spindle drills a hole in the PCB, the drilling equipment generates a data file of the actual drilling depth and performs the drilling depth deviation detection method as described in any one of claims 1 to 8.

11. The drilling equipment according to claim 10, characterized in that, The number of drilling spindles is two or more, and multiple drilling spindles can perform drilling operations individually or simultaneously; the drilling depth deviation detection device performs drilling depth deviation detection on the holes processed by each drilling spindle.