When a machine vision station produces unreliable results, the camera is rarely the culprit. Integration surveys keep finding the same distribution of blame: lighting and optics cause the majority of vision problems, software and cameras share the rest. Here are the seven lighting errors we see most often, and what to do instead.
1. Fighting the ambient light
The factory is full of light you did not plan for - skylights, sodium lamps, welding sparks from a neighboring cell, the operator's flashlight. Ambient light rides on top of your carefully designed illumination and shifts with weather and shift patterns. The fix is mechanical and free: shroud the imaged area, shade it, or strobe the light so your exposure window contains only your photons. A short exposure (50 us) with 10x overpowering light makes ambient irrelevant; a 10 ms exposure makes it the co-star.
2. Wrong wavelength for the material
Light color is a selection lever, not an aesthetic. Red light penetrates dark plastics and suppresses surface texture; blue light exaggerates surface detail on yellow or reddish materials; infrared sees through some inks that baffle visible light; white light is the compromise that is optimal for almost nothing. Match wavelength to the physics of your defect: for printed text on cardboard, blue light sharpens edge contrast; for glossy black plastic, diffuse red usually calms the reflections.
3. Specular surfaces under direct light
Shiny metal, polished plastic, glass - direct illumination turns them into mirrors, with hot spots saturating pixels and the rest in shadow. Specular surfaces need geometrical tricks: dome lights for diffuse flood, coaxial illumination where light travels down the lens axis and returns off flat surfaces, darkfield geometries where only scratched (rough) areas scatter light toward the camera. A flat mirror under direct ring light is not an inspection setup; it is a lamp.
4. Undersizing the depth of light
Your lens has depth of field; your light has depth of illumination. Bar lights placed 20 mm from a part that sits 60 mm deep in a tray illuminate the top and leave the bottom dark. Match the light's working distance specification to your real geometry, including part tolerance stack-up.
5. Ignoring the exposure budget
Light choice, exposure time and line speed form one equation. A common failure: the integrator picks a light, then discovers the required exposure exceeds what a moving part allows. Work backwards from the fastest part speed and the smallest exposure that freezes it, then choose a light bright enough to fill that exposure to 60-80% of camera saturation. Undershooting forces gain, and gain is noise.
6. One light for every defect
Brightfield shows contrast defects; darkfield reveals scratches and dust; backlight makes silhouettes for dimensional checks. These geometries contradict each other physically - no single fixture does all three. Multi-light stations (or sequential strobed lights on one exposure cycle) exist precisely because real parts have several defect classes. Plan lighting per defect, not per station.
7. Forgetting that light sources age
LED output decays - typically to 80% over tens of thousands of hours, faster with heat. Stations calibrated at commissioning drift out of threshold within a year. Specify strobe operation (duty cycle multiplies LED life), monitor brightness with a periodic golden-part check, and set a replacement interval. A camera that shipped with 12-month warranty will outlive an always-on LED bar several times over.
The cheap upgrade order
When image quality disappoints, the effective order of investment is usually: shroud ambient and stabilize geometry (free), fix wavelength and geometry (tens of dollars), add strobing (small), then consider a better lens (moderate). The camera upgrade comes last - often unnecessary once the first four are done. A modest 5 MP global shutter camera like the MV-CS050-10GM behind correct lighting beats a 20 MP camera in a light box that fights itself, every time.