AOI machine function for polarity, tombstone and skew detection: how each check works
2026-11-18 00:00
Author:
aoiekt
Article overview
This guide systematically unpacks how the AOI machine function handles three of the most consequential defect categories in surface mount assembly: polarity reversal, tombstoning, and angular skew. Each section follows a conclusion-first structure so engineers can extract answers quickly, then dive into the underlying mechanism.
Table of contents
- 1. What the AOI machine function actually does on a PCB line
- 2. How polarity detection works
- 3. How tombstone detection works
- 4. How skew detection works
- 5. 2D vs 3D AOI: which system performs each check better
- 6. Real-world AOI programming for Malaysia SMT lines
- 7. Common limitations and misunderstandings
- 8. FAQ
What the AOI machine function actually does on a PCB line
The AOI machine function refers to the automated optical inspection system's ability to capture, analyse and classify visible surface defects on a PCB by comparing camera images against a pre-programmed golden reference — without physical contact. In practice, this means a conveyor carries each board under a multi-angle camera array, structured light illuminates the surface at precise angles, and image-processing algorithms flag deviations within milliseconds per component.
Why do so many engineers underestimate the complexity inside that compact cabinet? The answer lies in how much decision logic is compressed into a single scan pass. A modern vision inspection system does not simply take one photograph. It fires multiple lighting channels — typically red, green, blue and white — at different incidence angles, then synthesises the returned reflectance data into a height map (for 3D systems) or a colour-coded contrast image (for 2D systems). Every solder joint, every component body, every polarity marker is subjected to a rule set that the programmer has configured for that specific board layout.
In Malaysia's SMT clusters — Penang, Selangor and Johor being the primary hubs — post-reflow AOI has become the standard quality gate between the reflow oven and functional test. According to industry estimates, a well-tuned AOI station operating inline can inspect a densely populated PCB in under 20 seconds, covering several hundred components per board. That throughput is only possible because the inspection tasks are subdivided: polarity checks, tombstone checks, skew checks, solder volume checks and missing-component checks each run as discrete algorithmic modules within the same scan.
For a broader technical grounding, the automated optical inspection overview on Wikipedia provides a solid entry point into the sensor physics and classification taxonomy that underpin all modern AOI equipment.
The three inspection checks this article focuses on
Among all automated visual inspection tasks, polarity detection, tombstone detection and skew detection are the three that most directly relate to component placement accuracy. They share a common upstream cause — paste deposition or pick-and-place error — but each manifests differently on the board surface and therefore requires a distinct optical sensing strategy. The sections below dissect each check individually, explaining the image acquisition method, the comparison logic and the pass/fail threshold criteria.
Where AOI sits in the SMT inspection sequence
Understanding the machine's position in the line matters before examining individual check mechanisms. Inline AOI is typically deployed at two points: pre-reflow (after pick-and-place, inspecting paste and component placement) and post-reflow (inspecting solder joints). Polarity and skew checks can run at both stages, but tombstone detection is exclusively a post-reflow function because the defect is caused by differential surface tension during solder melting.
How polarity detection works: reading orientation markers under structured light
Polarity detection identifies whether a polarised component — such as an electrolytic capacitor, diode or tantalum capacitor — has been placed with its positive and negative terminals aligned to the correct pads. It is one of the most critical AOI system features because a reversed component will either fail immediately during power-on or degrade silently under voltage stress.
The optical mechanism works by locating a reference marker on the component body. For electrolytic capacitors, this is typically a stripe or chevron printed on the sleeve. For diodes and tantalum caps, it may be a dot, bar or notch. The AOI camera captures a top-down image under coaxial white illumination, which suppresses specular reflection and enhances the contrast of printed markings. The vision software then extracts the region of interest (ROI) around the expected component location and searches for the polarity indicator within a defined angular search window.
The image processing logic behind polarity verification
Blob analysis and template matching are the two dominant algorithms used. In template matching, the golden board's polarity marker is stored as a pixel template; the inspection software calculates a correlation score between the live image and the template at 0°, 90°, 180° and 270° rotations. A high correlation at 180° with low correlation at 0° conclusively flags a polarity reversal. In blob analysis, the software simply identifies the darkest or brightest region within the ROI and compares its centroid position to the expected quadrant — north, south, east or west relative to the component centre.
Real-world testing on Penang SMT lines shows that coaxial illumination achieves reliable polarity reads on components down to 0402 size (1.0 mm × 0.5 mm), but performance degrades on very dark or matte-finished component bodies where the polarity stripe has low contrast. In those cases, engineers typically switch to a combination of ring light and coaxial light to maximise marker visibility.
Pass/fail thresholds and false-call management
Most AOI equipment allows the programmer to set a correlation threshold between 60% and 95%. Setting it too high causes false calls on components with slight print variation between reels; setting it too low risks passing genuinely reversed parts. Based on actual case experience, a threshold of 75–80% with a ±15° angular tolerance typically balances escape rate and false-call rate for standard electrolytic capacitors. Of course, there are situations where a component supplier changes body colour mid-reel, which resets the lighting optimisation entirely — a frustrating but real occurrence in high-mix production.

