Vision system sorts cotton at high speed

Linescan cameras and FPGA-based custom hardware team up to separate contaminants from raw cotton.

Apr 1st, 2005
Th 174429

Linescan cameras and FPGA-based custom hardware team up to separate contaminants from raw cotton.

By Andrew Wilson, Editor

The quality of raw cotton can vary from region to region and country to country, due to environmental factors such as harvesting and ginning conditions. In choosing raw cotton for a specific product, cotton selectors must balance physical characteristics, fiber length, amount of contaminants, and color of the cotton.

Figure 1. Trützschler real-time cotton-contaminant removal system uses toothed- drawn drums to separate out contaminants from raw cotton as it moves though the system. Controls for machine operation are seamlessly integrated with the machine-vision system through the user interface (below).
Click here to enlarge image

Before it can be spun, raw cotton must be processed in a number of stages by machinery that opens raw bales and cleans any contaminants that may be present. After loose fibers are brushed into rows by a carding machine, they are drawn into strands of a proper thickness and then transferred to a spinning frame, where the cotton is drawn further and wound on a bobbin as yarn.

Click here to enlarge image

One of the market leaders in industrial automated equipment for the textile market, Trützschler, specializes in the production of machinery and systems for spinning mills and the nonwoven industry. One of its products is a real-time system for detection and removal of contaminants from raw cotton. In operation, cotton bales are manually loaded into the system, which uses toothed-drawn drums that separate the raw material as it moves.


Trützschler enlisted the assistance of Tichawa Technology to develop a machine-vision system capable of imaging individual tufts of cotton as they are separated by the toothed drums to help remove contaminants (see Fig. 1). Captured images are analyzed by a high-speed computer system that corrects the images for any nonuniform lighting effects. When defects of a color different from the raw cotton and of a certain size are detected, appropriate high-speed pneumatic air guns are activated downstream to separate the contaminants from the cotton flow.

To obtain the high spatial resolution required, the company deployed its own TVI RGB1728 linescan imager to capture images. The camera, which features a 1728 × 3 (RGB), 40-MHz µPD3728 linescan imager from NEC Electronics America, is interfaced to the company’s proprietary image-capture board over a 225-Mbit/s HotLink interface from Cypress Semiconductor. “Using this interface,” says Christine Tichawa, managing director of Tichawa Technology, “data from the camera are transferred to the image-processing board at 225 Mbits/s.

“In linescan imaging, illumination must remain reasonably uniform over the entire field of view,” says Tichawa, “and with integration times that are typically very short, illumination intensity generally needs to be high.” To properly illuminate the cotton, Tichawa and her colleagues chose off-the-shelf fluorescent lamps because of their very broad spectrum and high color-rendering index. “As color analysis plays an important part in separating contaminants, a light source that provides the closest reproduction to natural daylight was required,” she adds.

FIGURE 2. After RGB data are transferred to an image-processing board the information must be buffered and the color components scaled by intensity to evaluate the surface color of the cotton tufts.
Click here to enlarge image

After RGB data are transferred to the image-processing board, the information must be buffered and the color components scaled by intensity to evaluate the surface color of the cotton tufts and contaminants (see Fig. 2). To do this in real time, buffered image data are fed into a Spartan FPGA from Xilinx. By performing this computation in a pipelined FPGA, maximum data throughput can be achieved.


After image data are normalized, each 1728 × 3 (RGB) pixel value must be mapped to control the output of 32 pneumatic valves spaced evenly across the output of the cotton-sorting machine. “Using real-world customer data,” says Tichawa, “it is possible to develop a set of tolerance bands for each mapped pixel value. The tolerance bands are used to determine whether normalized pixels have detected the presence of raw cotton [which will remain inside the tolerance band] or contaminants [which will show as pixel values outside the tolerance band].”

To detect the presence of foreign particles in the cotton, normalized pixel values mapped to specific pneumatic valves are counted and compared with threshold-data values in the FPGA. Should many out-of-tolerance pixels be counted on any given set of lines, the pneumatic valves must be actuated to blow the foreign particles from the cotton flow. To control this process, trigger-data values are transferred from the image-processing board to a second DSP-based microcontroller over a proprietary microcontroller bus (see Fig. 3).

Here again, processing speed plays a major role in the components used in the DSP controller. “Because the microcontroller was required to trigger pneumatic actuators at 102-ns intervals,” says Tichawa, “we could not use a DOS or Windows-based system.” Instead, the company chose to base the design around an ST10F269 embedded microcontroller from STMicroelectronics, a processor originally designed for automotive applications. With a processing frequency of 40 MHz, the ST10F269 processor can execute most instructions in 50 ns and features a 256-Kbyte embedded Flash memory with up to 111 I/O lines. “This allows the processor to control high-speed events, manage external memory, and control the user interface of the machine-vision system,” says Tichawa.

As the DSP counts the trigger values from the image-processing board, it activates 40 parallel 5-V I/O lines that are connected to an optoisolation board. This board amplifies the 5-V signals and drives 32, 24-V lines that are attached to the pneumatic valves used to separate contaminants from the cotton. Valve-activation time and valve delay can be adjusted for the minimum times from camera to separator.


In addition to driving pneumatic control lines, the optoisolation board is interfaced to a PLC that controls the operation of the cotton-sorting machine. In this way, controls for machine operation are seamlessly integrated with the machine-vision system through the user interface. Features include a light-level detector warning the operator if a lamp fails or the optics become dusty and a limiter to avoid pneumatic-valve damage if the permitted duty cycle is exceeded.

FIGURE 3. The design of the machine-vision system includes a color linescan camera interfaced to a custom image-processing board where color values are normalized and mapped to a number of pneumatic actuators. These data are transferred to a DSP-based controller that triggers I/O lines that drive the actuators.
Click here to enlarge image

Says Tichawa, “We recognized that the manufacturer might require an analysis of statistical data about the types and sizes of contaminants.” Because of this, the company integrated a serial data interface from the DSP controller that allows captured data to be transferred from the system and analyzed by off-the-shelf statistical-analysis packages on a remote PC. In this way, cotton mills can gain a better understanding of the types and amount of contaminants from each batch of cotton.

Tichawa is offering its system to manufacturers in other industries. It plans to market the linescan-based system to vendors of food-sorting, paper production, and automotive-automation systems.

Company Info

Cypress Semiconductor, San Jose, CA, USA

NEC Electronics America, Santa Clara, CA, USA

STMicroelectronics, Geneva,

Tichawa Technology, Friedberg,

Trützschler, Mönchengladbach, Germany

Xilinx, San Jose, CA,

More in Cameras & Accessories