Precision lens manufacturer for machine vision, medical, and industrial imaging applications.

M12 Lens Selection Guide for Embedded and Industrial Vision

Home - Lens Selection Guides - M12 Lens Selection Guide for Embedded and Industrial Vision
Reading Time: 11 min ( Word Count: 2,888 )

The AGV docked, the reader fired, and the station logged a miss. The 5-megapixel board camera had not failed. The m12 lens had backed off a quarter-turn under chassis vibration, and every code sat half a depth of field away from the plane the decoder was trained on. That is the usual failure mode on embedded vision: not glass quality, but a mount with no flange standard and a focus that lives only in thread position.

Key Takeaways

  • S-mount is an M12×0.5 metric thread with no standardized flange focal distance; focus is set by threading the barrel, then locking it.
  • C-mount registers at 17.526 mm. M12 does not. Treat every board lens as a unique mechanical back-focal-length match to its holder.
  • Most board designs cover up to 1/1.8″ (about 8.93 mm diagonal). A 2/3″ sensor (11.00 mm diagonal) will vignette unless the datasheet image circle is larger.
  • On robots, AGVs, and scanners, specify FT (full-thread) focus lock plus a set screw. HT (half-thread) is for compact, low-vibration housings.
  • Lensmind M12 part numbers encode focal length, fixed stop (F4.0–F11), FT/HT lock, and VIS IR-cut versus open NIR in one SKU.
  • Stay on S-mount for board cameras and tight envelopes. Move to C-mount FA glass when you need 2/3″–1.1″ coverage, an iris ring, or interchangeable accessories.

The rest of this page is the checklist a field engineer uses after that miss: thread and lock, image circle, focal length, aperture stop, coating, and the point where an S-mount is the wrong spend. The same five inputs in the machine vision lens selection guide still apply — sensor, working distance, field of view, resolution, environment — but on a board camera the environment line is usually vibration, and the mount line is always M12×0.5.

What an M12 Lens Actually Is

Lensmind M12 precision industrial lens on a white studio background for board-camera selection

An M12 lens is a board-level imaging optic whose barrel carries a male metric thread, M12×0.5: 12 mm nominal diameter, 0.5 mm pitch. The industry also calls it S-mount. The names describe the same interface. Edmund Optics states the point that trips first-time buyers: the thread is standardized, the flange distance is not.

Wikipedia’s S-mount entry matches the shop-floor reality. There is no flange registration surface. The lens must be focused by threading it in or out against a live image. Most designs have no iris ring. Aperture is a fixed stop inside the barrel. That is why a catalog that only lists “8 mm M12” is not a spec. You still need mechanical back focal length, image circle, stop, and coating.

If two S-mount barrels both say 8 mm, they can still fail to reach infinity in the same holder. Mechanical back focal length, not the thread, decides fit.

Use this mount when the camera is a PCB module, the housing is tight, and mass is measured in grams. Typical barrels run about 10–25 mm long and a few grams. Do not use it as a cheap substitute for a 2/3″ C-mount FA lens. The image circle and the missing iris will show up as dark corners and an exposure you cannot tune on the line.

Why Focus Walks on Board Cameras

Lensmind 6 mm M12 S-mount industrial lens with full-thread barrel used for vibration lock

C-mount cameras start in register because both sides of the interface agree on 17.526 mm from flange to sensor. An S-mount holder has no such contract. Focus is wherever you left the thread. One full turn of M12×0.5 moves the barrel 0.5 mm along the axis. On a short-focal-length module that is enough to throw a barcode out of the depth of field the decoder expects.

Vibration does the rest. Robot wrists, AGV decks, and document scanners shake the holder. A barrel that is only friction-tight will walk. Glue is a one-way lock and a rework problem. A nylon set screw on a half-thread barrel is better than glue and worse than a full-thread stack with a metal lock. If the station is mobile, write “FT lock + set screw” on the RFQ before you write the focal length.

The other walk is thermal. A plastic holder and a metal barrel expand at different rates. Overnight soak, then a hot shift, and the live image that was sharp at 08:00 is soft at 14:00. Metal holders and a locked thread reduce that stack. They do not replace a holder height that was wrong for the mechanical back focal length in the first place.

Holder height versus mechanical back focal length

Mechanical back focal length (MBFL) is the distance from the thread seating surface to the sensor at the designed conjugate. Holder height is the distance from the sensor plane to the top of the holder bore. Thread the lens fully in, then back it out on a live image. If infinity never comes, the holder is too tall or the MBFL is too short. If close objects are sharp and infinity is not, the holder is too tall. Soft corners that no thread position can fix are image-circle or chief-ray problems, not focus.

