SSZT532 february 2019 MSP430FR6043 , MSP430FR6047
Matt Calvo
With customers not only wanting but expecting the best performance and newest features in a product, it is now more important than ever to have a reliable yet innovative software library at that product’s foundation. TI had this ideology in mind when it built the ultrasonic sensing solution (USS) library to support its new line of ultra-low-power ultrasonic gas and water flow metering devices.
Interest in measuring flow can be traced back for centuries, but it was not until the end of the 19th century that flow rate became significantly more important to measure for industrial and utility purposes. The first flow meters invented were turbine flow meters, which consisted of multibladed rotors mounted at right angles to the direction of flow. Then came other solutions such as magnetic and Doppler flow meters, but all of these examples have their limitations. Mechanical turbine flow meters have moving parts that are subject to wear, and performance can degrade over time. Magnetic flow meters can only measure conductive liquids, while Doppler meters are far less accurate than their counterparts.
To mitigate all of these drawbacks, the industry turned to using ultrasonic technology to accurately measure flow. With ultrasonic flow meters there are no moving parts, which leads to an exceptionally long operation life. The use of ultrasound also enables high accuracy, regardless of the type of liquid or gas in the flow medium. The basis of this method relies on interpreting sound waves that propagate through the fluid. This interpretation can occur in mulitple ways, including time-to-digital (TDC) convertion, zero-crossing detection and waveform capture.
TI’s software-based solution uses the waveform-capture approach, depicted in Figure 1, for measuring the flow of water and gas. The software solution using the waveform-capture approach is superior to the TDC and zero-crossing detection methods because it can be reconfigured to account for different flow medium properties and sensor types.
Measuring the flow of fluid through a medium using ultrasonic waves involves electronically exciting a transducer and measuring the amount of time it takes for the emitted sound wave to propagate through that medium to another transducer. This process is repeated to obtain results both with and against the direction of flow, establishing a time differential that when analyzed determines the volume flow rate of the fluid. The waveform-capture-based approach to measuring flow involves capturing the full soundwave-induced voltage waveform at the receiving transducer using an analog-to-digital converter.
Once you have a digitized representation of the entire voltage waveform for the upstream and downstream measurements, you can use that data to perform post-processing techniques, such as cross-correlation, to calculate the volume flow rate. The USS library’s approach to calculating the flow rate has proven to be far superior to competing methods by providing better performance in zero-flow drift and noise suppression, while remaining robust to variations in signal amplitude, fluid composition and transducer variation.
The USS library is a highly comprehensive and intuitive suite of software resources and tools. Everything provided in the library, depicted in Figure 2, enables you to hit the ground running on an ultrasonic flow metering solution in just a matter of days. With the release of the MSP430FR6043, which supports flow measurement for both water and gas, we are releasing an updated version of the USS library that combines the USS software library and Ultrasonic Sensing Design Center graphical user interface (GUI) into one consolidated download on TI.com. For more information on the Ultrasonic Sensing Design Center GUI, check out our VIDEO: Ultrasonic gas flow meter software architecture.
The root directory of the USS library download is broken down into four folders: docs, examples, include and lib.
The USS software library itself is the foundation of the ultrasonic flow capture and measurement sequence and is divided into four components: library source code, library pre-compiled code, library configuration and the hardware abstraction layer. Figure 3 is a block diagram of a typical USS project, with the components of the USS software library highlighted in red.
The library source code is the first and largest component of the USS software library because it holds all of the APIs used to calibrate, configure and measure the flow measurement sequence. An in-depth description of these APIs and the code structures that pertain to them is located in the API user’s guide.
The second component of the USS software library is the only component provided in object format. It contains the APIs used to run the algorithms that calculate key parameters of the flow measurement process, such as absolute time of flight, differential time of flight and volume flow rate.
The third component is the USS library configuration. By default, the user configuration header file gives you full control of how the APIs are configured; aspects such as operating frequency, output power and sensor excitation method are all user-configurable. The newly integrated meter volume flow rate calibration header file gives you the option to calibrate the meter for multiple ranges of flow. The USS library user’s guide has more information on each configuration header file.
The fourth component is the hardware abstraction layer, which handles all of the communication to and from the low-level peripherals on the MSP430 device and the library’s APIs. These four components work in unison with the application code to provide a highly accurate, ultra-low-power, cost-effective solution for gas and water flow metering.
Visit the MSP430FR6043 or MSP430FR6047 product folders.
Get started with the EVM430-FR6043 USS evaluation module for gas metering OR the EVM430-FR6047 USS evaluation module for water metering.
Check out the MSP430 MCUs USS Design Center.
TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATASHEETS), DESIGN RESOURCES (INCLUDING REFERENCE DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS” AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.
These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable standards, and any other safety, security, or other requirements. These resources are subject to change without notice. TI grants you permission to use these resources only for development of an application that uses the TI products described in the resource. Other reproduction and display of these resources is prohibited. No license is granted to any other TI intellectual property right or to any third party intellectual property right. TI disclaims responsibility for, and you will fully indemnify TI and its representatives against, any claims, damages, costs, losses, and liabilities arising out of your use of these resources.
TI’s products are provided subject to TI’s Terms of Sale (www.ti.com/legal/termsofsale.html) or other applicable terms available either on ti.com or provided in conjunction with such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable warranties or warranty disclaimers for TI products.
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2023, Texas Instruments Incorporated