Skip to main content
ENGINEERING IDEAS INTO REALITY
Capabilities developed

Plastic cap inspection machine with cameras and air rejection of defective caps, for a plastic cap manufacturer

This inspection machine uses cameras to check the cap base, hinge, lid and foreign matter on flip-top plastic caps on a conveyor, then triggers an air blast to reject defective caps from the track. We designed and built 2 machines (2 camera sets per machine) for 2 production lines at a plastic cap manufacturer in 2017–2018, tested them with sample caps, both good and defective, and took the first machine for testing separately from the line at the customer's factory.

Illustration for the case Plastic cap inspection machine with cameras and air rejection of defective caps, for a plastic cap manufacturer
Industry
General manufacturing
Year
2017–2018
Scope of work
Inspection machine for flip-top plastic caps on a conveyor, for 2 production lines, to a specification of about 5,000 pieces per hour · 2 camera sets per machine on adjustable-distance axes above the conveyor: the first set inspects the cap base (tears, excess plastic) and the hinge, the second set inspects the lid, along with detection of foreign matter (dust, hair, insects) · Processing: Python + OpenCV · Display and logging: wxWidgets user interface and SQLite inspection results database · Control cabinet for selecting the cap type by the colour of each line · Air blast unit (Air Reject) to reject defective caps from the track · Light-control structure for the reflective metal track · What we built and tested: 2 inspection machines, designed to work with a conveyor supplied by another machine builder, tested with sample caps, both good and defective, with the first machine taken for testing separately from the line at the customer's factory
Duration
Dec 2017 – Nov 2018 (original plan: 10 weeks)

Summary

  • The 2 plastic cap inspection machines for 2 production lines are a capability we developed in 2017–2018. We designed and built the machines, tested them with sample caps, and took the first machine for testing separately from the line at the customer's factory.
  • Each machine has 2 camera sets. The first set inspects the cap base and hinge, the second set inspects the lid, and the system looks for foreign matter such as dust, hair and insects.
  • The project specification was a speed of about 5,000 pieces per hour. When an abnormal cap is found, the system triggers an air blast unit (Air Reject) to reject the cap from the track, and users can select the cap type by the colour of each line at the control cabinet.
  • Main lesson: the conveyor track design, defect list and acceptance criteria must be clearly agreed with all parties before building the machine, and testing should take place on the actual conveyor track, not only separately from the line.
01

The on-site brief

A plastic cap manufacturer needed an inspection machine for flip-top caps on a conveyor that could keep up with a speed of about 5,000 pieces per hour. The machine had to find caps that were torn, had excess plastic or had foreign matter, then reject defective caps from the line.

02

What we did

We built 2 inspection machines for 2 production lines, each with 2 camera sets. The image processing program is written in Python and OpenCV and triggers an air blast unit (Air Reject) to reject defective caps from the track. Users can select the cap type by the colour of each line at the control cabinet.

03

Test results with real workpieces

The first machine was tested separately from the production line at the customer's factory in 2018. During building and testing, we found factors that have to be agreed before installation on the production line: reflective track material and cover plates that block the camera's view, defect types added outside the scope of work, acceptance criteria, and testing on the actual conveyor track.

How the brief came about

This machine uses cameras to inspect every flip-top plastic cap on the conveyor and rejects defective caps from the line with air. Caps run closely in a row at a speed of about 5,000 pieces per hour. Defects such as tears at the hinge or hair stuck on a cap are small and hard to see by eye at this speed.

This plastic cap manufacturer ordered 2 inspection machines for 2 production lines in 2017. The inspection machines had to be installed together with a conveyor supplied by another machine builder. We were responsible for the camera sets, control cabinet and inspection program, while the conveyor and track were the machine builder's work.

What are a flip-top cap and a hinge?

A flip-top cap is a cap whose lid is attached to the cap body. The hinge is the part that connects the lid to the cap body.

Requirements and constraints

The machine had to inspect every cap at line speed and reject defective caps from the track when detected. The main requirements and constraints are as follows.

  • Speed of about 5,000 pieces per hour, with caps running closely in a row on the conveyor
  • Inspect the cap base (tears and excess plastic), hinge, lid and foreign matter such as dust, hair and insects
  • Caps on each production line come in several colours, and users must be able to select the cap type to inspect at the control cabinet
  • Reject defective caps from the conveyor track immediately on detection
  • Installation together with another machine builder's conveyor, so camera position and lighting depend on that builder's track design

Why 2 camera sets per machine and air rejection of defective caps

We split the cameras into 2 sets according to the inspection list. The first set handles the cap base and hinge, and the second set handles the lid. The 2 sets are mounted on adjustable-distance axes above the conveyor, so the camera distance can be adjusted. Rejection uses an air blast unit (Air Reject) because the brief called for defective caps to be removed from the track immediately while good caps carry on as normal. The machine's operating sequence is as follows.

  1. 1

    Select the cap type to inspect

    Before starting the line, the user selects the cap type by the line's colour at the control cabinet, so the system applies the inspection criteria that match the cap being produced.

  2. 2

    First camera set inspects the cap base and hinge

    It looks for cap bases that are torn or have excess plastic, and hinges that are torn or misshapen.

  3. 3

    Second camera set inspects the lid

    It checks for abnormalities on the lid. The system also looks for foreign matter visible to the camera, such as dust, hair and insects.

  4. 4

    Air Blowing Defect Sorting

    When the program judges a cap to be abnormal, the system triggers the air blast unit to push that cap off the conveyor track immediately.

  5. 5

    Store the inspection results

    The system records the inspection results and cap status in a database.

