Selecting the right M12 (S-mount) lens comes down to four variables: sensor image circle format, required field of view (FOV), working distance, and minimum aperture (F/#) for your lighting conditions. Get these right and the Sunex lens selection tools will narrow thousands of options to a shortlist in under 2 minutes.
M12 lenses — also called S-mount or board-mount lenses — are the dominant format for ADAS, robotics, medical, and security cameras. This guide walks through the selection process step by step.
What is an M12 (S-mount) lens and where is it used?
Talking to our clients, we noticed that selecting the right M12 lens (also called S mount lens) for a specific project or simply limiting the options to a range of applicable lenses is not trivial.
How do I choose the right M12 lens for my sensor format?
Sunex’s Optical wizards are free online tools (registration required) designed to assist you in selecting the proper M12 lens or any other CMOS lens for your applications. If wizards, tools, and configurators are not your cup of coffee (or even if they are), we are always here to talk to you in person!Contact Sunex
What F/# should I choose for my lighting environment?
There are different approaches when it comes to selecting the right lens, depending on whether you already selected a specific imager or have hard requirements for FOV and EFL. No matter your starting point, Sunex’s Optical wizards will help you in the selection process:
- Search imager database: We have built a database of popular CMOS imagers from major suppliers. You can search for an imager based on the manufacturer’s name, PN and imager resolution. Once an imager is identified, you can then go on to search for a list of compatible lenses.
- Find a lens by imager specification: Given the imager resolution and pixel pitch, this tool will compute a list of imager key characteristics, and search our database for all matching lenses.
- Field of view and EFL calculator: This tool will calculate the required lens effective focal length to achieve a desired field of view in degree or vice versa. This tool will work for all lenses including wide-angle and fisheye lenses with a significant amount of distortion.
- Depth of field calculator: This tool will calculate the depth of field and hyper-focal distance for a given lens focal length and f/# . It requires the user to enter the maximum blur size in µm. It works for both infinite and finite conjugate systems.
- Imaging optics solver: For a given object and image size requirement, this tool calculates the required focal length of the lens based on first-order optics. It then recommends a suitable lens structure and focal length based on the object field size. It is a good starting point for solving finite conjugate problems.
- Search lens by optical parameters: This is a collection of advanced search tools.
How do I use Sunex's free M12 lens selection wizard?
The following webinar explains the different functionally and use cases of Sunex’s Optical wizards:
Every wizard will lead you to a list of our best lens options for your requirements, sorted by field of view (descending). If you aren’t looking for a fisheye lens, just keep moving along to the next page of narrower angle lenses using the page navigation arrows provided! From this screen, you can also Order Samples (and check stock availability), calculate the Depth of Field, and Request a Volume Quote.

Once you selected the proper optics, the linked PDF will give you access to a datasheet and dimensional drawings.

When should I use a standard M12 lens vs. a custom-designed lens?
Sunex provides lots of options that should be close to any given need. If, however, you cannot find a part that matches your exact requirements, please feel free to contact us to learn about new designs: Contact Sunex
At Sunex, we are always interested in learning about new applications and project requirements. If we can’t find something that works in our current portfolio, we should discuss and custom lens design options. Our Imaging System Builder is a great way to start that process.