How to Read a Lensmind M12 Part Number

Lensmind M12 precision industrial lens series showing multiple S-mount focal lengths

The Hangzhou catalog puts the decisions into the SKU so a buyer does not have to decode a drawing to learn the stop or the lock. The live M12 / S-mount lens family lists 164 official models. H-series focal lengths run from 5 mm to 16 mm for 1/1.8″-class embedded sensors. M-series (M12–M35) covers larger-format board sensors. T045 and T54 are special short-EFL variants.

Code Meaning Values on the sheet
H + number Focal length, 1/1.8″-class series H05–H16 → 5–16 mm
M + number Larger-format sensor series M12–M35
T + number Special short-EFL optics T045, T54
11 / 40 / 56 / 70 / 80 Fixed aperture stop F4.0 / F5.6 / F7.0 / F8.0 / F11
FT or HT Focus-lock thread style FT = full-thread; HT = half-thread
VIS suffix IR-cut filter for daylight color No suffix = open for NIR illuminators

Example: LMZW-H1611HT-VIS is a 16 mm H-series barrel, F11 stop, half-thread mount, with an IR-cut filter. LMZW-H0756M12FT is 7.08 mm, F5.6, full-thread, no IR-cut. Five fixed stops exist so the aperture you calibrate is the aperture you keep. There is no iris ring to drift.

H05 is the close-range wide option, about 72° horizontal field on 1/1.8″. H07 is about 55°. H16 is about 25°, the mid-distance identification pick. H30 / M25 / M35 are the distant-feature and larger-format end of the same family. Quote the SKU, not a round “16 mm M12,” when you sample.

Match the Image Circle to the Sensor

Lensmind M12 board lens barrel used to cover 1/2 inch and 1/1.8 inch sensors

Megapixels do not size a lens. The image circle must cover the sensor diagonal. Format names are vidicon-era labels, not millimetres. Opto Engineering’s common-sensor table is the lookup most integrators actually use. A 1/1.8″ area is about 7.176 mm × 5.319 mm (8.933 mm diagonal). A 2/3″ area is 8.800 mm × 6.600 mm (11.000 mm diagonal). If the circle is smaller than the diagonal, the corners go dark.

Format Typical W × H (mm) Diagonal (mm) S-mount fit
1/2.7″ ~5.27 × 3.96 ~6.6 T045 / T54 class
1/2″ 6.400 × 4.800 8.000 H05 / H06 class
1/1.8″ 7.176 × 5.319 8.933 H07–H16 default
2/3″ 8.800 × 6.600 11.000 Usually C-mount FA, not S-mount

Always use the sensor’s active-area datasheet, not the marketing format, for the final check. Two “1/1.8″” chips can differ by a few tenths of a millimetre. If the circle only just covers the diagonal, expect relative illumination to fall in the corners. That is vignetting, not a dirty window. On a 2/3″ industrial body, start with the FA C-mount family instead of hoping an adapter will invent coverage.

Choose Focal Length, FOV, and Fixed Stop

Longer-focal-length M12 mount industrial lens used for distant-feature inspection

First-pass focal length uses the same thin-lens estimate as any other machine-vision pick:

f ≈ (sensor width × working distance) / (field width + sensor width)

Use active width, not the format name. Working distance is object-to-front-of-lens, not object-to-PCB. The formula ignores principal-plane offset, so treat the result as a starting EFL, then pick the nearest catalog value and confirm on a drawing.

Worked numbers: 1/1.8″ code reader at 120 mm

Take a 1/1.8″ sensor at 7.176 mm width, a 120 mm working distance, and a 50 mm-wide code on a tote. f ≈ (7.176 × 120) / (50 + 7.176) ≈ 15.1 mm. The nearest H-series values are 14 mm and 16 mm. H16 is listed at about 25° horizontal field on 1/1.8″; at 120 mm that frames roughly 53 mm, which is the 50 mm code plus a little placement margin. H07 at about 55° would throw away pixels on empty conveyor.

Then pick the stop. F4.0 gathers more light and thins the depth of field. F11 thickens the depth of field and starves a short-exposure reader. On a vibrating AGV, F5.6 or F8.0 is the usual first sample: enough depth that a small remaining walk does not fail the decode, without forcing the illuminator into saturation. Fixed stops exist so that choice cannot drift after calibration.

↑ Back to top

