Customer Solutions
Creating a High Throughput Vision-Based System for Pencil Sorting with NI IMAQ and LabVIEW
Author(s):
Anand Chinnaswamy, Soliton Automation Pvt. Ltd.; A. Ashok Kumar, Soliton Automation Pvt. Ltd.; G. Mahendran, Soliton Automation Pvt. Ltd.
Industry:
Machines/Mechanics
Product:
LabVIEW, LabVIEW Real-Time, PXI/CompactPCI, Vision
The Challenge:
Developing a machine vision-based automated sorting system that can sort two million pencils per day of different wood types, textures, and lead colors, that also can perform high-speed image acquisition, real-time processing, and precise synchronization of ejectors.
The Solution:
Building a high-speed sorting system using the NI Vision Development Module, LabVIEW, and digital image acquisition hardware, and also using IMAQ Vision Builder to develop and benchmark core image processing algorithms and an external circuit to accomplish real-time synchronization of ejectors.
Eliminating Defects with an Automated System
Our customer is one of the top five producers of wooden pencils worldwide. Pencils essentially consist of the lead enclosed by the wood. During the manufacturing of pencils, the leads are sandwiched between two wooden pieces referred to as slats, and individual pencils are then separated by a sawing process.
During this process, a number of defects can be induced, such as missing leads, lead offset, misalignment of slats, and more. As a natural, raw material, wood is prone to have defects, such as pieces chipping off, holes, and other defects that affect the pencil both functionally and aesthetically. Defects, such as lead offset, cause pencil leads to break during the sharpening process. We must remove these defects before moving on to the subsequent processes of lacquering and finishing.
Prior to our solution with NI products, more than 120 people were manually removing these defects, but even though a large number of people were involved, the quality of segregation was far from good. For example, lead offset has to be contained to within 300 microns for more demanding markets. It was impossible to reliably inspect such parameters manually. In addition to this, subjective errors crept into the manual process. Overall, the quality of manual inspection was substandard, and our customer was seeking a fully-automated system to perform this critical function.
The test requirements called for:
-
High-speed inspection and sorting of pencils at more than 23 pencils per second
-
Sorting of pencils into different bins based on defects. The requirement is to inspect the end faces of the pencils and classify the pencils into four categories – Side A Good, Side B Good, BSG (Both Sides Good), and BSB (Both Sides Bad). A side of the pencil is considered good if its edge face is clean without defects, such as lead center offset, lead end defects, and cracks.
The customer wanted a cost-effective test system that could provide:
1. Flexibility – Because the pencils were supplied to different categories of customers with different quality expectations, the system had to be flexible enough so the user could set up the machine accordingly. The system should be able to accommodate different types of pencils introduced in the future.
2. Delivery – Aggressive delivery schedule of 16 weeks for complete sorting machine.
3. Compact footprint – Efficient use of valuable manufacturing floor space.
We presented a solution using line scan digital cameras and image processing software and from National Instruments. While it would have been ideal to use LabVIEW Real-Time to provide the hard, real-time response that is needed to precisely fire the ejectors, we provided a PCI-based solution primarily due to the higher processing power that is available on that platform. Benchmarking studies conducted with IMAQ Vision Builder clearly indicated the need for a 2.5 GHz processor. We devised an external circuit that would provide the synchronization needed for ejection. Our solution stood out in terms of cost effectiveness and met all the requirements put forth by the customer.
Two Cameras Provide a Complete View
The system we created consists of two high-resolution, high-speed monochrome line scan cameras focused at two opposite sides of the pencil. Motorized filter wheels enable an automatic filter change depending on the pencil lead color. These cameras are connected to two separate PCI-1422 digital frame grabber cards. We positioned the cameras so the pencil axis was in line with the camera axis as they travel on the conveyer. Appropriate magnification optics and lighting equipment are provided.
We interfaced the control unit of the conveyor to the PCI-6025E data acquisition and control card. In this way, we could set the speed of the conveyor and acquiring position information from a 2500 PPR encoder. We connected the pneumatic ejection system to the digital lines of the DAQ card through an interface card that synchronizes the high-speed ejectors and drives the valves. A 2.5 GHz PC with high-speed RAM performs the image acquisition and processing. We then placed the PC along with the external circuitry in an air-conditioned panel to maintain constant conditions irrespective of the ambient.
The application software running in the PC process the data acquired from both cameras. Based on the defect definitions, the system classifies images as either good or bad. The system then sends this information out to the external interface card where it is stored in a FIFO-type memory buffer. We use this information from the PC, along with the encoder information and the line valid signals from the cameras, to synchronize the different ejectors.
A crucial part of the development cycle was the image processing algorithms. They had to be sophisticated enough to detect the different defect types under varying conditions, and at the same time, perform within the very short time period available. NI Vision Builder for Automated Inspection, with its performance meter, proved an indispensable tool to accomplish our task.
Creating a High-Speed Sorting Application in a Short Time
We built a fully automated pencil inspection and sorting system using the latest in virtual instrumentation and machine vision technology. The system is compact, easy to use, and improves overall inspection reliability. It eliminates the dependency on skilled workforce and will pay for itself in a year.
We found vision development tools such as NI IMAQ Vision Builder indispensable from specifying the type of processor needed to the development of robust algorithms. Without these tools, we certainly could not have successfully completed such a demanding, high-speed sorting application within a period of 16 weeks.
For more information, contact:
Anand Chinnaswamy
Classic Towers 1547 Trichy Road
Coimbatore - 641018, India
Tel: 91 (422) 302374 - 302371
Fax: 91 (422) 302375 E-Mail: achinna@solitonautomation.com