Aoi Programming: Preparation, Placement and Process Control

An automated optical inspection system finds what it has been taught to find, and it reports everything it is unsure about as a call for review. The engineering effort in AOI is therefore not in the camera but in the program: how the libraries are built, how the thresholds are set and how the calls are verified. A program that makes too many calls is ignored, and one that makes too few is worthless.

What AOI Can and Cannot See

Optical inspection sees surfaces. It detects missing components, wrong polarity, shifted parts, solder bridges, insufficient or excessive solder on exposed joints and the presence of foreign material. It cannot see under a package body, inside a barrel or underneath a ball grid array.

Understanding that boundary prevents two opposite errors: expecting AOI to replace X-ray, and giving up on AOI because it missed a defect it was never able to see. The complementary methods are compared in our article on X-ray and AOI.

Building the Inspection Library

The library holds a definition for each component type, including its body shape, termination geometry, polarity marking and the inspection windows that apply. A good library is built from a real board rather than from a datasheet, because the images the machine will see are of real joints, not of ideal drawings.

Libraries should also be shared between products. A well maintained global library means a new program starts from proven definitions and only needs the product specific thresholds. Where every program builds its own library from scratch, the same part is relearned repeatedly and the results differ from line to line.

Automated optical inspection camera scanning a populated board

Thresholds and the Trade with Calls

Every inspection decision has a threshold, and every threshold trades escapes against false calls. Tightening a window catches more marginal joints and flags more good ones. The operator then loses confidence in the machine, and the practical result of an over-tight program is that calls are cleared without being examined.

The target is a program whose calls are predominantly real. That is achieved by measuring the process first and setting windows based on its actual distribution, not on an ideal. Where the process is capable, the window can be wide and the call rate low; where it is not, the program should not be used to compensate for an unstable process.

Lighting and Image Quality

Inspection depends on contrast, and contrast comes from lighting. Different colours and angles reveal different features: a low angle shows the height profile of a fillet, while a diffuse source shows markings and text. Most machines allow several light sources per inspection, and the combination has to be tuned for each joint type.

Board finish and solder mask colour both affect the image. A change of finish changes the appearance of every joint on the board, which means a program tuned for one finish may need retuning for another. That dependency should be recorded so that a finish change triggers a program review rather than a surprise.

AOI review screen showing a defect marked on a solder joint

Verification and Review Strategy

Calls have to be verified by a person or by a higher resolution re-inspection. The verification station should present the image at sufficient magnification with the reference beside it, and the decision should be recorded. The rate of confirmed defects against calls is the metric that shows whether the program is useful.

Where the same call is cleared repeatedly, the program is wrong and should be corrected. Recording the reason for each clearance turns verification data into a program improvement loop, which is the only way the call rate falls over time without reducing coverage.

Coverage and Sampling

Full inspection of every board is not always necessary. Where the process is stable and the defect rate is low, sampling reduces cost while retaining a check. The decision depends on the product class and on the consequences of an escape, and it should be made explicitly rather than drifting into practice.

Where sampling is used, the sample plan has to be meaningful. Inspecting the same panel position every time gives no information about the process, and the results cannot be trended. The statistical approach is the same as for any sampling scheme.

Calibration and Maintenance

The camera, the lighting and the motion system all drift. A calibration schedule that verifies position accuracy and illumination stability keeps the measurements comparable, and a reference board with known defects confirms that the program still detects what it was designed to detect.

The reference board check is the single most valuable maintenance activity, because it tests the whole chain from camera to decision. Without it, a program that has stopped detecting a defect class looks exactly like a program that has nothing to report.

Linking Inspection to the Process

Inspection data is most valuable when it is joined to process data. A rise in a particular defect class can be traced to a printer setting, a reflow zone or a component lot, and the acceptance criteria used to judge the joints come from the same standard as the manual inspection described in our article on AOI in production.

The measurement is only as good as the definitions behind it. Where a defect class is ambiguous, the program and the operators will disagree, and the disagreement shows up as a call rate that never improves. Fixing the definition is usually more effective than adjusting the threshold.

Additional Considerations for This Build

Practical attention to aoi programming pays for itself here, because it decides whether the finished board behaves as the drawing intended. Where the requirement is not stated on the fabrication drawing or in the assembly notes, the shop has to assume a default, and that default is rarely the value the design was simulated with. Stating aoi programming explicitly, together with the tolerance that applies, removes the assumption and keeps the result predictable from batch to batch.

Deliberate attention to inspection coverage pays for itself here, because it decides whether the finished board behaves as the drawing intended. Where the requirement is not stated on the fabrication drawing or in the assembly notes, the shop has to assume a default, and that default is rarely the value the design was simulated with. Stating inspection coverage explicitly, together with the tolerance that applies, removes the assumption and keeps the result predictable from batch to batch.

Process Control and Verification

On a design of this kind, false call is the item that decides how the rest of the board is arranged. The process window is set by the narrowest step in the flow, so an improvement anywhere else shows up as margin rather than as yield until that step is addressed. A short note on the drawing about handling, storage or packaging is often worth more than an extra decimal place on a tolerance.

Where a value sits close to a process limit, the drawing should say so, since the shop can then open the process window rather than working to a nominal figure that carries no tolerance. A stack-up that is drawn rather than described removes most of the ambiguity from a quotation, and it lets the fabricator price the board against the dielectric and copper weights that will actually be used.

Related reading: our fabrication notes, board quality and design release notes cover the same ground.

FAQ

What false call rate is acceptable? It depends on the joint type, but a rate above roughly a few per cent per board makes verification unrewarding and encourages blanket clearing. The aim is calls that are mostly real.

Can AOI find cold solder joints? It can find the visual signature of one, such as a dull or irregular fillet, but it cannot confirm the internal structure. X-ray or electrical test is needed for confirmation.

Does a new component require a new program? It requires a new library entry and updated placement data. If the library is shared and well maintained, the change is small rather than a new programming exercise.

Leave A Comment