Lenses & opticsGuide

Bandpass filter with red LED light to block ambient light

How a bandpass filter matched to the LED wavelength can block ambient light: passband widths, a 625 nm worked example and checks before ordering.

LumaSpec Vision10 min read Share on LinkedIn

On this page 10 sections
  1. 01The decision: match the filter to the LED
  2. 02What the passband numbers mean
  3. 03Worked example: green sealant on bolt threads, 625 nm LED, 635 nm bandpass
  4. 04The same pairing in other documented cases
  5. 05Absorptive glass or dichroic coating
  6. 06Near IR: the same trick where eyes are blind
  7. 07Checks before you order
  8. 08When the usual answer is wrong
  9. 09Short checklist
  10. 10Questions

A strobed LED inspection can still be washed out by overhead factory light, daylight through a high window, or a red stack light beside the line. The standard fix is spectral, not mechanical: a bandpass filter over the front of your machine vision lens that passes only the LED's wavelength and rejects everything else, so no shroud is needed. This guide gives the decision, the passband numbers that drive it, one worked example with the arithmetic shown, and the checks to run before ordering. It is written for monochrome inspections such as presence checks, sealant detection and date-code reading, where contrast carries the information.

The decision: match the filter to the LED

The filter does not choose the part's color; it chooses the light's wavelength. Pick the LED first: red illumination makes green thread sealant and blue ink go dark, because those colors reflect almost no red. Then order a bandpass whose passband holds the LED's whole spectrum with margin on both sides. Which LED colour gives the best contrast in machine vision covers the wavelength choice by defect, and machine vision optical filters sets out the broader case for filters as contrast tools.

You rarely need a custom coating. Bandpass filters for machine vision are built around the common LED wavelengths, and historically carried 60 nm or more of bandwidth centered on them. Hard-coated types now span 20-85 nm FWHM — full width at half maximum transmission — with steep cut-on and cut-off slopes. A 60 nm passband centered within about 10 nm of the LED covers a red LED's typical 20-30 nm spectral width with room to spare.

What the passband numbers mean

Ambient white light spreads across roughly 400-700 nm. The filter passes only the slice its passband covers and reflects or absorbs the rest; the strobe then narrows the time ambient is allowed to land. Two levers, multiplied:

ambient fraction = passband FWHM / (700 nm - 400 nm) with strobing: ambient fraction x (strobe pulse / exposure time)

Both numbers are ratios you control. Halve the passband and the ambient halves; shorten the strobe pulse with the exposure locked to it and ambient falls again, while the overdriven LED holds the brightness. The measurement method for the second lever — comparing images with the strobe alone and with the station lights on — is described in strobed lighting ambient rejection: measure and improve it.

Worked example: green sealant on bolt threads, 625 nm LED, 635 nm bandpass

This is a documented case: bolt threads with green sealant, lit by a 625 nm red LED, shot on a monochrome camera under white overhead light. Take the station's starting point as a 10 ms free-run exposure, tightened to a 200 µs strobe pulse once the filter is in place.

Inputs:

  • LED center wavelength 625 nm, typical width 30 nm FWHM (610-640 nm).
  • Filter center 635 nm, passband 60 nm FWHM.
  • Ambient white light, roughly 400-700 nm.

The rule in words: the passband must contain the LED's entire spectrum, and the ambient may only keep the wavelengths inside that same window.

Arithmetic:

  • Passband edges: 635 - 30 = 605 nm and 635 + 30 = 665 nm.
  • LED span 610-640 nm sits inside, with 5 nm clear at the short-wavelength edge and 25 nm at the long one. The 10 nm center offset is what eats the low side; a 20 nm-wide LED would leave 10 nm. Keep 10 nm or more of margin per side when you pick.
  • Ambient passing: 60 / 300 = 0.20, about one fifth of the white light before coating transmission losses.
  • With the strobe: 200 µs / 10 ms = 0.02, so 0.20 x 0.02 = 0.004 — about 0.4% of the ambient an unfiltered, free-running camera would collect.

Red light bounces bright off steel and barely off green sealant, so the sealant reads near black against an illuminated thread. The decision: order the 635 nm bandpass in the lens's front thread, drive the LED as a 200 µs strobe, and lock the exposure to the pulse — the failure mode when that timing slips is covered in strobe light on but camera image is black. Skip the shroud.

For the light, a diffused red bar light gives the even wash a thread check needs; the bar lights range carries them, and the LS-BAR-1168, 423 x 40 mm, 24 V, is that style:

Bar lightsBar light, 423 x 40 mm, Red (LS-BAR-1168)LS-BAR-1168
Size
400 mm +
Type
Diffused
Voltage
24 V
$569.00View partBuild a system with it

The same pairing in other documented cases

The 625/635 pairing also lifted a 2D matrix read on reflective metal and darkened blue inkjet date codes on the red base of a coffee can — one filter, one light, three different materials. One wavelength up, a 660 nm dark red bandpass cut cellophane packaging glare enough to count chocolate chips in dough. And on a fluorescence reader, a 550 nm longpass in absorptive glass stopped 532 nm laser excitation from flooding the sensor.

Case Light Filter over the lens Result
2D matrix on reflective metal 625 nm red LED 635 nm bandpass Reflected ambient gone, code reads
Blue inkjet code on red plastic 625 nm red LED 635 nm bandpass Background lightens, ink darkens
Chips in dough through cellophane — 660 nm dark red bandpass Glare drops, count holds
Fluorescence under 532 nm excitation Fluorescent output 550 nm longpass, absorptive glass Laser blocked at wide angles

All of these are monochrome inspections; why a monochrome camera with an optical filter beats color for this work is covered there.

Absorptive glass or dichroic coating

