Using Lenses and Filters with Light-Sensitive Sensors

Simple lenses and filters can be used to greatly enhance the sensitivity, directionality, and effectiveness of both single- and multicell vision systems. By placing a lens over a small cluster of light cells, you can concentrate room light to make the cells more sensitive to the movement of humans and other animate objects. And you can also use optical filters to enhance the operation of light cells.

Let’s review the roles of lenses and filters, and how you can use them with light cells for your robots.

About Lenses

Lenses are refractive media constructed so that light bends in a particular way. The two most important factors in selecting a lens for a given application are lens focal length and lens diameter:

There are six major types of lenses, shown in Figure 1. Such combinations as plano-convex and bi-concave refer to each side of the lens. A plano-convex lens is flat on one side and curved outward on the other. A bi-concave lens curves inward on both sides. “Negative” and “positive” refer to the focal point of the lens, as determined by its design.


[Figure 1]

Lenses form two kinds of images: real and virtual.

A real image is one that is focused to a point in front of the lens, such as the image of the sun focused to a small disc on a piece of paper. The focal length of the lens is stated as a positive number, such as 1 or 2.5. Positive lenses are usually used to magnify an image.

A virtual image is one that doesn’t come to a discrete focus. You see a virtual image behind the lens. Negative lenses, which are started as a negative number, reduce the size of an object and create only virtual images.

For robotics vision applications, plano-convex or double-convex lenses of about 0.5" to 1.25" in diameter are ideal. Focal length should be fairly short—1" to 3". You can measure the focal length of a positive lens using the setup shown in Figure 2.


[Figure 2]

To use the lens, position it over the light cell(s) using any convenient mounting technique. One approach is to glue the lens to a plastic or wood lens board. You can use black construction paper to create light baffles. This will make the robot “see” only the light shining through the lens.

Using Figure 3 as a guide, you can create a kind of two-eyed robot by placing a lens over each group of four photoresistors. The lenses are mounted in front of the cells, which are secured to a circuit board in two groups of four. For one project I used miniature photoresistors. They measure about 1/8" in diameter, and, while they can be difficult to work with, they are ideal for constructing compact multicell vision systems.


[Figure 3]

Of course, you’re not limited to just 4 photocells. You might try 8 or even 16 cells, with the cells grouped together or separately to make multiple eyes.

You can also use phototransistors instead of photocells. Many phototransistors have built-in lenses, which help focus the light, making the sensors more directional.

About Filters

Filters accept light at certain wavelengths and block all others. A common filter used in robot design passes infrared radiation and blocks visible light. Such filters are commonly used in front of phototransistors and photodiodes to block out unwanted ambient light. Only infrared light—from an infrared emitter, for instance—is allowed to pass through and strike the sensor.

Optical filters come in three general forms: colored gel, interference, and dichroic.

Practical Uses For Lenses and Filters

You’ve already seen how a lens can gather more light and focus it directly onto a photoresistor or other sensor.

Two practical filters used in optical science, astronomy, photography—and, of course, robotics—are the Wratten 18A and Wratten 87.

Wratten 18A filters, sometimes referred to as Wood’s glass, pass light in the 350- to 400-nanometer (nm) region, which is just below visible violet. This section of the optical wavelengths is referred to as long wave, blacklight, or near UV. Phototransistors are already largely blind to light at this wavelength, but photoresistors have some sensitivity to it. There are also detectors specially made to detect this wavelength, but they tend to be expensive (an option might be to hack a cheapo outdoor UV sensor of the kind used for sunburn protection). One use of an 18A filter is to look for UV light from a flame.

Wratten 87 filters are commonly used in infrared photography in order to block all visible light. They’re used to create stunning cloud formations or bring out false colors. In robots, they’re useful for rejecting visible light and allowing only infrared light. Variations of the Wratten 87 block different parts of the infrared spectrum, but all are meant for near infrared, that part of the light spectrum just beyond human vision—typically about 900 to 1100 nm. Many phototransistors already incorporate the equivalent of a Wratten 87 filter. These appear dark red or brown.

Beware of Optical Filter Crosstalk

Optical filter crosstalk is a form of light spoilage caused by unwanted light reflecting either off the surface of a filter or internally within the glass of the filter. This can happen whether or not you use a baffle between the emitter and the detector.

To guard against this, you can use filters that are specially coated to prevent this kind of light spoilage, but they tend to be expensive. A quicker and easier solution is to use separate filters for the emitter and detector, or use a filter only over the detector.