AI in PCB inspection: how AOI and X-ray use deep learning
On a modern SMT (surface-mount) assembly line, a machine photographs every board. It decides whether the board looks right before a person ever sees it. The newer machines add deep-learning models, mostly to cut false calls and programming time. What counts as a defect still comes from a standard written by people, IPC-A-610. And some defects no camera can see.
Three machines, three moments
A typical surface-mount line inspects at up to three points. Small-batch lines may skip one or two. That's worth knowing when you order.
| Inspection | When | What it checks | What it can't see |
|---|---|---|---|
| SPI (solder paste inspection) | After stencil printing, before placement | Paste volume, height, area and offset on each pad, usually measured in 3D | Anything about parts; they aren't on yet |
| AOI (automated optical inspection) | After placement, after reflow, or both | Missing, shifted, rotated or wrong-polarity parts; bridges; visible fillets; lifted leads | Joints under a component body; electrical values |
| AXI (automated X-ray inspection) | After reflow, often on a sample or only on boards with hidden joints | BGA balls, QFN and power-pad joints, voids, bridges under parts | Polarity marks and part markings; it's slower and costs more |
None of them tells you whether the board works. A 10 kΩ resistor in a 1 kΩ position can look perfect. In-circuit and functional testing (electrical tests) are there to catch that.
Where assembly defects come from
Most of what AOI looks for comes from paste, placement or heat:
- Solder bridges. These are unwanted solder links between pins. Causes include too much paste, a misaligned stencil, or a fine-pitch part with too little solder mask between pads. They're common on 0.5 mm (20 mil) pitch QFPs and QFNs (chip packages with many closely spaced pins).
- Tombstones. A chip resistor or capacitor stands up on one end, because the solder on one pad melted and wetted before the other. Uneven pad sizes make it more likely. So does one pad tied straight into a copper pour with no thermal relief (thin copper spokes that slow heat flow).
- Insufficient solder and opens. A clogged stencil aperture, a part not seated flat, or leads that aren't coplanar.
- Wrong polarity. Diodes, LEDs, tantalum and electrolytic capacitors, or ICs rotated 90° or 180°. The cause is often a feeder or reel set up wrong. Sometimes it's an unclear footprint marking.
- Missing or wrong parts. Pick-up failures, empty feeders, the wrong reel in the right slot.
- Voids. Gas trapped in joints, especially under large thermal pads. Only X-ray shows these.
Why rule-based AOI raises false alarms
Classic AOI is programmed part by part. The settings include brightness and color windows, the expected fillet shape (the curve of solder at the joint), the allowed offset, and measured height on 3D machines. Every threshold is a compromise. Set it tight and the machine flags acceptable variation. Examples: a different supplier's capacitor with a slightly different body color, a shiny fillet that reflects light at an odd angle, or silkscreen that comes close to a pad. Set it loose and real defects slip through.
Each flag that turns out fine is a false call. An operator at a review station has to look at it. Lots of false calls cost line time. The bigger risk is human. After a few hundred "pass" clicks on harmless flags, the real bridge on board 412 gets passed too. We haven't found a solid independent figure for typical false-call rates. The numbers that go around online rarely cite a source, so we won't quote one.
What deep learning changes
A deep-learning model is trained on labelled images of good joints and bad ones. It learns to tell them apart from examples, not from hand-set thresholds. In inspection it does two jobs.
Judging flags. The rule-based program still runs and flags suspect joints. A trained model then reviews those flags. It clears the ones that look like known-good variation. Koh Young describes its Smart Review tool this way. It says judgment accuracy improves and false calls keep falling as the tool learns. It also says learning and model updates happen inside the machine, with no external server or cloud connection. That last point matters to assembly houses whose customers forbid board images leaving the building.
Writing the program. Setting up AOI for a new board takes time. Koh Young says its KSMART tools use stored data and deep learning to generate inspection programs. It also says its Auto Programming (KAP) removes the need for a golden board (a known-perfect sample) and cuts setup time by up to 70%. Those are the vendor's figures, not independent measurements.
Other inspection makers, including Omron, Saki, Mirtec, Viscom and CyberOptics, make their own claims in this area. For this post we could only check Koh Young's claims against its own pages. So the others aren't summarized. If you're comparing machines, read each vendor's current product page. Ask for results on boards like yours.
The limits are worth stating plainly. A model only knows defects it has seen enough examples of. So rare failure types and brand-new part types are its weak spots. It can't see through a BGA (a chip with solder balls hidden underneath) any better than the camera can. And it doesn't decide what's acceptable. That's IPC-A-610.
IPC-A-610 sets the pass mark
IPC-A-610, "Acceptability of Electronic Assemblies", is the visual acceptance standard most assembly houses work to. The current revision is J, published in March 2024. It replaced revision H, which came out in September 2020. It uses mostly photos and drawings. They show what's acceptable, what's a process indicator (not a defect, but a sign the process is drifting) and what's a defect. It does this for each product class: Class 1 general electronics, Class 2 dedicated service, Class 3 high performance. Its companion J-STD-001 covers the soldering process and materials.
The class changes the verdict. A fillet that passes at Class 2 can fail at Class 3. So the machine's thresholds and the AI's training labels are only as good as the class they were set for. Our post on IPC Class 2 vs Class 3 covers the differences.
Ordering small batches: what to ask
For five or fifty boards, inspection varies a lot between assembly houses. It also varies between service tiers at the same house. Don't assume. Ask:
- Is AOI done after reflow on every board, or on a sample?
- Is there SPI on the line?
- Is X-ray included for BGAs and QFNs, or is it extra? What void limit do they apply?
- Which IPC-A-610 class do they inspect to by default, and can you specify Class 3?
- Are through-hole and hand-soldered parts inspected, and how? AOI programs often cover the SMT side only.
- Can you get the inspection report, or images of anything reworked?
- Is there a first-article inspection (a full check of the first board) before the full run?
Get the answers in writing with the quote. If a board can't be inspected the way you need, it's better to know before it ships.
Design choices that make inspection easier
The camera can only judge what it can see. The operator can only check what's marked. A few habits help both:
- Fiducials. These are reference marks the machines use to line up the board. Put at least three global fiducials on the board (and on the panel rails), not in a line. A common choice is a 1 mm (40 mil) bare copper dot with a solder mask opening about twice that size. Add local fiducials near fine-pitch parts.
- Polarity marks that survive placement. A pin-1 dot under the IC body vanishes once the part is on. Put pin-1 marks, diode cathode bars and capacitor polarity marks outside the component outline.
- Consistent orientation. Point all diodes the same way. Put pin 1 of all ICs in the same corner where possible. That's easier to program and easier to check by eye.
- Room around tall parts. A tall electrolytic capacitor or connector can hide the fillets of small parts beside it from an angled camera. Leave a few millimeters, or put the small parts on the far side.
- Symmetric pads and thermal relief. Matching pads on chip parts, and thermal spokes into pours, reduce tombstoning. Then inspection doesn't have to catch it.
- No silkscreen on pads. Ink on a pad hurts soldering and confuses the vision system.
You can check several of these before ordering. Gerber3D's DFA check (design for assembly) runs 19 assembly rules on your Gerbers and pick-and-place file in the browser. Ask your assembler about X-ray before you commit to a BGA, not after.
Questions
What is the difference between AOI and AXI?
AOI (automated optical inspection) uses cameras and lighting to check what is visible: part presence, position, polarity and the solder fillets you can see. AXI (automated X-ray inspection) looks through parts to check joints hidden under BGAs and QFNs, including voids.
Does AOI catch every assembly defect?
No. It cannot see joints hidden under a component body, which need X-ray, and it does not test whether the circuit works. In-circuit or functional testing covers wrong values and dead parts that look fine.
Which version of IPC-A-610 is current?
IPC-A-610J, published in March 2024, which replaced revision H from 2020. It sets visual acceptance criteria for assemblies in three product classes.
What is a false call in AOI?
A false call is a board or joint the AOI machine flags as defective when it is actually acceptable. Each one costs an operator review, and a high false-call rate tempts operators to pass flags without looking closely.