Cameras & sensorsGuide

How to clean a machine-vision camera sensor without adding dust

How to clean a camera sensor safely: prove where dust sits, size it in pixels, blow it off, wipe with 99% alcohol, and know when it goes back for service.

LumaSpec Vision10 min read Share on LinkedIn

On this page 10 sections
  1. 01Prove the dust is on the sensor before you touch anything
  2. 02Size the shadow in pixels before you decide to clean
  3. 03Worked example: a 50 µL swab charge at 70% versus 99% alcohol
  4. 04Dry clean first: filtered air, face down
  5. 05Wet clean only what air cannot move
  6. 06Color cameras: stop at the IR-cut filter
  7. 07Know when to stop cleaning and swap
  8. 08Keep the next speck out
  9. 09The decision, in order
  10. 10Questions

A dark blob that sits on the same image pixels no matter which lens you mount is dust on the sensor. The fix, in order: blow it off face-down with dry, oil-free, filtered air; if residue remains, wipe once with 99%-purity or better optical-grade isopropyl or ethanol on a fresh swab — never drugstore 70%, which leaves thirty times more residue. Size the speck in pixels first: a 60 µm clump on 1.6 µm pixels casts at least a 38-pixel shadow, so clean only when that shadow beats your minimum-defect area inside a region the inspection actually looks at. It appears after a cap comes off in a dusty plant, after a lens swap on the line, or on a board-level camera built into a machine. One line protects the camera itself: never open a color camera past its IR-cut filter, and never let propellant, water or low-grade alcohol do the cleaning for you.

Prove the dust is on the sensor before you touch anything

Three checks take two minutes and stop you cleaning the wrong surface:

  1. Swap the lens. If the blob keeps the same pixel position under a different lens, it sits behind the mount — sensor side. If it moves or vanishes, the dust is on the lens.
  2. Stop the iris down. Close two or three steps and compare frames: a speck on or near the sensor casts a sharper, darker shadow at higher f-numbers, while front-element dust barely images at all.
  3. Look at the glass. Take the lens off, point the mount at a bright lamp and inspect the cover glass directly. Most specks are visible this way.

If the blob moves with the part instead of the camera, it is not on the sensor at all — that is an image-side defect, and the walkthrough on isolating a persistent black spot in the camera image covers that hunt step by step.

Size the shadow in pixels before you decide to clean

Every opening of a camera risks letting new dust in, so make the speck earn the cleaning. The sharpest shadow a speck can cast is its own diameter, and the pixel pitch turns that into a verdict:

shadow_px = s / p blur ≈ s + d / N

Here s is the speck diameter, p the pixel pitch, d the distance from the sensor plane to the glass the speck sits on, and N the f-number; keep s and d in the same unit. A 60 µm fibre clump on 1.6 µm pixels casts at least 60 / 1.6 = 37.5, so a 38-pixel shadow, about π/4 × 38² ≈ 1,130 pixels of area. If your smallest reportable defect is five pixels across — roughly 20 pixels of area — that speck shadows more than 50 times your threshold. The decision: clean any speck whose sharp shadow covers several times your minimum-defect area inside a region the inspection actually looks at; specks outside those regions wait for the next maintenance window.

The aperture decides how sharp that shadow really is. Take d = 1.5 mm, a typical cover-glass-plus-filter stack on a sealed C-mount camera, and the same 60 µm speck: at f/4 the shadow spreads to 60 + 1500/4 = 435 µm, a faint smear; at f/11 it is 60 + 1500/11 ≈ 196 µm; at f/16 it sharpens to 154 µm. Wide-open inspections hide sensor dust; depth-of-field settings reveal it, so if you stop down, clean before you tune thresholds.

You need the pixel pitch, and camera pages print it. The LS-BCM-0056 board camera states 1.6 µm × 1.6 µm pixels on a 1/2-inch sensor.

Board-level camerasGigE board camera / module, 12 MP, Color/Mono, 1.6 μm×1.6 μm pixels (LS-BCM-0056)LS-BCM-0056
Sensor format
1/2"
Lens mount
C-mount
Interface
GigE
Resolution
12 MP
$209.00View partBuild a system with it

For the rest of the sensor details worth capturing at commissioning, the board camera evaluation checklist for inspection systems keeps the list in one place.

Worked example: a 50 µL swab charge at 70% versus 99% alcohol

The inputs: one drop from a dropper bottle is about 50 µL, and that is roughly what a swab picks up for one pass; drugstore isopropyl is commonly blended to 70% v/v; optical-grade sensor fluid is 99% or better. The rule: the alcohol evaporates away clean, and everything else in the charge — water plus whatever it carries — dries last on the glass as streaks and a drying ring. Residue volume = charge × (1 − purity).

  • 70% blend: 50 µL × 0.30 = 15 µL of non-alcohol fluid.
  • 99% fluid: 50 µL × 0.01 = 0.5 µL.
  • Ratio: 15 / 0.5 = 30.

The 70% wipe leaves thirty times more fluid that must dry on the glass, which is exactly the streaking that lower purity causes — and why a casual wipe can leave the sensor looking worse than the dust did. The decision: fluid that touches sensor glass stays at 99% purity or better, isopropyl or ethanol; the 70% bottle keeps for housings, handles and gloves. Methanol-based fluids clean well but are toxic, and on a production floor that exposure is not worth taking.

Dry clean first: filtered air, face down

Most specks are loose and leave without contact. Power the camera down, take the lens or cap off, point the mount opening downward so gravity works with you, and blow with dry, oil-free, filtered air — a rubber bulb blower, or a bench line fitted with a regulator, filter and dryer. Short bursts at a slant, nozzle never touching the glass, then re-inspect under the lamp before reaching for fluid.

