How to Choose an M12 Camera Lens for an Embedded Camera
A team fits a 6 mm lens to a 20MP module, mounts it in the enclosure, and finds the corners of every frame are soft and dark. The lens was fine. It was specified for a 1/2.5-inch sensor, and the module carries a 1/1.7 inch one, so the image circle simply does not reach the corners.
That failure has nothing to do with lens quality and everything to do with two numbers that are easy to skip: image circle and sensor format. An M12 camera lens is cheap enough that nobody agonizes over it, which is exactly why it gets specified carelessly.
This post covers what the M12 standard defines, how to pick focal length from your field of view, when you need IR-cut or autofocus, and which Vadzo modules take an S-mount lens. Choosing an M12 lens for camera work involves four decisions, and only one of them is about the lens itself.
An M12 camera module is only as good as the optic threaded into it, and the two are specified separately.
What an M12 Camera Lens Is and What the Standard Leaves Open
Answer first: M12, also called S-mount, is a 12 mm diameter thread with a 0.5 mm pitch, written M12×0.5. That is nearly all the M12 lens mount specification defines.
The critical omission is flange distance. Unlike C-mount, the M12 lens mount does not fix the distance between the lens shoulder and the sensor surface. There is no standard back focal length to design around.
That sounds like a defect. In practice, it is the reason the format works for board-level cameras: you set focus by screwing the lens in or out until the image is sharp, then lock it with a set screw or a locking ring.
So, an S-mount camera lens is not a precision-mated part. It is a threaded barrel you position by hand, and the M12 lens thread spec is the only thing guaranteeing it will screw into the holder at all.
What that means practically. Any M12 lens fits any M12 holder mechanically. Whether it produces a usable image on your sensor is a separate question, and that question is answered by image circle, not by the thread.
S-Mount vs C-Mount: Which Format Suits Your Design
The S-mount vs C-mount decision is usually settled by size and sensor format before anyone compares optical quality.
| M12 / S-mount | C-mount | CS-mount |
Thread | M12 × 0.5 | 1 inch – 32 TPI | 1 inch – 32 TPI |
Flange distance | Not fixed | 17.526 mm | 12.526 mm |
Focus method | Screw the lens in or out | Fixed flange, focus ring on lens | Fixed flange, focus ring on lens |
Typical sensor formats | 1/6 inch to 2/3 inch | Up to 1 inch and beyond | Up to 1 inch |
Weight | Roughly 5 to 15 g | Tens to hundreds of grams | Tens to hundreds of grams |
Iris | Usually fixed | Commonly adjustable | Commonly adjustable |
The M12 board lens wins on mass, volume, and cost, which is why M12 board camera lens designs dominate embedded and IoT products. A module and lens together can weigh less than a C-mount lens on its own, and that is the main reason an S-mount camera for embedded vision is the default rather than the exception.
An M12 board lens also mounts directly over a PCB-level sensor, so a board camera lens M12 assembly needs no separate housing to hold registration.
C-mount wins on larger sensors, adjustable aperture, and repeatable mechanical registration. If your design needs an iris you can change, or a sensor above 2/3 inch, M12 is the wrong format, and no amount of lens shopping fixes it.
The honest summary: choose M12 for compact, cost-sensitive, space-constrained builds where fixed aperture is acceptable. Choose C or CS when you need aperture control, larger formats, or industrial repeatability.
Focal Length and Field of View: Getting the Number Right
Focal length is the specification that decides what your camera sees, and it is the one most often chosen by trial.
Work it backwards from the scene. Decide the width you need to cover at your working distance, then solve for focal length using sensor width. Focal length equals sensor width multiplied by working distance, divided by the scene width you want to cover.
A worked example makes it concrete. To cover 1 meter of scene at 1 meter distance on a sensor 5.6 mm wide, you need roughly a 5.6 mm lens. Move the camera to 2 meters, and the same coverage needs about 11 mm.
That arithmetic is what an M12 lens focal length calculator does, and running it yourself takes less time than finding one. The common stock values sit around it: an M12 6mm lens is the general-purpose choice for moderate coverage, while an M12 16 mm lens narrows the view for detail at distance.
Wide angles have a cost. An M12 mount wide-angle lens below about 3 mm introduces significant barrel distortion, and any measurement you take from that image needs calibration and correction first. Choosing an M12 lens with a wide FOV to avoid moving the camera back is a trade-off, not a free win, and an M12 lens with a wide FOV also spreads your pixels over more of the scene, so detail per object drops.
In practice, most teams end up bracketing around the calculation. An M12 6mm lens and an M12 16 mm lens on the bench will tell you more in ten minutes than another hour of arithmetic, since an M12 mount wide-angle lens changes the framing more than the numbers suggest.
The other direction has a cost too. Longer focal lengths shrink your depth of field, so a lens that focuses beautifully on a target at 2 meters may not hold focus across a 30 cm working range.
Sensor Format and Image Circle: The Mistake That Wastes Time
This is where the failure in the opening paragraph came from, and it catches experienced teams.
Every lens projects a circular image. The sensor sits inside that circle. If the circle is smaller than the sensor diagonal, the corners fall outside it, and you get vignetting, softness, or black corners.
So, a lens rated for 1/2.5 inch will not properly cover a 1/1.8-inch sensor. A 1/1.8-inch M12 lens on a smaller sensor is fine; you simply crop into the middle of the circle and lose some field of view.
The rule is one-directional. A lens rated for a sensor equal to or larger than yours works. A lens rated for a smaller one does not.
Resolution matters as well as coverage. A lens designed for an M12 2MP sensor may not resolve detail finely enough for a 20MP module even when the image circle is large enough, because the optical resolution and the pixel pitch are separate specifications.
For an M12 lens 4K camera build, check both numbers: an image circle at least as large as your sensor diagonal, and a resolution rating that matches or exceeds your megapixel count. A lens sold for an M12 lens 2MP sensor will physically fit an M12 lens 4K camera and quietly limit it.
A 1/1.8-inch M12 lens is the safe upper end for most embedded modules, since it covers the larger formats these sensors use.
IR-Cut, Day-Night, and Filtering
Silicon sensors respond to near-infrared light that human eyes cannot see. Left uncorrected, that produces washed-out, wrongly colored images in daylight.
An IR-cut filter blocks it. A fixed filter is enough when the camera only ever operates in visible light. An M12 lens IR-cut arrangement with an auto-switching filter is what you need when the same camera has to work day and night.
The mechanism is simple: the filter sits in the lens holder and swings out of the optical path at night, letting the sensor use IR illumination for a monochrome image, then swings back at dawn.
Vadzo’s Innova-521CRS, Innova-678CRS, and Innova-662CRS all specify S-mount with an auto-switching IR-cut filter, which is the configuration an M12 IR lens day-night deployment needs.
One detail that catches people: not every lens is IR-corrected. An ordinary lens focuses infrared at a slightly different point than visible light, so a camera sharp in daylight can go soft under IR illumination. If you are running IR at night, specify a lens designed for it.
This is also the deciding factor when choosing the best M12 lens for security camera work, and it is what separates a serious CCTV M12 lens from a general-purpose one. Ask any CCTV M12 lens supplier whether the design is IR-corrected before you specify an M12 IR lens day-night configuration, because an M12 lens IR cut holder does not fix a lens that shifts focus under infrared. That single question decides the best M12 lens for security camera deployments more often than resolution does.
Fixed Focus, Varifocal, and VCM Autofocus M12 Modules
M12 cameras come in three focus arrangements, and the right one depends entirely on whether your working distance changes.
Fixed focus is the default. You screw the lens to the right position during assembly and lock it. There is no focus search, no moving part to fail, and no software to write. For a camera at a known distance, this is the better engineering choice, not the cheaper compromise.
Varifocal lets you change focal length by hand. An M12 varifocal lens is useful during commissioning when the final field of view is not yet settled, at the cost of a larger assembly and a mechanism that can drift. Most shipping products replace the M12 varifocal lens with a fixed one once the field of view is settled.
VCM autofocus puts a voice coil motor in the lens holder so focus is set under software control. An M12 autofocus lens of this type is what you need when the subject distance varies during operation, and an M12 lens autofocus camera is the right label for that arrangement.
Vadzo splits its range along that line. The M12 autofocus camera module options are the Falcon-830CRH on the AR0830, the Falcon-521CRH on the AR0521, and the Falcon-544CRH on the AR0544, each specified as S-mount with VCM autofocus M12 optics. Everything else in the S-mount range is fixed focus, so a VCM autofocus M12 holder is a deliberate choice rather than a default, and picking an M12 autofocus camera module commits you to the driver and control loop that comes with it.
Choose an M12 lens autofocus camera only when distance genuinely varies. Autofocus adds a coil, a driver, a control loop, and a search time, and a fixed-focus module beats it on determinism every time the distance is known.
Which Vadzo Modules Take an M12 Lens
Thirteen Vadzo modules use an S-mount interface, across USB, MIPI CSI-2, GigE, and WiFi. They split into three groups by what the holder does.
Fixed-focus S-mount
Module | Sensor | Interface | Resolution | |
Falcon-2020CRS | onsemi AR2020 | USB 3.2 Gen 1 Type-C | 20MP | |
Falcon-821CRS | onsemi AR0821 | USB 3.2 Gen 1 Type-C | 8.3MP, 4K | |
Falcon-568MGS | Sony IMX568 | USB 3.2 Gen 1 Type-C | 5.1MP, global shutter | |
Falcon-233CRS | onsemi AR0233 | USB 3.2 Gen 1 Type-C | 2MP HDR | |
Bolt-234CGS | onsemi AR0234 | 2-lane and 4-lane MIPI CSI-2 | 2MP, global shutter |
VCM autofocus S-mount
S-mount with auto-switch IR-cut filter
How to read the split. If your working distance is fixed, start in the first table and save yourself an actuator. If the subject moves closer and farther during operation, the three CRH modules are the M12 lens autofocus camera options. If the camera runs through the night, the Innova group carries the auto-switch filter you need.
The Bolt-234CGS is worth noting separately. It combines a global shutter with an M12 mount on MIPI CSI-2, which is the pairing for high-speed imaging in robotics where the camera or the subject is moving during exposure.
Because the mount is a standard thread, embedded camera M12 lens options are not limited to what ships in the box. Any M12 lens with a sufficient image circle will thread in, which is what makes these modules straightforward to re-lens for a different field of view.