HANGZHOU FACTORY · ISO 9001
Specify the M12 that stays in focus
164 S-mount SKUs with FT or HT lock, five fixed stops from F4.0 to F11, and NIR or VIS configs, machined and tested in Hangzhou. Send sensor, working distance, field of view, and vibration notes. First-pass feasibility comes back within 48 hours.
164 models FT vibration lock ISO 9001

Browse M12 Lenses

FT Versus HT Focus Lock

Lensmind T54 M12 precision industrial lens with full-thread barrel for vibration-prone mounts

FT is full-thread: the barrel is threaded along most of its length so a lock ring or holder can clamp a long engagement. HT is half-thread: shorter stack, less clamp area, smaller envelope. The optical prescription can be the same. The vibration budget is not.

Put FT on robot arms, AGVs, handheld readers, and any scanner whose chassis shares a motor. Put HT in a sealed kiosk or a fixed cabinet where the only motion is the part, not the camera. A set screw on HT is a field patch. A set screw on FT is belt-and-suspenders, and that is the combination that survives a 24/7 dock.

Do not confuse lock with active alignment. Lock keeps a focused barrel from rotating. 1 μm-class active alignment, used on units that demand it in the Hangzhou cells, is a factory centration step. It does not replace a lock on the customer’s holder. Ask for both when the module is a high-resolution board camera that will live on a moving axis.

NIR Versus VIS Configurations

Warehouse conveyor and scanning gantry where NIR-illuminated M12 board cameras read codes

VIS in the Lensmind code means an IR-cut filter for daylight color. No suffix means the path is open for near-infrared illuminators, typically 850 nm or 940 nm in logistics and access control. The coating and the filter are not the same decision as the focal length. A VIS barrel under 850 nm LEDs looks dim because the cut filter is doing its job. An open NIR barrel under white light looks pink-magenta on a color sensor because NIR leaks into the channels.

Match the illuminator first. White LED or outdoor color → VIS. 850 nm or 940 nm flood → open NIR. Dual day/night modules sometimes need two SKUs or a removable cut filter, not a single “IR-ready” claim. Do not mix a VIS sample into an NIR production lot and then blame MTF. The glass never saw the band you are lighting.

If working distance also changes from tote to tote, a liquid-lens module (electrowetting focus in about 20 ms, no moving parts) can sit in the same S-mount envelope. That is a different family. Use it when the focus problem is object height, not vibration. Use FT lock when the focus problem is the barrel walking.

When an M12 Is the Wrong Mount

Lensmind FA C-mount machine vision lenses grouped for comparison with S-mount board optics

Board glass is the right spend on a PCB camera in a tight housing. It is the wrong spend on a 2/3″ or 1.1″ industrial body that already has a C-mount. The thread can be adapted. The image circle and the missing iris usually cannot. Edmund’s lens-mount note records C-mount flange distance as 17.526 mm; CS-mount sits 5 mm closer. Neither number applies to S-mount.

Need Best for S-mount Not for S-mount
Camera Board / embedded module Standard C-mount industrial body
Sensor Up to 1/1.8″ (select 1/2″, M-series larger) 2/3″, 1″, 1.1″ FA coverage
Focus Thread + FT/HT lock Interchangeable, flange-registered lenses
Iris Fixed F4.0–F11 stop Adjustable iris ring on the line
Job Codes, presence, embedded ID Gauging that needs < 0.05% distortion

An M12-to-C adapter solves the thread. It does not invent a 11 mm image circle. Wide S-mount designs often have a short mechanical back focal length and will not reach infinity through a C-mount throat. Telephoto board designs with longer MBFL are the better adapter candidates, and even then you check the drawing. If the camera is already C-mount, start with FA C-mount machine vision lenses and skip the adapter experiment.

Gauging is the other hard stop. FA production at Lensmind holds distortion below 0.05% with 10K+ batch consistency. That is a C-mount FA claim, not an S-mount claim. If a 1 mm change in object height moves the measured size past your tolerance, you are in telecentric territory, not a tighter M12 stop.

What We Check Before an M12 RFQ

Finished Lensmind machine vision lenses stacked on a factory rack before batch test documentation

