JAJU680A January   2019  – July 2022

 

  1.   概要
  2.   Resources
  3.   特長
  4.   アプリケーション
  5.   5
  6. 1System Description
    1. 1.1 Key System Specifications
  7. 2System Overview
    1. 2.1 Block Diagram
    2. 2.2 Design Considerations
      1. 2.2.1 Flow Measurement
      2. 2.2.2 ToF Measurement
        1. 2.2.2.1 ADC-Based Acquisition Process
        2. 2.2.2.2 Ultrasonic Sensing Flow-Metering Library
      3. 2.2.3 Low-Power Design
        1. 2.2.3.1 Energy-Efficient Software
        2. 2.2.3.2 Optimized Hardware Design
        3. 2.2.3.3 Efficient Use of FRAM
        4. 2.2.3.4 The LEA Advantage
    3. 2.3 Highlighted Products
      1. 2.3.1 MSP430FR6043
      2. 2.3.2 OPA836 and OPA838
      3. 2.3.3 TS5A9411
    4. 2.4 System Design Theory
      1. 2.4.1 Signal Processing for ToF
  8. 3Hardware, Software, Testing Requirements, and Test Results
    1. 3.1 Required Hardware and Software
      1. 3.1.1 Hardware
        1. 3.1.1.1 EVM430-FR6043
      2. 3.1.2 Software
        1. 3.1.2.1 MSP Driver Library (MSP DriverLib)
        2. 3.1.2.2 Ultrasonic Sensing Flow Metering Library
        3. 3.1.2.3 Application
          1. 3.1.2.3.1 Application Customization
          2. 3.1.2.3.2 LCD Stand-Alone Mode
        4. 3.1.2.4 USS Design Center (PC GUI)
      3. 3.1.3 Transducer and Meter
        1. 3.1.3.1 Frequency Characterization of Transducer and Meter
    2. 3.2 Testing and Results
      1. 3.2.1 Test Setup
        1. 3.2.1.1 Connecting Hardware
        2. 3.2.1.2 Building and Loading Software
          1. 3.2.1.2.1 Using Code Composer Studio IDE
          2. 3.2.1.2.2 Using IAR Embedded Workbench IDE
        3. 3.2.1.3 Executing Application
        4. 3.2.1.4 Configure Device and Observe Results Using GUI
        5. 3.2.1.5 Customization and Optimization
      2. 3.2.2 Test Results
        1. 3.2.2.1 Single-Shot Standard Deviation
        2. 3.2.2.2 Zero-Flow Drift
        3. 3.2.2.3 Absolute Time of Flight Measurements
        4. 3.2.2.4 Variability in Zero Flow Drift Across Transducers
        5. 3.2.2.5 Flow Measurements
        6. 3.2.2.6 Average Current Consumption
        7. 3.2.2.7 Memory Footprint
  9. 4Design and Documentation Support
    1. 4.1 Design Files
      1. 4.1.1 Schematics
      2. 4.1.2 Bill of Materials
      3. 4.1.3 PCB Layout Recommendations
        1. 4.1.3.1 Layout Prints
      4. 4.1.4 Altium Project
      5. 4.1.5 Gerber Files
      6. 4.1.6 Assembly Drawings
    2. 4.2 Software Files
    3. 4.3 Related Documentation
    4. 4.4 Terminology
    5. 4.5 Trademarks
    6. 4.6 サポート・リソース
  10. 5About the Authors
  11. 6Revision History

Signal Processing for ToF

Equation 5 gives the signal processing for time of flight.

Equation 5. r 2 i   =   r 2 i f s  

where

  • fs is the sampling rate of the ADC.
  • i is the index of the sample.
  • r2(t) indicates the received ultrasonic signal at the output of the transducer 2 (downstream capture).

Similarly, let the received signal at transducer 1 (upstream capture), r1(t), be represented by the data vector, see Equation 6.

Equation 6. r 1 - = r 1 1 ,   r 1 2 ,   r 1 3 ,   . . . ,   r 1 N  

As an example, for the sampling frequency of fs = 4000 kHz and capture duration of 40 µs, the size of the received data vectors N = 160.

Based on r1 and r2 , a correlation value, corr(k), is calculated as Equation 7.

Equation 7. c o r r ( k )   =   i = 1 N   r 1 i + k r 2 k ;   f o r   k   =   - m ,   - ( m - 1 ) ,   . . . ,   - 1 , 0 , 1 ,   . . . ,   ( m - 1 ) ,   m

where

  • values for r1i , r2 i = 0 for i < 1
  • i > N

The maximum of the correlation is calculated as Equation 8.

Equation 8. k ^ =   m a x k c o r r ( k )

where

  • Z-1 = corr(k–1)
  • Z0 = corr(k)
  • Z+1 = corr(k+1)

These variables are the correlation values at and near the maximum. The real maximum of the correlation is now given by an interpolation (see Equation 9).

Equation 9. δ   =   i n t e r p m a x Z - 1 ,   Z 0 ,   Z + 1

The DToF is now given by Equation 10.

Equation 10. T 12 c o r r   =   k ^ - m + δ

For efficient implementation, m is chosen as +1, implying that only three correlations (Z-1, Z0 , and Z+1) are computed most of the time. Figure 3-3 shows the previous relationships.

GUID-D6500780-12F7-49D2-8B02-5F2EBFFC73EC-low.png Figure 3-3 Interpolation Step for Differential ToF

The correlation-based ToF calculation has been reported in the literature previously, as given in the MSP430FR58xx, MSP430FR59xx, and MSP430FR6xx Family User's Guide. Efficient interpolation techniques are given in the EVM430-FR6043 Hardware Guide. As previously mentioned, for efficiency of implementation, the correlation is only computed over a few points, leading to a low-power implementation.

Estimating an accurate absToF in gas means that a temperature sensor is not needed to compute the velocity of sound in gas. In the USS SW Library used in this reference design, the absToF is determined by computing the envelope of the received signal. A maximum of the signal for each capture is first computed. The envelope crossing as a given ratio of this maximum is then determined. The absToF is then calculated by a constant offset from this threshold crossing of the envelope, as shown in Figure 3-4 and Equation 11.

GUID-C393E05F-6F72-478E-B1BD-59565BF430E8-low.png Figure 3-4 ADC Captured Waveform and Envelope for AbsToF Calculation

The UPS and DNS absToF are given by Equation 11.

Equation 11. T u p s a b s   =   T p r o p   +   T t h r e s h u p s   -   T o f f s e t T d n s a b s   =   T p r o p   +   T t h r e s h d n s   -   T o f f s e t

where

  • Tprop is the propagation time which is pre-programmed from USS Design Center GUI or application configuration and corresponds to approximate propagation time for the ultrasound signal in the given meter.

Typically, this value can range from 35 to 70 µs. The threshold parameters, Tthreshups and Tthreshdns , correspond to the time from the ADC trigger to the envelope crossing a certain ratio (typically chosen to be 20%) of the signal maximum.