What Is an M12 Lens? S-Mount Definition, M12 x 0.5 Thread, and Selection Guide
M12 x 0.5 thread, S-mount naming, sensor coverage, lens holders, and all-glass vs hybrid construction in one selection guide.
An M12 lens (also called an S-mount lens or board camera lens) is a compact camera lens with an M12 x 0.5 thread. The "M12" means 12mm nominal thread diameter. The "0.5" means 0.5mm thread pitch. M12 lenses screw directly into a camera holder and have no fixed flange distance. Focus is set by threading the lens in or out, then locking it.
M12 optics show up in cars, QR scanners, surveillance cameras, robots, and medical devices. Comparing M12 vs C-mount: M12 wins for compactness and board-level integration, C-mount for larger sensors and a standardized flange distance.
What Is an M12 Lens?
An M12 lens is a miniature camera lens with a 12mm diameter threaded mount and 0.5mm thread pitch. The mount screws directly into a lens holder on a camera module or PCB. M12 lenses are the standard optic for embedded vision systems because they weigh grams instead of tens of grams and cost less than larger industrial formats.
The Commonlands M12 lens collection runs from 0.8mm fisheye to 100mm telephoto, covering sensor formats from 1/6" through 1/1.6".
What Does M12 x 0.5 Mean?
"M12 x 0.5" is the thread specification for the lens mount: M12 means the nominal major diameter of the thread is 12mm, and 0.5 means the thread pitch is 0.5mm, the distance between adjacent thread peaks. The spec follows the ISO metric screw thread standard and defines the mechanical interface only. It says nothing about optical performance, focal length, sensor coverage, or image quality. Those come from the lens design itself.
What Is an M12 Lens Used For?
M12 lenses go into any smart device that needs to see under board-level packaging constraints. Field of view, resolution, and ingress protection vary widely across the Commonlands catalog. The application defines the lens, not the mount.
- Autonomous mobile robots and warehouse AMRs (navigation, obstacle detection)
- Factory machine vision nodes (barcode reading, presence detection, inspection)
- Drones and UAVs (payload cameras where mass budget is tight)
- Smart traffic and parking cameras (compact outdoor enclosures)
- Medical and handheld devices (short optical stacks, cost sensitivity)
- Consumer electronics and webcams (compact camera modules)
What Sensor Sizes Work With M12 Lenses?
Most Commonlands M12 lenses support sensor formats from 1/6" through 1/1.8". Some models extend coverage to 1/1.7" or even 1/1.6". The lens image circle must be larger than the sensor diagonal. If the image circle is too small, you get vignetting (dark corners) and soft edges.
Beyond image circle, check chief ray angle (CRA) compatibility. Modern CMOS sensors with microlenses have CRA requirements. Mismatched CRA causes color shading and reduced corner response. See the chief ray angle and mismatch guide for details.
M12 Lens vs C-Mount: Which Should You Choose?
| Parameter | M12 / S-mount | C-mount | CS-mount |
|---|---|---|---|
| Thread specification | M12 x 0.5 | 1"-32 UN | 1"-32 UN |
| Flange focal distance | No standard (varies by lens) | Fixed at 17.526mm | Fixed at 12.526mm |
| Focus method | Thread the whole lens in/out, then lock | Cam-driven focus ring or back-focus adjustment | Focus ring or back-focus adjustment |
| Iris control | Typically fixed aperture (no iris ring) | Adjustable iris ring on many lenses | Some lenses have an iris |
| Typical lens mass | 3-15 grams | 50-200 grams | 30-100 grams |
| Typical sensor coverage | Up to 1/1.8" (select designs 1/1.7"–1/1.6") | Up to 1" or larger | ~2/3" |
| Best for | Embedded, drones, robotics, compact sensors | Industrial inspection, larger sensors | ITS, security, Raspberry Pi HQ |
A C-mount lens focuses through an internal cam that moves lens groups relative to each other, rebalancing aberrations across the focus range (Kingslake, Lens Design Fundamentals). An M12 lens is rigid: threading it in or out moves the whole lens, with no internal rebalancing, so the two behave differently at short working distances.
See the lens mount guide: M12 vs C-mount vs CS-mount, or browse Commonlands C-mount lenses for larger formats.
How Do You Choose an M12 Lens Holder?
The holder provides the M12 x 0.5 threaded bore, screws to the board over the sensor, and sets the starting distance between board and lens. Too short and the image plane falls behind the sensor. Too tall and the lens bottoms out before infinity focus. The height has to place the lens mechanical back focal length (MBFL) within the thread's few millimeters of travel, not match it exactly, so check the MBFL on the lens datasheet before ordering.
Black PC is fine for prototyping. LCP (liquid crystal polymer) holds its dimensions better across temperature swings, which matters because holder drift becomes focus shift. Aluminum is the choice for sealed assemblies. The IP rating guide covers when IP67 or IP69K is required. Avoid 3D-printed holders in production.
Commonlands M12 Lens Holders
All holders below use the M12 x 0.5 thread and are $4.50 each. Lens not included. See the product pages for mechanical drawings.
| Holder | Height | Hole spacing | Material | Best for |
|---|---|---|---|---|
| CLA020 | 10mm | 20mm | Black PC | General purpose, prototyping |
| CLA021 | 7mm | 20mm | LCP | Low-profile builds, thermal stability |
| CLA022 | 8mm | 22mm | Black PC | Low-profile, 22mm-spaced boards |
| CLA024 | 12mm | 22mm | LCP | Longer MBFL lenses |
Adapters and Motorized Mounts
To run an M12 lens on a C-mount or CS-mount camera, the M12-to-CS adapter ($12.00) threads into the body and adds an internal M12 thread with a focus lock ring. It adds optical path length, so check the lens MBFL against the combined depth. The CLA811 M8-to-M12 adapter mounts smaller M8 x 0.5 lenses in an M12 bore.
For remote or closed-loop focus, the CLA322 piezoelectric mount holds position with no power applied, while the CLA321 voice coil mount drives continuous autofocus but needs power to hold. Both take standard M12 x 0.5 lenses. The CLA321 uses 23.5mm hole spacing.
How Do You Focus an M12 Lens?
An M12 lens is focused by threading the entire lens in or out of its holder while watching a live image, then locking the barrel once the target distance is sharp. There is no focus ring: the M12 body is rigid, and the thread itself is the focus mechanism.
The focus position depends on working distance. Lenses focused at infinity will be soft at close range and vice versa. For a detailed procedure, see how to focus a camera.
A focused lens that is not locked will drift under vibration. Lock it with a lock ring against the holder face (re-focusable), thread adhesive such as Loctite 222 or 243 (the standard production method), or a set screw, which can introduce tilt if overtightened. Confirm focus before the adhesive cures.
All-Glass vs Hybrid M12 Lenses: Which Construction Do You Need?
An all-glass M12 lens uses only glass optical elements. A hybrid glass-plastic lens mixes glass with molded polymer elements. All-glass construction holds focus more consistently across temperature because glass has lower thermal expansion and a more stable refractive index. Hybrid construction costs and weighs less. The operating environment decides which you need.
Construction shows up on spec sheets as element notation: "8G" means eight glass elements (all-glass). "2G4P" means two glass and four plastic (hybrid). If a datasheet omits it, ask the supplier, since hybrid is common at low price points. Molded plastic aspheres are not a shortcut. They hit surface shapes that are expensive to grind in glass. The difference that matters is thermal behavior, not baseline image quality.
| Construction | Choose it when | Main compromise |
|---|---|---|
| All-glass, all-metal | Outdoor, vehicle, or thermally cycled deployments; high-resolution sensors with small pixels, where the depth-of-focus budget is tight; no re-focus access after installation | Higher cost, a few grams heavier |
| Hybrid glass-plastic | Temperature-controlled indoor environments; lower-resolution or larger-pixel sensors with a looser depth-of-focus budget; cost- and weight-constrained builds | More focus shift with temperature |
Validate either construction the same way: fix a resolution target at the working distance, cycle the assembly across the full operating temperature range, and confirm sharpness holds. Focus shift depends on the lens, sensor, and housing together, so do not rely on datasheets alone. For deployments with shock, vibration, or ingress, see the Commonlands ruggedized lens guide.
How Do You Choose the Right Focal Length?
Focal length determines field of view: shorter focal lengths give wider views, longer focal lengths narrow the view and magnify the scene. The right choice follows from sensor width, working distance, and required scene coverage. That is why focal length is calculated from those three numbers, not guessed.
- Identify your sensor width from the sensor database.
- Define how wide a scene you need to capture at your working distance.
- Use the focal length calculator to estimate the required EFL.
- Verify the result with the field of view calculator.
- Consider distortion: wider lenses tend to have more barrel distortion unless they are specifically designed as low-distortion rectilinear types. If distortion matters, review the distortion guide.
Top 5 M12 Lenses for Machine Vision
The best M12 lens for machine vision depends on sensor format and working distance, so no single part number wins every build. For most 1/1.8" to 1/1.7" embedded cameras a 6mm low-distortion lens (CIL059) is the general-purpose starting point, with an 8mm all-glass lens (CIL085) for tighter distortion, a 200-degree fisheye (CIL219) for wide coverage, and a 25mm IR-corrected lens (CIL250) for long standoff. All five are Commonlands M12 lenses in stock in San Diego and ship same day on orders placed before 12 PM PST.
| Rank | Lens | EFL | F# | Sensor format coverage | Best for |
|---|---|---|---|---|---|
| 1 | CIL059 | 5.9mm | F/1.7 (F/2.8, F/4.0, F/5.6 variants) | Up to 1/1.7" | General machine vision, barcode reading, IP67 outdoor option |
| 2 | CIL085 | 8.2mm | F/3.0 (F/4.4 variant) | 1/1.8" (8.9mm image circle) | Low distortion (-0.9%), 12MP resolution, embedded stereo, all-glass thermal stability |
| 3 | CIL219 | 1.9mm | F/2.5 | 200-degree fisheye (6.3mm image circle) | Wide-area coverage, AMR navigation, IP67 sealed barrel |
| 4 | CIL250 | 25mm | F/2.0 | 1/1.7" | Long working distance, day and night NIR imaging |
| 5 | CIL083 | 8.0mm | F/2.8 | 1/1.8" (9.0mm image circle) | Lightweight, cost-sensitive indoor builds |
CIL085 and CIL083 sit at the same 8mm focal length but different construction: the all-glass CIL085 holds focus across temperature, while the hybrid CIL083 trades some thermal stability for lower weight and cost. The all-glass vs hybrid comparison above covers when that difference matters.
M12 Lens Suppliers Compared: Manufacturers vs Resellers
| Supplier | Based in | Role | What they do well |
|---|---|---|---|
| Commonlands | USA (San Diego) | Custom US design and assembly; also resells catalog lenses | 0.8mm-100mm M12 catalog with published MTF and distortion data, datasheets and CAD per SKU, US stock with same-day shipping, and direct engineering support |
| Edmund Optics | USA | Manufacturer and distributor | Large multi-mount catalog with detailed technical documentation |
| Lensation | Germany | Reseller with design services; does not manufacture | Board-level lens sourcing and tailored M12 optics for OEM programs |
| Arducam | China | Camera-module vendor; resells M12 lenses | Camera modules and development kits that bundle M12 lenses with sensor boards for Raspberry Pi and embedded prototyping |
| Towin | China | Reseller; does not manufacture | Standard M12 board lenses at low unit cost and high volume |
Frequently Asked Questions
Commonlands stocks M12 lenses from fisheye to 25mm telephoto, with same-day shipping on orders before 12 PM PST. These answers cover the standard itself.
M12 lens vs C-mount: which should I choose?
Choose M12 for compact embedded systems where size, weight, and cost are priorities. Choose C-mount for sensors larger than about 1/1.8", applications requiring an adjustable iris, or systems that need a fixed standardized flange distance of 17.526mm. See the lens mount comparison for a detailed breakdown.
How do you focus an M12 lens?
M12 lenses have no fixed flange distance. Focus by threading the lens in or out of the holder while viewing a live image. Once the image is sharp at your working distance, lock the lens with a set screw, lock ring, or thread locker. See how to focus a camera for a step-by-step guide.
How do I choose the right M12 lens holder for my camera?
Match three parameters: hole spacing (measure center-to-center between the board mounting holes, typically 18mm, 20mm, or 22mm), holder height (the lens mechanical back focal length must fall within the thread adjustment range), and screw type (M1.6, M1.7, or M1.8). Material (PC, LCP, or aluminum) is secondary once the geometry fits.
What is the difference between an all-glass M12 lens and a hybrid glass-plastic M12 lens?
An all-glass M12 lens uses only glass optical elements, usually in a metal barrel. A hybrid glass-plastic lens combines glass with molded polymer elements. All-glass construction holds focus more consistently across temperature swings. Hybrid designs cost and weigh less. Outdoor and automotive systems favor all-glass. Temperature-controlled indoor systems can use hybrid designs successfully.
Can I use an M12 lens on a CS-mount camera?
Yes, with an M12-to-CS adapter that threads into the CS-mount body and provides an internal M12 thread with a focus lock ring. The adapter adds optical path length, so verify the lens mechanical back focal length against the combined depth before ordering.
Need Help Choosing an M12 Lens?
Commonlands manufactures M12, C-mount, and M8 lenses for machine vision and embedded vision. Send our San Diego engineering team your sensor model and application at engineering@commonlands.com or call +1 (858) 333-7325. Orders placed before 12 PM PST ship same day.



