Feeding an M6 screw into a coupling with a camera-guided robot exposes a mismatch most integrators meet the hard way: the camera finds the part confidently, the robot moves, and the screw still will not enter. The reason is arithmetic. A clearance hole for an M6 screw allows a few tenths of a millimetre of lateral play; a wrist camera that matches the whole part outline reports positions millimetres apart from cycle to cycle.
This guide budgets vision guided screw insertion accuracy against the clearance the hole actually gives you. You will compute radial play from ISO 273 clearance holes, combine vision, robot and calibration errors into one number, and choose between three working fixes: backlit hole location at close range, coarse location plus force guidance, or a compliant bit. The optics are worked through with the arithmetic shown.
The clearance you actually have
Start with the hole, because the hole sets the error budget, not the camera. Metric clearance holes follow ISO 273: an M6 screw passes through a 6.4 mm fine, 6.6 mm medium or 7.0 mm coarse hole. An M6 screw in tolerance class 6g has a maximum major diameter of 5.97 mm, so the slack is not 0.6 mm — it is half the difference:
For the medium 6.6 mm hole that is (6.6 − 5.97) / 2 = 0.31 mm of lateral freedom before the shank touches a side. Across common sizes:
| Screw | Max Ø, 6g | Medium hole (ISO 273) | Radial play |
|---|---|---|---|
| M3 | 2.98 mm | 3.4 mm | 0.21 mm |
| M4 | 3.98 mm | 4.5 mm | 0.26 mm |
| M5 | 4.98 mm | 5.5 mm | 0.26 mm |
| M6 | 5.97 mm | 6.6 mm | 0.31 mm |
| M8 | 7.97 mm | 9.0 mm | 0.52 mm |
Two details shrink that play further. Plating, paint and entry burrs can steal 0.05–0.10 mm, so pin-gauge the real holes instead of trusting the drawing. A counterbore does not rescue you either: a 10 mm screw head in an 11 mm counterbore has 0.5 mm of play, but the shank enters the 6.6 mm through-hole first and that is the constraint. And if the screw threads into a tapped M6 hole, radial play is zero — only the chamfer and the screw tip can steer. The underlying fit arithmetic, with worked examples, is in this rod and hole clearance sizing guide.
The rule that follows from the table: your combined vision, robot and calibration error must stay under the radial play — and under half of it if you want production margin.
What whole-part locating actually delivers
When you teach the vision system the entire coupling instead of the individual holes, detection becomes easy and localization becomes coarse. A wrist-mounted 2D camera matching a whole part outline typically reports positions that vary by 3–4 mm between cycles. The match locks onto the silhouette over a field of view tens of millimetres wide; with soft machined edges and lighting falloff, the best match shifts by millimetres even when the part stands still.
That 3–4 mm is the right tool for some jobs: telling the robot which quadrant the part sits in, re-finding a coupling that shifts between screws, or picking screws from a pallet where the pockets supply the final alignment. It is the wrong tool for feeding a 6.6 mm hole with 0.31 mm of play. No standard clearance hole in the table above accepts a 3.5 mm error — not even the coarse M8 hole at 0.52 mm.
The motivation for whole-part teaching is real: taught at close range, individual holes give strong detection but a field of view that holds only one hole, so the part keeps leaving the frame. The fix is the resolution arithmetic below, not abandoning feature-level location. For the wide-view side of the problem, teaching a vision system a large part without rotating it and template matching a part larger than the field of view cover the practice, and the 2D vision guided pick and place cycle shows where the locate step sits in the program.
Build the accuracy budget
Four independent error sources add up at the hole. Combine them as root-sum-of-squares:
Work both strategies with realistic values. Whole-part locate on a wrist camera: vision 3.5 mm, hand-eye calibration 0.5 mm, robot 0.05 mm (typical cobot pose repeatability), part-to-part variation 0.3 mm.
σ_total = √(3.5² + 0.5² + 0.05² + 0.3²) = √(12.25 + 0.25 + 0.0025 + 0.09) = √12.59 ≈ 3.5 mm
Against the M6 medium play of 0.31 mm, that fails by more than a factor of ten. Feature-level locate of one backlit hole: vision 0.15 mm, hand-eye 0.10 mm, robot 0.05 mm, part variation 0.10 mm.
σ_total = √(0.15² + 0.10² + 0.05² + 0.10²) = √(0.0225 + 0.01 + 0.0025 + 0.01) = √0.045 ≈ 0.21 mm
That clears the 0.31 mm medium-hole play, sits exactly at the 0.21 mm fine-hole play, and meets the half-margin rule for the coarse M8 hole at 0.52 mm. So commit: M6 medium and larger clearance holes are reachable with feature location plus a chamfer; M6 fine holes need compliance on top; tapped holes always need force guidance. The same budgeting method, pushed into sub-0.1 mm territory, is in vision guided placement accuracy budgeting to 40 µm.
One term people forget: if the camera mount or the part fixture shifts, the hand-eye term regrows. Why moved parts drift off target explains the mechanism; in a screw-driving cell it is the reason you re-locate the part after every insertion when clamping is not rigid.
Close-range feature locate: the optics that get you there
The complaint that close-range teaching loses the part is a resolution problem you solve with arithmetic. Take a 12 MP camera with a 1.1-inch sensor: 4096 × 3000 pixels at 3.45 µm gives a 14.1 × 10.3 mm imaging area. You want all four M6 holes of a coupling on a 40 mm hole circle in one frame, so target a field of view about 70 mm wide.
At a working distance of 150 mm: m = 14.1 / 70 = 0.20, so f = 150 × 0.20 / 1.20 = 25 mm. A standard 25 mm C-mount lens it is. Check it: m = 25 / (150 − 25) = 0.20, field of view = 14.1 / 0.20 = 70 mm wide and 10.3 / 0.20 = 52 mm tall, scale = 70 mm / 4096 px = 17 µm per pixel.
Now the 6.6 mm hole spans 6.6 / 0.017 = about 380 pixels. A circle that large centroids to roughly 0.1 pixel, which is 1.7 µm in the image — afterwards the budget is dominated by hand-eye calibration and robot repeatability, not optics. Four holes in one frame, each nearly 400 pixels across: you keep the field of view and the feature size. If your adapter stack needs checking, see C mount vs CS mount: adapters, focus and clearance.
For the close-range station, a 12 MP global-shutter camera with a 1.1-inch sensor and C-mount, such as the MV-CH120-11UC:
- Sensor format
- 1.1"
- Lens mount
- C-mount
- Interface
- USB3
- Resolution
- 12 MP
Global shutter matters on a wrist: a rolling shutter imaging while the arm settles turns circles into ellipses and biases the centroid sideways. If you prefer inspection on the device with no PC at the station, the MV-SC6050C-08M-XBN is a 5 MP smart camera with a global shutter, an 8 mm M12 lens and its own multi-color light source; confirm its field covers all four holes at your standoff before you commit. Area scan cameras and smart cameras list both classes, and the camera configurator walks the sensor and lens pairing.
Run your own numbers with the lens focal length calculator:
The sensor, lens and working distance that produce the 70 mm field above:
Light the holes, not the part
Counterbored through-holes are a gift: the camera sees the background through them. Put a matte white panel under the fixture and every hole becomes a bright disc on darker metal — the highest-contrast circular target you will ever centroid. Backlight through the hole is the first choice whenever the part sits over an opening; no ring light matches that contrast.
When the fixture is solid, go dark-field: a low-angle ring grazes the surface so the hole edges glow while flat metal stays dark. For blind holes this is the only geometry that shows the circle. Ring selection at 150 mm standoff is dictated by the inner opening clearing the lens view cone, and by angle: low-angle (0–15°) for edge glow, around 60–75° when the coarse locate also needs to see the part.
The LS-RNG-0100 is a 120 mm ring light at 60°, 620 nm red, 24 V:
- Size
- 100-200 mm
- Type
- Standard
- Angle
- 60°
- Voltage
- 24 V
Red at 620 nm keeps a monochrome camera in its most sensitive band and avoids the colour-channel averaging that smears edges on a colour sensor — commit to mono for the close-range station. The LS-RNG-0730 is a 103 mm ring light with a 48 mm inner diameter, 24 V, offered from low-angle through 85° versions, so one family covers both geometries if the station changes later.
Strobe the ring through the controller at 100 µs to 1 ms to freeze residual arm motion; continuous illumination at a 1 ms exposure buys nothing extra.
Ring lights and the lights finder carry both backlight panels and low-angle rings, and lighting geometry for image contrast covers the camera-light-part triangle in more depth.
Coarse locate, then force or compliance
The third strategy accepts the 3–4 mm whole-part number and finishes mechanically. The camera brings the screw over the hole within a few millimetres; a force sensor in the wrist then runs a short spiral search — press lightly, circle outward until the screw drops, then drive it. A 45° entry chamfer converts lateral error into axial compliance: a chamfer 1 mm wide forgives about 1 mm of lateral offset as the cone rides in, and the search itself corrects 1–3 mm over one to three seconds per hole. A spring-loaded compliant bit does the same passively for about 0.5–1 mm.
This is the answer for tapped holes, where radial play is zero and no camera locates tightly enough — insertion has to be force-guided regardless. It is also the fallback when a close-range camera and backlight simply will not fit the station. The cost is cycle time and a force sensor or compliant tip; the benefit is that vision only has to be a part-finder. The same locate-coarsely-then-execute-accurately pattern is used in this vision guided robot dispensing set-up.
One detail from the gripper side: soft silicone fingertips hold screws by stiction, and the screw stays in the cup when the driver starts, dragging it off position or pulling the part as it turns. Hard anodized fingertips, or a vacuum bit that holds the screw by the head, keep the screw where the locate said it was. If the part can shift as screws tighten, re-locate between insertions; multiple wrist camera snapshot positions to cover a large table shows how to plan those snapshots.
When the usual answer is wrong
Whole-part teaching is correct when the tolerance really is millimetres: picking screws from a pallet, sorting, presence checks. It fails silently when inherited for insertion, because the detection score stays excellent while the position wanders — high score, wrong hole.
Feature teaching has its own traps. A black part on a white table is two intensities of the same neutral colour; shape matchers cope, but weakly, and a printed teaching target helps: print the part drawing at 1:1 on coloured paper — yellow with black lines gives a template the matcher locks onto — then remove the paper and run the locator on the real metal. Teach from the drawing, inspect the part.
The counterbore itself can mislead: at close range you see the 11 mm counterbore crisply and the 6.6 mm through-hole as a shadow inside it. Centroid the counterbore, not the shadow — the two are concentric within normal machining, and the counterbore edge is the cleaner circle. Below roughly 20 pixels across, a hole belongs to detection, not measurement; from about 100 pixels up, you are centroiding.
Checks before you order anything
- Pin-gauge the real holes. Plating and burrs cost 0.05–0.10 mm; budget the measured minimum.
- Recompute radial play from the measured hole and the screw's maximum diameter.
- Combine σ_vision, σ_hand-eye, σ_robot and σ_part by RSS; demand the total under half the play.
- Log 30 re-locates with the part repositioned between each; take σ_vision from that data, not from a brochure.
- Confirm the hole spans at least 100 pixels at your chosen lens and working distance.
- Confirm a 45° entry chamfer exists on the entry side; a 1 mm chamfer forgives about 1 mm lateral.
- Re-locate the part after every insertion if clamping is not rigid.
- Swap silicone fingertips for hard tips or a vacuum bit before blaming the camera.
The decision, case by case
| Your case | Play available | What to commit to |
|---|---|---|
| M6 into 6.6 mm medium clearance hole | 0.31 mm | Backlit feature locate (σ ≈ 0.21 mm) plus a 1 mm chamfer |
| M6 into 6.4 mm fine clearance hole | 0.21 mm | Feature locate plus compliant bit; whole-part locate cannot work |
| M6 into tapped M6 hole | 0 mm | Vision only positions; force-guided spiral does the insertion |
| M8 into 9.0 mm coarse hole | 0.52 mm | Backlit feature locate alone, with margin to spare |
| Screws picked from a pallet jig | Pockets align | Whole-part locate is fine; ±3–4 mm is acceptable |
Start at the camera configurator with the sensor and working distance from the worked example, or send the hole sizes, the part drawing and your robot's repeatability through the contact page and we will run the budget with you.
Questions
How much lateral error can an M6 screw tolerate before it binds?
Half the difference between the hole and the screw's maximum diameter. An M6 screw in class 6g has a 5.97 mm maximum major diameter, so a 6.6 mm medium clearance hole gives (6.6 − 5.97) / 2 = 0.31 mm of play; a 6.4 mm fine hole gives 0.21 mm; a 7.0 mm coarse hole gives 0.52 mm. Plating and entry burrs eat into that, so pin-gauge the real holes and budget the measured minimum. A 45° chamfer about 1 mm wide forgives roughly another 1 mm as the screw cone rides in.
Why does my vision system find the part but still miss the hole?
Because matching the whole part outline anchors the position to a silhouette tens of millimetres wide, and the best match shifts by about 3–4 mm between cycles. The detection score stays high — the system is confident about the wrong thing. Use whole-part matching as a part-finder for coarse motion, then locate one hole at close range as a feature, or finish the insertion with a force sensor or a compliant bit.
How many pixels do I need across a screw hole?
About 100 pixels across the hole for a stable centroid, and never below roughly 20 pixels for reliable detection at all. A 6.6 mm hole at 17 µm per pixel — a 12 MP, 1.1-inch sensor with a 25 mm lens at 150 mm — spans about 380 pixels, which centroids to around 0.1 pixel. If your field of view must be much wider, increase sensor resolution rather than giving up feature-level teaching.
Do counterbored through-holes need a backlight?
They reward one. With a matte white panel under the fixture, the camera sees the bright background through each hole, so every hole becomes a high-contrast disc on darker metal — the easiest centroid target there is. When the fixture is solid, a low-angle ring in dark-field geometry lights the hole edges instead; that is also the only option for blind holes, where nothing shows through.
Can a force sensor insert the screw without precise vision?
Yes, within limits. A spiral search that presses lightly while circling outward corrects about 1–3 mm of lateral offset in one to three seconds, and a 45° chamfer converts lateral error into axial compliance — a 1 mm chamfer forgives about 1 mm. Vision still has to land the screw inside that window, so pair a coarse whole-part locate with force guidance and plan for the added seconds per hole in the cycle.

