You are looking at a glass part sealed inside a clear polycarbonate enclosure, and every front-light geometry you try shows two transparent layers that refuse to separate. The fix is to stop fighting in the visible and attack the two properties where these materials genuinely differ: spectral transmission and index of refraction. This guide commits to a decision rule for each route, gives the numbers behind them, works a full set-up from field of view to exposure and f-number, and lists the checks to run before ordering. Presence checks, dimensional checks and defect checks each end with one answer.
Which lighting setup sees glass through a clear plastic enclosure?
A collimated backlight imaged by a telecentric lens is the default answer: it separates the two materials by refraction, tolerates about 2° of window wedge, and keeps working even when both materials transmit identically.
Two clear materials in one optical path give you exactly two handles. Transmission: if the glass absorbs a wavelength the plastic passes, a backlight at that wavelength turns the part into a gray silhouette, the same near-infrared logic already proven in near-infrared lighting for printed packaging. Refraction: when the transmission curves match, the indices still do not, and a collimated backlight converts every sloped surface into a dark line. Polarization adds a third, narrower use: naming which material is which.
Test in that order. Transmission first, because it is one light and one threshold. Refraction second, because it is the default that survives matched curves.
How do you separate two clear materials by transmission?
Backlight both materials at 940 nm and read the difference: iron-bearing soda-lime glass absorbs progressively more from 850 nm toward its broad iron band near 1.1 µm, while clear polycarbonate holds transmission out to about 1.6 µm, so the gray-level gap widens with wavelength.
In the visible the two are near twins. Published transmission for clear soda-lime glass sits near 90% at green wavelengths for a few-millimetre sheet, and clear polycarbonate grades run 86-90%. The brightness difference between "window alone" and "window plus a flat glass part" comes almost entirely from the part's two Fresnel reflections:
Eight to nine percent of a 230 gray-level background is about 19 gray levels: visible on a clean bench, too little to survive dirt, tint drift and stray reflections on a line. In the near infrared the arithmetic moves your way. Ordinary soda-lime glass carries iron, whose absorption grows from 850 nm toward a band near 1.1 µm, while clear polycarbonate keeps transmitting to roughly 1.6 µm. On 3-6 mm of standard-iron glass the measured gap typically widens to 25-40 gray levels at 940 nm. On low-iron "extra clear" glass it stays near the 19-level Fresnel floor, and the spectral route is dead from the start.
The decision test takes ten minutes. Place a window offcut, then the same offcut with the real glass part behind it, in front of the light. Camera at fixed 2 ms exposure, zero gain, 8-bit output. Trim the drive until the bare window reads 230. Record window alone and window plus part at 850 nm, then repeat with a 940 nm source. The route passes when the gap reaches 30 gray levels; a midpoint threshold then keeps 15 levels of margin on each side. If neither wavelength clears it, order the collimated backlight and stop thinking about wavelength.
The 850 nm source for this test is:
- Size
- 100-200 mm
- Type
- Standard
- Voltage
- 24 V
- Wavelength
- 850 nm
When the 850 nm gap lands under 30 gray levels, ask for the same lit area at 940 nm; the backlights category filters on wavelength. Ultraviolet looks tempting because soda-lime cuts off near 405 nm, but polycarbonate's own absorption edge sits just under 400 nm, so the open window between them is too narrow to build on.
Why does a collimated backlight make clear glass visible?
Because every ray that meets a sloped glass surface bends out of the telecentric lens's acceptance cone and arrives as a dark line: a 1° slope in air deviates the beam about 0.34°, and an f/8 lens accepts only about ±3.6°.
Snell's law does the separating. A ray meeting a surface tilted θ from perpendicular leaves deflected, and a telecentric lens collects only rays inside its acceptance cone, so the deflected energy lands elsewhere and the feature prints black:
At f/8 the cone is about ±3.6°, so glass slopes steeper than roughly 10° go fully dark. Stop to f/16 and the cone halves to ±1.8°, catching slopes past about 5° at four times the exposure. Chips, rims and bubble walls run 30-90° locally, a deviation of 10-30°, which is why they print as crisp black on a white field.
Meanwhile the enclosure vanishes. A window with parallel faces deflects nothing; it shifts the image sideways and costs one Fresnel reflection per face. Window wedge is the one geometry spec that matters: wedge ω deviates the beam by about 0.6 ω in polycarbonate, so keep it under 2° for an f/8 cone, and specify 1° when the drawing allows. Only the window's own scratches and dust light up, and most of that scatters outside the cone; give the light the cleanest wall, and if you own the enclosure design, add a flat optical port in that face.
The pairing is what makes it gauging-grade: a telecentric backlight with a double-telecentric lens is the standard combination, and the trade-offs are laid out in collimated backlight or diffuse backlight for edge gauging. Whether your part justifies telecentricity on the lens side is answered in when you need a telecentric lens for gauging.
Two source families in the collimated lights category do this job:
- Size
- 100-200 mm
- Type
- Collimated
- Size
- 100-200 mm
- Voltage
- 5 V
The first is a 120 x 120 mm collimated panel you treat like any backlight; the second is a Ø100 mm telecentric unit that matches a telecentric lens by aperture.
What does a complete worked set-up look like?
For a 28 x 85 mm glass cartridge inside a 40 mm deep enclosure, this presence-and-measurement build works: a 1600 x 1200 camera with 4.5 µm pixels, a 25 mm lens at 442 mm working distance, and a 136 mm backlight deliver 75 µm per pixel.
The cartridge lies with its long axis across the field, 20 mm behind a 3 mm polycarbonate window, so focus lands mid-depth. The arithmetic, in order:
- Field of view 120 x 90 mm, giving 35 mm and 62 mm of margin around the part.
- Camera: 1600 x 1200 pixels at a 4.5 µm pitch, so the sensor is 7.2 x 5.4 mm and the scale is 120 mm / 1600 px = 75 µm per pixel. Smallest trustworthy feature on a 3-pixel rule: 0.23 mm. Subpixel edges at a quarter pixel: about 19 µm. Pixel budgeting for dimensional work is its own discipline, covered in choosing camera resolution for dimensional inspection.
- Magnification m = 7.2 mm / 120 mm = 0.06.
- Lens: f = WD × m / (1 + m), so with a 25 mm lens the working distance is 25 × 1.06 / 0.06 ≈ 442 mm. Budget ±10 mm of focus travel; this is thin-lens arithmetic and real optics shift it slightly.
- Depth of field: 2 × N × c × (1 + m) / m² with c = 2 pixels = 9 µm. At f/8: 2 × 8 × 0.009 × 1.06 / 0.0036 ≈ 42 mm, which covers the 40 mm interior.
- Exposure: start at 2 ms with zero gain and trim until the empty window reads 230. With a 30 gray-level gap the part floor sits at 200 and the presence threshold goes at 215.
- Verdict: presence, yes. Outer dimensions to ±0.1 mm on a 1 mm feature, yes: the 10-to-1 metrology rule wants about 100 µm or finer, and 75 µm per pixel clears it.
Run the same numbers for your own geometry in the lens focal length calculator.
Pick the camera in the camera finder and the lens through the lens step of the configurator. The collimated route reuses this arithmetic with a 0.06× telecentric lens, chosen because 7.2 / 120 = 0.06, plus one of the collimated sources above.
Do crossed polarizers or a polarization camera help?
Yes, but as a material test rather than a geometry light: between crossed polarizers a molded polycarbonate wall glows with stress fringes while annealed glass stays nearly black, because polycarbonate's stress-optic coefficient runs about three times that of soda-lime glass.
Two jobs, one physics. First, glare: a polarizer on the light and a crossed analyzer on the lens delete the specular reflection of the source off the window and off the part, the standard trick detailed in crossed polarized lighting for transparent film defects. You pay in light: each sheet passes roughly 42% of unpolarized light, the pair about 18%, so multiply exposure by five to six.
Second, material identity. Molded polycarbonate is birefringent from frozen-in molding stress; annealed glass is nearly isotropic. The wall shows fringes, the part stays dark, and you get a one-look answer to which layer is the plastic. The catch: tempered glass also carries locked-in stress and also lights up, so retardance names stressed parts, not materials.
A polarization camera puts four analyzer orientations on one sensor and maps retardance per pixel in a single exposure, at the price of resolution and low-light headroom. Reach for it when you need the wall's stress map or a per-pixel glare mask. For a clean silhouette through a flat window, two sheets of film do the same job for less.
Which method should you choose for your inspection?
Spend your money this way: 940 nm infrared backlighting for presence and basic measurement whenever the measured gap reaches 30 gray levels, collimated backlighting with a telecentric lens for edges, chips and any gauging, crossed polarizers only when you must name the material.
| Your inspection goal | Committed method | The number that decides it |
|---|---|---|
| Part present or absent | 940 nm infrared backlight, standard lens | gap of 30 gray levels between window alone and window plus part |
| Outline and dimensions | Collimated backlight plus telecentric lens | edge transition under 1 pixel; subpixel edges near 19 µm in the worked build |
| Chips, cracks, inclusions | Collimated backlight, lens at f/8 or f/16 | slopes steeper than about 10° at f/8, 5° at f/16, go black |
| Telling wall from part | Crossed polarizers or polarization camera | stress fringes in molded polycarbonate, none in annealed glass |
| Low-iron glass, matched curves | Collimated backlight now, SWIR next | 940 nm gap stuck near the 19-level Fresnel floor |
If the real task is reading a code printed on the glass rather than measuring it, lighting for codes inside glass attacks the glare problem first. For internal defects in transparent parts, screen projection inspection is a further through-the-part route.
When both 850 nm and 940 nm fail and you still need a silhouette, move the wavelength, not the geometry: short-wave infrared at 1.2-1.6 µm, where iron and water absorption make ordinary soda-lime glass effectively opaque while clear plastics still pass usable light. That band needs an InGaAs-class sensor, and the band choice is walked in full in SWIR vs NIR vs visible imaging.
One camera for that band:
- Sensor format
- 1/2"
- Lens mount
- C-mount
- Interface
- GigE
- Resolution
- Up to 3 MP
Sensors of this class span roughly 0.4-1.7 µm. The infrared cameras category holds the short-wave and thermal options.
When is the usual answer wrong?
Three cases break the defaults: low-iron glass closes the 940 nm gap to a handful of gray levels, a part pressed against the window or under shrink film cuts refraction contrast about eightfold, and a curved or heavily scratched wall spoils the collimated image.
Low-iron glass is the silent killer of the spectral route, because its transmission at 940 nm looks like the polycarbonate's. The refraction route does not care, and SWIR at 1.2-1.6 µm does not either.
Full contact kills refraction contrast at the touching faces. At a glass-to-polycarbonate boundary the small-angle deviation is θ × (1 - 1.52/1.585) ≈ 0.04 per degree, against 0.34 per degree at a free-standing glass edge in air: eight times weaker. Where the part rests on the window or sits under film, only free-standing edges and true air gaps still print; measure those, or fall back to the infrared route.
A domed or crowned wall acts as a lens: deviation varies across the field and dark bands creep into the collimated image. Amplitude-based infrared survives it, refraction does not. And once haze, tint or thickness drops total transmission through both walls below about 20%, exposure and noise take over and every optical route is finished; the through-plastic alternative is portable X-ray inspection of plastic parts, which ignores transmission entirely.
What should you check before ordering the light?
Run this list before you raise a purchase order: two-sample gray-level gap at 850 nm and 940 nm, window wedge under 1°, backlight at least 1.1 times the field of view on both axes, and a depth-of-field budget that covers the enclosure interior.
- Gray-level gap on real samples, fixed 2 ms exposure, bare window tuned to 230. The 30-level gate decides the whole route.
- Window wedge from the enclosure drawing: under 2° for an f/8 cone, 1° preferred. Deviation is 0.6 × wedge in polycarbonate.
- Backlight lit area at least 1.1 × the field on both axes; the 136 mm panel over a 120 mm field gives 13% and passes.
- Magnification m = sensor width / field width, then WD = f × (1 + m) / m. Confirm the working distance fits the cell.
- Depth of field 2 × N × c × (1 + m) / m² against the interior depth, with c = 2 pixels.
- The cleanest, flattest wall in the optical path. If you specify the enclosure, choose the window material for your wavelength; selecting a UV-transmitting enclosure window is the same material decision at the other end of the spectrum.
- Threshold at the midpoint of the measured gap, 15 levels of margin per side, and an alarm when drift eats half of it.
Run the two-wavelength test first, because it decides between a one-light presence system and a telecentric gauging cell. Once you know which side you are on, start at the lighting step of the configurator or browse the lighting finder; the rest of the geometry decisions are collected under lighting.
Questions
Will a dome light show the glass part through the window?
No. A dome removes specular glare from one surface, but two transparent layers stay featureless under it, so you get a nicer picture of the window, not of the part. Domes earn their place when the inspection target is the enclosure's own surface: scratches, print or weld beads on the plastic. Through a clear wall the answer is always a backlight.
How thick can the polycarbonate window be for 940 nm backlighting?
Thickness is the smaller term. Clear polycarbonate loses only a few percent per 10 mm of path at 940 nm, against roughly 10% fixed Fresnel loss from its two surfaces, so a 3 mm wall and a 10 mm wall behave nearly alike. What kills the method is haze, tint and scratches: they scatter and absorb at every wavelength and erode the gray-level gap.
Can a diffuse 850 nm backlight do edge gauging as well as presence?
Presence yes, gauging no. A diffuse source emits rays at many angles, so an edge refracts them into a soft gradient two to four pixels wide instead of a sharp line. Collimation removes exactly that: with parallel rays and a telecentric lens, the edge transition drops under a pixel and subpixel edge algorithms hold their accuracy.
Does the method change for borosilicate or tempered glass parts?
Yes, twice. Borosilicate carries almost no iron, so the 940 nm gap collapses toward the 19-level Fresnel floor; go straight to the collimated route. Tempered soda-lime carries locked-in stress, so it lights up between crossed polarizers exactly like a plastic: retardance then identifies stressed parts, not materials, and refraction stays the honest geometry signal.
Do I need a telecentric lens, or does any lens work with the collimated backlight?
For presence, a standard lens stopped to f/8 gives usable dark edges. For gauging, go telecentric: it holds magnification constant across depth, which a 40 mm deep enclosure otherwise smears, and its narrow cone is what converts small ray deviations into contrast. A standard lens re-collects the deviated rays and dilutes the signal you paid for.



