Skip to content

Machine Vision Illumination Design with TracePro

A printed circuit board inspection system checking solder joint geometry at 2 µm resolution must be able to distinguish specular reflection from the solder meniscus against diffuse background from the PCB laminate. Whether that contrast ratio is achievable depends heavily on the illumination direction, spectral content, and spatial uniformity at the inspection plane. Choose the wrong illumination geometry, and the same surface defect that produces a bright pixel in simulation becomes invisible against background noise on the production floor.

Designing machine vision illumination with spreadsheets and heuristics can lead to prototype iterations. A ring light built at the specified inner diameter may produce coefficient of variation (CoV) values of 0.18 across the central field when the specification calls for CoV below 0.10, which may require a mechanical redesign. A structured light projector that achieves an acceptable contrast at normal incidence may drop to a lower value at the 15° part tilt that occurs on a real conveyor, falling below the threshold needed for reliable phase extraction.

TracePro allows engineers to model the complete illumination geometry in 3D, assign LED source emission profiles, apply measured surface BSDF data to inspection targets, and compute photometric output at the camera focal plane before any hardware is fabricated. This article covers the TracePro workflow for four machine vision illumination modes: ring light bright field, dark field grazing illumination, dome diffuse illumination, and structured light projection.

Illumination Modes in Machine Vision and Their Optical Design Requirements

Machine vision inspection systems use different illumination geometries depending on what type of feature they are detecting. Each mode places specific requirements on the illumination optics that TracePro can quantify.

Bright Field Ring Illumination

Bright field ring illumination places LEDs in an annular array at a 15-45° elevation angle from the optical axis. Light strikes the inspection surface at a moderate angle and the camera collects the specular or near-specular return. This mode is well-suited for reading embossed characters on connector housings, detecting cracks in polished metal surfaces, and verifying solder joint geometry where the specular solder meniscus produces a high-contrast reflection.

The optical design requirement for a bright field ring light is uniform irradiance at the inspection plane with CoV below 0.10-0.15 across the inspection field diameter. Non-uniformity introduces gray-level variation that the vision system interprets as a textured background, reducing sensitivity to low-contrast defects. TracePro models the ring light by placing individual LED sources at each array position, assigning the LED's measured near-field emission profile (Lambertian, batwing, or side-emitting), and computing the superposed irradiance map at the working distance. Parametric studies over ring diameter and LED elevation angle allow the engineer to find the geometry that minimizes CoV.

Dark Field Grazing Illumination

Dark field illumination strikes the inspection surface at grazing incidence, typically 75-85° from the surface normal (5-15° from the surface plane). Raised features, contamination particles, scratches, and edge discontinuities scatter light toward the camera aperture, appearing bright against a dark background that receives no specularly reflected light. This mode is highly sensitive to surface texture and is the standard approach for detecting particulate contamination on semiconductor wafers, micro-cracks in glass, and solder paste deposition errors.

The critical design parameter for dark field illumination is the elevation angle of the source array relative to the inspection surface. Too steep an angle and the specular background becomes bright enough to saturate the camera. Too shallow an angle and the illumination does not reach the full inspection field at uniform intensity. TracePro's ray trace computes the irradiance gradient across the inspection field as a function of source elevation angle, identifying the angle that maximizes defect contrast for a given surface BSDF.

Diffuse Dome Illumination

Dome illumination surrounds the inspection part with a hemispherical diffuser, producing near-Lambertian illumination from all directions simultaneously. Specular reflections from curved surfaces are suppressed because no single angle of incidence is favored. This mode is used for inspecting highly reflective curved parts such as pharmaceutical blister packs, automotive trim components, and reflective labels.

The optical design challenge with dome illumination is achieving uniform luminance across the dome interior. Non-uniform dome luminance creates luminance gradients at the inspection surface that the vision system interprets as defect-like brightness variation. TracePro models the dome geometry by assigning a diffuse surface BSDF to the dome inner surface and distributing LED sources at the dome entry aperture, then computing the luminance distribution across the dome interior.

Modeling LED Sources for Machine Vision in TracePro

TracePro supports three LED source model types relevant to machine vision illumination. The choice of source model depends on the available data from the LED manufacturer and the required simulation accuracy.

The first model type is a ray file based on IES or EULUMDAT photometric data. LED manufacturers typically provide measured photometric test data in one of these formats. A 3.2 mm x 3.2 mm LED package with a 120° Lambertian emission pattern, for example, can be imported as an IES Type C file and placed at each ring array position in the TracePro model. This approach captures the LED's angular emission profile accurately and accounts for the far-field photometric behavior.

The second model type is a ray file representing the LED's near-field emission. This is especially appropriate for chip-on-board (COB) LED arrays with secondary lenslets, where the LED die positions and secondary lens geometry create an emission pattern that departs significantly from a simple Lambertian distribution. TracePro accepts a measured near-field luminance ray file as a File Source. Rays are traced from the File Source to accurately represent the spatial luminance variation.

The third model type is TracePro's Surface Source Property. The Surface Source Properties models the spectral power distribution and the angular beam pattern of the LED. Surface Source Properties can be either symmetric or asymmetric, giving users the ability to model complex LED geometries.

A 24-LED ring light with a 50 mm inner diameter and 80 mm outer diameter, with LEDs at a 30° elevation angle above the inspection plane, can be parameterized efficiently in TracePro using ray files or Surface Source Properties. The resulting irradiance map at 200 mm working distance typically shows CoV values in the range of 0.03-0.07 for a well-matched ring geometry, quantifying the uniformity before any hardware is built.

