This blog post was originally published at Commonlands’ website. It is reprinted here with the permission of Commonlands.
Miniature M12 lenses are everywhere nowdays: in your car, at retail checkout QR code scanners, in surveillance cameras, as eyes for robotics, in medical applications, and anywhere you can think a camera would be.  The world of smart devices and robots has to see and miniature lenses are a core component!
An M12 Lens is also known an S-Mount Lens. These lenses come in an endless number of specifications, shapes, and sizes. This provides engineers the ability to easily customize miniature cameras based on their requirements and CMOS Sensor selection.
For example, M12 lenses can have different fields of view, MTF, F#s, distortion, ingress protection, barrel material, chief ray angle, filters, etc… The resolution of M12 lenses varies from VGA to 20MP depending on it’s as-designed optical prescription and as-manufactured opto-mechanical tolerances.
M12 threaded lenses can be a starting point to prototype for higher precision Active Alignment cameras which use multiple degrees of freedom to align a lens to a sensor.
There are also other types of “M” threaded lenses such as M7, M8 lenses. The difference between an M8 lens and M12 lens is that an M8 lens has an 8mm diameter thread, where the M12 lens has a 12mm diameter thread.
M12 lens Threads are “standardized” but not really….
I do not know where the term S-Mount camera originated from, but these refer to the same type of lens.
My best guess is that the term S-Mount means “Short Mount” with origins from the C-Mount, F-Mount, etc… This came from the C Short-Mount “CS-Mount” for the short-mount variant (12.5mm flange height) of the C-Mount with 17.5mm flange height. Contact me with your thoughts as I’m open to your opinion!
This term “S-Mount” leads people to believe that the M12 lens type is a standard mount like the C-Mount, when in fact is isn’t. Not all M12 lenses can be used with every M12 lens mount! Read our blog post “intro to lens mounts” for more information.
You need to consider other factors such as lens Mechanical Back Focal Length, lens diameter, and lens thread position to ensure that an M12 lens will work with a given M12 lens holder.
M12 Lenses Are 12mm in Diameter, but Not 12.0mm in diameter Due to the Fundamental Triangle for Thread Crests!
Thread nominal dimensions are specified in ISO 68-1: ISO general purpose screw threads — Basic profile — Part 1: Metric screw threads from the International Standards Organization.
After factoring in the height of fundamental triangle, you can calculate that the real diameter of M12x0.5 lenses is <=11.9mm.
Make sure you get your M12x0.5 thread tolerances Correct
M12 lens tolerances can be calculated using the International Standards Organization’s ISO965-1 : ISO general purpose metric screw threads – Tolerances.
Unfortunately, these are not explicitly calculated in any international standard defining screw threads. This frequently leads to improper torque between the M12 lens and lens mount.
Improper torque between a lens and lens mount threads will introduce image plane tilt, and make the corner(s) or side(s) of your image blurry!
So, I’ve gone ahead and made an easy to use look up table with the proper references included within the excel document. Please refer to the below when measuring:
At Commonlands, we offer Torque-Matched Pre-threaded M12 lenses and lens Mounts for OEM Customers (5kpcs+)
Once you’ve found an M12 lens that works for your camera, we can match any of our lenses to our lens holders. Then, we pre-thread these together to achieve a set torque value.
Here is an example of a semi-automated lens to lens mount assembly machine that is in our Class 100~1000 cleanroom in San Diego, California.
Max Henkart
Founder and Imaging Optics Engineer, Commonlands