Two sources bring back the contamination you just removed: an unfiltered compressor line carries oil and water aerosol, and canned air carries propellant that spits liquid when the can tips or runs cold.

Wet clean only what air cannot move

Fluid is for what stays behind: fingerprints, dried splash, an oily film. Work in this order:

  1. Wet a clean swab — or an optical microfiber wrapped over a swab stick — with 99% or better optical-grade isopropyl or ethanol. In a small mount opening, a cotton swab can carry the cloth tip and keep the pressure even.
  2. Make one wet pass across the glass in a straight line with slight overlap at the edges. No scrubbing and no second pass with a used swab: once a swab has left the glass it is carrying the grit you just lifted.
  3. If streaks remain, let the glass dry and make one pass with a fresh swab, then re-inspect under the lamp.

The glass itself is on your side: the protective window over the sensor is hard, and during wiping only very hard particles — glass, sand, diamond — will scratch it. Ordinary dust will not, so lift it rather than fear it. A lens pen works too: flip out the retractable brush for loose grit, then use the padded tip on a fingerprint.

Color cameras: stop at the IR-cut filter

A color sensor is not the first glass you meet through the mount: a factory-aligned IR-cut filter sits in front of it. Clean the outer surface exactly as above, but never disassemble past the filter to reach the silicon — that stack is an aligned optical assembly, and dust or condensation behind it is a service case, not a cleaning case. Mono cameras are the simpler twin: no color filter stack, just the cover glass right behind the mount. Bare board modules are the opposite extreme; many carry no cover glass at all, so air only there, and the notes on cameras without sensor cover glass explain what that means in a dirty environment. How the IR-cut filter sits in the color path is covered in the guide to color camera near-infrared imaging and IR-cut filter options.

Typical of each kind:

Area scan camerasHikrobot MV-CU020-90GC 2.5 MP Area Scan Camera, GigE, GMAX4002, ColorMV-CU020-90GC
Sensor format
1/1.7"
Lens mount
C-mount
$309.00View part
Area scan camerasHikrobot MV-CS200-10UM 20 MP Area Scan Camera, USB3.0, IMX183, 2nd Gen., MonoMV-CS200-10UM
Sensor format
1"
Lens mount
C-mount
$759.00View part

Know when to stop cleaning and swap

Cleaning has an endpoint. Send the camera for service when dust or condensation sits behind a color camera's IR-cut filter, when the glass is chipped, or when a breached seal has let residue build inside the barrel. Replace the module when the same shadow returns within days of a proper clean — something is feeding dust past the seal — or when the camera has reached end of life anyway. The guide to replacing a board-level camera when a sensor goes end of line covers matching a new module to the old footprint.

Keep the next speck out

Dust enters through the mount, so finish the job with caps: fit a clean body cap the moment a lens comes off, store caps closed and wiped, and never stand an open camera mount-up on a bench under a fan or HVAC diffuser. After any clean, log the date and the flat-field result so the next person knows the baseline.

The decision, in order

Run the sequence the same way every time: swap the lens to place the speck; run the pixel math — a 60 µm speck on 1.6 µm pixels is a 38-pixel shadow — and clean only inside inspected regions where that shadow beats your defect threshold several times over; dry filtered air face down before any fluid; wet wipe only with 99% or better optical-grade isopropyl or ethanol, one pass per fresh swab; and on a color camera, the outer filter surface only, service behind it. If the camera is due for replacement rather than cleaning, the camera finder filters area scan cameras by sensor, resolution and interface, the configurator starts from the sensor, and the applications team answers through the contact page.

Questions

How do I tell dust on the sensor from dust on the lens?

Swap the lens. If the blob sits on the same sensor pixels with a different lens mounted, it is on the camera side. Then stop the aperture down two or three steps: a speck on or near the sensor sharpens as the f-number rises, while dust on the front element barely images at all. Front-element dust is also the fastest to clean.

Can wiping scratch the sensor's cover glass?

The protective glass over the sensor is hard: during wiping, only very hard particles — glass, sand, diamond — will mark it. Ordinary dust will not scratch. The practical risks are dragging a grit particle across the glass and leaving residue, so use fresh fluid and a fresh swab for every pass and let the fluid do the lifting.

What alcohol should I use to clean a camera sensor?

Optical-grade isopropyl or ethanol at 99% purity or better. Drugstore blends around 70% carry too much water: the water dries last and streaks the glass. Methanol-based fluids clean well but are toxic, so they are not worth the exposure on a production floor. Keep the bottle sealed and never pour used fluid back.

Can I clean the sensor of a color camera myself?

Only the outer surface. A color sensor sits behind a factory-mounted IR-cut filter, so the silicon is not reachable and must stay that way: the filter stack is an aligned optical part. Clean the outer glass through the mount like any other, and if dust or condensation sits behind the filter, the camera goes back for service.

Why do dust specks look worse at small apertures?

The cone of light reaching each pixel narrows as the f-number rises. A speck a millimetre or two in front of the sensor casts a shadow about as wide as the speck plus the cone width where it sits, so at f/16 the shadow is nearly sharp while at f/2.8 it spreads so thin it disappears. Inspections that stop down for depth of field need cleaner glass.

How often should sensor cleaning be scheduled?

On evidence, not on a calendar. Add a flat-field look to the maintenance round: image a uniform backlight at your production aperture and check whether any shadow inside an inspected region is large enough to trip your defect logic. With caps fitted whenever no lens is mounted, most line cameras go long stretches needing nothing more than air.