What is Air Reject?

Air Reject is a set of air nozzles mounted beside the conveyor track. When the system detects a defective piece, the nozzles release air to push that piece off the track without stopping the conveyor.

What we built and tested

We built 2 cap inspection machines for 2 production lines, complete with camera sets, control cabinets and an inspection program that triggers the air blast unit to reject defective caps. The items are as follows.

  • 2 inspection machines, each with 2 camera sets on adjustable-distance axes above the conveyor
  • Control cabinet for selecting the cap type by the colour of each line
  • Image processing program (Python and OpenCV) with a user interface (wxWidgets) and an inspection results database (SQLite)
  • Program that triggers the air blast unit (Air Reject) to reject defective caps from the track
  • Light-control structure added later, when the machine's conveyor track was changed to reflective metal

Project sequence

The project began in 2017. The main sequence of work was as follows.

  1. 2017: the project started on the original 10-week plan
  2. During machine building: the machine builder's conveyor track was changed to reflective metal, so we added a light-control structure
  3. 2018: the first machine was taken for testing separately from the production line at the customer's factory

Details of test results on real workpieces

We tested the machine with sample caps, both good and defective, within the scope of work, and took the first machine for testing separately from the production line at the customer's factory in 2018. The documents do not record figures for the defect detection rate or the incorrect rejection rate, so we do not report accuracy figures.

The results of testing separately from the line apply to those test conditions. During building and testing, we found factors that have to be agreed before installation on the production line, as follows.

  • The actual conveyor track differed from the design, in both the reflective track material and the cover plates that block the camera's view
  • Defect types outside the scope of work were added, such as ink marks, burn marks, ripped caps, cutter marks and black spots
  • The agreement on acceptance criteria was still unclear
  • Results from testing separately from the line must be confirmed again on the production line's actual conveyor track

What we learned

This work offers the following principles for installing inspection cameras together with machinery from other manufacturers.

  • The machinery design around the camera is part of the inspection system. Track material, cover plates and mounting position determine both lighting and camera angle, so these designs must be agreed with the machine builder before designing the lighting. In this project, the track changing to metal meant a light-control unit had to be added later.
  • The defect list must be defined from real samples of defective pieces and closed before the machine is built. Defect types added after the machine is built change both the lighting and the inspection program.
  • Acceptance criteria must clearly state the defect types, test method and site conditions used for testing. All parties must share the same understanding before building starts, and the criteria must include testing on the actual conveyor track. Results from testing separately from the line do not yet show how the machine behaves under on-site lighting and vibration.

How can this approach be applied to your production line?

If your line produces caps or small plastic parts that run in a row on a conveyor, and defective pieces must be rejected from the line, you can use the same approach as this case: separate cameras by inspection point, decide results with an image processing program, then reject with air. What needs adapting is the lighting, camera angle and defect list, according to your parts and track.

Reusable parts and parts that need adapting

System partReusableNeeds adapting when
Camera setsSeparating cameras by inspection point on adjustable-distance axesParts of a different shape or size need the camera angle and distance redesigned
LightingAdding a light-control structure when the background is reflectiveA different track material or part colour means the lighting must be retested with real parts
Inspection programSelecting the part type at the control cabinet and storing inspection results in a databaseDifferent defect types mean collecting samples of defective pieces and setting new criteria
RejectionAir blast unit (Air Reject) beside the trackHeavy or differently shaped parts need testing to confirm that air can actually push them off the track
Working with the machine builderDividing the work between cameras and program on one side, and conveyor and track on the otherIn every case, the track design, materials and mounting positions must be agreed in writing before starting
  • Prepare real samples of defective pieces for every defect type you want rejected, from the design stage onwards
  • Write clear acceptance criteria stating the defect types, the smallest size that must be visible, the line speed to be supported and the site conditions used for testing, then make sure all parties share the same understanding before building starts
  • Plan testing on the production line's actual conveyor, so that test results reflect on-site lighting and vibration conditions

Technology used

Machine Vision2 camera sets per machinePythonOpenCVwxWidgets (user interface)SQLiteAir reject unit for defective capsControl cabinetConveyor

Frequently Asked Questions

What can this machine inspect on a plastic cap?

Within the scope of work, the first camera set inspects the cap base and hinge, looking for torn spots or excess plastic; the second camera set inspects the lid; and the system looks for foreign matter visible to the camera, such as dust, hair and insects.

How does the machine reject defective caps without stopping the conveyor?

When the program judges a cap to be abnormal, the system triggers the air blast unit (Air Reject) mounted beside the conveyor track, which releases air to push that cap off the track immediately. Good caps carry on as normal without the conveyor stopping. If your parts are heavier than, or shaped differently from, the caps, you must first test that air can actually push them off the track.

Why does the conveyor track affect camera inspection?

The camera needs stable lighting and a stable background to distinguish the cap from its defects. In this case the conveyor rail was changed to reflective metal, so we had to add a light-control structure. The rail material should therefore be agreed with the machine builder before work begins.

Can it be used with other types of cap or plastic part?

In principle, yes, but we need to see the actual parts first. We will ask for samples of good parts and defective parts, separated by defect type, along with the line speed and the conveyor design, to assess the camera, the lighting and the rejection method.

How much does an inspection machine like this cost?

There is no standard price, because it depends on the number of cameras, the defect types, the line speed and any additional mechanical work required. Contact us to request a quotation. We will assess it after seeing the parts and the site.

Want a system like this for your work?