How to Detect Black Objects with Photoelectric Sensors
For opaque black objects, start with beam interruption: through-beam if both sides are accessible, or polarized retro-reflective if a reflector fits. With access from only one side, evaluate background suppression or distance sensing using the actual black target. The right choice depends on opacity, surface finish, background separation and speed—not color alone.
Choose the sensing method from the available space
A black object does not always need a special sensor. First decide whether you can detect it by blocking an established light path. That avoids relying on a strong reflection from the part itself.
| Your application | Start with | Confirm before selection |
|---|---|---|
| Opaque part; access on both sides | Through-beam sensor, or opposed fiber heads for a confined space. | The smallest feature blocks enough of the beam at every allowed position. |
| One wired side; space for a reflector opposite | Polarized retro-reflective sensor with its specified reflector. | Minimum range, reflector alignment, target coverage and response to glossy surfaces. |
| Only one side accessible; no reflector | Background-suppression (BGS) or distance sensor with black-target data. | Enough returned light and separation between all target-present and target-absent conditions. |
| Black part on a black belt or panel | Distance-based sensing if the part creates a usable height difference. | Height tolerances, belt movement, spot position and the model’s detection limits. |
| Black printed mark on packaging | Contrast or color-mark sensing. | Mark-to-background contrast, gloss, spot fit and mark duration at production speed. |
| Dark film or translucent plastic | A transmission test; consider a sensor designed for transparent objects. | Whether the actual material attenuates the chosen wavelength enough. Visually black does not prove opaque. |
Conceptual optical paths, not mounting drawings. Dashed lines indicate a blocked path or a cutoff boundary; diagrams are not to scale.
Through-beam and retro-reflective: detect the interruption
For an opaque target, these arrangements can avoid the weak-return problem of ordinary diffuse sensing. Through-beam requires an emitter and receiver on opposite sides. Retro-reflective keeps both optical functions in one housing but still needs a reflector across the path. This distinction is explained in OMRON’s photoelectric sensing overview.
Do not choose from range alone. A large beam can remain partly clear around a narrow black tab; a ring may pass with its open center on the optical axis. Place the beam on a reliably present feature. On glossy parts, use the correct polarized sensor/reflector combination and test the full angle range: mirror-surface rejection is helpful, but not a guarantee for every shiny film or curved surface.
One-sided sensing: qualify the return and the background
BGS and distance sensors are useful when an opposite receiver or reflector cannot be installed. BGS commonly uses optical triangulation; other distance sensors may use time of flight. They still need a usable signal from the target. “Background suppression” does not mean unlimited black-object range or immunity to every surface.
Ordinary diffuse sensing can also work at a suitable distance with adequate contrast and margin. It needs evidence on the actual dark part, especially with a bright background. For the broader geometry trade-offs, see the through-beam, retro-reflective and diffuse comparison.
Why a black part can still be difficult to detect
For reflective sensing, the receiver needs enough useful light from the intended area. A part’s visible appearance tells you only part of that story.
Matte black and glossy black create different problems
A matte black surface may return too little light at the chosen distance. A glossy black surface can instead send a strong reflection in a narrow direction: a small change in tilt or curvature can move that return away from the receiver—or produce glare at another position.
Test the molded radius, seam, textured patch and any oil or protective film that the beam may actually hit. A flat sample held squarely in front of the sensor is not equivalent to a rotating molded part.
Visible black does not predict every wavelength
Materials reflect and transmit light differently across wavelengths. A part that looks black to your eyes may behave differently under red or infrared illumination. Changing pigment, resin or coating can change the result even when the parts look similar.
Red, infrared or blue illumination should therefore be compared on representative samples. “Laser” describes the light source, not a universal black-object solution; its wavelength and spot geometry still matter.
OMRON’s engineering guidance discusses surface color, light-source reflectance, small-object detection and glossy-surface rejection. Apply the data to the specified model and target—not every sensor that uses the same light color.
Do not start by turning sensitivity to maximum. That may help a weak target switch, but it can also make a reflective background switch. Light-ON and Dark-ON change output logic; they do not increase the optical signal or make an unsuitable geometry reliable.
Black-on-black detection needs a measurable difference
When both the part and background are dark, brightness contrast may be weak. A raised part offers another distinction: its surface is closer to the sensor. The important question becomes whether that distance difference remains distinguishable throughout the allowed movement and tolerances.
Black foam on a black automotive door panel
Banner describes using Q4X triangulation-based laser sensors to check foam and other components on dark door panels. The application uses height differences to distinguish presence from absence at four inspection positions, rather than relying only on color contrast. Read Banner’s application description.
What transfers to your machine: look for a usable geometric difference. The application does not establish a minimum detectable height for your sensor, nor prove that another model will detect the same parts.
Why a single cutoff can fail on a moving belt
Suppose testing across all allowed positions produces these distances from the sensor:
Top of the black part90–96 mm
Belt with no part present94–102 mm
The conditions overlap at 94–96 mm. No single distance cutoff can classify every part-present condition separately from every belt-only condition. A more precise distance reading does not remove this geometric overlap.
Next move: reduce belt or part movement, aim at a different feature, arrange beam interruption, or use another independently distinguishable signal. If the ranges do not overlap, still allow for the chosen model’s switching uncertainty, hysteresis and surface-dependent shift.
If the task is a black registration mark on a flat surface, there may be no useful height change at all. That is a contrast-detection task. A BGS sensor designed to ignore color changes is not automatically the right instrument.
Read the black-target data, not just the headline range
A range measured using a standard white card is not a guaranteed operating distance for a small black rubber part. Before comparing candidate models, resolve four specifications.
- Target-specific range and test conditionsAsk what target material or reflectance reference was used, its size, distance and angle. If a curve refers to “6% remission,” that is a stated low-reflectance test condition—not proof that your visibly black sample behaves identically. Check the usable minimum distance as well as the maximum.
- Black-white shift and switching stabilityFor BGS, black-white shift describes how the switching distance changes between specified black and white targets. Hysteresis is the difference between switching-on and switching-off positions for a target moving in opposite directions. Neither is the same as measurement accuracy or repeatability. Keep the real target and background away from uncertain switching boundaries.
- Spot size at the working distanceThe spot must land on the feature you intend to inspect despite part-position variation. A fine spot can miss a narrow tab, enter a hole or cross a curved edge. A larger spot can include the background. Compare the actual feature with the model’s spot diagram; see why beam spot size matters for small objects.
- Response settings and invalid-signal behaviorCheck the response time for the selected teach, averaging or stability mode, not only the fastest catalog setting. For a measuring sensor, confirm how weak, missing or out-of-range returns appear in the output and controller. An invalid measurement must not silently become an accepted “part present” result.
Pepperl+Fuchs’ BGS selection guidance explains minimum range, spot coverage, hysteresis and black-white difference. Its example values are not specifications for a different product.
Teach both real conditions. Use the exact model’s procedure with the worst acceptable part and the real no-part background where that teach mode supports both. Do not assume that every adjustment knob changes distance, or that a teach sequence from another sensor applies. Record the final parameters so replacements can be checked consistently.
Can the sensor and PLC capture a fast-moving part?
A setup that switches correctly while stopped can still miss parts in motion. The relevant time is how long a reliably detectable feature stays in the sensing zone—not simply the conveyor’s overall cycle time.
A 6 mm feature at 1.2 m/s gives about 5 ms
In this illustrative example, 6 ÷ 1.2 = 5 ms. That is a geometric estimate of the available detection window, not a guaranteed 5 ms electrical pulse. Beam overlap, edge shape, response delays and configured filters can change the pulse seen at the output.
Check sensor ON and OFF response times, any delay or pulse-stretch setting, the PLC input filter and the controller’s actual capture method. A normal cyclic input, a latched input and a high-speed counter do not capture short events in the same way.
Also measure the smallest gap between parts. Pulse stretching may make a short event easier to capture, but can merge adjacent events if the output does not reset between them. There is no universal “two times faster” rule that approves the whole chain.
Acceptance check: at maximum operating speed, compare the physical part count with the sensor output and the PLC count using suitable diagnostics. Repeat with the smallest feature, shortest gap and worst surface orientation. Conveyor-specific event definitions are covered in the counting, presence and position guide.
Troubleshoot by changing one condition at a time
Use the symptom to form a hypothesis, then test that hypothesis. A missed black object does not by itself prove that the sensor needs more sensitivity or a shorter distance.
| What you observe | Possible explanation | Useful next check |
|---|---|---|
| White sample works; black sample does not | Insufficient return, surface-dependent switching shift or transmission through the dark sample. | Keep size and position constant. Compare signal or distance diagnostics with the actual materials and the model’s black-target data. |
| The part works at only one angle | Specular reflection, glare or a spot crossing an edge. | Vary only the allowed part angle. Note where the spot lands and whether the signal becomes weak or saturates. |
| The empty belt sometimes registers as a part | Background entering the accepted region, a shiny patch or insufficient target/background separation. | Run the empty belt through its full movement, including seams. Compare its closest position with the farthest acceptable target position. |
| Stopped tests pass; production counts do not | Short detection window, inadequate reset gap, motion-related spot movement or controller capture limits. | Compare the sensor output pulse and the PLC event at increasing speed. Check both target and gap duration. |
| The sensor indicates detection; the PLC does not | Output/interface mismatch, wiring, input filtering or a missed short pulse. | Confirm what the LED actually indicates. Have a qualified person check the exact wiring diagram, PNP/NPN compatibility and input timing. |
| Detection drifts over a shift or after a batch change | Lens contamination, loose alignment, material variation or changed settings. | Compare with the recorded baseline and a retained sample. Inspect optics and mounting, then test a new-batch part without changing several settings at once. |
For faults beyond black-target behavior, use the photoelectric sensor troubleshooting checklist. Secure the machine before moving brackets or targets; follow the site’s safe test procedure for powered measurements and motion trials.
Validate the final setup before production
One clean sample and one successful switch are a starting point. A useful validation record shows what was tested, what could change and whether the controller captured the intended event.
- Define what must be detected.Specify presence, count, leading edge, mark or missing component. Identify the smallest required feature and any unwanted feature that must be ignored.
- Challenge the accepted part range.Include material batches, matte and glossy finishes, curvature, position limits and permitted contamination. Keep known-good and known-bad examples separate.
- Test the installed geometry and timing.Use the final bracket, background, reflector and cable arrangement. Include no-part conditions, maximum speed, minimum gaps and neighboring sensors operating.
- Record results and change triggers.Save exact model, settings, distances, samples, test count, misses and false detections. Recheck after relevant changes to the part, mounting, firmware, response mode or controller filtering.
Set the acceptance criteria for your process before testing. If the allowable misses or false detections have not been defined, report the observations without calling the installation validated. A short zero-miss trial is not proof of a zero failure rate.
What to send when asking for a sensor recommendation: representative black samples, a dimensioned view of the available mounting space, target/background distances, minimum feature and gap, maximum speed, required output and the current failure symptom. If you are comparing xsz sensor background-suppression options, request evidence for the exact proposed model under those conditions before approving a substitute.
This guide addresses process detection. Ordinary photoelectric sensors are not a substitute for protective devices and a validated safety function where personnel protection is required.