Color Sensing Needs Should Be Considered When Replacing a Machine Vision System

How Much Color Sensing Is Necessary?: When Should a Slow Machine Vision System Be Replaced by Color Sensors Without Implementing Overkill?

The primary in-line inspection on our consumer products assembly equipment has to distinguish several colors, some of them only subtly different. The simplicity of color sensors looks attractive, compared to the outdated, too-slow machine vision system we have to replace. Some customers are looking for a simpler way. What specific needs should we add up to make sure we get the right color capabilities and resolution without lapsing into overkill and buying functions we don't need?

—from August '09 Control Design

ANSWERS

More Than Color
First, determine if color identification is the only requirement in the application. If the differentiation of one or more colors is the only purpose, then a color sensor invariably is the best solution to consider. Color sensors are typically faster, simpler and more cost-effective, and they can be as powerful as color vision technology in color identification capability.

If, on the other hand, the application also requires that a part's orientation, contour or a pattern be checked in addition to its color, then color vision sensors or color vision systems are required.

Advanced color sensors can identify minute differences in color similar to a color vision sensor, but sometimes an application can be easily and more cost effectively solved by a lower-level color sensor. So for color identification applications, determine the type of color sensor that is best suited for the application.

In general, lower-level potentiometer or push-button programmable color sensors are a solid and affordable solution for differentiating visibly different colors. These sensors typically have RGB (red, green and blue) LED transmitters, which often are used to distinguish colors such as red, yellow, brown, purple and others.

If the application requires distinguishing very similar shades of the same color, or if it requires more control or analysis, then a programmable advanced color sensor should be employed. Advanced color sensors use a white LED transmitter to better cover the color spectrum and use software to graphically display taught colors. Control functions could include checking not just color but the correct sequence of colors, such as the order of colored wires going into a wiring harness, the definition of acceptable color tolerances and even how colors are analyzed by the sensor.

Jeff Allison, product manager,
Pepperl+Fuchs,
www.pepperl-fuchs.com

Threshold of 10
Looking for the simplest color sensor solution that does the job is a good goal. There are several factors to be considered that might drive the selection decision to a product with more functionality than the simplest solutions, yet with much less complexity and cost compared to full-blown machine vision systems.

Color sensors that can be taught to distinguish between 10 or more different colored objects offer more versatility, especially for automotive applications, where there are often four or more color options.

Sensing colors on textured and other difficult surfaces and differentiating between subtle colors might require more sophisticated color sensors that have large sensing areas illuminated by diffuse off-axis lighting generated by multiple LEDs for each wavelength evaluated. Many inexpensive color sensors operate from on-axis lighting from a single white LED and are unreliable for distinguishing colors on textured surfaces.

Even though a higher performance color sensor might have more features than a particular operation needs, well-written setup software will have wizards to quickly guide production engineers to the configuration that fits their applications. And this time savings can add up to significant cost saving in applications where product changeovers occur often.

The stakes are high—shipping incorrect color products is not only expensive to correct but can lead to penalties imposed by the customer. The cost of a slip-up could be the value of an entire rejected production run. Hence, catching one incorrect color can pay for even the most expensive color sensor.

Steve Nylund, CEO,
Delta Computer Systems,
www.deltamotion.com

Subtle Differences
Many vendors make color sensors that measure average color in a small area of an object—your "consumer products." Most sensors output a triple of spectral values such as red, green, blue or L,a,b. Some sensors output more spectral values to help detect subtle color differences. You might need this hyper-spectral resolution if your colors are very subtly different.

If you need to measure color on more than one area of an object or multiple colors in an area, then a modern color machine vision system is a better choice. In this case, a camera, processor and software measure and distinguish colors. As with a color sensor, average color values can be returned, but now from multiple locations on the object. You can also measure multiple colors in an area of the object, perhaps produced by a color texture.

The measured color depends on the spectrum of the illumination, the angle between the illumination and the object, the angle of view of the sensor or camera and the spectral response of the sensor or camera. The illumination and sensor angles are fixed, and the sensor or camera response is known. You must control the lighting spectrum to reliably measure color. Some sensors include lighting. Most color machine vision systems don't include lighting, but the vendor can help you with lighting selection. Light sources change their spectrum over time or operating conditions, such as temperature or power level. If you include a neutral—white or gray—reference area in the camera's field of view, that can be used to dynamically compensate for lighting spectral changes.

Ben Dawson, director of strategic development,
Dalsa
www.dalsa.com

How to Use Color Sensors
Full-color photoelectric sensors provide a new level of capability to error-proofing and production control. Not only can they precisely match colors and reflectivity values, they are able to identify and exclude or include near color matches on dissimilar as well as similar surfaces. Their color recognition capability provides a robust solution for applications such as sorting by color, part orientation and assembly verification.

Full-color photoelectric sensors are designed to help customers with applications where the specific shade of color or reflectivity of the object is important. Most color sensors today contain a white light emitter and three separate receivers. The light is reflected off of the target and returns to the sensor. The receivers, tuned to look for a specific wavelength of light—one each for red, green and blue—record the components of the reflected light and its intensity. The sensor then compares these values to settings made by the user to determine the necessary action driven by the signal from the sensor.

Programmable tolerance settings in the sensor also make it possible to tightly control the match of the target to the programmed value. This is important when sorting or matching objects of similar color. The more exact the required match, the tighter the color tolerance level is set. Models are available with up to 15 individual color outputs.

