9 » IC Electronic information » Category: P

IC Electronic information

PCB Appearance Inspection Machine Manual image acquisition and stitching

In Electronic Infomation Category: P | on April 23,2011

Visual inspection of printed circuit board PCB production line machine is an important quality control equipment, which is based on optical image processing and BLF242 datasheet and computer vision recognition principle, the main function is encountered in PCB assembly production process to detect the appearance of defects . China is the worlds largest producer of PCB, but not the power, PCB production and BLF242 price and an important link in the chain - PCB equipment and BLF242 suppliers and instruments is not strong is the formation of one of the important reasons of this situation, Chinas PCB industry to promote the development and progress, developed a more automatic simple visual inspection machine, the system more compact and higher performance and low cost manual PCB visual inspection machine. Visual inspection machine manual PCB board is put through the manual transmission device automatically send PCB, uniform linear array CCD camera scanning PCB, to obtain accurate images, and then compared by computer processing have been scanned and printed circuit board to judge, and then sub-device under computer feedback control signal automatically sorting PCB (OK / NG). Can foreign body, exposed copper, up the oil, scratches, gold-plated bad character error, green oil uneven, uneven pad, residual copper, were missing, such as the appearance aspects of developing accurate defect detection. As the speed of image acquisition and processing and results will directly affect the PCB board detection accuracy and effectiveness, this manual visual inspection machine for detailed study of the characteristics of the image acquisition system, using C # in. net framework and the secondary development of ActiveMil GDI + graphics interface library used to achieve image acquisition software system development.

1 PCB Appearance Inspection Machine structure of the system

PCB complex structure line detection system, the transmission control equipment, electrical control systems and cameras must be under precise control of the computer in order to coordinate the processing, complex detection and sorting tasks. Based on machine vision inspection equipment, PCB-line structure shown in Figure 1.

Figure 1, based on machine vision inspection equipment, PCB line structures

System consists of motion control, image acquisition and image processing part. Image acquisition part is an important part of the whole system. Camera and lens in the machine vision equivalent to the human eye, is responsible for the subjects image. Image acquisition part is an important part of PCB inspection system, but also the basis for detection and processing. PCB test systems emphasize speed and accuracy of detection, so the need for image acquisition part of the timely and accurate manner to provide a clear image.

2 image acquisition system hardware architecture

1) image acquisition system works

When the system power on, MCU PCB automatically detect the stage is reset to the starting point. This process has two main fiber optic sensors and servo motors to complete. Two sensors were installed in the motor look around the start of a track, that is reset point and track endpoint. From reset, stop and reverse the motor function. After power MCU detected sesorl (reset point or starting point) is invalid, then call the motor reversal procedure so that PCB back to the start position of the stage, while the serial port to send color pictures to the PC, invalid signal. Then MCU to determine whether there is button is pressed, if any button is pressed, the motor started forward, while the serial port to send color pictures to the PC, the effective signal. This process is a PCB line scanning process to complete the image acquisition. This process motor through three phases: acceleration phase, deceleration phase and the uniform color pictures stop phase. The process of being transferred to the motor, starting from seven, MCU through the capture compare unit-specific (CCU6) to the feedback of the servo motor encoder pulse count back, but the count to adopt plans and effective value, the serial port to the PC to send mining map starting signal, at this time began to PCB linear CCD for image acquisition. Slowdown in the motor end of the sensor is to track senor2 Department, the motor stopped and immediately reversed back to the starting point, this process sends the serial port to the PC signal is invalid mining plans. At this point a complete testing process integrity. MCU to detect if there is the next key press down detection. One serial port to send the start signal acquisition effective and can avoid false triggering. CCD image of the signal collected by the CamreLink interface, image acquisition card, then sent to PC for further image processing.

Figure 2 PCB Appearance Inspection Machine image acquisition system principle diagram

2) sensor and the button for the reception and testing

Using opto isolation technology, can achieve optical isolation between the circuit, even if the input signal can be unimpeded by, and to prevent the output signal is fed to the input, favorable to suppress spikes and a variety of noise interference, stable, non-contact point, long life, high transmission efficiency. For real-time feedback of the rotating mirror is detected speed signal, the design used in high-speed optocoupler ACPL-072L, transfer rate up to 25 MBd, and simple peripheral circuits, shown in Figure 3.

Figure 3 ACPL-072L circuit diagram This design uses XC164CS peripheral

containing capture / compare unit CC25 port, the coupler as an external interrupt transmission signal to trigger the XC164, high-speed precision positioning and button detection sensor.

3) CCD camera system

The manual visual inspection machine PCB image acquisition system uses NED Rainbow Series 3CCD color line scan camera NUCLi7300. The camera is widely used, can be carried out before the black and white camera can not detect color differences. External interface for high-speed serial interface (Camera Link), can be easily connected with the capture card, you can easily set the gain and offset, and RGB cable with a modified delay function. Number of pixels for the 7 300x3 Line, pixel size is 10x10 m, data rate 60MHz, minimum scan rate 7.6kHz. Figure 4-based system used in the model of continuous line scanning rate Timing diagram.

Figure 4 CCD line scan rate model of continuous timing diagram

Image acquisition system uses a Matrox cards SoliosXCL-SU74, the card comes with two independent processor or a base model in the mode Camera Link Configuration, 66 MHz sampling rate, 64 MB buffer, you can collection area array and linear array camera, and with a variety of acquisition modes.

