A high-precision intelligent positioning method for PCB based on digital micromirror

Through the PCB high-precision intelligent positioning method based on digital micromirror, the improved Faster RCNN is used for object detection and precise positioning, which solves the problems of low efficiency and difficult to guarantee the plug-in quality of electronic components, and realizes a high-precision and efficient plug-in process.

CN114359900BActive Publication Date: 2025-06-06JIANGSU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111560383.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-06-06
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

In the prior art, the insertion of electronic components on PCB boards has problems such as low efficiency, high cost and difficult to guarantee quality, which affects the development of the electronics industry.

Method used

Using a high-precision intelligent positioning method of PCB based on digital micromirror, images are acquired through digital micromirror imaging system, and target detection is used to establish mapping relationships between electronic components and PCB boards, accurately positioning and transmitting coordinates to the robotic arm for insertion.

Benefits of technology

It realizes high-precision positioning and precise insertion of electronic components on PCB boards, improves production efficiency and quality, and reduces labor costs and labor intensity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359900B_ABST
    Figure CN114359900B_ABST
Patent Text Reader

Abstract

The present invention provides a PCB high-precision intelligent positioning method based on a digital micromirror, which obtains images of various electronic components and PCB boards, and produces a data set of electronic components and PCB boards from preprocessed images. According to the names of the positive and negative pins of various electronic components in the data set and the names of the plug-in holes corresponding to the positive and negative pins on the PCB board, a mapping relationship between the positive and negative pins and the plug-in holes is established; an improved Faster RCNN is used to perform target detection on the images in the data set, and the coordinates of the positive and negative pins of the electronic components and the coordinates of the corresponding plug-in holes on the PCB board are obtained, and the data is transmitted to a mechanical arm, thereby completing the precise plug-in of electronic components on the PCB board. The method of the present invention can realize intelligent and high-precision plug-in of electronic components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of electronic component positioning, and in particular relates to a PCB high-precision intelligent positioning method based on a digital micromirror. Background Art

[0002] In the manufacturing process of electrical equipment, the insertion of electronic components on PCB boards is an important step in the production of electrical equipment. As an important part of modern electronic equipment, the quality of electronic components inserted into PCB boards directly affects the performance of the product. However, the insertion production of some tiny electronic components is basically a labor-intensive manual operation assembly line. Manual insertion has problems such as low insertion efficiency, high personnel costs, difficult to ensure insertion quality, and high management intensity. With the rapid development of the electronics industry, higher requirements are placed on the speed and quality of PCB board plug-in assembly. Due to the increase in labor costs and the high labor intensity, the insertion production of electronic components has become a factor restricting the development of the electronics industry. Therefore, the insertion of electronic components through an automated system has broad practical significance for improving production quality and efficiency. Summary of the invention

[0003] In view of the shortcomings in the prior art, the present invention provides a high-precision intelligent positioning method for PCB based on a digital micromirror, which overcomes the inconveniences caused by manual insertion.

[0004] The present invention achieves the above technical objectives through the following technical means.

[0005] A high-precision intelligent positioning method for PCB based on digital micromirror, specifically:

[0006] Acquire images of various electronic components and PCB boards based on the digital micromirror imaging system, and pre-process the acquired images;

[0007] The preprocessed images are used to generate a data set of electronic components and PCB boards. According to the names of the positive and negative pins of various electronic components in the data set and the names of the insertion holes corresponding to the positive and negative pins on the PCB board, a mapping relationship between the positive and negative pins and the insertion holes is established.

[0008] Use the improved Faster RCNN to detect targets in the images in the dataset and obtain the coordinates of the positive and negative pins of electronic components and the coordinates of the corresponding circular holes on the PCB board;

[0009] In the improved Faster RCNN, a convolutional network is used instead of a fully connected structure layer to complete the bounding box regression task; the convolutional network adopts a parallel structure, first using a 3×3 convolution to perform the first feature extraction on the output of ROI Align, and then using a 1×1 convolution kernel to perform the second feature extraction on the output of ROI Align, and then adding the two extracted features.

[0010] In the above technical solution, after the 3×3 convolution performs the first feature extraction on the output of ROI Align, a 1×1 convolution kernel is used to increase the number of input channels from 256 to 1024.

