MATLAB and Android Synergy
Collecting Vibration Data with a 333D01 and an Android Phone while Analyzing With MATLAB
What makes the 333D01 USB Digital Accelerometer a great device for data acquisition? Extreme portability.
Why not use a device most people already carry around? The smart phone.
An Android phone and MATLAB make for an easy solution to acquire data in the field and analyze in the comfort of the office.
Since vibration measurements often occur in hard-to-reach places, lugging a laptop to acquire data may not be a convenient option. Recording data directly onto a phone and analyzing that data with a quick MATLAB program becomes an easy task with little user interaction.
Developing a graphical user interface (GUI) in MATLAB optimized to read .WAV files with 333D01 calibration information was straightforward. The Android data recorder app is optimized for use with the 333D01. The Digiducer proves how feasible data collection on a phone has become. The phone can capture data from the 333D01 sensor and analyze it via computer in a few short steps. All that’s needed is a USB to micro USB connector, a sensor and a phone. The MATLAB script is available from Digiducer.com.
The USB Audio Recorder app by Daniel Sobe and Dr. Jordan is found at www.Digiducer.com/pages/software. As it is both free and easy to use, this app is able to facilitate both the acquisition and exportation of the collected data.
In this application, the user placed the sensor on an air compressor and set up the app acquisition settings. The sensor had a magnetic base for mounting. This is one of many options that could be used, such as bolting or gluing the sensor. Although a magnetic base allows the user to collect data on metal surfaces, the trade-off for convenience is the accuracy of the higher frequency response.
After selecting a USB device, the app prompts for sample rate and sample resolution. The app offers a broad spectrum of sample rates and serves as a very simple interface for a quick data acquisition process. All sample rates are supported by the 333D01. The user selected 8000 Hz deducing that the vibration would be low frequency and 24 bits for best accuracy. Even better, the app writes complete calibration data into the WAV file to ensure data scaling would be problem free.
After collecting initial data, the WAV file, including the embedded full sensor calibration along with the measured data, was sent via email to a computer for MATLAB analysis. All files were placed in the same folder as the .WAV file analyzer. This is what makes the phone method of acquisition so appealing – it’s portable and there are many optional ways to transfer your data.
The user then ran the WAV file through the script, ‘Digiducer_Data_Analyzer.m’ for analysis. The GUI itself is also very user friendly and requires minimal input. The GUI automatically does all scaling necessary to provide data in calibrated engineering units. The program reads information from the WAV file, including the scaling for engineering units such as g’s and serial number, and is able to display them according to the user’s input settings. The scaling is traceable back to national standards.
Afterward, the user may input the desired settings and click on ‘Select File & Analyze’ to choose the data file. Although this requires the user to do little for the inputs, the GUI will still display accurate and precise data.
The GUI extracts the calibration information embedded in the WAV file then displays the serial number, sample rate of the data, date of calibration, the length of measurement in seconds, sensitivities for the separate channels, average and instantaneous frequencies and magnitudes, the average and instantaneous frequency spectra as well as the wave function. The program immediately displays scaled data according to the sensor’s sensitivity and creates readable graphs. The return on the investment of time is huge. Little effort was put into the data acquisition and analytical processes that can now be repeated for numerous test situations.
The Android app makes it easy to record data with a phone instead of toting a computer around. This is especially appealing for users taking several tests at several different sites. The luxury of using the phone for recording is convenient and the GUI allows for a quick analysis in the comfort of one’s own office.