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.
Figure 1: System block diagram for ultrasonic sensing using the MSP430FR604x
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.
Figure 2: Offerings of the MSP430™ USS library
The root directory of the USS library download is broken down into four folders: docs, examples, include and lib.
The docs folder houses all of the documentation and user guides associated with the USS software library, the Ultrasonic Sensing Design Center GUI, and the application programming interfaces (APIs) that execute and configure the flow measurement sequence.
The examples folder contains a template example and integrated development environment project files for both the MSP430FR6043 and MSP430FR6047. The provided template example shows the basic usage of the library’s APIs and showcases a typical software flow in an ultrasonic flow metering application.
The include folder holds header files that define important aspects of the project, such as error message codes, fixed-point math definitions and library structures.
The last folder, lib, comprises full and memory-optimized versions of the USS software library to enable the analysis of all options for flow-measurement computation. You can then narrow the library down to your preferred option to save memory in the final design.
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.
Figure 3: Software block diagram for ultrasonic sensing using the MSP430FR604x
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.
For additional information on ultrasonic sensing:
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.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.