MACHINE VISION IMPLEMENTATION IN RAPID PCB PROTOTYPING



Similar documents
Analecta Vol. 8, No. 2 ISSN

Image Processing Based Automatic Visual Inspection System for PCBs

Poker Vision: Playing Cards and Chips Identification based on Image Processing

Circle Object Recognition Based on Monocular Vision for Home Security Robot

Colour Image Segmentation Technique for Screen Printing

Automatic Detection of PCB Defects

Canny Edge Detection

LIST OF CONTENTS CHAPTER CONTENT PAGE DECLARATION DEDICATION ACKNOWLEDGEMENTS ABSTRACT ABSTRAK

Neural Network based Vehicle Classification for Intelligent Traffic Control

VECTORAL IMAGING THE NEW DIRECTION IN AUTOMATED OPTICAL INSPECTION

Indoor Surveillance System Using Android Platform

Self-Calibrated Structured Light 3D Scanner Using Color Edge Pattern

PCB DETECTION AND CLASSIFICATION USING DIGITAL IMAGEPROCESSING

ESE498. Intruder Detection System

Mouse Control using a Web Camera based on Colour Detection

Eight Tips for Optimal Machine Vision Lighting

Digitization of Old Maps Using Deskan Express 5.0

An Algorithm for Classification of Five Types of Defects on Bare Printed Circuit Board

Implementation of Canny Edge Detector of color images on CELL/B.E. Architecture.

3D SCANNING: A NEW APPROACH TOWARDS MODEL DEVELOPMENT IN ADVANCED MANUFACTURING SYSTEM

Scanners and How to Use Them

Reflectance Measurements of Materials Used in the Solar Industry. Selecting the Appropriate Accessories for UV/Vis/NIR Measurements.

3D Scanner using Line Laser. 1. Introduction. 2. Theory

Navigation Aid And Label Reading With Voice Communication For Visually Impaired People

Manufacturing Process and Cost Estimation through Process Detection by Applying Image Processing Technique

QUALITY TESTING OF WATER PUMP PULLEY USING IMAGE PROCESSING

VEHICLE TRACKING AND SPEED ESTIMATION SYSTEM CHAN CHIA YIK. Report submitted in partial fulfillment of the requirements

Automatic Traffic Estimation Using Image Processing

Optical Digitizing by ATOS for Press Parts and Tools

COLOR-BASED PRINTED CIRCUIT BOARD SOLDER SEGMENTATION

Saving Mobile Battery Over Cloud Using Image Processing

ROBOTRACKER A SYSTEM FOR TRACKING MULTIPLE ROBOTS IN REAL TIME. by Alex Sirota, alex@elbrus.com

Detection of Bare PCB Defects by Image Subtraction Method using Machine Vision

Using MATLAB to Measure the Diameter of an Object within an Image

Klaus Goelker. GIMP 2.8 for Photographers. Image Editing with Open Source Software. rocky

Vision based Vehicle Tracking using a high angle camera

Printed Circuit Board Defect Detection using Wavelet Transform

REAL TIME TRAFFIC LIGHT CONTROL USING IMAGE PROCESSING

A Prototype For Eye-Gaze Corrected

COARSE RESOLUTION DEFECT LOCALIZATION ALGORITHM FOR AN AUTOMATED VISUAL PCB INSPECTION

EFX Keying/Alpha plugins for After Effects

A Study on M2M-based AR Multiple Objects Loading Technology using PPHT

A Method for Controlling Mouse Movement using a Real- Time Camera

DEVELOPING AN ISP FOR HOTEL INDUSTRY: A CASE STUDY ON PUTRA PALACE HOTEL

Automatic Labeling of Lane Markings for Autonomous Vehicles

Vision-Based Blind Spot Detection Using Optical Flow

LOCAL SURFACE PATCH BASED TIME ATTENDANCE SYSTEM USING FACE.

Overview. 1. Introduction. 2. Parts of the Project. 3. Conclusion. Motivation. Methods used in the project Results and comparison

White Paper. "See" what is important

Automated Optical Inspection is one of many manufacturing test methods common in the assembly of printed circuit boards. This list includes:

Composite Video Separation Techniques

Making Multiple Code Reading Easy. Webinar

INDUSTRIAL VISION. Don Braggins, UK Industrial Vision Association

Optimize Position and Path Planning of Automated Optical Inspection

Virtual Mouse Using a Webcam

ZEISS T-SCAN Automated / COMET Automated 3D Digitizing - Laserscanning / Fringe Projection Automated solutions for efficient 3D data capture

Wavelet-Based Printed Circuit Board Inspection System

