ECParts Toolkit LogoECParts Toolkit

Sensors Guide

Ultrasonic Ranging Design: Echo Windows, Multipath, and Error Budgets

Distance is the last step of a pulse-echo measurement. The harder work is deciding which echo belongs to which target, how long to listen, and how much trust to place in a return.

16 min · Intermediate · Updated October 16, 2026

Start with the Acoustic Path

Most compact ultrasonic range sensors launch a burst and detect a reflected wave. Their reported interval is round trip. Separate acoustic flight time from trigger width, firmware scheduling, analog blanking, receiver latency, and output-pulse convention. A board that starts its timer at the wrong event can show a constant distance offset even when the propagation equation is correct.

Formula reference

Air pulse-echo model

v(T) ≈ 331.3 + 0.606 T m/s, with T in °Cd = v(T) (t_echo - t_fixed)/2t_echo ≈ 2d/v(T) + t_fixedDelta d_timer = v(T) Delta t/2

Variable definitions

d is one-way distance to the reflecting surface
t_echo is measured round-trip time under the sensor timing convention
t_fixed is a characterized electronic/acoustic offset, not a guessed correction
The temperature approximation is for ordinary air over its specified useful range

Use the Ultrasonic Distance Calculator to evaluate echo time, distance, timer resolution, temperature corners, and timeout. It does not decide whether an observed pulse is a valid echo.

Design the Listening Window

The receive path cannot always hear immediately after transmission. The transducer continues ringing and the amplifier may recover from overload. Let t_blank be a characterized blind interval. A simple geometric lower bound is d_min ≈ v t_blank/2, but the real minimum also depends on echo amplitude, receiver threshold, transducer mechanics, and target reflectivity. Do not claim an accurate near range from timing arithmetic alone.

At the far end, calculate t_max = 2d_max/v_min and add bounded processing and clock margin. The slowest plausible propagation speed gives the longest expected echo delay. A timeout is an explicit no-echo state. Converting it into a numerical max-range reading destroys fault information, especially when a beam is obstructed or the target absorbs sound.

StageEngineering actionFailure to watch
Transmit and blankLaunch a burst and ignore receiver activity during ringing and recovery.Blind zone and firmware blanking must match hardware.
Open the echo windowStart timing at the sensor-defined acoustic reference, then admit echoes after blanking.Subtract any characterized fixed delay only once.
Select an echoUse a documented threshold, envelope, correlation, or first-valid-echo rule.Strong late reflections can displace weak early ones.
Convert timeApply the correct one-way or round-trip path factor and sound speed.Record temperature and medium assumptions.
Qualify the resultCheck signal quality, timeout, consistency, and geometry before filtering.A timeout is missing data, not a distance sample.

Worked Timing and Temperature Checks

CaseCalculationInterpretation
20°C airv ≈ 343.42 m/sUse a representative path temperature
1 m targett = 2/343.42 ≈ 5.82377 msRound-trip echo, no fixed delay
1 µs timing stepDelta d ≈ 0.17171 mmQuantization only, not total accuracy
300 µs blankingv t/2 ≈ 51.5 mmOptimistic geometric blind-zone bound
4 m maximum at 0°Ct ≈ 8/331.3 = 24.15 msAdd justified margin to set timeout
Uncorrected +10°CDelta v ≈ 6.06 m/sAbout 1.76% range scale error near 20°C

The +10°C example holds measured time fixed and compares the sound-speed estimates. It is a scale error, not an additive offset. A fixed electronics delay creates a different, approximately additive range error.

Build an Error Budget Before Averaging

Separate random repeatability from systematic bias. If a time estimate is shifted by Delta t, range shifts approximately v Delta t/2. If sound-speed estimate is shifted by Delta v, range shifts approximately t Delta v/2. These first-order terms must be evaluated at the operating distance and temperature. Target geometry and multipath may not be small independent perturbations, so they need scenario tests rather than a neat RSS sum.

