Speed of sound and beam geometry
Ultrasonic level and distance sensors measure the round-trip Time of Flight (ToF) of a 40–200 kHz acoustic burst in air. Because speed of sound varies strongly with air temperature (~0,17 %/°C):
- c(T) = 331,3 · √(1 + T / 273,15) m/s
- t_echo = 2 · d / c(T)
- D_beam = 2 · d · tan(θ / 2)
Worked example
At 3,0 m target distance, 20 °C air and a 10° full beam angle:
- c(20 °C) = 343,2 m/s
- Round-trip echo time = 17,48 ms (max ping rate ~38 Hz with 1,5× decay guard)
- Beam spot diameter at target = 0,52 m (keep tank walls > 0,26 m from centerline)
Frequently asked questions
How much error does air temperature cause without compensation?
Air speed of sound changes by roughly 0,17 % per °C (about 0,6 m/s per °C). A 30 °C swing from 20 °C causes roughly 5 % range error (~150 mm at 3 m) unless temperature compensation is enabled.
Why does beam angle matter inside a tank or silo?
Any weld seam, ladder rung, inlet pipe or agitator blade inside the full beam diameter D_beam reflects an early false echo that locks the level reading above the true liquid surface.
Can ultrasonic sensors measure accurately in vacuum or steam?
No — acoustic waves require air/gas molecules and attenuate heavily in dense steam, foam or heavy dust. For vacuum, steam or high-pressure tanks, use 80 GHz FMCW radar or hydrostatic differential pressure.