Checking every pen on a ball-pen assembly machine
An inspection box on a pen assembly machine checks each pen part by part: body, tip socket, label and end cap.
A ball pen is a small product made of several parts: barrel, refill, tip, end cap and label. An assembly machine puts them together at high speed, and a single missing or wrong part means a pen that does not work or does not look right. This post describes how the Monitait Vision Engine (MVE) checks every pen on a pen assembly line.
The problem
At assembly speed, an operator cannot look at each pen. Faults such as a missing end cap, a missing or misplaced label, or a bad tip are easy to miss with spot checks. The goal was to have every pen checked on the machine itself, before the pens are packed.
What we installed
An enclosed inspection box is mounted on the assembly machine, over the chain that carries the pens. The enclosure keeps the lighting the same all day and keeps out the reflections and shadows of the hall. The camera inside takes a frame of each pen as it passes, and the frames are processed on an edge PC beside the machine.
What the system looks for
A trained detector finds each part of the pen in the frame and checks that it is present and in the right place: the body, the tip socket, the label and the end cap. A pen passes only when every expected part is found where it belongs.

How the line uses it
The result for each pen is available on the machine, where it can be used to take a faulty pen out of the flow, and every result is counted. Counts per fault type show the maintenance team which station of the assembly machine is causing trouble, instead of only showing that pens are being rejected.
Numbers we can share
- Every pen tip is checked on the assembly machine, not a sample.
- Our systems have checked about 30,000,000 pens so far.
- The ball-pen model scored 0.87 (mAP@0.5) in validation. This is a validation score on labelled images, not a line accuracy figure.
What we learned
- Check parts, not just the whole product. Detecting each part separately makes the result explainable: the operator sees which part is missing, not only that the pen failed.
- An enclosure is worth it on assembly machines. Small, shiny parts change appearance with every change of hall lighting. Closing the camera and light in a box keeps the view the same all day.
Is this relevant to your line?
The same approach works for other small assembled products: caps and closures, cosmetics, writing instruments, connectors and medical disposables. Send us 20 to 50 images or a short video of good and faulty parts, with your machine speed, and we will reply with a verdict per defect type and a proposed setup.
Related
Finding defects without a trained model compares vision-language models with anomaly detection on 659 factory images. It is useful reading if your line has few labelled defect images to start with. For the MVE product lines and field figures, see monitait.com.