Lens Spacers, Shims and Focal Length Extenders
This is Section 7.1 of the Imaging Resource Guide
Applications can require a lens to stretch beyond its limits or be precisely dialed into its ideal design parameters. Lens spacers, shims and focal length extenders are simple tools a user can easily utilize to achieve these requirements. Spacers and focal length extenders modify the field of views or working distances in fixed focal length lenses, whereas shims can be used to precisely control the working distance of telecentric lenses.
Most fixed focal length lenses have integrated mechanics to allow focusing at different working distances. The fixed focal length nature of the design means that the elements move throughout a defined range, which dictates the working distances where it is possible to focus. This predefined range is chosen based on the design of the lens, as lenses will perform the best in the range they were designed for. However, it is often advantageous to stretch a lens beyond its limits in order to fit a particular application when smaller fields of view or shorter working distances are required. By augmenting the system with a spacer in between the camera and lens, the range of working distances over which the lens optimally performs changes. This augmentation comes with a variety of deviations from the way that the lens normally works that need to be considered carefully before implementation into any system.
Generally, the main purpose of adding a spacer is to increase the vision system’s magnification or shorten the working distance; these two changes occur in tandem and are explained by the Gaussian imaging equations. Equation 1 shows the relationship between image distance (I), object distance (O) and the focal length of the lens (f). Note that the object distance is a negative number. By increasing the image distance, the object distance (working distance of the lens) must decrease. When the working distance and image distance change, so must the magnification (PMAG), based on Equation 2 (refer to our application note Object Space Resolution for more information). Figure 1 shows this effect visually. Imaging lenses are more complex systems and the calculations for spacer usage are more complicated.
Figure 1: An Illustration of the relationship between image and object distance (I and O respectively) and lens focal length (f).
The decrease in working distance and the increase in magnification (reduction of the field of view) are the two most distinct advantages of utilizing a spacer in an optical system. Choosing the correct spacer will vary by application, but consider an example with a 35mm focal length lens compared to the same 35mm lens with an 11mm spacer. The results of the spacer can be found in Table 1.
In our example the spacer’s most significant impacts on the system are that the working distance is reduced by more than half, and the magnification increases by more than a factor of two. In a space constrained system, using this type of spacer can be advantageous as well, as the total track length (length from the image plane to the object plane) is reduced.
|No Spacer||11mm Spacer|
|Field of View (½")||28.5mm||11.88mm|
Table 1: Comparison of specifications of the same 35mm focal length lens (focused at minimum working distance) with and without a spacer. The most important system changes are in bold.
It is also important to take into account the performance impact that spacers can have on the optical system. The working distance range over which the lens physically operates before adding spacers is generally where the best performance will be based on the optical design, and performance will typically suffer as these distances are altered with spacers. Using the same lens from the example above, Figures 2 and 3 show the MTF curves for the lens at the minimum working distance (Figure 2) and with the 11mm spacer (Figure 3) at f/4 on a 2/3" sensor. As a rule of thumb, a spacer should not be used if it is more than half of the focal length.
If used correctly, spacers can be an excellent way to augment a lens and adapt it to a specific application, as long as its limitations and reductions in performance are kept in mind. Restricting the wavelength range for the lighting to be monochromatic will help to mitigate these issues. As a best practice using a lens at within its design range is the best option for optimal performance. Longer focal length lenses tend to respond better to spacers, as they are often simpler designs when compared to shorter focal length lenses, and it is important to carefully analyze the system where spacers are considered before implementation.
Figure 2: 35mm focal length lens at the minimum designed working distance.
Figure 3: 35mm focal length lens with 11mm spacer.
Shims follow the same basic concepts as spacers, but are used for fixed magnification lenses such as telecentric lenses. Shims are very thin (0.025 - 1.0mm) stainless steel spacers used to control working distance with fine precision in order to guarantee the best image quality possible for a given setup.
Flange distance is defined as the ideal distance from the shoulder of the camera to the sensor plane and can vary slightly from the nominal design distance due to tolerancing. This departure from nominal is due to variations in housing design and sensor placement inside of a camera. An exact or custom distance may be required to control one of the following: working distance, image quality, or system to system repeatability. Shims act as thin spacers that can be placed between the lens and camera to customize this distance.
As image distance varies, image quality can also vary. If the image distance is shifted too far from the ideal design, a noticeable blur or degradation in MTF can occur. For example, this may occur when switching a lens between different cameras - even if the same model of camera and lens are being used, there may still be small variations from one camera to the next that may cause working distance or image quality changes as each new system is assembled. In this case, minor adjustments can be made using shims to bring the MTF and focus back to optimum levels. During the setup of each new system or line, slight adjustments to the image distance may be required, which is why many telecentric lenses come with shims included. With critical optical parameters dialed in for each system, software thresholds and calibration procedures will be repeatable from one system to the next.
Telecentric lenses are often chosen for applications requiring demanding manufacturing measurements, or the ability to get a certain view of an object under test. Often times these applications include other challenges such as limited working distance range due to swinging robotic arms, contaminations nearby, or limited space due to an existing mechanical layout of a machine into which the new measurement system must be fit. Similar to using lens spacers, adding or removing shims at the rear of a telecentric lens takes advantage of the relationship between image distance, object distance, and focal length (Figure 1) and adjusts the working distance slightly into a usable range. In monochromatic applications, shims can also be used to compensate or refocus for chromatic focal shift (refer to our application notes in Section 6 of the Imaging Resource Guide for more information). Shims give users precision control of image distance to achieve the best possible solution for their application.
Focal Length Extenders/Multipliers
Another way to increase the magnification of a machine vision system is by using a focal length extender. A focal length extender is similar to a lens spacer in that they are both placed in between the back of the lens and the camera. A focal length extender, however, will not change the working distance range where the lens will work; focal length extenders contain a negative set of elements that change the focal length of the machine vision lens by a multiplicative factor. For example, a 25mm focal length lens with a focal length extender of 2X will have an effective focal length of 50mm, and will therefore have half of the field of view it originally had at the same working distance ranges.
Another useful advantage of focal length extenders is that they can be stacked upon one another, and have a multiplicative effect on the focal length of a lens. For example, a 25mm focal length lens used with two focal length extenders of 1.5X and 2X will have a new focal length of 75mm, as 75 is the product of 25, 1.5, and 2.
Much in the same way that the use of spacers does not come without a compromise, potential degradation of image quality should be considered when using focal length extenders. Because the individual lens elements in an objective have all been specifically designed and engineered to balance each other out in terms of optical performance, adding an additional negative element into the optical train will reduce that performance by introducing additional optical aberrations that the lens was not designed to balance out. Focal length extenders also reduce the amount of light throughput in a lens by changing the f/#. For instance, a focal length extender of 2X will decrease light throughput by a factor of four. The potential negative effects on image quality should be considered before implementing a focal length extender.