Application noteReading dot-peened 2D codes on metal
The short answer
Use dark-field lighting: a low-angle ring light placed close to the part. The flat surface stays dark and every peened dot lights up.
- Technique
- Dark field
- Industry
- Automotive and machined parts


What the camera sees
Camera views come from the lighting bench, which simulates each light on the same part.

Bright fieldDark fieldThe problem
Direct part marking (DPM) by dot peen puts a 2D code into the part as a pattern of small pits. There is no ink: the dots are the same material and colour as the surface around them. Under a ring light near the lens, the flat metal and the dots look almost the same, and machining marks or corrosion compete with the code.
Why it works
Light arriving at a low, grazing angle bounces off the flat surface and away from the lens, so the background looks dark. The walls of each pit face the light at a steeper angle and send part of it up into the camera. Each dot becomes a small bright point on a dark field, which a code reader can decode reliably.
How to set it up
- Mount the ring close to the part, so its light skims the surface. A dark-field ring works at short working distances; raised too high, it turns back into a bright-field light.
- Centre the code under the ring, so the dots are lit equally from every side.
- On rough or heavily machined surfaces the texture also catches the light. Increase the diffusion, or try a dome light, which evens out the texture.
- Laser-etched codes on smooth, flat metal change the finish rather than the shape, and often read better in bright field with a co-axial light.
- Red light with a monochrome camera gives good contrast and, with a matching filter, is less affected by room light.
What usually goes wrong
- The ring mounted at the lens instead of close to the part.
- A curved part: on a shaft, a ring only skims part of the code. Use a bar light along the axis, or a dome.
- Oil or coolant left on the part, which fills the dots and softens their edges.
Lights for this job
More application notes

Co-axial
Finding scratches and dents on ground or polished facesUse a co-axial light.
Backlight
Inspecting threads, profiles and gear teeth with a backlightUse a backlight.
Dark field
Finding burrs and chipped edges on machined partsUse dark-field lighting: a low-angle ring light close to the part, or bar lights from the sides.
Tell us what you need to see.
Describe the part, the defect and the working distance. An engineer replies with the light, or designs one.