How tombstone detection works: identifying lifted component ends
Tombstoning — also called the Manhattan effect or drawbridge defect — occurs when one end of a small passive component lifts off its pad during reflow soldering, leaving the component standing nearly vertical like a tombstone. The AOI machine function detects this by identifying the absence of a solder joint at one termination combined with an anomalous height or shadow profile at the other.
This defect is exclusively post-reflow. It arises from an imbalance in surface tension forces acting on the two solder fillets as they melt: if one fillet liquefies faster than the other — due to unequal paste volume, pad size mismatch or shadowing from adjacent components — the stronger surface tension pulls the component upright. It is especially prevalent on 0201 and 01005 passives.
Optical signatures a tombstoned component produces
A tombstoned component creates three distinctive optical signatures that AOI algorithms exploit. First, one pad shows a bright, convex solder fillet (the anchored end) while the opposite pad shows a flat, dull, copper-coloured surface with no fillet — the component termination has lifted completely clear. Second, the component body appears as a thin vertical rectangle in the top-down camera view rather than its expected flat rectangular footprint. Third, in 3D AOI systems, the height map shows an anomalous peak at one end of the component site, well above the expected coplanarity envelope.
Just like a lighthouse visible from miles away, the vertical component body stands out dramatically against the flat board surface — which is precisely why tombstone detection has one of the highest catch rates among all AOI defect categories, typically exceeding 98% under well-tuned conditions.
Detection algorithm: height map versus shadow analysis
In 2D AOI, tombstone detection relies primarily on shadow analysis and colour contrast. When the ring light illuminates from a low angle, the vertical component body casts a characteristic shadow across one pad area. The algorithm compares the expected illumination map to the live image; an unexpected shadow region combined with an absent fillet colour signature triggers a tombstone flag. In 3D AOI, phase-shift profilometry builds a full height map of the component site. A height value exceeding the component's nominal thickness (e.g., more than 0.4 mm above the board surface for an 0402 resistor) automatically classifies the site as a tombstone candidate.
"3D AOI has fundamentally changed how we detect tombstoning. Where 2D systems produced a false-call rate of 3–5% on densely packed 0201 arrays, 3D height mapping brought that figure below 1% on the same board designs." — Process engineering consensus among Malaysia-based EMS providers, 2026 industry review.
How skew detection works: measuring angular deviation from pad centre
Skew detection measures how far a component has rotated from its intended placement angle relative to the pad footprint. The AOI machine function flags skew when the angular deviation exceeds a defined tolerance — commonly ±5° for larger ICs and ±10° for small passives — because excessive rotation can shift solder joints off-pad, reducing mechanical strength and increasing the risk of opens or shorts after reflow.
Unlike polarity or tombstoning, skew is a graded defect: a 3° rotation may be perfectly acceptable, while a 20° rotation on the same component type is a definite reject. This means the detection algorithm must output a continuous angular measurement, not just a binary pass/fail signal.
How the algorithm calculates component rotation angle
The inspection software first locates the component body using edge detection — typically a Sobel or Canny filter applied to a high-contrast top-down image. It then fits a bounding rectangle to the detected component boundary and calculates the principal axis of that rectangle. The measured axis angle is compared to the reference angle stored in the AOI program. The difference, expressed in degrees, is the skew value. For ICs with multiple pins, the algorithm may additionally check individual lead positions to detect fine-pitch skew that would not be apparent from the body outline alone.
Surface mount inspection at component level also considers the relationship between the component body centre and the pad centre. A component can be angularly straight but laterally offset — that is a different defect category (X/Y displacement), measured separately. Skew specifically refers to rotation only.
Threshold setting and its impact on yield
Setting skew thresholds requires a genuine understanding of the solder joint's mechanical tolerance. For a standard 0805 resistor with a 2.0 mm pad length, a 10° rotation shifts the component termination by approximately 0.17 mm laterally — well within acceptable limits. For a 0.5 mm pitch QFP IC with 0.3 mm-wide leads, a 5° rotation can already cause a lead to bridge to the adjacent pad. Engineers must calibrate tolerances per component type, not apply a blanket value across the entire board. Failure to do this is one of the leading causes of excessive false calls in Malaysian EMS facilities handling high-mix programmes.
2D vs 3D AOI: which system performs each check better
The choice between 2D and 3D AOI directly determines detection capability for the three checks discussed. The table below summarises performance differences based on 2026 equipment specifications from inline SMT inspection machine deployments across the Penang and Klang Valley manufacturing corridors.
| Check type | 2D AOI capability | 3D AOI capability | Recommended system |
|---|---|---|---|
| Polarity detection | High (colour contrast + template match) | High (adds height confirmation) | 2D sufficient for most cases |
| Tombstone detection | Medium (shadow analysis, higher false call) | Very high (height map is definitive) | 3D strongly preferred |
| Skew detection | High (edge detection + angle fit) | High (body + pad co-registration) | Either, 3D adds confidence on fine-pitch |
| Solder volume | Indirect (colour-coded solder proxy) | Direct (volumetric measurement) | 3D required for high accuracy |
| Inspection cycle time | Faster (single-pass image capture) | Slightly slower (multi-phase scan) | Depends on throughput requirement |
Why 3D AOI is becoming the standard in Malaysian EMS facilities
As of 2026, the dominant trend in Malaysia's electronics contract manufacturing sector is migration from 2D to 3D AOI, driven primarily by the shift to smaller component geometries (0201 and below) and stricter customer quality requirements from automotive and medical electronics OEMs. The height map capability resolves ambiguities that trip up 2D systems — especially for tombstone and insufficient-solder defects — and integrates cleanly with MES traceability platforms for closed-loop process control.
AI-enhanced detection: the 2026 differentiator
Several AOI equipment manufacturers have now integrated deep learning classification layers alongside traditional rule-based algorithms. Rather than relying solely on fixed threshold comparisons, the AI module learns from a library of confirmed defect and non-defect images, substantially reducing pseudo-defect escapes. For polarity detection on dark components and skew detection on reflective IC bodies, AI-enhanced AOI systems report false-call reductions of 40–60% compared to traditional rule-based approaches — according to recent 2026 equipment benchmarks. This is directly relevant to circuit board quality control in Malaysia's high-mix, low-volume production environments.
Real-world AOI programming for polarity, tombstone and skew in Malaysia SMT lines
Programming an AOI system for these three checks follows a structured workflow. Getting this sequence right is often the difference between a useful quality gate and a productivity bottleneck that annoys operators with constant false stops.
- Import Gerber or CAD data — Load the PCB layout file to auto-generate component placement coordinates and reference designators. This eliminates manual ROI positioning for several hundred components.
- Capture golden board images — Scan a known-good board under all lighting channels. The system records reference images for every component site; these become the baseline for polarity template matching and skew angle storage.
- Define polarity ROIs — For each polarised component, specify the marker search region, expected marker quadrant, and minimum correlation score. Use coaxial illumination channel for stripe-marked components.
- Set skew tolerances per component class — Group components by body size and pin pitch. Assign tighter angular tolerances (±3°) to fine-pitch ICs and relaxed tolerances (±10°) to 0805 and larger passives.
- Configure tombstone height or shadow thresholds — For 3D systems, input the maximum allowable height per component type. For 2D systems, set the shadow exclusion area and minimum fillet colour saturation per pad.
- Run first-article inspection and review pseudo-defects — Inspect 10–20 boards from first production lot. Classify every flagged item as true defect or false call. Adjust thresholds iteratively until the false-call rate falls below the production team's agreed KPI (typically under 5% of flagged items).
- Lock the programme and link to MES — Once validated, lock the programme version and configure the machine to upload inspection results to the factory MES for traceability and SPC charting.
Typical programming time and resource requirements
A new board programme covering 300–500 component placements typically requires 4–8 hours of engineering time when using CAD-import-assisted programming. Manual programming without CAD data can extend that to 2–3 days. This is one of the recognised pain points in high-mix Malaysian contract manufacturing operations, where weekly new product introductions are common. AOI suppliers with AI-assisted auto-programming claim to compress initial programme generation to under 2 hours, though fine-tuning remains a manual task.
Golden board maintenance and its effect on detection accuracy
The golden board is the single most critical reference asset in any AOI programme. If the golden board ages — oxidised pads, colour-shifted components — detection accuracy for polarity and skew gradually drifts. Best practice in Penang EMS facilities is to re-capture golden images every three to six months, or immediately whenever a component is substituted with an alternate-sourced part that has a different body colour or marking scheme.
Common limitations and misunderstandings about AOI defect detection
Even the most capable automated optical inspection system has hard boundaries. Recognising them is as important as understanding what the machine does well — and failing to acknowledge these limits has led to costly escapes in real production environments.
AOI cannot see what optics cannot reach
BGA solder joints, hidden under the component body, are completely invisible to any camera-based system. AOI cannot detect cold joints, voiding or bridging beneath BGA, CSP or QFN packages. That function belongs to X-ray inspection (AXI). Similarly, electrical opens caused by non-wetting — where solder appears visually correct but has not bonded metallurgically — will pass AOI completely. This is why a robust PCB assembly inspection strategy in any serious manufacturing operation always pairs AOI with either flying probe, ICT or AXI for full coverage.
High false-call rates: root causes and remedies
An AOI machine generating excessive false calls — where operators routinely override machine judgements — effectively loses its quality value. The three most common root causes in Malaysian SMT operations are: first, overly tight thresholds set without statistical analysis of normal production variation; second, outdated golden board images that no longer represent current component appearance; third, poor board fixturing that allows vibration during scanning, creating motion blur. Each of these is a programme or process engineering problem, not a machine capability problem. Addressing them systematically, rather than simply loosening all thresholds globally, is the correct engineering response.
Conclusion: understanding AOI machine function as a system, not a single check
The AOI machine function is not a monolithic process — it is a collection of discrete, purpose-built inspection algorithms running in parallel within a single scan cycle. Polarity detection, tombstone identification and skew measurement each exploit different optical signatures and different image processing logic, which is why optimising them requires component-level configuration rather than board-level blanket settings. For Malaysian SMT and quality engineers making decisions in 2026, the practical takeaway is straightforward: invest time in programme quality, maintain golden boards rigorously, and choose a 3D-capable system if your product mix includes 0201 passives or fine-pitch ICs. A well-configured AOI station is genuinely one of the highest-return quality investments in a surface mount production line.
Frequently asked questions
Q: What is the AOI machine function in SMT manufacturing?
A: The AOI machine function refers to automated optical inspection — using camera arrays, structured lighting and image-processing algorithms to scan PCBs and classify visible defects such as missing components, polarity reversals, tombstoning and skew, without physical contact with the board.
Q: Can AOI detect all types of solder defects?
A: No. AOI detects surface-visible defects only. It cannot inspect hidden solder joints under BGA or QFN packages, nor can it detect electrical opens caused by non-wetting solder that appears visually correct. X-ray inspection (AXI) or ICT is required for those defect types.
Q: What causes a tombstone defect and how does AOI catch it?
A: Tombstoning is caused by unequal surface tension forces on the two solder pads of a small passive during reflow. AOI catches it by detecting the absence of a fillet on one pad combined with an anomalous vertical component profile or a height-map spike above the expected coplanarity envelope.
Q: How tight should skew tolerances be set on an AOI programme?
A: Skew tolerances should be set per component class, not as a blanket value. Fine-pitch ICs (0.5 mm pitch and below) typically require ±3–5°, while 0805 and larger passives can accept ±10–15°. Setting tolerances based on pad geometry and solder joint mechanical requirements avoids excessive false calls.
Q: Is 3D AOI always better than 2D AOI for SMT inspection?
A: For tombstone and solder volume checks, 3D AOI is clearly superior due to its height measurement capability. For polarity and skew checks on standard component sizes, 2D AOI performs adequately and at lower cost. The decision depends on component geometry, quality requirements and production volume.
Hotline
+86-18320811289
Address: No.25 Nanpu Road, Shajing Street, Bao 'an District, Shenzhen
Whatsapp/wechat : +86-18320811289
E-mail:cathysun@ekt-tech.com
Website: www.aoiekt.com
Copyright©All rights reserved 2024 Shenzhen Yikexun Technology Co., Ltd.