REAL TIME FACE DETECTION SYSTEM AMY SAFRINA BINTI MOHD ALI

Signature Region of Interest using Auto cropping

Computer Integrated Manufacturing Course Description

Building an Advanced Invariant Real-Time Human Tracking System

Development and Integration of a Micro-Computer. . based Image Analysis System for Automatic PCB Inspection

Application Example: Automated Robot Inspection Cell for Quality Control on Sheet Metal Components. The future of metrology in vehicle construction

A Cheap Visual Inspection System for Measuring Dimensions of Brass Gear

RESEARCH PAPERS FACULTY OF MATERIALS SCIENCE AND TECHNOLOGY IN TRNAVA SLOVAK UNIVERSITY OF TECHNOLOGY IN BRATISLAVA

A Comprehensive Set of Image Quality Metrics

Basler. Line Scan Cameras

Designing a Schematic and Layout in PCB Artist

Using CAD Data in Assembly - Advantages and Pitfalls

PCB Prototyping Machine. Auto Lab. Tutorial MITS Electronics

Technical Article. Markus Luidolt and David Gamperl

Lecture Notes, CEng 477

Vision for Solder Paste Depositing

Speed Performance Improvement of Vehicle Blob Tracking System

An Energy-Based Vehicle Tracking System using Principal Component Analysis and Unsupervised ART Network

Industrial Vision Days 2012 Making Cameras Smarter: FPGA Based Image Pre-processing Unleashed

Radius Compensation G40, G41, & G42 (cutter radius compensation for machining centers, tool nose radius compensation for turning centers)

Colorado School of Mines Computer Vision Professor William Hoff

ADVANCED APPLICATIONS OF ELECTRICAL ENGINEERING

Data Storage 3.1. Foundations of Computer Science Cengage Learning

A Reliability Point and Kalman Filter-based Vehicle Tracking Technique

UNIT 1 INTRODUCTION TO NC MACHINE TOOLS

Shape Measurement of a Sewer Pipe. Using a Mobile Robot with Computer Vision

Encoders for Linear Motors in the Electronics Industry

Digital Image Requirements for New Online US Visa Application

LIGHTNING AS A NEW RENEWABLE ENERGY SOURCE SARAVANA KUMAR A/L ARPUTHASAMY UNIVERSITI TEKNOLOGI MALAYSIA

MetaMorph Software Basic Analysis Guide The use of measurements and journals

TABLE OF CONTENTS. SUPERVISOR S DECLARATION ii STUDENT S DECLARATION iii DEDICATION ACKNOWLEDGEMENTS v ABSTRACT LIST OF TABLES

Contents. Document information

It simply works! Safe process monitoring.

19th International Conference on Mechatronics and Machine Vision in Practice (M2VIP12), 28-30th Nov 2012, Auckland, New-Zealand

MOTION DETECTION FOR PC BASED SECURITY SYSTEM BY USING OPTICAL FLOW NUR NABILAH BT MOHAMAD HAMID

ANT COLONY OPTIMIZATION (ACO) ALGORITHM FOR CNC ROUTE PROBLEM WAN NUR FARHANAR BT WAN ZAKARTA

Tool Enhancement For Collaborative Software Engineering Education

APPLICATION NOTES: Dimming InGaN LED

Morphological segmentation of histology cell images

Transcription:

Journal of Mechatronics, Electrical Power, and Vehicular Technology e-issn 2088-6985 Vol. 02, No 2, pp 79-84, 2011 p-issn 2087-3379 MACHINE VISION IMPLEMENTATION IN RAPID PCB PROTOTYPING IMPLEMENTASI MACHINE VISION PADA PEMBUATAN DUPLIKASI PCB Yosafat Surya Murijanto, Rusman Rusyadi, Maralo Sinaga Department of Mechatronics, Faculty of Engineering Swiss German University, Bumi Serpong Damai Banten 15321, Indonesia yosafat. murijanto@student.sgu.ac.id; rusman.rusyadi@gmail.com; maralo.sinaga@sgu.ac.id Recieved: August 24 th, 2011; Revised: October 27 th, 2011; Accepted: December 1 st, 2011; Published online: December 22 th, 2011. Abstrak Pemrosesan image yang merupakan inti dari machine vision telah membuktikan dirinya menjadi bagian yang penting pada industri saat ini. Penerapan pemrosesan image telah membuka pintu yang baru dalam proses manufaktur yang lebih baik. Karya tulis ini memaparkan penerapan machine vision dalam proses desain modul yang mampu mengekstrak lubang bor dan mengarahkan jalur koordinat PCB dari kondisi yang belum tersusun menjadi jalur koordinat yang tersusun. Algoritma ini dimulai dengan proses pre-capturing, diikuti dengan segmentasi image dan pemfilteran, deteksi sisi dan kontur, ekstraksi koordinat dan diakhiri dengan pembuatan G-code. Library yang ada di OpenCV dan Qt IDE merupakan perangkat utama yang dipergunakan. Melalui beberapa percobaan yang dilakukan, disimpulkan bahwa algoritma ini mampu memberikan hasil yang cukup baik. Algoritma pengeboran dan ekstraksi jalur menghasilkan rata-rata 90% dan 82% dari jumlah lubang bor dan jalur yang ada pada PCB yang discan dalam total waktu pemrosesan kurang dari 3 detik. Hal ini dapat dicapai pada kondisi pencahayaan yang baik, permukaan PCB yang baik, dan webcam yang berkualitas baik. Kata kunci: PCB scanning, ekstraksi koordinat, G-code, machine-vision. Abstract Image processing, the heart of machine vision, has proven itself to be an essential part of the industries today. Its application has opened new doorways, making more concepts in manufacturing processes viable. This paper presents an application of machine vision in designing a module with the ability to extract drills and route coordinates from an un-mounted or mounted printed circuit board (PCB). The algorithm comprises pre-capturing processes, image segmentation and filtering, edge and contour detection, coordinate extraction, and G-code creation. OpenCV libraries and Qt IDE are the main tools used. Throughout some testing and experiments, it is concluded that the algorithm is able to deliver acceptable results. The drilling and routing coordinate extraction algorithm can extract in average 90% and 82% of the whole drills and routes available on the scanned PCB in a total processing time of less than 3 seconds. This is achievable through proper lighting condition, good PCB surface condition and goodwebcam quality. Keywords: PCB scanning, coordinate extraction, G-code, machine vision. I. INTRODUCTION This paper mainly focuses on the application of vision in manufacturing processes. The concept was born from the reverse engineering concept suggested by Koivunen [1], in which she stated that integrating reverse engineering and computer vision will benefit manufacturing processes in many ways. In this case, vision is used to generate design data of an existing printed circuit board (PCB). The data is then further processed to form a computer aided design (CAD) model and other manufacturing information, before finally a prototype of the scanned component is built in a manufacturing cell. G-code acts as the CAD model mentioned previously. The concept will greatly decrease design time and at the end could save much manufacturing cost. II. METHODOLOGY A. Creating Proper Lighting Condition Martin [2] uttered that the quality and appropriateness of lighting are critical aspects for creating a robust vision inspection. Two lighting modules were constructed: back light to support drilling coordinate extraction (un-mounted PCB case) and front light to support routing coordinate extraction. Based on Figure 1 which is shows a comparison of common machine vision lighting, sources LED arrays was chosen as the lighting source of these lighting modules due to its 2011 RCEPM - LIPI All rights reserved doi: 10.14203/j.mev.2011.v2.79-84

Machine Vision Implementation in Rapid PCB Prototyping (Yosafat Surya Murijanto, R. Rusyadi, M. Sinaga) JMEV 02 (2011) 79-84 Figure 1. Comparison of common machine vision lighting sources [2]. superiority to other light sources: stability, flexibility, lifetime, and cost effectiveness (low power consumption). Lighting techniques can be classified as bright field (on-axis lighting), partial bright field (directional lighting) and dark field (off-axis lighting). Each has its own application field and further categorized as direct and diffuse lighting. Figure 2 groups lighting techniques according to their application fields. The application focuses on scanning PCBs, a surface with relatively uneven topology and mixed surface reflectivity, and thus bright and dark field lighting can be applied in the front light. However, bright field is chosen because of its better capability in generating contrast and enhancing topographic details [2]. When dealing with metals, however, bright field may create glares on the metal surface. This could result in incorrect contour extraction and at the end, false coordinate extraction. This problem can be reduced by applying a diffuser in our front light module [3]. Back lighting provides excellent image contrast as it produces silhouettes of the image against the bright background [2]. This is used to expose PCB edges and drill holes. The back light design can be observed in the figure 3. B. Image Preparation Image preparation will consist three operations. Those operations are color conversion, smoothing and edge detection described as follow. 1) Color conversion Each frame grabbed by the webcam is stored as an red, green and blue (RGB) image. This is of course useful if it is used for visual inspection by humans, but not for image processing done by computers [4]. RGB image stores the value of each pixel in 3 channels and in many cases computers are only able to process operation in 1 channel at a time. Processing 3 channel images could take too much time and consume too much memory. Therefore RGB image has to be converted to grayscale image, which represents major features of the RGB image in a single channel. 2) Smoothing Smoothing (or blurring) is done to remove unwanted camera artifact or noises [5]. The simplest burring technique is applied by replacing a pixel value with the average of its surrounding neighbor-pixels. 3) Edge detection Edge detection is the base of contour extraction operation, which is the main algorithm of drilling and routing coordinate extraction. A method developed by J. Canny is applied. This technique takes the first and second derivatives of intensity of an image pixel, as shown in figure 4. An edge is defined if the second derivative result is zero and the first derivative result is above the defined threshold. C. Routing Coordinate Extraction The objective of developing this algorithm is the ability to extract lines from a complex image (PCB image). To do so, contour extraction and polygon approximation techniques are applied. Engraved acrylic Frame LED Figure 2. Lighting techniques application fields [2]. Figure 3. Back light design. 80