[0011] In the above technical solution, the improved Faster RCNN is to add a hybrid attention module to VGG-16 of Faster RCNN, and the hybrid attention module includes a channel attention module and a spatial attention module;

[0012] The channel attention operation is specifically:

[0013] Input the intermediate feature F, perform global maximum pooling and mean pooling on the feature F by channel, send the two one-dimensional vectors after pooling into a two-layer neural network respectively to obtain two features, add the two features and pass them through the activation function to obtain the weight coefficient Mc, and finally multiply the weight coefficient Mc and the input feature F to obtain the output feature F';

[0014] The spatial attention operation is as follows:

[0015] Input feature F', perform average pooling and maximum pooling of a channel dimension respectively, obtain two features, concatenate the two features according to the channel, then undergo convolution operation, and then pass through activation function to obtain weight coefficient Ms, finally, multiply weight coefficient Ms and feature F' to obtain final feature.

[0016] In the above technical solution, the initial anchor frame of the RPN in the adjusted and improved Faster RCNN is specifically as follows: two groups of anchor frames are generated for each feature point in the RPN of Faster RCNN, and the length-width ratios of each group of 3 anchor frames are 2:1, 1:2 and 1:1 respectively, and the 6 anchor frames cover all the positive and negative pins of electronic components and the circular holes for PCB board insertion.

[0017] In the above technical solution, in the improved Faster RCNN, ROI Align is used instead of ROI Pooling, specifically: bilinear interpolation is used to segment the ROI to obtain several small areas, K points are used in each small area, each small area is equally divided into K sub-areas, bilinear interpolation is used in each sub-area to obtain the pixel value of the center point, and finally the maximum value of the center pixel values ​​of the K sub-areas is selected as the pixel value of the small area.

[0018] The above technical solution also includes: transmitting the obtained coordinates of the positive and negative pins of the electronic components and the coordinates of the corresponding insertion holes on the PCB board to the robotic arm, and the robotic arm completes the insertion of the electronic components.

[0019] In the above technical solution, the hybrid attention module is added after pooling layer 2 and pooling layer 4 of VGG-16.

[0020] In the above technical solution, the digital micromirror imaging system includes an adaptive light source, a digital micromirror, a CMOS image detector, lens group one and lens group two. The adaptive light source emits light to various electronic components and PCB boards. The reflected light passes through lens group one and is imaged on the digital micromirror. After the digital micromirror is deflected, it passes through lens group two and finally forms an image on the CMOS image detector.

[0021] The beneficial effects of the present invention are as follows: the high-precision intelligent positioning method for PCB based on digital micromirror of the present invention uses improved Faster RCNN to perform target detection on images in a data set, accurately identifies and precisely locates the positive and negative pins of various electronic components and the corresponding insertion holes on the PCB board, obtains the coordinates of the positive and negative pins of the electronic components and the coordinates of the corresponding insertion holes on the PCB board, transmits the data to a robotic arm, and then completes the precise insertion of electronic components on the PCB board, thereby ensuring the positioning accuracy of the electronic components and overcoming various inconveniences caused by manual insertion. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a flow chart of the high-precision intelligent positioning method for PCB based on digital micromirror according to the present invention;

[0023] Figure 2 This is a structural diagram of the improved Faster RCNN described in the present invention;

[0024] Figure 3 This is a structural diagram of the hybrid attention module of the present invention;

[0025] Figure 4 A convolutional network diagram for bounding box regression according to the present invention;

[0026] Figure 5This is a diagram of the digital micromirror imaging system described in the present invention. DETAILED DESCRIPTION

[0027] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments, but the protection scope of the present invention is not limited thereto.

[0028] like Figure 1 As shown, the present invention provides a high-precision intelligent positioning method for PCB based on a digital micromirror, which specifically includes the following steps:

[0029] S1: Build a digital micromirror imaging system to obtain images of various electronic components and PCB boards;

