Know Your Machine Vision Components
Before you design a machine-vision system, you need to learn as much as you can about individual components.
Rob Gregory, Data Translation, Marlboro, MA -- Test & Measurement World, 3/1/1999
| In the electronics industry, machine-vision systems inspect circuit boards, assemblies, individual components, and even labels. Inspecting such items requires a reliable system that can accurately determine whether the components are placed on a circuit board properly, whether an assembly contains the correct number of fasteners, whether a label contains the right manufacturing information, whether a part is the right color, and so on. By combining a fast Pentium-class PC (which provides a PCI bus), frame-grabber board, camera, lenses, source of illumination, interface hardware, and some software, you can configure your own inspection system. But before you get your hands on any hardware and software, you must look at the types of available inspection components. I’ll give you an overview of the key parts of an inspection system. (T&MW has published other articles that address individual inspection techniques and components. See “For Further Reading.”)
Don’t overlook the camera’s lenses, because they focus the image on the CCD or CMOS sensor. The lenses also determine the size of a camera’s field of view, and the camera’s ability to resolve small features or components. You can purchase many types of cameras, including simple monochrome cameras that produce a standard RS-170/CCIR video signal, composite color cameras, RGB color cameras, linescan cameras, progressive-scan cameras, and cameras that produce digital (as opposed to analog) outputs. Some applications can use standard continuous-output cameras, provided the production line can “park” the part in the inspection station. Stopping the product lets the camera obtain a still image without aliasing or blurring. If parts move continuously, then you must use an asynchronous, or reset, type of camera, which produces an image only when triggered. RS-170/CCIR cameras with a 640x480-pixel resolution may suffice for many inspection tasks, but if you require more resolution, you may need a camera with from 512x512 pixels to 4096x4096 pixels. Most cameras produce 8-bit video data, which works well in many applications. For applications that need more dynamic range, such as those that must detect subtle shade variations, you can use 10-bit to 16-bit cameras. As the pixel resolution and dynamic range increase, though, so does the cost of a camera. A frame grabber converts a camera’s analog signals into digital data, but the internal analog-to-digital converter must not alter the image information during the conversion process. When you choose a frame grabber, be sure to check the manufacturers specifications for jitter, which should be typically ±5 ns or less. Jitter describes the shifting of rows of pixels in relation to each other. Check also for good noise performance. Typically RMS noise should be below 0.7 LSB. There are two things you don’t want in a frame grabber—automatic gain circuits (AGCs) and edge-sharpening or color-saturation circuits. The AGCs increase or decrease signal gain by a variable unknown amount, thus altering the data without any way for the user to know by how much. Edge-sharpening or color-saturation circuits artificially “enhance” an image to make it look more appealing to the eye, but in doing so they alter the image data. These circuits find use in multimedia-type frame grabbers that you should not use in industrial applications. Some cameras digitize the video information right in the camera itself; thus, they’re called “digital cameras.” These cameras put out digital signals that a digital-camera interface, or digital frame grabber, can acquire and transfer to memory. Even though the signals come from the camera in digital form, the camera may not put out the digital information in a standard row-column rank order. Thus, a digital frame grabber may have to rearrange the pixel data to form an array that represents the image. No matter what type of camera you use, you must purchase a frame-grabber board that can accept the type of signal or signals put out by the camera. Camera manufacturers can provide lists of compatible frame-grabber boards. Many cameras accept timing and synchronization signals from a frame grabber, and the cameras may produce timing signals that go back to the frame grabber. The signals from the frame grabber to the camera let you control camera functions in complex applications. The timing signals also help reduce overall jitter, improving results in gauging applications. Frame grabbers themselves come in a variety of types. You can choose from basic units that work with one camera, up to boards that operate with several cameras, provide onboard image-processing capabilities, and store several images. You also can find frame grabbers that operate on most common computer buses such as the ISA, VME, and PCI buses. For PC-based image-processing systems, PCI-bus frame grabbers now enjoy great popularity, although ISA-bus boards still work well in low-end systems that don’t provide high-speed response. Lights You can’t get a good image of a part unless you have sufficient light. The light source you choose depends on what you want to inspect. Lighting requirements are determined not only by the object you want to inspect (size, color, shape, reflectivity, texture, and so on) but also by the color and texture of the background, the ambient light, the camera’s wavelength sensitivity, and so on. You can also choose from a variety of lamps that provide different types of light. Such light sources include fluorescent tubes, incandescent bulbs, LEDs, high-intensity halogen lamps, and even strobe lamps. For most machine-vision systems, you must carefully control lighting to ensure accurate and repeatable results. Part Sensor Unless you want your machine-vision system to spend a lot of time processing images of an empty conveyor belt, you need a way to detect the presence of the part you need to inspect. Sensors might include optical sensors that detect a broken light beam, a proximity switch that detects metal parts, or a shaft encoder that determines the position of a moving stage or handler mechanism. In each case, the sensor sends a trigger signal to the machine-vision system, which then acquires an image and processes it under software control. Computer The PC provides the key to a machine-vision system. Most vision systems require at least a 133-MHz Pentium processor and several open PCI connectors. The faster the processor, the less time the machine-vision system will need to process image information. Speed is particularly important on high-speed production lines. Common inspection times for PC-based systems are from 10 to 20 parts/s as determined by the image size, number of tests performed per image, and speed of the host PC. Higher-speed lines running at 50 components/s usually require the use of an additional processor card to reduce processing time. Because machine-vision systems end up on production lines, you should consider using an industrial or “ruggedized” PC. Industrial-grade PCs provide heavy-duty power supplies, air filters, rugged cases, and other features that suit them well for non-office use. Software In addition to the machine-vision hardware, you’ll also need inspection software. Most frame-grabber manufacturers offer some software that you can use with their boards. The manufacturers may offer demo versions of their software so you can make sure a package meets your needs. Often you can use the demo version to perform image-processing tests on your bitmapped test images. Inspection software ranges from elementary inspection routines written in C to full-featured inspection and image-analysis software that you can tailor to your specific needs. If you’re a top-notch C programmer, you may want to use basic routines and write and debug your own applications. If you feel more comfortable letting someone else do the bulk of the programming, look at the packages that offer the features you need. Many image-analysis packages offer basic image-analysis routines for edge detection, blob counting, and so on. They may also provide operations for gauging and measuring, bar-code reading, robot guidance, and presence/absence testing. The latest icon-based software packages require no code writing and you can use them to rapidly develop a system to test the feasibility of various inspection strategies. You can also use the icon-based packages to develop complete inspection systems for use in production. Communications Whatever type of computer you choose to use as the basis for a machine-vision system should communicate with networked computers. The vision system will need to communicate pass/fail data to a database, fault information to a repair station, and process-control information to managers or equipment operators. In some cases, you may want the vision system to actually help control the process, perhaps signaling an actuator to move a defective product into a rework or reject bin. You can use a digital I/O board or even control signals from a frame grabber to control external devices. A standard Ethernet or other network-compatible card and appropriate software will let you connect the computer in a vision system to a network. Know Your Application
Make sure you know what type of information you need to properly inspect a product. If you simply want to spot defects, you won’t need to gather information for gauging or metrology. Be sure to weigh the things you want to inspect for by making a Pareto chart of the types of defects you expect and the number of occurrences of each. You can use the chart to determine which defects rate a high inspection priority and which rate a lower priority. Then, when you set up a machine-vision system, you can address the high-priority tasks first and add the low-priority tasks later. You also need to know how far apart the production line spaces the parts. Parts that come along a production line in rapid succession leave little time between images for the software to perform its analysis tasks. A faster computer may overcome timing problems. Many machine-vision software packages incorporate a clock/timer, so you can closely monitor the time needed by each step in a series of inspection operations (see Fig. 1). You often can use the timing information to modify the image-analysis sequence or to adjust the motion or speed of the production line. PC-based machine-vision systems can often inspect 15 to 20 components per second, depending on the number of measurements or operations you require.
3. What components do you need to buy? Using the descriptions of components provided earlier in this article, determine which types best meet your needs. At the minimum, you’ll need a computer, a frame grabber, a camera, lights, and software. A machine-vision system is only as strong as its weakest link. Taking shortcuts, scrimping, or failing to carefully evaluate hardware—particularly the optics and “imaging path”—can greatly reduce a system’s effectiveness. Manufacturers publish application notes and white papers that can help you determine the types of equipment available, whether they are appropriate for your uses, and how to properly use the equipment.
How Do You Avoid Pitfalls? Keep in mind that a machine-vision system may not “see” things the way you do. And even if it does see an object properly, conditions that your brain compensates for automatically will confuse inspection software. Common problems include changes in the color or finish on a part. A shiny finish may cause glare that saturates an image and makes a camera see it as all or mostly white. A color change may cause a component to blend into the background, thus becoming all but invisible. Problems may also arise from changes in ambient light, poor camera focus or position, incorrect part orientation or position, and different background colors. The end effects vary from application to application, but be aware that these problems do occur regularly in machine-vision systems. Attention to a few details can help cut down on problems such as false failures. Always be sure that you mount cameras according to their manufacturer’s specifications. Position lights securely and block ambient light from the inspection area. Ensure that your production line moves parts into the camera’s view in a reproducible position. Now that you know more about the components that make up a machine-vision system, you can do further reading, obtain data sheets for components, and further investigate the production line on which you want to install an inspection system. As you narrow your search to a few manufacturers, nothing will substitute for hands-on examination of products and side-by-side comparisons. Manufacturers should provide demonstration units or “loaners” that you can evaluate under realistic conditions. T&MW Rob Gregory is a senior product marketing manager for Data Translation’s imaging and machine- vision products. He received a B.S.E.E.T. from SUNY Buffalo. FOR FURTHER READING |




















