Intelligent production control method for PCB
By using machine vision inspection and affine transformation matrix technology, the system automatically identifies character offsets on PCB boards and generates pre-deformed silkscreen graphics, solving the problem of positional offsets in traditional PCB character silkscreen printing and achieving efficient and accurate character compensation and production control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PANZHIHUA PANKE ELECTRONIC TECH CO LTD
- Filing Date
- 2026-02-04
- Publication Date
- 2026-04-24
AI Technical Summary
In traditional PCB character silkscreen printing processes, character position misalignment leads to decreased soldering quality and assembly difficulties. Existing manual sampling inspection is inefficient and highly subjective, and cannot achieve real-time feedback and dynamic compensation.
By employing machine vision inspection technology, through image feature extraction and affine transformation matrix, characters and vias on PCB boards are automatically identified, and pre-deformed silkscreen graphic files are generated to achieve accurate detection and automatic compensation of character offset.
It achieves objective, accurate, and automated evaluation of character offset, reducing scrap rate and rework costs, and improving the intelligence level and overall efficiency of the production line.
Smart Images

Figure CN121639686B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision inspection technology, and more specifically, to an intelligent production control method for PCB circuit boards. Background Technology
[0002] As the core carrier of electronic devices, PCBs (Printed Circuit Boards) typically require silkscreen printing of characters and markings to indicate the location, model, and orientation of components. This is crucial for subsequent assembly, testing, and maintenance. In traditional PCB silkscreen printing processes, the printed graphics are controlled by pre-designed files. However, in actual production, due to factors such as thermal expansion and contraction of the PCB material, mechanical tolerances of production equipment, alignment system errors, and cumulative deformation from multiple laminations, the actual printed character positions often deviate from their theoretical design positions (i.e., relative to fixed structures such as pads and vias). This deviation can lead to characters covering pads, affecting soldering quality, or misalignment with corresponding components, causing assembly problems. Currently, the industry mostly uses manual sampling combined with visual comparison to monitor character printing quality. This method is inefficient, subjective, and lagging, unable to achieve real-time feedback and dynamic compensation during production. Therefore, there is an urgent need for a production control method that can intelligently and accurately detect local character deviations and automatically and adaptively correct the silkscreened graphics. Summary of the Invention
[0003] The purpose of this invention is to provide an intelligent production control method for PCB circuit boards to solve the above-mentioned technical problems.
[0004] To achieve the above objectives, the embodiments of this application provide the following technical solutions:
[0005] This application provides an intelligent production control method for PCB circuit boards. The method includes: responding to a quality inspection operation command, a camera captures a sampled PCB board located on a quality inspection table to obtain a first quality inspection pattern; then, based on a color-based image feature extraction algorithm, white character areas, multiple silver-white solder points, and black fixed via areas are extracted from the first quality inspection pattern; then, a preset shape-based image algorithm is used to remove the silver-white circular and square block-shaped solder points, leaving only the line-shaped white character areas and the black block-shaped fixed via areas, which are recorded as the first feature pattern; a standard character board is retrieved, and the centers of the multiple black fixed via areas in the standard character board are aligned with the centers of the black fixed via areas in the first feature pattern to obtain a first superimposed mapping pattern; the character offset is evaluated based on the first superimposed mapping pattern, and if the offset exceeds a preset threshold, the original screen printing pattern in the screen printing machine is corrected based on the offset.
[0006] Optionally, the character offset is evaluated based on the first overlay mapping pattern, including:
[0007] The silkscreen circuit distribution diagram in the PCB board is mapped onto the standard character board, thereby obtaining the number of intersections between the identification frame and the circuit corresponding to each component on the standard character board, and the intersection density is calculated based on the perimeter of the identification frame and the number of intersections.
[0008] The standard character board is divided into three local observation areas: upper, middle, and lower. Then, based on the cross density of the marker boxes in each local observation area, multiple marker boxes with low cross density are selected and recorded as offset measurement markers. This yields multiple offset measurement markers for each local observation area.
[0009] Based on the component number corresponding to each offset measurement identifier, the corresponding component measurement area is identified in the first superimposed mapping pattern. The measurement area includes a first identifier block diagram corresponding to the first feature pattern and a second identifier block diagram corresponding to the standard character plate.
[0010] The offset vector corresponding to the component measurement area is calculated based on the midpoint position offset of the first and second identification block diagrams. The offset vector points from the midpoint corresponding to the second identification block diagram to the midpoint corresponding to the first identification block diagram. The average vector value corresponding to the local observation area is calculated based on multiple offset vectors within the local observation area.
[0011] Optionally, if the offset exceeds a preset threshold, the original screen printing pattern in the screen printing machine is corrected based on the offset, including:
[0012] Based on the vector length value of the upper, middle and lower position weights and the average vector value corresponding to each local observation area, the character offset estimate of the current PCB board is evaluated by a weighted algorithm. When the vector angle between the average vector values of the two corresponding local observation areas on the upper side and the lower part observation area is greater than 105°, the character offset estimates corresponding to the upper local observation area and the lower part observation area are amplified according to a preset gain coefficient. The sum of the offset estimates of the three local observation areas after amplification is calculated. When the sum of the offset estimates is greater than a preset threshold, the original silkscreen pattern in the silkscreen machine is corrected based on the offset.
[0013] Optionally, the original screen printing pattern in the screen printing machine is corrected based on the offset, including:
[0014] An affine transformation matrix is generated for each local observation region based on the vector mean value corresponding to each local observation region, wherein the translation parameter in the affine transformation matrix is 50%–70% of the inverse value of the vector mean value.
[0015] A smooth transition interval is set for the parameters of the affine transformation matrix corresponding to adjacent local observation areas, and interpolation calculation is performed within the smooth transition interval to generate a set of transformation matrix parameters that change continuously in the longitudinal direction of the PCB board.
[0016] Input a standard silkscreen graphic, and perform coordinate transformation by applying the continuously changing transformation matrix parameters according to the coordinates of each pixel in the graphic to generate a pre-deformed silkscreen graphic file.
[0017] The pre-deformed screen printing graphic file is output to drive the PCB character screen printing machine for printing;
[0018] The interpolation calculation within the smooth transition interval includes:
[0019] Determine the first and second affine transformation matrices at the boundary of two adjacent local observation areas, and set multiple interpolation points along the longitudinal direction within the smooth transition interval;
[0020] For each interpolation point, based on its relative position within the smooth transition interval, the translation parameters in the first and second affine transformation matrices are linearly interpolated to calculate the third affine transformation matrix corresponding to that interpolation point.
[0021] The beneficial effects of this invention are as follows:
[0022] The intelligent production control method for PCB circuit boards described in this invention automatically extracts the character and fixed through-hole features of the PCB inspection board through machine vision, and uses the fixed through-hole with stable position as a reference to perform high-precision alignment with the standard character board. This effectively eliminates interference factors such as solder joints, and realizes objective, accurate and automated evaluation of character offset, completely replacing inefficient and subjective manual visual inspection.
[0023] Secondly, this invention divides the detection area into multiple local observation areas such as upper, middle, and lower, and selects position-sensitive "offset measurement marks" based on the cross density of characters and underlying circuits for independent analysis (at this time, the cross density can reduce the distortion of printed patterns caused by line crossover, thereby improving its sensitivity or accuracy to offset). It can effectively capture and quantify the differential and nonlinear offsets (such as twisting and warping deformation) that may exist in different areas of the PCB board, providing an accurate data basis for fine compensation.
[0024] Secondly, based on the detected local offset vectors, instead of performing a simple overall translation, an affine transformation matrix with smooth transitions is generated for different regions. By interpolating between adjacent regions, a set of continuously varying transformation parameters is generated, resulting in a pre-deformed silkscreen graphic file. This method can accurately compensate for complex local deformations, ensuring that the printed characters remain accurately aligned on the deformed PCB board, significantly improving the overall alignment accuracy and product consistency. This method seamlessly integrates online detection, intelligent analysis, and equipment control, achieving closed-loop production control from "problem detection" to "automatic problem correction." This significantly reduces scrap rates and rework costs caused by character offsets, improving the intelligence level of the production line and overall production efficiency.
[0025] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of an intelligent production control method for PCB circuit boards according to an embodiment of the present invention;
[0028] Figure 2 This is a schematic diagram illustrating the correction principle of the bent PCB circuit board described in this embodiment of the invention. Detailed Implementation
[0029] 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 only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0030] It should be noted that similar reference numerals or letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0031] Example:
[0032] like Figure 1 As shown, this embodiment provides an intelligent production control method for PCB circuit boards, the method including steps S100, S200 and S300.
[0033] Step S100: In response to the quality inspection operation command, the camera captures the sampled PCB board located on the quality inspection table, thereby obtaining the first quality inspection pattern. Then, based on the color-based image feature extraction algorithm, the white character area, multiple silver-white solder points, and black fixed through-hole area in the first quality inspection pattern are extracted. Then, the silver-white circular and square block solder points are removed by the preset shape-based image algorithm, leaving only the line-shaped white character area and the black block fixed through-hole area, which is recorded as the first feature pattern. In the color-based image feature extraction algorithm, white and silver-white are very similar. Therefore, the solder points are removed by the shape features of the silver-white square or circular blocks, thereby obtaining the line-shaped white character area on the PCB board.
[0034] Step S200: Retrieve the standard character plate and align the center of the multiple black fixed through-hole areas in the standard character plate with the center of the black fixed through-hole areas in the first feature pattern to obtain the first superimposed mapping pattern.
[0035] Step S300: Evaluate the character offset based on the first overlay mapping pattern, and if the offset exceeds a preset threshold, correct the original screen printing pattern in the screen printing machine based on the offset.
[0036] The specific implementation of evaluating character offset based on the first overlay mapping pattern in step S300 can be as follows:
[0037] Step S310: Map the silkscreen layer circuit distribution diagram in the PCB board onto the standard character board, thereby obtaining the number of intersections between the identification frame and the circuit corresponding to each component on the standard character board, and calculating the intersection density based on the perimeter of the identification frame and the number of intersections.
[0038] Step S320: Divide the standard character board into three local observation areas: upper, middle and lower. Then, based on the cross density of the marker boxes in each local observation area, select multiple marker boxes with low cross density and record them as offset measurement markers. This will result in multiple offset measurement markers corresponding to each local observation area.
[0039] To reduce the amount of offset calculation, it is necessary to select high-quality detection targets. As for the top silkscreen layer, the silkscreen layer circuit causes the silkscreen characters to bulge. Therefore, the higher the cross density of the silkscreen characters, the more severe the distortion of the silkscreen characters will be, which will have a significant impact on the accurate measurement of the offset in the later stage. Therefore, in this embodiment, the character identification boxes with lower density (less cross) are selected as the best detection targets.
[0040] Step S330: Based on the component number corresponding to each offset measurement identifier, identify the corresponding component measurement area in the first superimposed mapping pattern. The measurement area includes a first identifier block diagram corresponding to the first feature pattern and a second identifier block diagram corresponding to the standard character plate.
[0041] Step S340: Based on the midpoint offset of the first and second identification block diagrams, the offset vector corresponding to the component measurement area is calculated. The offset vector points from the midpoint of the second identification block diagram to the midpoint of the first identification block diagram. The mean vector value of the local observation area is then calculated based on multiple offset vectors within the local observation area. The mean vector value can indirectly characterize the overall offset of the entire local observation area.
[0042] After measuring the overall offset of all local observation areas, it is necessary to assess the severity of the offset of the entire PCB board. Generally speaking, the direction and offset distance of the average offset vector corresponding to the top, middle and bottom local observation areas will not differ significantly, especially the offset direction. However, when PCB boards in the same batch share the same core board and the same batch of prepreg, their internal stress direction and coefficient of thermal expansion (CTE) characteristics are basically the same. At the same time, they are laminated and cured in the same oven, and their temperature rise curves and pressure curves are exactly the same. This causes the entire batch of boards to release stress and warp in almost the same way (for example, they all show a "smile shape" or "crying face shape" bow). Therefore, when a linear offset model obtained by measuring a board is "top right offset, bottom left offset or top upper offset, bottom lower offset, i.e., the offset direction is large, such as the vector angle of the average vector is greater than 105°", it is likely to be applicable to most boards in this entire batch. Therefore, correcting the original screen printing pattern in the screen printing machine based on the offset can be used for batch compensation in the later batch, significantly improving the average alignment accuracy of the entire batch.
[0043] Therefore, when a PCB board warps or tilts, it greatly increases the likelihood that a large number of other PCB boards in the same batch awaiting silkscreen printing will also experience the same issue. Thus, it is necessary to promptly correct the original silkscreen pattern in the silkscreen machine. It should be noted that this is a temporary emergency measure aimed at maximizing the average alignment accuracy of the batch. The following section will detail a solution to this situation:
[0044] Step S350: Based on the upper, middle and lower position weights and vector length values of the average vector values corresponding to each local observation area, the character offset estimate of the current PCB board is evaluated by a weighted algorithm. If the vector angle between the average vector values of the two vector values corresponding to the upper local observation area and the lower part observation area is greater than 105°, the character offset estimates corresponding to the upper local observation area and the lower part observation area are amplified according to a preset gain coefficient. The total offset estimate of the three local observation areas after amplification is calculated. If the total offset estimate is greater than a preset threshold, the original silkscreen pattern in the silkscreen machine is corrected based on the offset.
[0045] It should be noted that the above-mentioned assessment of the degree of offset involves two weights, and the calculation basis and method differ from the traditional simple weight preset. Among the weights for the upper, middle, and lower positions, the weight of the middle position is usually the largest, followed by the weights of the upper and lower sides. This weight setting is more suitable for offsets in the same small range of PCB board material. The weights are set according to the importance of the area, i.e., the offset in the same direction. Since the middle position better represents the overall offset of the PCB board material, it is more reasonable to configure a high weight. However, when the PCB board warps or tilts as mentioned above, the offset distance in the middle is usually shorter, while the offset distance in the upper and lower sides is larger. The shift distance is relatively long, and the angle between the offset vector directions on the upper and lower sides is relatively large. That is, the angle between the vector directions on the upper and lower sides is the core indicator for determining whether the PCB board has warped or warped (e.g., greater than 105°). Therefore, when the angle between the average vector values of the two vectors corresponding to the local observation area on the upper side and the local observation area on the lower side is greater than 105°, it is necessary to modify the weight allocation of the previous overall offset setting in a certain direction (this weight is applicable to most offset corrections) to determine the current silkscreen offset degree. Specifically, it is to increase the offset weight on the upper and lower sides, thereby increasing the sensitivity to the vector angle distribution on the upper and lower sides. See step S350 for details.
[0046] Secondly, the specific implementation of correcting the original screen printing pattern in the screen printing machine based on the offset in step S350 can be as follows:
[0047] Step S351: Generate an affine transformation matrix for each local observation area based on the vector mean of each local observation area, wherein the translation parameter in the affine transformation matrix is 50%–70% of the inverse value of the vector mean;
[0048] Step S352: Set a smooth transition interval for the parameters of the affine transformation matrix corresponding to adjacent local observation areas, and perform interpolation calculation within the smooth transition interval to generate a set of transformation matrix parameters that change continuously in the longitudinal direction of the PCB board.
[0049] Step S353: Input the standard silkscreen graphic, and perform coordinate transformation by applying the continuously changing transformation matrix parameters according to the coordinates of each pixel in the graphic to generate a pre-deformed silkscreen graphic file.
[0050] Step S354: Output the pre-deformed silkscreen graphic file to drive the PCB character silkscreen printer for printing;
[0051] To further explain the above implementation principle, such as Figure 2 As shown, when the PCB board warps, point A in the original silkscreen pattern will shift to the left. In this embodiment, by shifting point A in the original silkscreen pattern slightly to the right, point A in the original silkscreen pattern can be made as close as possible to the actual point A on the warped PCB board. It should be noted that since this is a sampling inspection, during the subsequent inspection and fixing, manual settings will allow the originally warped PCB board to temporarily return to flatness using a customized fixture. However, since the silkscreen machine is for mass production, it only has a movement limit mechanism internally and lacks complex features such as flattening clamps.
[0052] The interpolation calculation within the smooth transition interval includes:
[0053] Determine the first and second affine transformation matrices at the boundary of two adjacent local observation areas, and set multiple interpolation points along the longitudinal direction within the smooth transition interval;
[0054] For each interpolation point, based on its relative position within the smooth transition interval, the translation parameters in the first and second affine transformation matrices are linearly interpolated to calculate the third affine transformation matrix corresponding to that interpolation point, thereby making the distortion adjustment smoother. Since the affine transformation matrix for each local observation region is calculated based on the mean of the offset vector, it can lead to obvious discontinuities at the connection between two local observation regions. To reduce this defect, interpolation is used. The division ratio of the smooth transition interval is not limited in this embodiment.
[0055] Specifically, the aforementioned correction process involves generating affine transformation matrices with smooth transitions for different regions based on the detected local offset vectors, rather than performing a simple overall translation. By interpolating between adjacent regions, a set of continuously changing transformation parameters is generated, resulting in a pre-deformed silkscreen graphic file. This method accurately compensates for complex local deformations, ensuring that the printed characters remain accurately aligned on deformed PCB boards. This significantly improves the overall alignment accuracy and product consistency of character printing. The method seamlessly integrates online detection, intelligent analysis, and equipment control, achieving closed-loop production control from "problem detection" to "automatic problem correction." This substantially reduces scrap rates and rework costs caused by character offsets, enhancing the intelligence level of the production line and overall production efficiency.
[0056] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An intelligent production control method for PCB circuit boards, characterized in that, The method includes: In response to the quality inspection operation command, the camera captures the sampled PCB board on the quality inspection table to obtain the first quality inspection pattern. Then, based on the color-based image feature extraction algorithm, the white character area, multiple silver-white solder points, and black fixed through-hole area in the first quality inspection pattern are extracted. Then, the silver-white circular and square block solder points are removed by the preset shape-based image algorithm, leaving only the line-shaped white character area and the black block fixed through-hole area, which is recorded as the first feature pattern. Retrieve the standard character plate and align the centers of the multiple black fixed through-hole areas in the standard character plate with the centers of the black fixed through-hole areas in the first feature pattern to obtain the first superimposed mapping pattern. The character offset is evaluated based on the first overlay mapping pattern, and if the offset exceeds a preset threshold, the original screen printing pattern in the screen printing machine is corrected based on the offset. The evaluation of character offset based on the first overlay mapping pattern includes: The silkscreen circuit distribution diagram in the PCB board is mapped onto the standard character board, thereby obtaining the number of intersections between the identification frame and the circuit corresponding to each component on the standard character board, and the intersection density is calculated based on the perimeter of the identification frame and the number of intersections. The standard character board is divided into three local observation areas: upper, middle, and lower. Then, based on the cross density of the marker boxes in each local observation area, multiple marker boxes with low cross density are selected and recorded as offset measurement markers. This yields multiple offset measurement markers for each local observation area. Based on the component number corresponding to each offset measurement identifier, the corresponding component measurement area is identified in the first superimposed mapping pattern. The measurement area includes a first identifier block diagram corresponding to the first feature pattern and a second identifier block diagram corresponding to the standard character plate. The offset vector corresponding to the component measurement area is calculated based on the midpoint position offset of the first and second identification block diagrams. The offset vector points from the midpoint corresponding to the second identification block diagram to the midpoint corresponding to the first identification block diagram. The average value of the vector corresponding to the local observation area is calculated based on multiple offset vectors within the local observation area. Among them, when the offset exceeds a preset threshold, the original screen printing pattern in the screen printing machine is corrected based on the offset, including: Based on the vector length value of the upper, middle and lower position weights and the average vector value corresponding to each local observation area, the character offset estimate of the current PCB board is evaluated by a weighted algorithm. When the vector angle between the average vector values of the two corresponding local observation areas on the upper side and the lower part observation area is greater than 105°, the character offset estimates corresponding to the upper local observation area and the lower part observation area are amplified according to a preset gain coefficient. The sum of the offset estimates of the three local observation areas after amplification is calculated. When the sum of the offset estimates is greater than a preset threshold, the original silkscreen pattern in the silkscreen machine is corrected based on the offset.
2. The intelligent production control method for PCB circuit boards according to claim 1, characterized in that, Correcting the original screen printing pattern in the screen printing machine based on offset conditions includes: An affine transformation matrix is generated for each local observation region based on the vector mean value corresponding to each local observation region, wherein the translation parameter in the affine transformation matrix is 50%–70% of the inverse value of the vector mean value. A smooth transition interval is set for the parameters of the affine transformation matrix corresponding to adjacent local observation areas, and interpolation calculation is performed within the smooth transition interval to generate a set of transformation matrix parameters that change continuously in the longitudinal direction of the PCB board. Input a standard silkscreen graphic, and perform coordinate transformation by applying the continuously changing transformation matrix parameters according to the coordinates of each pixel in the graphic to generate a pre-deformed silkscreen graphic file. The pre-deformed screen printing graphic file is output to drive the PCB character screen printing machine for printing; The interpolation calculation within the smooth transition interval includes: Determine the first and second affine transformation matrices at the boundary of two adjacent local observation areas, and set multiple interpolation points along the longitudinal direction within the smooth transition interval; For each interpolation point, based on its relative position within the smooth transition interval, the translation parameters in the first and second affine transformation matrices are linearly interpolated to calculate the third affine transformation matrix corresponding to that interpolation point.
Citation Information
Patent Citations
Component character detection method, system and equipment for PCB (Printed Circuit Board) and medium
CN119027961A
Printing quality online detection method based on artificial intelligence
CN119444721A