Concept explainer · Intermediate · 3 min read
Camera Lenses for Embedded Cameras
M12, CS and C Mount Explained
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
Small cameras use M12 (S-mount) lenses, while the Raspberry Pi HQ camera takes CS or C mount lenses. Focal length sets the field of view: 2.8 mm is very wide and 16 mm zooms in. Check that the lens image circle covers the sensor and that the mount matches your camera, then focus and lock the lens.
Key specs at a glance
- M12 / S-mount
- 12 mm thread, tiny sensors, many focal lengths
- CS mount
- Back focus 12.5 mm, used on Raspberry Pi HQ and security cameras
- C mount
- Back focus 17.5 mm; needs a 5 mm spacer on CS cameras
- Focal length
- 2.8 mm wide, 6 mm normal, 12 to 35 mm telephoto
- Image circle
- Must cover the sensor diagonal
- Aperture
- Lower f-number lets in more light
Mount types
The mount determines how far the lens sits from the sensor and which cameras accept it.
| Mount | Thread | Typical camera | Notes |
|---|---|---|---|
| M12 (S-mount) | M12 × 0.5 | Arducam, small board cameras | Screw to focus; lock with a ring |
| CS mount | 1 inch × 32 TPI | Raspberry Pi HQ, CCTV | 12.5 mm flange distance |
| C mount | 1 inch × 32 TPI | Industrial cameras | 17.5 mm; add a 5 mm adapter for CS bodies |
- M12 (S-mount)
- Thread:
- M12 × 0.5
- Typical camera:
- Arducam, small board cameras
- Notes:
- Screw to focus; lock with a ring
- CS mount
- Thread:
- 1 inch × 32 TPI
- Typical camera:
- Raspberry Pi HQ, CCTV
- Notes:
- 12.5 mm flange distance
- C mount
- Thread:
- 1 inch × 32 TPI
- Typical camera:
- Industrial cameras
- Notes:
- 17.5 mm; add a 5 mm adapter for CS bodies
Focal length and field of view
The horizontal field of view is about 2 × atan(sensor width ÷ (2 × focal length)). On a small sensor of about 6.3 mm width, a 2.8 mm lens sees roughly 100 degrees, 6 mm about 55 degrees, and 16 mm about 22 degrees. A larger sensor sees more with the same lens. Use the shortest focal length that gives the view you need, because wide lenses distort straight lines near the edge.
What to check before buying
the lens image circle must be at least as large as the sensor, or the corners go dark.
low-distortion lenses are better for measurement and machine vision.
a lens with an IR-cut filter gives true colour by day; without one, infrared light shifts colour but helps night vision.
f/1.8 to f/2.8 for low light.
make sure the board's lens mount adapts to the lens you plan to use.
Fitting and focusing
- 1Remove the dust cap, keep the sensor clean and do not touch the glass.
- 2Screw the lens in until the image is sharp at the working distance.
- 3Lock it with the grub screw or ring so it cannot rotate.
- 4Check the corners: if they are dark, the lens image circle is too small.
- 5For Raspberry Pi HQ, use a C or CS lens with the right adapter ring; see the camera modules guide.
Try it: Length converter calculator
Change the values and the diagram and results update as you type.
Common mistakes to avoid
- Choosing a lens with an image circle smaller than the sensor.
- Forgetting the 5 mm adapter for a C-mount lens on a CS camera.
- Leaving the lens loose after focusing.
- Touching the sensor or lens glass.
- Picking a very wide lens and then trying to measure with it.
Frequently asked questions
What is the difference between C and CS mount?
Their threads are the same, but C mount has a longer flange distance (17.5 mm vs 12.5 mm). Use a 5 mm spacer to fit a C lens on a CS camera.
Which focal length for a robot camera?
2.8 to 4 mm gives a wide view for navigation.
What is an image circle?
The area of light a lens projects onto the sensor. It must cover the sensor to avoid dark corners.
Can I use any M12 lens?
Most fit M12 holders, but check the image circle and focal length for your sensor.
Do I need an IR-cut filter?
Yes for accurate colours in daylight; remove it only for night vision.
Parts for this guide
Calculators
Terms in this guide
Projects that use it
Put this into practice: 1 step-by-step build in our project library uses parts from this guide.
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.




