An image that reads the code on the sample part is a demo, not a solution. The decision that matters is whether the contrast still holds on the next part: the next size, the next ink color, the one that arrives rotated 15 degrees, the carton with a fold in the shrink wrap. Most lighting failures in production are not failures of brightness — they are adequate set-ups meeting a part they were never shown. This guide defines robustness for machine vision lighting, gives the numbers that separate adequate from robust, and walks a worked example where the wrong glare fix costs a factor of four in exposure.
Three criteria, and the one that decides the project
Lighting design has three jobs, all measured in contrast: maximize contrast on the feature you inspect, minimize contrast on everything you ignore, and hold both across the entire part population. The first two are tuned on a sample part in an afternoon. The third decides whether the system still passes six months later.
Robustness is a margin, and it takes a number: measure the gray-level separation between feature and background on the worst part you can find, and keep it at least twice the threshold your software needs for its pass/fail call. That 2:1 margin absorbs LED aging, dust on the diffuser, and the slow drift in ambient light that nobody scheduled. Adequate means it works on the part in your hand. Robust means it works on the population, which includes parts you have not seen yet. The same argument from the integrator's bench is made in why machine vision inspection succeeds or fails on lighting.
The four axes that break an adequate set-up
Every robustness failure lands on one of four axes:
- Size and shape. Specular glare obeys the law of reflection: it reaches the lens when the mirror image of the light sits inside the lens aperture. Curve the surface and the hotspot walks away from your tuned position.
- Orientation. Tilt the part by θ and the reflected beam swings 2θ. A five-degree fold in a wrap film swings the glare cone ten degrees — from outside the aperture to dead center.
- Color. Red ink under red light returns nearly the same gray level as the background; the print simply disappears. The wavelength that gives maximum contrast on one part can erase the next.
- Presentation. Where the part sits in the field of view, at what height, at what tilt. A coaxial light reads a concave print only while it is centered; a dome reads it anywhere in the aperture.
For the full geometry menu behind these axes, see machine vision illumination types: choosing the geometry.
A code under shrink wrap: dark field first
The classic adequate-but-fragile set-up is a code under cellophane or shrink film. A coaxial diffuse light over wrapped film is a mirror aimed straight back at the lens — unreadable. The first fix is low-angle, dark-field geometry: LEDs at a 0-15 degree grazing angle throw the film's specular reflection away from the camera, so flat film goes dark while bars, folds and wrinkles scatter light toward it.
A low-angle ring is the adequate answer — it works on most parts. The robust answer adds a broad, diffused emitting area, so no single fold can redirect a bright lobe into the lens. The LS-RNG-0517 is a 120 mm diffused ring with a 0 degree emission angle; the LS-RNG-0256 is a 96 mm OD ring built for the same low-angle range. Both families live in ring lights.
- Size
- 100-200 mm
- Type
- Diffused
- Angle
- Low angle (0-15°)
- Voltage
- 24 V
Codes behind glass and clear containers follow their own rules — see lighting for codes inside glass: a test plan — and marks etched into metal are covered in DPM Data Matrix lighting for readable marks on metal.
A polarizer fixes glare and costs you stops
Cross-polarization — polarizer on the light, analyzer on the lens — blocks specular glare at the source, because the glare keeps its polarization and the analyzer rejects it. It costs you twice:
- Light. Plan for two stops: exposure times four, or double the drive current and double the pulse width.
- Robustness. On curved or rotating parts the reflected glare is only partly polarized and leaks through, and the analyzer darkens the print you are trying to read. A polarizer tuned on one bottle shape fails on the next.
The decision: on a flat, fixtured, slow part, cross-polarization is a legitimate tool, and its trade-offs are laid out in cross polarization to reduce surface glare. When anything about the part varies, change the geometry instead: move the light off the lens axis, or put the LEDs on one side with an arc light such as the LS-RNG-0877, whose 1.7 W white array throws one controlled lobe you can aim away from every mirror path.
- Type
- Arc / multi-angle
- Voltage
- 24 V
For small shiny parts where dome, diffuse and polarized rigs all compete, the comparison in lighting shiny metal pins without glare saves a week of bench time.
Worked example: lot code on a shrink-wrapped carton at 200 mm/s
The numbers, in order:
- Code. Data Matrix with a 0.25 mm module. The usual decode floor for 2D codes is 3 pixels per module; design for 4.
- Camera. A 1.6 MP mono camera, 1280 x 960 at 4.8 µm pixels: sensor width = 1280 x 4.8 µm = 6.1 mm.
- Field of view. 80 mm wide — a 60 mm carton face plus 10 mm of registration margin each side.
- Resolution. Object pixel = 80 / 1280 = 0.0625 mm, so the module covers 0.25 / 0.0625 = 4.0 pixels. Passes, with 33 percent margin over the 3-pixel floor.
- Motion. Belt speed 200 mm/s. One object pixel of blur allows exposure = 0.0625 / 200 = 0.31 ms. Continuous light at 1 ms smears 200 x 0.001 = 0.2 mm, about 3.2 pixels — a 4-pixel module will not survive that.
- Strobe. Pulse the low-angle ring for 250 µs: blur = 200 x 0.00025 = 0.05 mm, about 0.8 pixel. Clean decode.
- The polarizer route. Two stops stretch the pulse to 250 µs x 4 = 1 ms, and the smear is back to 3.2 pixels on a 4-pixel module. Contrast collapses, and the read drops out on exactly the parts with thin print.
Decision for this line: strobed low-angle diffused ring, no polarizer. On an indexed line that stops the carton, the arithmetic flips — 20 ms of exposure makes cross-polarization free, and the polarizer becomes the right call. Adequate answers survive the demo; robust answers survive the arithmetic.
Curved and wandering parts: dome versus coaxial
A coaxial light sends one collimated beam down the lens axis — exactly right for flat, shiny or engraved surfaces, and exactly wrong for anything curved. On the concave bottom of a beverage can, the window where print is legible is narrow; the print drifts a few millimetres and the read fails. A dome lights the part from every azimuth at once, so every print position has its own working path to the lens. Print position stops being an axis you have to control.
Sizing rule of thumb: keep the part to about half the dome's emitting width, so the wide-angle rays still reach across it. The LS-DOM-0085 has a 116 mm emitting area in a 166 mm body. At the half-width rule, that suits parts up to about 55 mm across. The LS-CXL-0092 is a 70 x 70 mm coaxial light for the flat-plate version of the same inspection.
Flat-part specialist against curved-part generalist:
| Specification | LS-CXL-0092 | LS-DOM-0085 |
|---|---|---|
| Power, red (W) | 5 | 13.7 |
| Emitting area (mm) | 70x70 | dia. 116 mm |
| Price | $309.00 | from $409.00 |
Values as printed in each product's data sheet; open a part for its drawing and full specifications.
Selection details and failure modes are in dome lights for shiny, curved and wrinkled parts; browse dome lights and coaxial lights for sizes.
Color: the wavelength axis
Wavelength is where adequate lighting hides best. Red light on black-on-white print gives the highest contrast on the bench — and zero the day a red stamp runs, because red ink reflects red light and lands at nearly the same gray level as the paper. The rules:
- One ink color, guaranteed: use the complementary wavelength to darken it — red light for blue or green ink, blue light for red or orange ink.
- Mixed ink colors: white light. Lower peak contrast than a matched pair, but it erases no color in the population.
- Covert marks: 365-405 nm excites fluorescent inks and brighteners that stay dark under white light; 395 nm is the common choice among ring-light wavelengths.
The reasoning behind each choice is in which LED colour gives the best contrast in machine vision, and a second frame per wavelength buys back both worlds: multi wavelength light sequencing.
One coaxial source in two colors, and a narrow-band ring for filter pairing:
- Size
- 50-100 mm
- Voltage
- 24 V
- Size
- 100-200 mm
- Type
- Standard
The LS-CXL-0027 is a 60 x 60 mm coaxial light in 4.4 W red and 7.2 W white versions. The LS-RNG-0100 is a 120 mm ring at 620 nm with a 60 degree beam.
Ambient light is part of the population
Presentation includes the environment. Overhead LED bay lighting is a second, uncontrolled illuminator that changes with shift patterns and seasons. Fix it in this order:
- Shroud the station. An opaque enclosure around part, light and lens — the cheapest fix and always robust.
- Narrow-band pair. A 620 nm ring with a matching 620 nm bandpass filter on the lens passes the LED and rejects broadband overhead light.
- Strobe. A short pulse at raised drive current makes the LED dominate ambient during the integration window; the shorter the pulse, the larger the ratio.
How much ambient your strobe actually rejects is measurable — see strobed lighting ambient rejection: measure and improve it — and drift over hours and temperature is a separate check in machine vision lighting stability testing. When the trigger is what moves rather than the light, stabilizing lighting changes at the trigger covers the sequencing.
How to choose
| Situation | First choice | Why it holds |
|---|---|---|
| Flat, shiny or engraved part, fixtured | Coaxial light | One beam, one axis; nothing in the population varies |
| Code under film, moving line | Low-angle diffused ring, strobed | Specular lobe aimed away; pulse freezes motion |
| Curved part, print position varies | Dome | Every print position keeps a working light path |
| Mixed ink or part colors | White, or sequenced wavelengths | No color in the population is erased |
| Flat part, light must stay on-axis | Cross-polarization | Glare blocked at source; pay two stops of exposure |
| Fast line, thin features | Short strobe pulse | Blur held under one pixel |
Checks before you order
- Worst-part contrast measured, not assumed, at twice the software threshold.
- Exposure headroom: you can double exposure or pulse width without breaking the blur budget.
- Mechanics: dome emitting width against part size at the half-width rule, ring inner bore against the lens, working distance for both.
- Driver headroom: the controller can source the strobe current with margin to spare.
- A fallback wavelength or geometry in the same mount, tested before launch rather than after the first escape.
When the usual answer is wrong
- A dome everywhere. Full diffusion erases the texture contrast that reveals scratches and embossing; on flat matte parts, dark field beats a dome.
- A polarizer everywhere. It is a flat, fixtured, slow-line tool. On curves it leaks glare; on fast lines it spends your blur budget.
- Red light as a default. Maximum contrast on black ink, total loss on red ink.
- More power. Raising current on a geometry problem brightens the glare along with the print. Fix the geometry first, then buy photons.
The robust-lighting checklist
- Thirty real parts: good, borderline and known-bad, spanning the size, color, orientation and presentation extremes.
- Contrast on the worst part at twice the software threshold.
- Glare path traced: the light's mirror image outside the aperture at every part tilt in the population, plus a few degrees.
- Exposure and pulse arithmetic written down: speed times exposure under one pixel.
- Ambient controlled by one named method — shroud, bandpass pair or strobe.
- One tested fallback wavelength or geometry.
Run your geometry through the lighting finder, start at the lighting step of the configurator, or follow the full bench procedure in machine vision lens and lighting selection: a test plan. For a population of parts that resists every standard geometry, bring the worst parts to the contact page — the worst parts are the whole point.
Questions
How many stops of light does cross-polarization really cost?
One to two stops is the planning floor; budget exposure times four. A good polarizing sheet passes about 40 percent of unpolarized light, and a crossed pair over a diffuse scene commonly leaves 10 to 25 percent of the original brightness, which is two to three stops. Measure your own sheets, because film quality and wavelength move the number. At strobe speeds the loss lands directly in pulse width, which then lands in motion blur.
How many parts do I need to test before a lighting design counts as robust?
Thirty real parts is the working minimum: ten known-good spanning the size and color range, ten borderline pass/fail pulled from production history or deliberately mis-oriented, and ten known-bad. If thirty are not available, cover each axis at its extremes — smallest and largest, lightest and darkest ink, maximum tilt — because failures cluster at the extremes, never at the center. Re-run the same set after any change to lens, working distance or exposure.
When is cross-polarization the better choice over changing the geometry?
When the geometry cannot move: the light must share the lens axis, as in a coaxial path over an engraving, the part is flat and fixtured, and the exposure budget exists. Polarization also survives parts that rotate slowly about the optical axis, where an off-axis light would sweep shadows across the feature. Pay for the stops with a strobe, and confirm the analyzer does not darken the print you are trying to read.
Why does a dome read print that a coaxial light misses on curved parts?
A coaxial unit illuminates from one direction, along the lens axis, so the specular window that shows the print is narrow — curve the surface or move the print and it falls outside. A dome arrives from every azimuth at once, so every print position keeps its own working light path. Size the dome by the half-width rule: keep the part to roughly half the emitting width so the wide-angle rays still reach across it.
Is white light always the robust color choice?
For mixed ink colors, yes: white gives usable contrast on every print, where a matched red fails the day a red stamp appears. The trade is peak contrast — a single complementary wavelength darkens one ink harder than white ever will, so a single-ink line should run it and keep white as the tested fallback. If the camera and controller can spare a second frame, sequence both wavelengths and keep the best of each.