Image detection systems currently on the market they use a surface scan (Areascan) camera for image acquisition and analysis, but due to the appearance of the PCB inspection machine inspection of PCB products larger size range - 50 mmx50mm ~ 330mmx250 mm, precision Daya pixel-level requirements, face scanning cameras to take as the speed of resolution and can not meet these requirements, so the system selected is the line scan CCD. But the line scan speed detection system must be used to obtain the area of ??shade, the PCB under test when the movement to the camera field of view over the hardware to send the same signal to trigger the camera started collecting, it will capture card hardware acquisition mode is set to trigger synchronous acquisition and to allocate the maximum memory 64 M. CCD with the acquisition card connection diagram shown in Figure 5.

Figure 5 CCD with the acquisition card connection diagram

3 software system components

The image acquisition system software development language used is C #, software development kit is AetiveMil9.0 components.

Matrox has a rich package - image processing and pattern recognition library (MIL) and the sub-library MIL MIL-LITE (basic image processing). MIL is a hardware-independent 32-bit image processing library, use of Intels MMX multimedia graphics acceleration library of image processing has been optimized to handle binary, grayscale or color images, which is independent of the hardware platform. And for rapid Windows application development, MIL bundled ActiveMIL. AetiveMIL is a management image acquisition, processing, analysis, display and archiving of dynamic controls *. Aeti-veMIL fully integrated into the Microsoft Visual Basic, Visual C + + and. net rapid application development environment. The image acquisition system of choice is AetiveMil control library, the library can control all functions of all the MIL, but due to the use ActiveX control, so much the difficulty of reducing the program design and shorten the software development cycle, improve the application system stability.

3.1 image acquisition program based on AclivrMil

On the Matrox image acquisition to image acquisition secondary development of a common software architecture shown in Figure 6.

Figure 6 Matrox card development diagram

Image acquisition process basic idea is:

1) open communication channels, that is, to determine an application object (Application), and each application object to create one or more system objects (System).

2) initialize the hardware resources, that is, assign each system object data cache (Data Buffer), data acquisition (Digitizer), and data display (Display) object.

3) start the collection process, will read into the data cache the image and assigned to the cache array, the array of processing through the implementation of image processing, image data associated with the data after the control or the form can be displayed shows the results after pretreatment.

AetiveMIL allows developers to quickly and easily to an image application and the Windows user interface together. Application development tools include drag and place, and punctuate the scroll and click configuration, substantially reduces the amount of code. At. net framework3.0 card made environment, the development package installed and properly configured MIL after, Application, System, Image, ImageProcess, Display and other components will be automatically added to the toolbar.

Developers will need to use the controls on the form drag to the image acquisition, an Application, a single lens manual that corresponds to the appearance of machines, a System, a single window display - a Disp-laly, in order to improve CPU utilization asynchronous acquisition should enable double buffer - Two ImageBuffer, and a ImageProcess.

3.2 Asynchronous double buffer capture thoughts

Matrox MeteorII image capture card supports both synchronous and asynchronous acquisition mode.

Synchronous acquisition method suitable for continuous acquisition display image without doing computing, and this is because the synchronous acquisition mode, before each image acquisition, CPU are synchronized to the acquisition card sends the signal acquisition, and then wait for the end of acquisition, Therefore, the CPU in the acquisition process, but only because of lack of image data in a wait state. As a frame CCD image capture only need about 40 ms, which is roughly equivalent to the human visual retention, so in sync mode acquisition and processing can not guarantee complete in 40 ms, it can not achieve real-time processing requirements.

Asynchronous acquisition mode, the acquisition work and computer processing of the image can be, that is, when the CPU processing the current frame of the image, CCD camera to the next frame of image acquisition. Thus, in programming, you need a caching mechanism to cache the current images have been collected to complete and cache CCD camera will capture images, or are collected in order to achieve image acquisition and processing in parallel. Obviously, the use of this double acquisition methods can lower the cache on the hardware system requirements, but also greatly enhance the systems processing speed to meet the real-time processing requirements.

3.3 image acquisition code

3.4 Image stitching using GDI +

4 Image Acquisition instance

Figure 7 is a synchronous acquisition system collected the PCB image, image width is 7300, high of 1 000 with a time of 1.3 s, and there are dropped frames. Figure 8 is a double buffer asynchronous image acquisition system collected the PCB with a time of 1.0 s, acquisition of image quality is good.

Figure 7 PCB synchronous acquisition system collected images

Figure 8 double buffered asynchronous image acquisition system collected PCB

Results show that the double buffer asynchronous acquisition system significantly increased image acquisition speed, and the use of ActiveX components to shorten the development cycle and reduce the development of the human cost. And improve the quality of image acquisition. An image acquisition and real-time stitching 7300x10000 only 1.3 s, there is no dropped frames, non-destructive splicing splicing. Image buffer size calculation formula for MemSize = ImageWidthxlmageHeightxFrames, experiments also show that the synchronous acquisition method to collect the 7 300x1 000, 8 bits per pixel of an image generally requires 6Gb cache space; using asynchronous dual-cache method to collect the same resolution acquisition the image takes less than 32 mb of cache can not ask straight off to save the image. Thus, the use of asynchronous dual-buffer acquisition mode can not only save system resources and can be more efficient and better collection results.

5 Conclusion

Double cache technology in recent years in the field of image display has been widely used, the design is the first time, and asynchronous dual-cache technology used in the PCB collected manually with visual inspection machine image acquisition system. Using Matroxs SoliosXCL-SU74, use the asynchronous method can double buffer PCB Waiguan collecting real-time continuous acquisition machine (in this experiment is set to capture 10 frames per second image, each frame width 7300, height 1 000) requirements and use GDI + library to achieve real-time lossless image mosaic, the more traditional image capture program more efficient, lower hardware requirements, is more suitable for the appearance of PCB and other large image data acquisition system.

BLF242 datasheetBLF242 suppliersBLF242 Price

All right © 2010-2016 Certificate