Journal of Mechatronics, Electrical Power, and Vehicular Technology e-issn 2088-6985 Vol. 02, No 2, pp 79-84, 2011 p-issn 2087-3379 Figure 5. Polygon approximation [5]. Figure 4. Canny edge detection concept [5]. A contour is a list of points that represent a curve in an image [5]. The contour extraction algorithm comprises component labeling and assembling. Component labeling differentiates holes from contours. Then these found contours are assembled according to the defined method. This module will assemble the contours as trees. Polygons are the approximated from these contours. This is done to ensure that the extracted points form a close-loop and to filter the results from excessive points caused by image noises. First, a line is drawn from two extreme points of the contours. A farthest point of the contour, measured from that line, is then defined and lines are drawn to connect the newly-defined point with the existing points. This continues until the length of each line exceeds the defined precision parameter. Figure 5 illustrates the polygon approximation. D. Drilling Coordinate Extraction The challenge of developing the drilling coordinate extraction is to be able to detect small and imperfect circles. To meet this requirement, two main algorithms were applied: Hough [6] and thresholding-based circle detection. Hough circle is based on edge detection and first-order Sobel derivative. It provides more practical way of detecting the drill holes. The center coordinate of the circles is also directly returned. However,the algorithm is very prone to noises. The thresholding-based circle detection integrates tophat image morphology, basic thresholding, contour extraction and polygon approximation. Tophat algorithm is applied according to Equation (1). The input image is subtracted by the opened image. The opened image itself is done by first eroding and then dilating the image. Figure 6 illustrates the tophat image morphology. The result of the tophat image morphology is then thresholded and.dilated once again; this will reveal the drill holes. Finally, contour extraction and polygon approximation are applied and the drilling coordinates can be extracted. The advantage of this algorithm is the ability to preserve edges even on glare area or in case uneven reflection exists. However, the time needed to complete the operation highly depends on the number of circles to be detected. tophat(src) = src open(src) (1) E. Generating G-Code The communication between systems should use standardized data formats [1]. For this reason, G-code file creation is chosen as the final step of the main program. After the coordinates are extracted, they are masked to form standardized G-code based on RS274D and DIN 66025 [7]. To be manufacturable, the G-code should include the drilling and routing coordinates and the drilling and engraving parameters, including spindle speed, feed rate and depth of cut. The G-code creation utilizes Qplain Text Edit class provided by Qt. 81

Machine Vision Implementation in Rapid PCB Prototyping (Yosafat Surya Murijanto, R. Rusyadi, M. Sinaga) JMEV 02 (2011) 79-84 Figure 6. Tophat image morphology [5]. III. RESULTS AND DISCUSSION A. Routing Coordinate Extraction The routing coordinate extraction was tested using a simple S curve image and 4 PCB types.the result shows that it is able to detect in average more than 80% of all routes. As mentioned in the previous section, the algorithm highly depends on edge detection. However the edge detection failed in some cases. This is due to the uneven contrast and reflection caused by the front light module. If the input is an ideal image, the algorithm will perform perfectly, this can be seen as it was tested using a simple binary image. Evaluating the processing time, the algorithm managed to detect and process 1698 contours in 828ms time. The test conclusion can be observed in table 1 and the routing coordinate extraction result can be seen in figure 7. B. Drilling Coordinate Extraction The detections using hough circle and thresholding-based circle are discussed as follow. 1) Hough circle Hough circle offers easy and practical way of detecting drill holes. However this algorithm delivers poor performance as it is applied in this case. The algorithm is based on Sobel operation, which is rather sensitive to noises. Setting the threshold values too high would eliminate most drill holes, but setting it too low would result in so much noises and false circle detection. This algorithm was only able to detect 13 out of 842 correct holes 2) Thresholding-based circle detection This algorithm performs much better compared to the Hough circle. The holes in the glare area can also be really preserved due to the tophat algorithm. Though there are some problems around the glared and shadowed area, the result is still acceptable. The algorithm managed to detect 817 out of 842 holes on the matrix PCB. The test conclusion can be observed in Table 2 and the drilling coordinate extraction result can be seen in the Figure 8. C. G-code Generation After doing some observations and testing of the generated G-code, it can be seen that the algorithm delivers precise result. The test was done by manufacturing a simple PCB from a generated G-code. The result showed that every line can be executed correctly. The unit used in the G-code is mm as a result of applying G71 in the code. An example of generated G-code that shows the drilling operation can be observed in the Figure 9. Figure 7.Routing coordinate extraction result. Figure 8. Drilling coordinate extraction result. (The rectangles show improper drill detection). 82

