Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Ultrasound reads about 3 cm short in warm air: separate sound-speed error from the 24 MHz oscillator

The ultrasonic ranging prototype for warehouse storage locations, aimed at a flat reflector fixed at one meter, yields a reading close to one meter in the morning but approximately 97 centimeters in a warm environment, while the 24 MHz clock on the board remains within normal range. This result cannot be immediately attributed to the crystal oscillator. Ultrasonic ranging first measures the time elapsed until the echo returns, then converts this duration into a one-way distance using the speed of sound; within the same distance, sound travels faster in warm air, causing the echo to return earlier. If the software still multiplies this shorter time interval by the speed of sound in cold air, it will calculate a distance that is too short.

Using an independent low-voltage warehouse ranging board and a fixed test reflector as the R&D scenario, analyze the synthesized or existing time-stamped records. Do not connect to the production line, do not perform personnel detection, and do not alter device actions. The critical validation decision is: should the deviation varying with temperature and distance be prioritized for inclusion in the speed-of-sound model, or does it belong to timer frequency inaccuracy? Only with the two pieces of evidence separated can procurement determine whether to tighten the frequency tolerance of the reference crystal oscillator.

Separate the measured round-trip time from the distance calculation

Echo flight time is the total time for sound to propagate from the sensor to a reflecting surface and back. The ideal one-way distance equals the measured round-trip time multiplied by the propagation speed, then divided by two. If the time reading is correct but the used speed of sound differs from the actual value, a proportional distance error still occurs. The speed of sound approximation model describes air conditions, not circuit compensation coefficients. Air temperature, temperature distribution along the path, gas conditions, and other factors may affect propagation; this paper uses a simplified model for ordinary air to estimate the order of magnitude of temperature effects, without guaranteeing distance accuracy for all field environments.

The crystal oscillator participates in the preceding step. Assuming this design derives a 24 MHz reference using a fixed clock ratio to the capture timer, the timer counts the number of periods between two defined events. Beyond reference accuracy, verification must also confirm which clock domain the derived clock belongs to, whether the prescaler is correct, and whether the start/stop markers correspond to the actual echoes. Observing the correct 24 MHz on the board merely indicates that the relevant point has this clock; it does not imply that the capture unit necessarily interprets the period count at this frequency. Conversely, confirming normal capture using an independent, known electronic time interval does not imply that the speed of propagation in air equals the software configuration.

One verifiable part number is the SX3M24.000B10G40TNN oscillator from SCTF (Shenzhen SCTF). It is a 24 MHz, nominal 3.3 V, CMOS output oscillator in a 3.2 mm × 2.5 mm SMD package. The manufacturer's corresponding datasheet specifies an initial frequency tolerance of ±10 ppm, a frequency stability of ±50 ppm, and an operating temperature range of -40°C to +105°C. Do not sum these two frequency deviation fields without considering their coverage ranges, nor infer that acoustic ranging has already been automatically compensated because the device can operate in high-temperature environments. The rationale for selecting this candidate is to provide a calculable time budget for the timer, not to assert that any commercial ranging device already uses this model.

A change from 20 °C to 40 °C predicts the direction of error

The approximate speed of sound in ordinary air can be calculated as 331.5 plus the Celsius temperature multiplied by 0.6, yielding a result in meters per second. At approximately 20°C, the speed is about 343.5 m/s, and at 40 °C, it is about 355.5 m/s. Assuming a fixed reflector distance of 1 meter, the round-trip time under uniform 40°C conditions is approximately 2 divided by 355.5 seconds, or about 5.63 milliseconds. If the software continues to convert using the 20°C speed of sound, it yields 343.5 divided by 355.5 meters, approximately 0.966 meters, which is 3.4 centimeters lower. The calculation does not account for the actual reflector geometry, nor does it assume that the reflecting edge will not change; it merely indicates that the error magnitude observed at this level can be explained by the speed of sound formula.

Performing a first-order estimation with the same ratio: if the timing reference has proportional errors of fifty parts per million, a one-meter scale corresponds to approximately 0.05 mm. The value of fifty is used for order-of-magnitude comparison, not as the system error upper limit, and does not account for quantization, detection thresholds, gating, or on-board algorithms. While error performance can be improved when timing base deviation conditions are met, it is incorrect to equate tens of micrometers in the error budget with several centimeters without compensation. If the error magnitude is inconsistent with the capture prescaler, the prescaler must be verified first; one cannot assume that a higher-precision same-frequency crystal oscillator will correct fixed-multiple errors.

Observation with a fixed reflectorCheck firstConclusion not established
Echo arrives sooner in warmer air, and the cooler-air conversion gives a shorter rangeAir temperature along the path and the conversion usedThe oscillator drifted out of spec
A known electronic interval is measured with a proportional errorCapture clock path, reference and count conversionTemperature compensation alone will fix it
Distance error is nearly the same number of millimeters at different rangesFixed delay, distance datum and echo selectionAn error proportional to sound speed
Echo shape, amplitude and selected peak all change with temperatureReflector and detection criteriaOne temperature factor is sufficient for acceptance

Compare two known distances for a scale error or a fixed offset

First, clearly identify the source of the temperature reading. A value located on the panel immediately adjacent to the processor may represent the thermal state near the board rather than the entire air path. For a prototype in an indoor environment with approximately uniform air conditions, a validated environmental point can serve as an initial input; however, if one segment of propagation passes through a cold doorway and another segment is inside a warm storage area, a single measurement point may not represent the entire path. Do not assume that because the sensor temperature and the displayed reading change in sync, it can be directly used as the correct compensation value. Ensure the validation report explicitly clarifies the temperature source, measurement location, sampling timestamp, and its correspondence with the echo record.

Use two additional verified fixed distances to preserve the original echo time, environmental conditions, and pre/post-conversion results. A proportional error typically amplifies when distance increases, whereas distance deviation caused by fixed start-end delays does not necessarily scale proportionally with distance; the two can superimpose, so the two distances serve only as preliminary evidence for distinguishing direction, not as a diagnostic endpoint. For rework boards or material-exchange boards, repeat the verification using the same target, attitude, and confirmed algorithm. Do not save only the integer centimeters displayed on the final screen; if the original numbers have already been rounded, it becomes difficult to distinguish whether changes originate from the sound speed model or the decision window.

When procuring reference samples, consolidate the complete part number, power supply, logic level, and applicable frequency deviation into a single item, while listing the entire system's allowable environmental conditions and ranging error as a separate item. If the original project's acceptance criteria only cover room temperature, a new warm-temperature region requires additional boundary validation; do not simply adopt the old ranging commitment by selecting a clock with a wider temperature range. If a significant proportional error persists under specified conditions, provide separate validation evidence for acoustic conversion and electronic timing, avoiding the repeated attribution of the same error across two reports.

Frequently asked questions

Adding a temperature sensor does not eliminate the need to consider oscillator accuracy. The temperature sensor improves propagation delay estimation, while the oscillator and counter still determine the time scale. First, quantify the two types of errors separately, then allocate the budget according to project requirements; one component cannot substitute for the acceptance criteria of the other chain.

Why does a zero-point calibration performed at room temperature still show deviation in hot weather? A single zero-point correction typically only compensates for the fixed offset under that specific condition. If the speed of sound estimate varies proportionally with the environment, a new combination of distance and temperature may still alter the error. Retaining multiple distance conditions and electronic time references is more indicative of whether the design is robust than adjusting to match a display reading against a single room-temperature sample.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.