Unlike vision sensors that are designed for pattern detection, contour verification or edge location, full color sensors are aimed only at a specific spot on the target that verifies that the right product or the desired attribute is present. This allows them to operate at speeds as fast as 1 msec, much faster than the typical 20 msec update time required by vision sensors.

Full-color sensors are an optimum solution for a wide range of applications. For example, automotive carpet manufacturers use full color sensors to match carpets to vinyl heel pads—two dissimilar surfaces—where the color variation might be indistinguishable to the naked eye.

Roger Altendorf, photoelectric product specialist,
Balluff
www.balluff.com/bfs

More Colors Mean More Time
Many color sensors are indeed faster than machine vision or color camera systems, and much easier to set up. Color sensors on the market today offer several channel outputs to provide for multiple color selections. However, the more colors to be separately distinguished or identified, the longer the processing time. A color sensor that has four digital outputs detecting four different colors might take only 300 μsec or so to process. A color sensor with eight digital outputs detecting eight different colors could take up to 1 msec to process.

An alternative to the digital output processing time is a separate analog output. Every color has a blend of RGB, CMYK or XYZ levels that determine the hue, saturation and intensity. A sensor providing analog outputs of these levels into a controller to determine color identification could be a much faster process than the digital method.

A feature that is available in some of the latest sensors is the ability to communicate with the sensor via a computer, PLC or HMI device. This provides the customer with quick changeover capability, downloadable recipes and reductions in setup and downtime, and it allows for sharing of best practices with other facilities or machines. This feature might seem like overkill to some customers but could be a cost savings in the long-term. Most software packages are free from the factory, very robust and user-friendly. Using a software package to capture colors and determine tolerances is much easier on a computer screen than pushing buttons on a sensor that may be buried deep within your machine or locked behind safety doors, light curtains or interlocks.

Tim Kelley, VP of business development and marketing,
Tri-Tronics
www.ttco.com

Compare the Contrast
Photoelectric sensors can provide a range of sensing solutions that can be tailored to specific requirements—from challenges that require reduced dimensions and cost to applications where color, contrast or luminescence sensing is needed. Where detection of subtle color differences such as dark blue to light blue is required, color sensors can detect different color tones and grayscale tints reliably and efficiently. Compact, high-performance, specialty photoelectric sensors and can be programmed to store three different colors independently and have a quick response time of 650 msec. They can provide a chromaticity plus intensity algorithm for higher sensitivity to tone variations and can detect even subtle variations in color.

Some color mark registration applications can be accomplished using contrast—color mark—sensors. Contrast sensors distinguish two surfaces according to the contrast produced by the difference in reflection. For example, a dark reference mark—low reflectivity—can be detected by comparing it against the contrast of the lighter surface—high reflectivity. Contrast sensors are frequently used in automated packaging applications for registration-mark detection to automate the folding, cutting and sorting phases.

Eric Le, product manager,
Eaton
www.eaton.com

Is Color the Difference?
The most important aspect is to make sure the application does need a color camera and can't be done with a regular gray scale camera. Color cameras produce more data than monochrome cameras. Usually when color is the only difference between a good and bad product, color cameras need to be used. A hardware color conversion rather than software color conversion makes the inspection more deterministic. This also needs to be considered.

Once it's clear that a color camera is needed, the first step is to determine the field of view, operating distance and resolution needed. Proper lighting choices will depend on the part being inspected based on reflections and ambient lighting effects. Next, note the differences in color in the inspection parts. In the application mentioned above, some colors are subtly different. In practice, an object's color often displays a degree of variability due to conditions such as lighting and object topography, among others. The camera chosen should take this variability into account when creating color models and then determine the number of pixels present in the region of interest that match each trained color model. Consequently, the current color corresponds to the model with the highest pixel count. For color monitoring, it's also important to determine how important it is to get the color definitions. If very precise color definitions are needed, then the software tool used in the vision system should define models at 24-bit resolution.

In addition, in many color applications the color vision system should be capable of not only color sorting, but also detecting the presence/absence of colors, color identification and color monitoring. Some applications might also need to find color defects. The choice of color camera should have software tools capable of handling all the types of inspections mentioned above. In addition, the size of the defects and also the pixel size needed to get the desired accuracy will determine the resolution of color cameras needed. It could be 1600x1200 in some applications where higher resolution is needed beyond the standard 640x480.

Narayan Subramaniam, product marketing—vision systems,
Cognex
www.cognex.com

Quality Counts
The key to any color sensor application is the quality of the actual color targets used for calibration and the calibration of the color sensor itself. Spending the time up front to characterize the output from the color sensor based on real-world color targets will allow the user to determine the correct range of the color sensor output defined for the specific system.

Trevor Schelp, senior product engineer,
Optek Technology
www.optekinc.com

DECEMBER'S PROBLEM

We build some pretty basic machines that have only limited need for variable speed control of 240/480 Vac motors from 5 to 20 hp. That's going to change as we expand the machines' capabilities and design them to integrate into systems. We're arguing about whether to switch from full-voltage starters to either VFDs or soft starters. We think we could save energy costs with VFDs because we sometimes run at faster speeds than we need to, but that's not a big deal at the moment. Soft starts would clearly be easier on the system at startup. Cost can't be ignored.

Send us your comments, suggestions or solutions for this problem. We'll include it in the December '09 issue and post it on ControlDesign.com. Send visuals if you'd like—a sketch is fine. Email us at RealAnswers@putman.net. Please include your company, location and title in the response.

Have a problem you'd like to pose to the readers? Send it along, too.