Practical Notes for Embedded and Prototype Builds
A few things that only show up once the lens is in your hand.
Lock the focus properly. A lens that is sharp on the bench and soft in the field usually moves. Vibration walks an unlocked thread, so use the set screw or a locking ring and check it after your shock testing, not before.
Watch the mechanical envelope. M12 lenses vary considerably in length and front diameter. Two lenses with the same focal length can have very different barrels, and an enclosure aperture cut for one may not clear the other.
Prototype with a lens kit. An M12 lens Raspberry Pi setup or any bench rig benefits from having several focal lengths on hand, because the calculated number and the number that looks right in the actual scene are often one step apart. A cheap M12 lens Raspberry Pi rig is the fastest way to survey embedded camera M12 lens options before committing to a module.
Handle the glass carefully. These are small elements with short focal lengths, so a fingerprint covers a larger proportion of the aperture than it would on a bigger lens. It shows in flare before it shows in sharpness.
Confirm the holder height. Since M12 does not fix flange distance, a lens with an unusual back focal length may not reach focus within the travel your holder allows, particularly at very short focal lengths.
Frequently Asked Questions
What is an M12 camera lens?
An M12 camera lens, also called an s-mount camera lens, is a compact lens with a 12 mm diameter thread at 0.5 mm pitch, written M12×0.5. It is the standard mount for board-level and embedded cameras because it is small, light at roughly 5 to 15 grams, and inexpensive. The M12 lens mount specification defines the thread but not the flange distance, so focus is set by screwing the lens in or out and then locking it. Available focal lengths run from under 1 mm to around 100 mm, so embedded camera M12 lens options cover everything from fisheye to telephoto. Thirteen Vadzo modules use an S-mount interface across USB, MIPI CSI-2, GigE, and WiFi, which makes an S-mount camera for embedded vision straightforward to re-lens.
Will any M12 lens fit any M12 camera?
Mechanically, yes; optically, not always, and that distinction causes most of the trouble. The M12 lens thread spec means any M12 lens will screw into any M12 holder, but the lens must also project an image circle large enough to cover your sensor. A lens rated for a smaller format will vignette or go soft in the corners on a larger sensor. Check the rated sensor format and the resolution rating, not just the thread, because a lens sold for an M12 lens 2MP sensor will fit an M12 lens 4K camera and quietly cap it. A 1/1.8 inch M12 lens is the safe upper end for most embedded modules. Vadzo’s S-mount modules accept any standard M12 lens for camera use, so you can re-lens a module for a different field of view without changing the camera.
What is the difference between S-mount and C-mount?
The S-mount vs C-mount difference is thread size, flange distance, and scale. M12 uses a 12 mm thread with no fixed flange distance, so you focus by turning the lens. C-mount uses a 1-inch thread with a fixed 17.526 mm flange, and CS-mount uses the same thread at 12.526 mm. C-mount lenses support larger sensors and usually offer an adjustable iris, but they are far heavier and larger. M12 is the right choice for a compact embedded build, which is why an M12 board lens dominates board camera lens M12 designs; C-mount is the right choice when you need aperture control or a sensor above 2/3 inch.
Do I need autofocus on an M12 camera?
Only if the subject distance changes during operation, so an M12 lens autofocus camera is a requirement rather than an upgrade. For a fixed installation, screwing the lens to the correct position and locking it gives you a sharper, more deterministic result with no actuator to fail and no search time. An M12 autofocus lens using a VCM in the holder earns its place when the working distance varies, such as a handheld reader or a camera imaging objects at different depths. An M12 varifocal lens sits between the two, letting you set the field of view by hand during commissioning. Vadzo offers three VCM autofocus M12 S-mount modules, the Falcon-830CRH, Falcon-544CRH, and Falcon-521CRH, and each M12 autofocus camera module sits alongside a wider fixed-focus range. Day and night installations need a separate decision, since an M12 lens IR cut holder and an IR-corrected CCTV M12 lens are what make an M12 IR lens day-night build work, and that pairing is the best M12 lens for security camera guidance in one line.
What focal length M12 lens do I need?
Work it from the scene rather than picking a common value. Focal length equals sensor width multiplied by working distance, divided by the scene width you want to cover, which is the same calculation any M12 lens focal length calculator performs. Covering one metre of scene at one metre distance on a 5.6 mm wide sensor needs roughly a 5.6 mm lens. Remember that an M12 mount wide-angle lens introduces barrel distortion that must be corrected before any measurement, and long lenses reduce depth of field. Bracket the result on the bench with an M12 6mm lens and an M12 16 mm lens, or on a cheap M12 lens Raspberry Pi rig, before committing. Any Vadzo M12 camera module will accept a different M12 lens once you have the number, and an M12 lens with a wide FOV is a trade rather than a free win.