Journal of Mechatronics, Electrical Power, and Vehicular Technology e-issn 2088-6985 Vol. 02, No 2, pp 79-84, 2011 p-issn 2087-3379 Table 1. Routing coordinate extraction performance. SBI SPCBA SPCB B DPCB MPCB Processed image size (pixels) 242 x 336 341 x 296 339 x 249 162 x 172 561 x 271 Detected raw contours 1 248 475 78 1698 Detected routes 1 23 34 47 227 Detected routes approx. 100% 70% 95% 100% 45% Processing time (ms) 78 265 438 156 828 Note: SBI: Simple Binary Image; SPCB-A: Single layer PCB A; SPCB-B: Single layer PCB B; DPCB: Double layer PCB; MPCB: Matrix PCB. Table 2. Overall drilling coordinate extraction performance. Hough circle Basic thresholding Tophat + thresholding Detected circles 15 757 817 Correct holes 13 627 757 Error 98.46% 25.53% 10.10% Processing time (ms) 438 16 140 Figure 9. Generated G-code example. IV. CONCLUSION AND RECOMMENDATION The project managed to integrate vision sensor in reverse engineering process through the PCB scanning module. It is able to extract in average 80% of all routes and 90% of all drill holes of a PCB in less than 3s time. It is also able to output manufacturable G-code as the CAM data. To perfect the module, the front light can be changed into dome or coaxial lighting, which will eliminate glares and uneven reflection. Computer graphic techniques such as path refining, line approximation and circle approximation can also be applied to output better engraving movement. Finally, a component library can be added to the database to improve the drilling coordinate extraction accuracy. This component library should comprise the basic components, especially standard integrated circuits (ICs). REFERENCES [1] Visa Koivunen and Ruzena Bajcsy, (1992, Aug.). Rapid Prototyping Using Three- Dimensional Computer Vision. Scholarly commons. [Online]. Available: http://repository.upenn.edu/cgi/viewcontent. cgi?article=1496&context=cis_reports&seiredir=1#search=%22machine+vision+rapid+ prototyping%22 [Accessed: November 4, 2011] [2] Daryl Martin, A Practical Guide to Machine Vision Lighting. Rochester, VT: Advanced Illumination, October 2007. [3] CVI Melles Griot, Machine Vision Lighting Fundamentals, in Fundamentals of Imaging and Machine Vision. CVI Melles Griot 2009 Technical Guide, Volume 2, Issue 1. pp. 3. 2009. [4] G. Bradski, Open Source Computer Vision Library in Robotics, New Jersey: Prentice Hall, 2004. [5] Bradski, G. and Kaehler, A., Learning OpenCV, 1st ed., CA: O Reily Media Inc., 2008. [6] Brovička, J., COMS30121 Image Processing and Computer Vision, Circle Detection Using Hough Transform Documentation, March 2003. [7] Power Automation America, Inc., Standard List of CNC Codes. Machine Mate Inc. [Online]. Available: http://www.machinemate.com/standardcod es.htm [Acessed: November 4, 2011] [8] Y. Murijanto, Machine Vision Implementation in Rapid PCB Prototyping. Thesis Report, Swiss German University, BSDCity, Tangerang, Indonesia, July 2011 83

Machine Vision Implementation in Rapid PCB Prototyping (Yosafat Surya Murijanto, R. Rusyadi, M. Sinaga) JMEV 02 (2011) 79-84 [9] D.A. Forsyth, & J. Ponce. Computer Vision: A Modern Approach. NJ: Prentice Hall, 2003. [10] T.Q. Chen, J.X. Zhang, Y.N. Zhou, and Y.L. Murphey. A Smart Machine Vision System for PCB Inspection. University of Michigan, 2000. 84