Error sourceTypical effectControl
Timer tickQuantized range stepUse adequate timer resolution and capture hardware
Threshold jitterEcho-time scatter tied to SNRQualify echo envelope and repeatability
Path temperatureMultiplicative range biasMeasure representative air temperature
Fixed delayNearly constant distance offsetCalibrate against reference positions
Target angleMissed or weak returnConstrain target geometry and beam alignment
MultipathLate false rangeTest reflective surroundings and echo-selection rules
Cross-talkEarly false detection from adjacent modulesSchedule pings and isolate channels

The Sensor Calibration Calculator can fit a measured offset and slope, but calibration cannot rescue an unstable echo-selection rule. Retain raw time stamps, amplitude or quality data, timeout flags, and reference distance during calibration.

Multipath, Target Shape, and Multiple Sensors

The nearest object is not always the first accepted return. A smooth tilted target can specularly reflect energy away from the receiver, while a side wall creates a later, stronger path. Soft materials attenuate the echo; narrow posts may only partially fill the beam. Characterize first-valid, strongest, and tracked-echo strategies against the actual scene. Never switch strategies silently between firmware revisions.

Multiple ultrasonic heads can hear one another. Schedule bursts so the full maximum-range listening window and ringing interval of one measurement end before a neighboring head transmits, unless coding or synchronized processing has been validated. A median filter can reject isolated outliers, but it can also conceal a rapidly moving target or repeated systematic reflection.

Validation Matrix

Test more than one flat wall. Measure near and far endpoints, representative middle distances, angled and absorbing surfaces, shiny nearby structures, clutter, moving targets, and no-target cases. Repeat at cold and hot air temperatures, different supply voltages, and realistic mounting tolerances. Log valid-echo rate as well as distance error. A design that reports a plausible number for every invalid return is harder to debug than one that admits uncertainty.

For the wider sensor signal chain, see Motion, Distance, and Inertial Sensor Measurement Workflows. This guide owns pulse-echo deployment, echo qualification, environmental error, and validation rather than general accelerometer or ADC design.

Common Mistakes

  • Using one-way time of flight for a reflected echo.
  • Treating trigger width as acoustic flight time.
  • Subtracting an unmeasured fixed delay.
  • Setting timeout from nominal sound speed only.
  • Returning maximum range when no valid echo exists.
  • Equating timer resolution with sensor accuracy.
  • Ignoring transducer ringing near the target.
  • Assuming a strong late echo came from the nearest target.
  • Averaging systematic temperature bias.
  • Testing only one perpendicular hard target.

Support reference

FAQ

Why does pulse-echo ranging divide time by two?

The pulse travels to the target and the reflection travels back. One-way distance is d = vt/2 when t is the measured round-trip acoustic time.

Is the trigger pulse width the time of flight?

No. Time of flight is the interval between acoustic launch and the selected return echo, after accounting for sensor timing conventions and fixed electronics delay.

Why does a sensor have a minimum range?

Transducer ringing, transmit-receive switching, and receiver recovery can mask an early echo. The usable blind zone must be measured or taken from the sensor specification.

How should I set the echo timeout?

Calculate the round-trip time at maximum range using the slowest plausible sound speed, then add margin for receiver latency and uncertainty. The timeout must not imply that a missing echo is a measured maximum distance.

Can I correct range using air temperature?

Yes. Measure representative path temperature and update sound speed before applying d = vt/2. A single-point temperature reading may still miss a strong gradient along the acoustic path.

Does a fine timer guarantee accurate distance?

No. Quantization is only one term. Echo threshold jitter, propagation-speed error, target angle, multipath, mounting delay, and calibration can dominate.

Why can the nearest object be missed?

A weak or angled near reflector can return less energy than a later strong path. Receiver gain, thresholds, beam width, blanking, and echo-selection rules determine the reported target.

Can averaging remove a systematic temperature error?

No. Averaging reduces suitable random noise, but an incorrect sound-speed model or fixed delay produces bias that remains after averaging.

How do I verify an ultrasonic range design?

Test reference targets across range, angle, material, ambient conditions, nearby reflectors, and supply voltage. Record raw echo timing and no-echo events, not just the filtered distance.

Summary

Compute the round-trip path correctly, then engineer the receive window and echo-selection rule. Temperature, blanking, target geometry, and multipath often matter more than the timer tick. Verify both valid ranges and no-echo behavior with the actual mounted sensor.