[0030] Build as Figure 5 The digital micromirror imaging system shown in the figure includes an adaptive light source, a digital micromirror, a CMOS image detector, a lens group 1 and a lens group 2. The digital micromirror is a spatial light modulator, which is placed on the imaging optical path of the CMOS image detector; when the digital micromirror is set to "on", the adaptive light source shines light on the object to be measured (various electronic components and PCB boards), and the light reflected by the object to be measured passes through the lens group 1 to image the high dynamic scene on the digital micromirror. After the incident light is modulated by the digital micromirror code, due to the structural characteristics of the digital micromirror, the reflected light is deflected by 24° and passes through the lens group 2, and finally forms an image on the CMOS image detector; when the digital micromirror is set to "off", the light reflected by the object to be measured cannot enter the CMOS image detector. Among them: the CMOS image detector uses the OV50A image sensor, which has 50 million pixels and a single pixel can reach 1.0μm; the digital micromirror has the characteristics of high resolution and can display image details clearly and accurately, thereby reducing the distortion of the graphics during the imaging process, and using a nonlinear polynomial distortion fitting algorithm to achieve high-precision mapping of the digital micromirror and the CMOS image detector. The polynomial distortion fitting algorithm has good accuracy and can correct some distortions, so that the final error is 1.02 pixels, realizing pixel-level mapping of the imaging system and reaching thousandths; the adaptive light source can adjust its own brightness according to the actual environment, improve imaging clarity, and reduce factors such as light and noise in the image.

[0031] S2: The CMOS image detector inputs the acquired image into the computer for image preprocessing to eliminate the influence of factors such as illumination and noise in image acquisition;

[0032] S3: Generate a dataset of electronic components and PCB boards from the preprocessed images, and use a dictionary table to establish a mapping relationship between the positive and negative pins and the plug-in holes according to the names of the positive and negative pins of various electronic components in the dataset and the names of the plug-in holes corresponding to the positive and negative pins on the PCB board;

[0033] Create the following folders: image: to store images that need to be labeled, annotations: to save the labeled data, classes: category information of image annotation content; the preprocessed images are stored in image, and the categories of the electronic components and PCB board preprocessed images that need to be labeled are written into the classes folder. When classifying, pay attention to the correspondence between the positive and negative pin names of various electronic components and the corresponding plug-in round hole names on the PCB board (such as: aluminum electrolytic capacitor UHE1V102MHD positive pin-aluminum electrolytic capacitor UHE1V102MHD positive pin jack, aluminum electrolytic capacitor UHE1V102MHD negative pin-aluminum electrolytic capacitor UHE1V102MHD negative pin jack), then use labelimg to label, save the labeled data in the annotations folder, and the data set is completed. According to the names of the positive and negative pins of various electronic components in the data set and the names of the corresponding plug-in holes on the PCB board, a mapping relationship is established using a dictionary table, such as: dict = {"aluminum electrolytic capacitor UHE1V102MHD positive pin": "aluminum electrolytic capacitor UHE1V102MHD positive pin jack"}.

[0034] S4: Use the improved Faster RCNN to perform target detection on the images in the dataset, accurately identify and precisely locate the positive and negative pins of various electronic components and the corresponding insertion holes on the PCB board, and obtain the coordinates of the positive and negative pins of the electronic components and the coordinates of the corresponding insertion holes on the PCB board;

[0035] The improved Faster RCNN (convolutional neural network) is to add a hybrid attention module (such as Figure 2 As shown), enhance effective features and suppress invalid features, specifically:

[0036] The hybrid attention module consists of two independent submodules: the channel attention module and the spatial attention module. Given any intermediate feature map in the convolutional neural network, the hybrid attention module injects the attention map along the two independent dimensions of the channel and space of the feature map; Figure 3As shown in the figure, given an intermediate feature F as input, the shape of feature F is H×W×C, firstly, feature F is globally max-pooled and mean-pooled by channel to obtain two 1×1×C channel descriptions, and the two one-dimensional vectors after pooling are respectively sent to a two-layer neural network, the number of neurons in the first layer is C / r (r=16), the activation function is Relu, and the number of neurons in the second layer is C. The two layers of neural networks are shared, and two 1×1×C features are obtained. After adding these two features, a Sigmoid activation function is used to obtain the weight coefficient Mc, and finally the weight coefficient Mc and the input feature are added. F, we can get the output feature F' with the shape of H×W×C, and the channel attention operation is completed; the feature F' obtained by the channel attention module is used as the input feature of the spatial attention module, and firstly, average pooling and maximum pooling of a channel dimension are performed respectively to obtain two H×W×1 features, and these two features are spliced ​​together according to the channel, and then subjected to a 7×7 convolution operation, reduced to one channel, and the feature shape is H×W×1, and then subjected to the Sigmoid activation function to obtain the weight coefficient Ms, and finally, the weight coefficient Ms is multiplied by the feature F' to obtain the final feature, completing the spatial attention operation. The hybrid attention module combines spatial attention and channel attention. After Faster RCNN adds the hybrid attention module, it can significantly improve the accuracy, overall efficiency and precision of image classification and target detection; in this embodiment, the hybrid attention module is added after the pooling layer 2 and the pooling layer 4 of VGG-16, respectively, such as Figure 2 shown.

