Barcodes are commonplace in material handling applications as a means of identifying and tracking products throughout manufacturing, distribution and purchasing by consumers. With this technology comes the responsibility to ensure each barcode can be read properly at each of the aforementioned stages. Vision sensors with barcode reading (BCR) capabilities can provide this assurance by inspecting barcodes for three key factors: presence, quality and content.
To ensure a barcode is present, a vision sensor’s BCR tool compares a stored image of a product containing a barcode, which is designated as a “good” part, with all images obtained during the inspection. Unlike conventional laser barcode readers, vision sensors can detect a barcode placed at any orientation and located anywhere within the camera’s field of view. This means the sensor can identify barcodes more readily and reduce false readings—instances where a “good” part is mistakenly rejected—due to slight variances in label position.
Vision sensors additionally evaluate the quality of the barcode to confirm that the symbol exhibits sufficient contrast to be read further downstream. This trait helps ensure the product can be effectively tracked from manufacturer to user. Along with preventing improperly marked products from reaching consumers, thus avoiding costly returns and recalls, this barcode grading can help indicate when an automated system’s barcode marker needs replacement or repair. This allows companies to address the concern immediately, without experiencing further rejected products.
Another reason to use vision sensors for barcode applications is to verify barcode content. Vision sensors can “decode” a wide variety of barcodes—from linear, one-dimensional (1D) barcodes to more complex, two-dimensional (2D) data matrix symbols. Their ability to provide a successful solution in these applications, however, is dependent upon factors such as image contrast, primarily established through proper vision lighting. The sensor must additionally be simple and efficient to set up, run and modify inspection parameters as needed.
The simplest barcode type, linear 1D, essentially acts as a license plate for a product. It contains a series of numbers or letters—traditionally expressed through vertical black lines on a white background—that serve to identify the product. To use this barcode type, a series of numbers associated with each type of product handled is stored within an electronic database on the user’s main computer terminal. When a vision sensor reads this barcode, the decoded information is used to sort items based upon factors such as type of product and shipping destination.
The former application example helps speed order fulfillment, ensuring users can quickly categorize inventory and retrace each product’s placement when needed. The latter can save users significant shipping costs by allowing zone skipping, in which a package can be taken by truck directly from the sender to the final destination—with no unnecessary mail hub stops in between.
However, 1D linear barcodes are limited in the amount of information they can contain—many such as UPC codes contain only basic identification about the product and its manufacturer, expressed in a string of 10 numbers. A 2D barcode consists of tiny cells and can contain exponentially more data—2,335 numbers or 155 ASCII characters—within a single, compact symbol. This increased capacity allows users to encode information not only about the product itself, but also the date it was manufactured, the individuals running the work cells in which it was made, which raw ingredients it contains and the origins of these ingredients.
This arrangement assists in the creation of a product’s e-pedigree, which ensures product quality and facilitates recalls when needed by allowing manufacturers to retrace their steps when a faulty product is identified. Thus, the recall can be performed on a more limited basis, saving costs and limiting customer dissatisfaction, all while allowing manufacturers to more easily identify the cause of the faulty production.
While 1D barcodes are often applied using labels, they may also be applied via an ink stamp directly to a product’s surface in consumer packaging, as long as the dark barcode lines appear to contrast with the surface color of the package. With 2D barcodes come more options. They can be applied by label or ink stamp, or the cells may be imprinted as either solid or dot patterns onto the surface of a metal part—a process called peening.
Ways to ensure reliable, repeatable barcode reading with vision sensors differ depending upon the marking method used. When reading label-applied or ink-marked barcodes, a vision sensor identifies and decodes the symbol based on color differentiation; the sensor can see within the image it has captured that the dark portions of a barcode vary in color from the light background. When examining a dot-peen data matrix code, a vision sensor must instead examine the product for differences in texture, identifying a convex pattern placed atop a product’s surface.
In both of the above instances, creating optimum contrast between the barcode and its background is key, and this is most commonly established through vision lighting.
Dedicated vision lighting is perhaps the most critical component of any vision inspection, as it ensures the camera can obtain accurate, consistent application images. Ordinary plant conditions—variances in sunlight, shadows or even air pollutants, such as smoke—make for inconsistent and therefore undesirable lighting. Dedicated lighting helps users overcome the challenges ambient light presents, while optimizing the variances between a barcode and its background.
In most instances, LED lighting is the ideal solution for machine vision. While dedicated incandescent lighting is an option, it is perhaps the least-consistent lighting, as the amount of illumination it gives off reduces with the bulb’s usage. Fluorescent lighting is more efficient and longer lasting than incandescent, but these lamps have issues with consistency; their “flicker” rate is high due to output frequency.
LEDs are energy efficient, offering 100,000 hours of operation with consistent, monochromatic illumination throughout their usable life. While the higher cost of LEDs have prohibited their use in large-scale applications, recent LED advancements, such as significant increases in brightness and power, have made them more compelling for high-accuracy vision inspections.
With the light source selected, the next step is determining the mode of dedicated lighting, which depends on the type of barcode that must be examined. As mentioned earlier, a vision sensor distinguishes a label or ink-printed barcode from its background based on color. Since the dark bars and light background naturally exhibit contrast, it is the purpose of vision lighting to emphasize this contrast, which usually requires only direct illumination.
For these applications, a ring light is mounted around the camera’s lens and directed at the target object. By flooding the inspection area with even, consistent illumination, the ring light highlights the barcode itself, while counteracting any negative influence the plant’s ambient light may have on the inspection. To further emphasize contrast in instances where the barcode is placed on a colored surface, users can apply a ring light that is the same color as the surface. This technique makes the background surface appear bright while the barcode lines appear dark, thus creating a high-contrast image.
When a vision sensor is used to examine a dot-peen barcode, it must be able to distinguish texture variances on two surfaces of the same color. In some instances, the 2D barcode is placed on a reflective part, such as in the manufacture of automotive components, so the vision lighting used must also avoid creating glare. Both on-axis and low-angle lighting provide indirect lighting that highlights texture variances.
Low-angle lighting is positioned nearly perpendicular to the region of interest—the surface containing the barcode—and casts shadows that emphasize changes in elevation. An onaxis light is ideal for reflective objects. It is placed between the vision sensor and target object and uses a beam splitter, which directs light rays along the same axis at the camera lens. Due to this arrangement, reflective surfaces perpendicular to the camera appear bright, while surfaces at an angle to the camera— in this case, the raised barcode— appear dark, making them easier for the camera to capture.
Once proper contrast has been established through dedicated vision lighting, the vision sensor can accurately determine not only whether the barcode is present and what information it contains, but also whether the symbol itself demonstrates satisfactory contrast. The vision sensor evaluates the contrast between the dark and light portions within a barcode, or, in the case of a dotpeen data matrix code, the differences between the raised portions and their background on a product’s surface. If the code does not exhibit sufficient contrast, the vision sensor recognizes that the product has failed inspection and creates an output signaling the product should be diverted from the line.
For vision inspection to be truly successful, it must be efficient both in operation and use. Traditional PC-based vision solutions provided comprehensive capabilities, but they often required advanced, time-consuming programming. Any inspection modifications needed to be accomplished from the PC and then re-uploaded to the vision sensor, requiring downtime and often inconveniencing users, as it was not always practical to keep a laptop on the plant floor to monitor inspections.
Touchscreen programming has now enhanced some vision sensors’ capabilities, allowing users—even those without prior programming knowledge—to set up, monitor and modify a vision inspection on the factory floor. All programming can still be transferred to a main computer terminal for storage and remote modifications when needed, but users have the hands-on approach often desired to keep pace with fastmoving production schedules.
Whether the screen is integrated into the sensor itself or used as a remote handheld touchscreen and applied to program multiple vision sensors, touchscreen programming adds simplicity to the sophistication of vision sensing, making it even more practical and advantageous to apply for barcode applications.
Mike Turner is material handling business development manager with Banner Engineering, a manufacturer of photo eyes, sensors and associated products for industrial and process automation.