The part grew, the camera cannot move any closer, and the lens on hand focuses too far away or frames too wide. Three small mechanical parts bend the optics you already own before you order anything: an extension tube used as a spacer, a set of thin shims, or a focal length extender. All three mount between the lens rear and the camera, and each trades something for the change it buys. This guide gives you the imaging equation, a worked 35 mm example with the arithmetic shown, the light and sharpness limits, and a rule for when a spacer beats a new lens.
What do spacers, shims and focal length extenders change?
A spacer added between lens and camera increases image distance, so working distance shortens and magnification rises together; a shim is a 0.025-1 mm precision spacer that trims focus on fixed-magnification lenses; a focal length extender multiplies focal length without moving the working distance range.
In practice the spacer is an extension tube threaded between a C-mount or CS-mount lens and the camera. The mounts differ by 5 mm of flange distance (17.526 mm for C, 12.5 mm for CS), and the adapter and clearance checks come before any tube goes on. Shims are stainless or brass foils stacked in the same place. An extender is a small negative lens group in a barrel; it works optically rather than mechanically, and its costs get their own section below.
How much working distance does a spacer remove?
The imaging equation puts it exactly: an 11 mm spacer on a 35 mm lens focused at 165 mm drops working distance to about 95 mm and lifts magnification from 0.27x to 0.58x.
The two relations are the FoV, WD and magnification basics with a tube bolted on:
Worked example, as a thin-lens estimate (a real lens's principal planes sit inside the barrel, so expect a few percent drift):
- f = 35 mm, WD = 165 mm: 1/d = 1/35 - 1/165 = 0.02857 - 0.00606 = 0.02251 per mm, so d = 44.4 mm
- m = 44.4/165 = 0.27x; on a 1/2" sensor, 6.4 mm wide, the field of view is 6.4/0.27 = 23.8 mm
- add t = 11 mm: d' = 55.4 mm, WD' = 35 x 55.4/(55.4 - 35) = 95 mm, m' = 55.4/95 = 0.58x, field of view 6.4/0.58 = 11.0 mm
| Spacer added | Image distance | Working distance | Magnification | Field of view, 1/2" sensor |
|---|---|---|---|---|
| 0 mm | 44.4 mm | 165 mm | 0.27x | 23.8 mm |
| 11 mm | 55.4 mm | 95 mm | 0.58x | 11.0 mm |
| 15 mm | 59.4 mm | 85 mm | 0.70x | 9.2 mm |
The same equation gives a sensitivity rule worth remembering: 1 mm of spacer moves best focus by about 1/m² mm of working distance. At 0.27x that is 14 mm per mm; at 0.58x, 3 mm per mm; at 1x, just 1 mm. Close-focus rigs twitch for exactly this reason: the tube supplies the coarse millimetres, the focus ring trims the last one.
For the worked example, a 35 mm C-mount lens for 2/3" sensors such as the LS-FFL-0679 fills the role.
- Type
- Machine vision fixed
- Sensor format
- 2/3"
- Mount
- C-mount
- Resolution
- 6-10 MP
Tubes come in fixed steps rather than exact computed lengths. The LS-LXR-0284 adds 15 mm of spacing behind a C or CS mount. In the example that is the third table row: 85 mm working distance at 0.70x.
- Type
- Extension tubes
How far can you push a spacer before sharpness suffers?
Keep total spacing under half the focal length, 17.5 mm on a 35 mm lens: past the designed focus range, contrast falls first in the corners, short focal lengths suffer worst, and monochromatic lighting recovers part of the loss.
The barrel's focus travel defines the conjugate range the designer balanced for. Stretch beyond it and the correction drifts; chromatic error grows fastest, which is why a mono camera under narrow-band light recovers usable contrast. The colour fringing fix and the bandpass-filter pairing with red light cover that mitigation. Longer focal length lenses take spacers better because their designs are simpler. Light also falls as magnification rises; the working f-number and magnification article gives the exact f/# accounting.
Depth of field thins with the same 1/m² dependence: moving from 0.27x to 0.58x divides it by (0.58/0.27)² ≈ 4.6. Put your magnification and aperture into the depth-of-field calculator below before you commit to a spacer.
When do shims beat spacers on a telecentric lens?
Reach for 0.025-1 mm shims when the lens is fixed-magnification and the fault is focus rather than framing: flange tolerances move best focus from camera to camera, and thin foils trim it back while magnification stays constant.
Flange distance varies with mount machining and sensor position, even between two cameras of the same model. A telecentric selected for magnification and image circle delivers its rated performance only at its design image distance, so the foil stack is the fine adjustment that returns peak MTF and keeps pixel scales and thresholds identical across stations. That constant magnification is also why telecentric field-of-view maths never needs the working distance.
The 1/m² rule applies to shims too. The LS-TCL-2118 is a 1x telecentric lens with 108 mm WD and a C-mount for 2/3" sensors. At 1x, 0.1 mm of foil moves best focus about 0.1 mm of working distance.
- Sensor format
- 2/3"
- Mount
- C-mount
- Image circle
- 8-11 mm
- Type
- Object-side telecentric
At low magnification the lever lengthens sharply. The LS-TCL-1422 is a 0.166x bi-telecentric lens with 258 mm WD and a C-mount for 1" sensors. At 0.166x the rule puts focus shift near 36 mm per millimetre of shim (1/0.166² ≈ 36.3), so trim in 0.025 mm steps and judge the image, not the ruler.
- Sensor format
- 1"
- Mount
- C-mount
- Image circle
- 16-22 mm
- Type
- Bi-telecentric
What does a focal length extender cost in light and sharpness?
A 2x extender doubles effective focal length and f-number, so an f/2.8 lens works at f/5.6 and the sensor collects one quarter of the light; the field of view halves at the same working distance.
The negative group inside multiplies the lens's focal length: 25 mm becomes 50 mm, and stacked factors multiply, so 25 mm with 1.5x and 2x extenders acts as 75 mm. Unlike a spacer, the working distance range does not move. Light scales with the square of the factor: 2x costs four times the photons, about two stops; 1.5x costs 2.25x, about 1.2 stops. Exposure time or illumination must rise by the same factor. Sharpness pays as well, because the extender adds its own aberrations on top of the objective's; reserve extenders for occasional narrow-field checks, and for permanent work choose the focal length properly.
How do you check focus and scale after adding spacing?
Refocus, then image a calibration target: a 76 x 76 mm dot grid with 0.5 mm dots shows where contrast peaks and gives a fresh pixel-to-mm scale, because the spaced system's magnification is no longer the rated value.
Run the check in this order:
- Focus for peak contrast at the target centre and record the focus-ring position.
- Compare corner dots with centre dots; if corners smear while the centre is crisp, remove spacing before accepting the setting.
- Recalibrate the pixel-to-mm scale, because magnification changed and both object-space pixel size and any distortion correction start from it.
- Repeat the pass or fail threshold test on real parts, not only on the target.
The same routine follows fitting a new adapter, since anything behind the lens moves the conjugates.
The LS-LXR-0029 is a 76 x 76 mm dot-grid calibration board with 0.5 mm dots.
- Type
- Calibration targets
When is a spacer the wrong tool?
Buy a lens whose design range already covers the job whenever production volume justifies it; spacers suit bench trials, one-off fixtures and bridging the wait for the right optic.
A spaced lens gives up corner contrast, depth of field and rated MTF by construction. For permanent close-range measurement, a telecentric at the correct magnification or a fixed focal length lens designed for short working distance will hold tolerance with less light and less tuning; start from the machine vision lens finder or configure a lens around your WD and field of view. When distance must grow rather than shrink, zoom mechanics may already cover it, as in extending zoom working distance. For the hardware itself, the accessories finder lists tubes, rings and foils, and the configurator matches them to the camera you run.
If the spacing maths leaves the system short anyway, send working distance, field of view and sensor size through the quote form and we will size the optic with you.
Questions
Can I stack extension tubes to reach a higher magnification?
Yes, spacer thicknesses simply add: two 15 mm tubes behind a C-mount act as one 30 mm spacer. Keep the total under half the focal length, 17.5 mm on a 35 mm lens, because corner sharpness falls quickly past that. If the magnification you need demands more spacing, a longer focal length or a dedicated close-range lens is the better buy.
Does a spacer change the f-number I set on the iris?
The ring stays where you set it, but the working f-number rises to about f/# x (1 + m) for a symmetric lens. At the worked example's 0.58x, an f/4 setting behaves near f/6.3, so the sensor receives roughly 2.5x less light and exposure time must rise by the same factor to compensate.
Which shim thickness should I try first on a telecentric lens?
Start at 0.025 mm, image a dot-grid target, then step through 0.05, 0.1, 0.5 and 1 mm until corner-to-centre contrast peaks. Work at the wavelength you run in production, because chromatic focal shift moves the peak. Every foil is removable, so the search stays reversible and quick.
Why does a lens with a spacer no longer focus at infinity?
Infinity focus requires image distance exactly equal to the focal length. A spacer adds thickness between the lens and the sensor, so the nearest sharp distance becomes finite and close, which is the macro effect the spacer exists to create. Remove the spacer and the infinity setting returns.