A usable board-lens RFQ is one page. Missing any of the lines below is how you get a sample that threads in and still never focuses. Custom feasibility at Lensmind is a first pass within 48 hours (NDA first if drawings move). Prototype to mass production is 60 working days on the written commitment. Repeat orders are 30 days. Payment is 50% advance and 50% before shipment. Sampling is supported at project stage; production quantity is quoted per specification and annual volume.

  • Sensor: model, format, active width × height, pixel size. “5 MP” is not enough.
  • Holder: height from sensor plane, thread type, set-screw location, rear-element clearance.
  • Conjugate: working distance and field width × height, plus the smallest feature you must resolve.
  • Lock: FT or HT, vibration source (robot, AGV, scanner, cabinet), whether a lock ring is allowed.
  • Band: white / 850 nm / 940 nm, VIS cut or open NIR, any cover glass or filter already on the sensor.
  • Environment: IP67 / IP68 only when specified, temperature, washdown, expected life in cycles.
  • Volume: sample now, annual quantity later. Tooling is stored free for 5 years if a custom cell is cut.

Every production batch ships with test documentation covering the agreed family parameters — typically MTF, distortion, BFL, DOF — plus batch number, test conditions, inspection coverage, and an explicit pass/fail judgment. Reports are default, not a special request. The Hangzhou plant runs Class 10,000 (ISO Class 7 equivalent) assembly cells and ISO 9001 certified in 2024. The company registered in 2019; the founding team’s accumulated practice is 26 years, which is not the same number.

Illustrative path, not a named customer: a logistics OEM putting a 1/1.8″ module on an AGV bumper, 120 mm to the tote code, 50 mm field, 850 nm bar light, chassis vibration. The first sample is H16, F5.6 or F8.0, FT lock, no VIS suffix. The holder height is checked against MBFL on a live image before any glue is discussed. If the code still walks after lock, the problem is holder stiffness or illuminator geometry, not a need to jump to C-mount.

Conclusion

S-mount optics earn their place on board cameras because they are small, light, and cheap to lock once. They fail when someone treats the thread as a flange standard, skips the image-circle check, or ships HT into a vibrating chassis. Write sensor, holder height, field, lock, and illuminator band before you open a catalog. Then pick the nearest H/M/T SKU and confirm MBFL on a drawing.

Key takeaways

  • M12×0.5 is the thread. There is no flange number. Focus is thread position plus lock.
  • Cover the real sensor diagonal. 1/1.8″ is about 8.933 mm; 2/3″ is 11.000 mm and usually wants C-mount FA glass.
  • FT lock belongs on moving cameras. Five fixed stops from F4.0 to F11 keep the calibrated aperture from drifting.
  • VIS versus open NIR is an illuminator decision. Do not sample the wrong coating and then blame the EFL.

If you are locking a board camera on a robot, an AGV, or a scanner and you already know the sensor and working distance, send those five inputs plus the vibration note. The Hangzhou applications desk will map them to an H-, M-, or T-series SKU, or tell you the job belongs on C-mount instead. First-pass feasibility is 48 hours. You leave with a named part, not a thread size.

Written by the Lensmind Optics team — Hangzhou factory (Lin’an) and Zhongshan office, company registered 2019, ISO 9001 certified 2024. Founder on this site: Baker Zhao.

Frequently Asked Questions

What thread is an M12 lens?

M12×0.5: 12 mm nominal diameter and 0.5 mm pitch. That thread is the S-mount standard. It does not set flange distance or image circle.

Does an M12 lens have a flange focal distance?

No. S-mount has no standardized flange. Focus is set by threading the barrel, then locking it. C-mount is 17.526 mm; that number does not apply here.

Can I put an M12 lens on a C-mount camera?

Only with an adapter, and only if mechanical back focal length reaches the sensor. Most wide board designs will not. If the body is already C-mount, start with FA glass.

How do I stop M12 focus from walking?

Specify FT full-thread lock plus a set screw on any moving camera. HT half-thread is for compact, low-vibration housings. Glue is a last resort because it blocks rework.

What sensor size do M12 lenses cover?

Most H-series designs target 1/1.8″ (about 8.933 mm diagonal). T-series covers 1/2.7″. 2/3″ (11.000 mm) usually needs a C-mount FA lens, not an S-mount adapter.

What is the difference between VIS and no-suffix M12 SKUs?

VIS adds an IR-cut filter for daylight color. No suffix leaves the path open for 850 nm or 940 nm illuminators. Match the SKU to the light, not to the focal length.

Baker Zhao

Baker Zhao

Founder, Lensmind Optics

Baker Zhao is the founder of Lensmind Optics, with 26 years of experience in the optical industry — including Vice President of Sales at Sunny Optical (Zhongshan) and earlier roles at Foxconn, LG and Sintai Optical. He leads Lensmind with a mission to help customers find reliable, application-specific optical solutions from development to volume production.

Leave a Comment