An ultrasonic sensor used as a robot presence switch often compares measured distance with a near limit, far limit, or taught window. Hysteresis keeps small fluctuations from toggling the output repeatedly, but the limits must come from the real part and fixture envelope rather than one ideal teach cycle.
Separate measurement from the switching decision
The sensor first estimates distance from echo time. Internal logic then applies averaging, validity checks, thresholds, and hysteresis before changing the discrete output. The output can therefore remain stable while raw distance moves.
Read the exact product documentation for switching modes and response delay. A single switching point with hysteresis, a window, and a normally open or normally closed output produce different behavior at boundaries and during invalid echoes.
Teach the complete production distribution
Measure correct parts across position tolerance, surface finish, temperature, vibration, robot pose, and supplier variation. Include the maximum and minimum permitted distance, not only the nominal center.
Then measure empty fixture, wrong part, double part, displaced part, and every strong surrounding reflector. The valid window needs separation from all reject states plus a guard band for measurement uncertainty.
Hysteresis prevents chatter
Without hysteresis, a reading that oscillates around one threshold can switch on and off each cycle. Entry and exit thresholds separated by hysteresis make the state stable until distance moves far enough in the opposite direction.
Too little hysteresis creates output chatter and repeated robot decisions. Too much can hold a valid state after the part leaves or moves beyond the acceptable location. Specify maximum release distance and time as well as pickup distance.
Window direction matters
A window can accept only distances between near and far limits. Confirm whether the device switches inside or outside the window and how it treats the dead band, overrange, missing echo, and teach error.
Choose fail behavior deliberately. An invalid echo should not silently preserve a presence state indefinitely when the robot depends on current confirmation. Use output logic and diagnostics that match the process risk.
Filtering adds delay
Averaging and multiple measurements can stabilize noisy distance but delay detection of entry and exit. Combine sensor response delay, filtering, PLC input, task cycle, logic, and robot reaction in the timing budget.
At conveyor speed, convert delay to travel distance. A stable output that arrives after the pickup point is not useful. Relate the reading to the acquisition pose rather than the pose when the PLC finally processes it.
Fixture echoes can enter the window
A bracket or bin wall may return a stable echo within the taught range when the part is absent. Move likely reflectors and log raw distance. Test all robot and fixture states, including doors, clamps, full bins, and tooling changes.
Mechanical shielding, sensor angle, reduced range, or another sensing location is stronger than relying on a narrow threshold against an unstable false path.
Temperature and airflow move the distribution
Sound speed changes with temperature, and thermal gradients can bias a path beyond what local compensation corrects. Test cold start, warm production, drafts, and hot parts if those states exist.
Do not teach only after the machine is fully warm when startup production must also pass. Preserve environmental limits in the configuration record.
Use raw diagnostics during commissioning
Capture distance, validity or echo quality, switching output, robot pose, and part identity on one timeline. Plot histograms for accepted and rejected states. A visible overlap means threshold tuning alone cannot provide robust classification.
Set limits for false accept, false reject, chatter, release delay, and missing-echo behavior. Repeat enough cycles to include mechanical and material variation.
Protect configuration ownership
Record near and far limits, hysteresis or mode, teach method, filtering, output polarity, response delay, firmware, and sensor identity. Lock or control teach inputs so operators cannot redefine the window with an incorrect part.
After replacement, restore settings and repeat the full state matrix. Similar catalog range does not guarantee identical threshold behavior.
Keep process sensing separate from safety
An ordinary ultrasonic output can support part presence and quality decisions, but it is not personnel protection. If a false presence can create a hazard, use suitable risk controls and validated safety functions.
Design the robot sequence so a lost or implausible signal creates a controlled response, not an automatic blind retry.
Engineering rule
Build switching limits from measured distributions of correct and incorrect states. Use only enough hysteresis to prevent chatter while preserving required release position and time, and include response delay in robot motion.
A taught number is not a validation. The proof is separation between every allowed part trace and every reject echo across the production envelope.
Guard-band calculation
For each state, calculate the minimum distance from its measured distribution to the nearest decision boundary. Subtract sensor accuracy, temperature residual, robot pose error, part tolerance, and fixture movement. The remaining guard band must stay positive under the validated confidence method. If it vanishes, change geometry or add an independent feature instead of hiding overlap with filtering.
Test boundary behavior by moving a qualified target slowly through near and far limits in both directions. Record the entry and exit points, raw distance, output, and acquisition time. This verifies actual hysteresis and reveals whether the release point violates the robot's clearance requirement.
Sources checked November 4, 2026:
Pepperl+Fuchs, UB500 ultrasonic sensor technical data and switching behavior:
https://files.pepperl-fuchs.com/selector_files/navi/productInfo/edb/130227_eng.pdf
Pepperl+Fuchs, ultrasonic sensor technology overview:
https://www.pepperl-fuchs.com/global/en/classid_182.htm
Illustration note: The accompanying image is an AI-generated concept. It is not a sensor trace, teach record, product screenshot, or deployment evidence.