Most bandpass filters are interference (dichroic) types: thin-film stacks that transmit by reflection and destructive interference. They give the steep, precise edges the table above relies on, but their passband shifts as rays arrive at an angle, so off-axis light sees a slightly different filter. On a standard machine-vision lens the rays run close to head-on, and this does not matter.

Wide-angle rays are where it breaks. In the documented microarray case, scatter from the 532 nm laser arrived over a wide range of angles; dichroic filters did not reach acceptable blocking, while an absorptive dyed-glass longpass did, because absorption does not care about the angle of incidence. The decision: dichroic bandpass in front of a standard lens; absorptive glass when a strong line source reaches the filter at wide angles, or behind very short, wide-angle optics.

Near IR: the same trick where eyes are blind

When the ambient shares your band — red stack lights beside a red-lit station are the classic case — move the pair to near IR. Monochrome machine-vision cameras usually respond there, the light range covers infrared sources, and a bandpass keeps the visible noise out. The LS-LXR-0225 is a band-pass filter, 850 nm (near IR), with an M30.5 x 0.5 thread:

Lens accessoriesBand-pass filter, 850 nm (near IR), M30.5 x 0.5 thread (LS-LXR-0225)LS-LXR-0225
Type
Filters & polarizers
$119.00View partBuild a system with it

Match the source's printed wavelength to the filter's center exactly; the same margin logic from the worked example applies at 850 nm. Filters, adapter rings and holders all live in lens accessories, and the light finder filters the source range by wavelength.

Checks before you order

  • LED spectrum at operating current. LEDs shift with temperature and drive, so take center and FWHM from the light's data at the current you will run.
  • Passband margin. Center within about 10 nm of the LED, with 10 nm or more of passband beyond each LED edge.
  • Thread fit. The filter thread must match the lens front thread; an adapter ring bridges one size difference, and camera lens adapter focus covers what a ring changes.
  • Camera type. Monochrome. The filter turns a color camera into a one-channel sensor.
  • Timing. Strobe pulse inside the exposure, camera triggered on the pulse. Set this before judging the filter, because ambient accumulates over the whole exposure.
  • Specular glare. If the enemy is a mirror-like reflection rather than broadband ambient, cross polarization is the tool, and the two fixes combine.

When the usual answer is wrong

Color cameras. A bandpass leaves one Bayer channel with signal and the other two near black, so two thirds of the pixels stop contributing. Use monochrome.

Ambient inside your passband. The filter passes its own band by design, so a red stack light defeats a red system. Change wavelength — near IR is usually free of it — or win on time with a short strobe.

Features you need bright. The passband lightens what reflects it and darkens what does not. Green sealant under red goes dark because it reflects no red; if your defect is red on steel and must read dark, illuminate and filter in green or blue instead. Pass what the background reflects, and the defect darkens.

Very wide optics. Field-edge rays hit a dichroic at enough angle to shift its passband. Behind a short wide-angle lens, use absorptive glass.

Short checklist

  • LED center wavelength and FWHM written down from the light's data — the whole match hangs on these two numbers.
  • Passband keeps 10 nm or more beyond each LED edge — covers LED drift and the center offset.
  • Filter thread matches the lens front thread — rings bridge one step, no more.
  • Monochrome camera, exposure locked to the strobe pulse — ambient integrates over the full exposure otherwise.
  • Two-image ambient test at full line lighting — quantifies what the filter and strobe each bought you.
  • Absorptive glass where wide-angle rays or a laser line must be blocked — dichroic edges walk with angle.

Match the pair in the configurator, which steps from light to filter thread to camera, read the wider background on the lenses topic page, or talk to us with your LED's wavelength and we will confirm the passband.

Questions

How far off can the filter center be from the LED wavelength?

Keep the offset within about 10 nm when the passband is 60 nm FWHM. The published 625 nm LED and 635 nm filter pairing sits exactly 10 nm apart, and a 30 nm-wide LED still fits inside the 605-665 nm window. Push further and one LED edge approaches the 50% transmission point, so the image dims and drifts as the LED's wavelength moves with temperature.

Can I use a bandpass filter on a color camera?

You can mount one, but you throw most of the image away. A single-band filter leaves one Bayer channel carrying signal while the other two go near black, so two thirds of the sensor's spatial information is lost along with all color discrimination. Run the inspection on a monochrome camera, which also resolves finer detail through the same filter.

How much ambient light does a bandpass filter actually remove?

Against white light spanning 400 to 700 nm, a 60 nm FWHM passband transmits about 60 / 300 = 20% of the energy before coating losses; halve the passband to 30 nm and the figure drops to 10%. The estimate assumes a flat spectrum, which factory LED and fluorescent lighting roughly is. Any strong spectral line inside your passband still gets through.

Why did a dichroic filter fail to block a 532 nm laser?

Interference coatings transmit by reflection and destructive interference, and their passband shifts as the angle of incidence rises. Wide-angle scatter from the laser walked around the blocking band, so dichroic filters never reached acceptable results in the documented microarray case. Absorptive dyed-glass longpass filters block by absorption and hold their blocking at any angle.

Does the filter replace strobing?

No, they attack different dimensions. The filter cuts the spectrum ambient occupies; strobing cuts the time it occupies. With a 60 nm passband and a 200 microsecond strobe pulse inside a 10 ms exposure window, ambient falls to about 0.2 x 0.02 = 0.4% of its unfiltered, free-running level, while the overdriven pulse keeps the LED's brightness up.

What if the ambient light is the same color as my LED?

The filter cannot help, because it passes that wavelength by design. Red stack lights beside a red-lit station are the classic case. Either move the light and filter pair to a band the ambient does not contain, such as 850 nm near IR, or win on time: a short strobe pulse locked to the exposure makes the LED dominate the instant the camera integrates.