A fourth option for modeling light sources, particularly for structured light, is the TracePro Grid Source. The Grid Source can be used to modeled structured light patterns such as points, lines, grids, and rings. There are options for parallel light or for Gaussian angular and spatial distributions. The TracePro Grid Source does not require any geometry to be added to the model and multiple Grid Sources can be added to the model.

Dark Field BSDF Analysis for Surface Defect Detection

Dark field illumination sensitivity depends directly on the ratio of scatter from a defect to scatter from the defect-free background surface. TracePro quantifies this ratio by assigning separate BSDF models to the background surface and the defect surface, then computing the irradiance at the camera aperture for each.

For a ground aluminum inspection surface with given RMS roughness, the Harvey-Shack ABg BSDF model values can be calculated, or preferable measured with a scatterometer. The same can also be done for a scratch defect. TracePro traces rays from the dark field ring source to each surface model at the optimized grazing angle and tallies the camera-aperture irradiance. The ratio of defect-surface irradiance to background-surface irradiance, integrated over the camera aperture NA, gives the defect contrast.

For a grazing angle of 80° from normal, a TracePro simulation can show that the scratch defect produces a greater irradiance at the camera aperture compared to the background surface, giving a high defect contrast in normalized gray levels at the camera. Reducing the grazing angle to 70° from normal drops the defect contrast, potentially lower than the threshold needed for reliable detection at the required false-alarm rate. This quantitative result can help direct the mechanical design team to maintain the 80° grazing angle within ±2° across the full inspection field.

TracePro's analysis also identifies the effect of working distance variation on dark field contrast. For an inspection system where part height variation of ±2 mm is expected, TracePro simulates the irradiance map at 198 mm, 200 mm, and 202 mm working distances, showing that the contrast variation across this range is less low, helping confirm whether the illumination design maintains contrast across the full height variation range.

Structured Light Projection Design in TracePro

Structured light inspection systems project a defined pattern onto the inspection surface and recover 3D surface topography from the deformation of that pattern. The projection optics must produce adequate pattern contrast at the required standoff distance and across the expected range of part tilt angles. TracePro models the full structured light optical system, including the projector, the inspection surface, and the camera collection geometry.

The TracePro model of a structured light projector begins with a source plane carrying a pattern transparency. A grating, such as a Ronchi grating with 40 line pairs per millimeter or another type of transmissive grating, can be placed at the projector focal plane.

The projection lens is defined as a refractive lens assembly. TracePro traces rays from the patterned source through the projection lens and computes the irradiance at the inspection surface, which shows the pattern deformed by the surface topography.

TracePro simulation can be used to compute the contrast of the projected pattern as a function of part tilt angle from 0° to 15°. As part tilt increases, the simulation can show how fringe contrast decreases and whether it remains above the threshold required for reliable phase extraction. This result directs the system designer to either limit part tilt to less than 13°, increase the projection lens aperture to f/2.0 to improve contrast at high angles, or switch to a different method for calculating the contrast.

The surface scatter contribution is difficult to capture with simplified geometric calculations and is better evaluated through a Monte Carlo simulation that includes the surface BSDF. TracePro includes numerous symmetric and asymmetric scatter models.

Photometric Output for Camera Integration and System Validation

TracePro produces three photometric outputs that directly support camera selection and system integration for machine vision.

The irradiance map at the inspection plane, reported in W/cm² or lux, specifies the illumination level available to the camera. Given the camera's quantum efficiency at the LED wavelength (typically 490-530 nm for blue, 617-650 nm for red, or 830-870 nm for near-infrared LEDs), the lens f-number and transmission, and the required minimum signal-to-noise ratio, the engineer can verify from the TracePro irradiance map whether the LED drive current and source array size produce adequate signal. For a silicon area-scan camera with 3 µm pixels, a quantum efficiency of 0.62 at 630 nm, and an f/2.8 lens, the required inspection-plane irradiance can be calculated from the camera sensitivity, exposure time, lens transmission, and target signal-to-noise ratio. TracePro confirms whether the ring light geometry delivers this level across the full inspection field.

The luminance map at the camera focal plane quantifies the image-plane signal level in units of cd/m², which allows the engineer to check against the camera's dynamic range. For high-reflectance specular surfaces such as solder joints, the peak luminance at the camera can exceed the camera's full-well capacity at normal exposure settings. TracePro identifies these saturation-risk locations in the field of view at the design stage, before the first hardware prototype is assembled.

The intensity distribution plots at the camera aperture identifies directions in the illumination geometry where specular returns from surface features will be bright enough to saturate the camera. For bright field ring illumination of a polished metallic connector housing, TracePro shows a peak scatter direction at the camera aperture center when the inspection surface is at the correct standoff. Offsetting the camera axis by 3-5° from the ring light axis can reduce the saturation peak while retaining adequate signal from the near-specular surface. This offset is invisible to a simple geometric calculation but can be captured in the TracePro BSDF ray trace.

TracePro provides machine vision system engineers with quantitative illumination analysis across all standard inspection modes: bright field ring illumination, dark field grazing arrays, diffuse dome illumination, and structured light projection. LED source models based on measured IES photometric data, surface BSDF assignments from material data or measurement, and photometric output maps at the camera focal plane give inspection system teams quantitative illumination designs before committing to hardware fabrication.

Contact us to discuss TracePro licensing options or to request a demonstration for your specific inspection application.