[0037] like Figure 2 As shown, adjust the initial anchor box of RPN (Region Proposal Network) in the improved Faster RCNN, specifically:

[0038] In the RPN of Faster RCNN, each feature point will generate three groups of initial anchor frames of different sizes. Each group has three anchor frames with different length-to-width ratios. Considering that the positive and negative pins of various electronic components and the circular holes of PCB boards are relatively regular in shape, the initial anchor frames are adjusted as follows: two groups of anchor frames are generated for each feature point. The length-to-width ratios of each group of three anchor frames are 2:1, 1:2 and 1:1 respectively. The six anchor frames can cover all the positive and negative pins of electronic components and the circular holes of PCB boards. By adjusting the anchor frames, the efficiency and the positioning accuracy of the initial prediction can be improved.

[0039] like Figure 2 As shown in the figure, in the improved Faster RCNN, ROI Align is used instead of ROI Pooling, specifically:

[0040] Faster RCNN uses ROI Pooling to fuse the output of RPN and feature maps, and uses nearest neighbor interpolation to pool feature maps. When the coordinates of the feature map after scaling cannot be exactly integers, the decimals will be discarded, which is equivalent to selecting the point closest to the target, losing a certain amount of spatial accuracy. ROI Align uses bilinear interpolation to replace nearest neighbor interpolation. When the scaled coordinates cannot be exactly integers, the floating point values ​​can be obtained through interpolation, and the pooled values ​​are processed to ensure spatial accuracy. Using the ROI Align mechanism, the coordinates of the anchor box output by the RPN can be accurately matched to the feature map, solving the mapping error and averaging error problems, and improving the accuracy of subsequent processing and positioning accuracy.

[0041] ROI Align cancels the quantization operation and uses bilinear interpolation. First, segmentation is performed on the ROI. Then, K points are used in each small area obtained by segmentation (the performance is best when K is 4). That is, each small area is divided into four sub-areas. In each sub-area, bilinear interpolation is used to obtain the pixel value of the center point. Finally, the maximum value of the central pixel values ​​of the four sub-areas is selected as the pixel value of the small area.

[0042] In the improved Faster RCNN, a convolutional network is designed to replace the fully connected structure layer to complete the bounding box regression task, specifically:

[0043] Faster RCNN uses a fully connected structure to complete the bounding box regression task. The aggregation characteristics of the fully connected structure will ignore the spatial information where the features appear, while the convolutional network can better retain spatial information and extract contextual information. Therefore, the convolutional network is more suitable for the bounding box regression task and effectively improves the positioning accuracy.

[0044] Convolutional networks use a parallel structure, such as Figure 4 As shown in the figure, 3×3 convolution is used to extract the first feature of the output of ROI Align, and then a 1×1 convolution kernel is used to increase the number of input channels from the original 256 to 1024 to increase the richness of the features. Then a 1×1 convolution kernel is used to extract the second feature of the output of ROI Align, and the number of channels of the output of ROI Align is changed to 1024. Finally, the two features are added, and the activation function is Relu. Compared with the fully connected layer, the global average pooling layer does not require a large number of training parameters and has a stronger ability to resist overfitting. Therefore, the global average pooling layer is used instead of the fully connected layer to achieve further dimensionality reduction of the convolution block output to prevent overfitting.

[0045] S5: The computer transmits the coordinates of the positive and negative pins of the electronic components and the coordinates of the corresponding insertion holes on the PCB board to the robotic arm, and the robotic arm completes the insertion of the electronic components.

