SLAA941 March   2020 TUSS4440 , TUSS4470

 

  1.   TUSS44x0 Software Development Guide
    1.     Trademarks
    2. 1 Introduction to High-Level Software Flow
    3. 2 Main Energia Sketch File
      1. 2.1 MCU Initialization
      2. 2.2 TUSS44x0 Configuration
        1. 2.2.1 TUSS44x0 Odd Parity Calculation
        2. 2.2.2 TUSS44x0 Settings
          1. 2.2.2.1 Driver Settings
          2. 2.2.2.2 Receiver Settings
      3. 2.3 Read Ultrasonic Time-of-Flight
        1. 2.3.1 Run Time-of-Flight
        2. 2.3.2 Post-Process Data
        3. 2.3.3 Convert Time-of-Flight to Distance
    4. 3 Energia Examples
      1. 3.1 GetDistance.ino - COM Terminal Input Example
      2. 3.2 VOUT_ADC_Capture.ino - Standalone Example
    5. 4 References

Convert Time-of-Flight to Distance

To convert time-of-flight to distance, use velocity = distance/time. More specific to ultrasonic time-of-flight to distance, use velocitysound = distanceto_object / timeof_flight_one_way for one-way measurements, and velocitysound = distanceto_object / (timeof_flight_round_trip / 2) for round-trip measurements. Note that the speed of sound varies as a function of transmission medium density and temperature, so TI recommends to use an external temperature sensor to measure ambient temperature to calibrate the speed of sound variable when converting time-of-flight to distance.

For example: If the time-of-flight for a round-trip measurement is 30ms, and the transmission medium is air at room temperature, then distance is calculated as shown in Equation 1.

Equation 1. distanceto_object = velocitysound × (timeof_flight_round_trip / 2) = 343 m/s × (30 ms / 2) = 5.145 m