LIGHT WORKS.      The evolution of machine vision optics.

About Us | Contact
23mm fields | 46mm fields | 94mm fields | more than 100mm fields
how they work | applications | adjustable field splitters | FAQ
front end optical design | optical consulting | gauging help | resumé
optics tips & tricks | glossary | FAQ | machine vision articles | machine vision links
optics tips & tricks | glossary of terms | machine vision articles | frequently asked questions | machine vision links
how they work | applications | specifications | definitions
subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link | subglobal7 link
subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link | subglobal8 link

Optics Tips and Tricks

Light Works Home

Light Ideas© Issue #1

Isaac Newton, C-mount Lenses, and You

 

Suppose you want to inspect a widget using a certain pixel resolution. You know you need a lens and a camera, but then what? Okay, perhaps this is a bit simplistic, but it should serve to illustrate a point about the Newtonian form of the lens equations. This might save you much heartache and gnashing of teeth. (If you already know this stuff, print and keep this page anyway. Next time you’re in dire need of a paper airplane or just a mortar to lob at your co-worker, it could come in handy.)

Simple lens equations allow you to calculate object and/or image distances, magnification, and lens focal length. Given any two values, you can calculate the other two. Most people learn the Gaussian form. This is the one where s = object distance from the center of the lens, s’ = image distance from the center of the lens, and for any equations, f = lens focal length while m = magnification -- image size divided by object size. For the Gaussian form:

Gaussian simple lens equation    

and    lens magnification equation

 

Now these equations are fine and true for what is called the paraxial condition, but they are not all that practical. "Why not?" cry the insulted Gauss fans. Well there are two reasons. The first is that the "lens center" is a bit tricky to define with real lenses. As far as optical calculations go, there usually is no single lens center. The second reason is that even if you use the equivalents of a lens center -- called the first and second principal surfaces -- most catalogues of complex lenses don’t tell you where these equivalents are located relative to some physical part of the lens like the front or back flange. Therefore you can’t really calculate important information such as object and image distance relative to something that you can physically measure.

So where does Newton come in? Well, the following illustrates his form of the lens equations.

Newton's form simple lens equation

Newtonian form of the simple lens equations

 

These, of course, are not three independent equations, but it is handy to write them out even if the third can be derived from the other two.

So why is this form better? Well the object and image distances, x and x’, are measured from the lens front and back foci which can usually be found experimentally with sufficient accuracy for most applications. (The image of a small light source placed at about 100 times the lens focal length, for example, will be very nearly at the back focus. Use a piece of ground glass or just a piece of paper as a screen to see this.) But you probably don’t even need to experiment. If you know that the lens is a c-mount, you know the location of the back focus; the specification tells you. In part the c-mount spec. says the lens thread should be 1" diameter with 32 threads per inch. What is more important, however, is that it says that the back focus of the lens will be 0.690" (~17.5mm) from the back mounting flange. This is true regardless of the lens focal length. NOTE: The lens focus ring must be set to infinity for this to work.

Many cameras are likewise specified as c-mount. This means the detector will be placed 0.690" (~17.5mm) behind the camera’s front flange. It doesn’t matter what the camera is; if it’s a c-mount, it’s supposed to be true. So, if you screw any c-mount lens (with no spacers) into a c-mount camera and set the focus ring to infinity, the detector should be at the back focus of the lens, or x’ = 0. This simplifies the process of distance calculations, especially when figuring out how long an extension or spacer should be used between the camera and lens. Take a look at this example.

Suppose you need to inspect a 150mm x 100mm rectangle, maybe a label, with a resolution of about 0.25mm per pixel. One way to do this would be to use a 2-D matrix camera with ~600 x 400 pixels. A common camera type is a so-called 2/3" array with 768 x 494 pixels -- close enough to 600 x 400 with a few to spare.
Okay, the 2/3" array has a physical size of ~8.6mm x 6.4mm. (Yes, there is a reason why it’s called 2/3", but that’s not important here.) You’ll find this in the camera specifications. This says that the magnification should be -8.6mm/150mm or m = -0.0573.

Further suppose that you want to use a 50mm focal length lens; f = 50mm. So, you know m and you know f, now just use the first equation to find that x’ = 2.865mm. Because the lens and camera are both c-mount, this tells you immediately that you need to add enough spacers to total 2.865mm. (See the diagram below.) That’s it! Well… not quite.

front camera flange to detector

 

In practice, of course, it would be difficult to find or make spacers that add up to exactly 2.865mm. Instead, add spacers equal to ~2.5mm or 2.75mm, then use the lens focus adjustment to reach the proper final x’ and therefore m. Remember, the back focus of a c-mount lens is at 0.690" (~17.5mm) from the back flange only when the focus ring is set to infinity. Adjusting the focus ring to less than infinity moves the back focus closer to the lens, effectively adding "spacers."

The next step is to calculate x, the distance from object to lens front focus, by using the second or third equation. You should get ~873mm. Add this to the distance from the lens to its front focus and you have the total lens to object distance.

The odds are, however, that you won’t be lucky enough to be provided with the front focus distance. So, what do you do?

Well, often it won’t really matter. With most common optical designs you can usually assume that the lens flange to front focus distance is less than the lens focal length. There are exceptions, especially with so-called macro lenses, but these are few.

Another consideration is that most c-mount lenses are designed for small magnifications, much less than one. Given this and the second equation, you can then see that x will often be much larger than f. When this is the case, it’s not very significant in a practical sense whether the lens to object distance is 873mm or 873mm + 50mm.

But suppose you really need an accurate value. Once again, you can determine the lens front focus position to within 1% by placing a light source at 100 times the lens focal length. This time, however, use the lens "backwards" so that the image of the source is formed "in front" of the lens. One word of warning: you may not be able find the front focus position this way for short focal length lenses, especially those that can have small f-numbers. The reason is that the front focus position may actually be inside the lens where you can’t see it formed on a screen.

Finally, remember that these equations assume the paraxial condition – a simpler-than-real model – but they are very useful for getting you on first base in the right ball park. Also, for high quality lenses at high f-numbers, the solutions are almost exact; a good argument for using good optics!

Another LIGHT IDEA from LIGHT WORKS!

 

 


Home
| About Us | Privacy Policy | Contact Us | ©2005 Light Works LLC