[0046] The embodiments are preferred implementations of the present invention, but the present invention is not limited to the above-mentioned implementations. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essential content of the present invention belong to the protection scope of the present invention.

Claims

1. A high-precision intelligent positioning method for PCB based on digital micromirror, Features: Acquire images of various electronic components and PCB boards based on the digital micromirror imaging system, and pre-process the acquired images; The preprocessed images are used to generate a data set of electronic components and PCB boards. According to the names of the positive and negative pins of various electronic components in the data set and the names of the insertion holes corresponding to the positive and negative pins on the PCB board, a mapping relationship between the positive and negative pins and the insertion holes is established. Use the improved Faster RCNN to detect targets in the images in the dataset and obtain the coordinates of the positive and negative pins of electronic components and the coordinates of the corresponding circular holes on the PCB board; In the improved Faster RCNN, a convolutional network is used to replace the fully connected structure layer to complete the bounding box regression task; the convolutional network adopts a parallel structure, firstly uses a 3×3 convolution to perform the first feature extraction on the output of ROI Align, and then uses a 1×1 convolution kernel to perform the second feature extraction on the output of ROIAlign, and then adds the two extracted features; The improved Faster RCNN is to add a hybrid attention module to VGG-16 of Faster RCNN, and the hybrid attention module includes a channel attention module and a spatial attention module; The channel attention operation is specifically: Input the intermediate feature F, perform global maximum pooling and mean pooling on the feature F by channel, send the two one-dimensional vectors after pooling into a two-layer neural network respectively to obtain two features, add the two features and pass them through the activation function to obtain the weight coefficient Mc, and finally multiply the weight coefficient Mc and the input feature F to obtain the output feature F'; The spatial attention operation is as follows: Input feature F', perform average pooling and maximum pooling of a channel dimension respectively, obtain two features, concatenate the two features according to the channel, then undergo convolution operation, and then pass through activation function to obtain weight coefficient Ms, finally, multiply weight coefficient Ms and feature F' to obtain final feature.

2. The PCB high-precision intelligent positioning method according to claim 1, It is characterized in that After the 3×3 convolution performs the first feature extraction on the output of ROIAlign, a 1×1 convolution kernel is used to increase the number of input channels from 256 to 1024.

3. The PCB high-precision intelligent positioning method according to claim 1, It is characterized in that Adjust the initial anchor frame of RPN in the improved FasterRCNN. Specifically, two groups of anchor frames are generated for each feature point in RPN of Faster RCNN. The length-width ratios of each group of three anchor frames are 2:1, 1:2 and 1:1 respectively. The six anchor frames cover all the positive and negative pins of electronic components and the circular holes of PCB boards.

4. The PCB high-precision intelligent positioning method according to claim 1, It is characterized in that In the improved Faster RCNN, ROIAlign is used instead of ROIPooling. Specifically, bilinear interpolation is used to segment the ROI to obtain several small areas. K points are used in each small area to divide each small area into K sub-areas. Bilinear interpolation is used in each sub-area to obtain the pixel value of the center point. Finally, the maximum value of the central pixel values ​​of the K sub-areas is selected as the pixel value of the small area.

5. The PCB high-precision intelligent positioning method according to claim 1, It is characterized in that Also includes: The obtained coordinates of the positive and negative pins of the electronic components and the coordinates of the corresponding insertion holes on the PCB board are transmitted to the robotic arm, which completes the insertion of the electronic components.

6. The PCB high-precision intelligent positioning method according to claim 1, It is characterized in that The hybrid attention module is added after pooling layer 2 and pooling layer 4 of VGG-16.

7. The PCB high-precision intelligent positioning method according to claim 1, It is characterized in that The digital micromirror imaging system includes an adaptive light source, a digital micromirror, a CMOS image detector, a lens group 1 and a lens group 2. The adaptive light source emits light to various electronic components and PCB boards. The reflected light passes through the lens group 1 and is imaged on the digital micromirror. After the digital micromirror is deflected, it passes through the lens group 2 and finally forms an image on the CMOS image detector.

Citation Information

Patent Citations

  • Electronic component quality detection method and system based on deep learning

    CN111932511A

  • Faster R-CNN-based small sample target detection method

    CN113052185A