Welcome! This page has been built to support engineering instructors and students in conducting measurements of vibrating objects using contact and non-contacting sensing with mobile devices. These methods can support inquiry-based laboratories, providing students with the tools to measure the static and dynamic response of any structure they can conceive and load.
A variety of phone-based measurement methods is listed and linked here:
Use the accelerometer built into your phone to measure accelerations from 0.0005 to 1 g in magnitude at frequencies between 0.5 and 50 Hz (higher for some phones!).
Use the LiDAR sensor on iPhone Pro models to measure time varying displacements as small as 0.1 mm at distances of 0.25 to 3 meters.
Indirectly measure the vibration of ferrous objects by sensing a changing magnetic field.
Record video and identify the natural period of vibration by including a stopwatch in the video. Simple but effective!
Use a purpose-built app to "freeze" the motion of a harmonically oscillating object by adjusting the frame rate of video capture.
Use a purpose-built app to identify the position of features in a video to track with time.
Use your phone to measure inclination and track rotations of structures. This is less effective for vibration measurement, but excellent for static load testing.
Use your phone to measure the rate of rotation to determine the torsional or rotational natural frequencies of structures.
My friends in Germany have a wonderful saying "Wer misst, misst mist," which translates as "Who measures, measures manure." In just a few words, they encourage you to consider the quality of your measurements if you plan to measure at all. The saying assumes we can't measure accurately, so let's try to fix that with some discussion of measurement quality.
When working in the time domain, time resolution is the primary limitation. For example, a millisecond clock app can be found, but it is limited by the resolution of the internal clock on a phone as well as the refresh rate of the screen (usually 60 Hz but sometimes 120 Hz). You can improve the accuracy of frequency estimates by measuring the duration of as many cycles as possible and dividing by the number of cycles to determine the period.
Period (sec) = (duration of multiple cycles)/(number of cycles)
Frequency (Hz) = 1/period
The apps described on this site will require regular use of this calculation method. PhyPhox offers a particularly good interface for collecting and analyzing data to determine the duration of multiple cycles. See the magnetometer example.
When applying a Fast Fourier Transform (FFT) to a time history, the resolution of the frequencies represented in the resulting frequency spectrum is a function of the sampling rate of the data collection and the number of samples collected. More specifically, the frequency resolution is equal to the sampling rate divided by the number of samples. A 10-second measurement with a sampling rate of 100 Hz would have 1000 samples. The frequency resolution would be 100 Hz divided by 1000 samples, or 0.1 Hz. Collecting more data would improve the frequency resolution. Doubling the length of the measurement to 20 seconds would cut the frequency resolution in half to 0.05 Hz.
The FFT can only be applied to time series with lengths of powers of two, or 2^n, which further restricts the size of data collection windows. Frequencies can only be identified up to half of the sampling rate of the device (the so-called Nyquist folding frequency). Many phones sample at 100 Hz, so 50 Hz is the highest measurable frequency without considering aliasing.
The sample rates of sensors on most mobile phones are related to the frame rate of a camera (often 60 frames per second) or the sampling rate of the phone (often 100 Hz, but up to 400 Hz on some phones). Given the limitations of the phone and the FFT, Table 1 is helpful when planning an experiment and selecting a sampling duration to ensure an adequate frequency resolution. The bottom row of the table shows us that if we are collecting at 100 Hz and want a frequency resolution of, say, 0.012 Hz, we would need to collect 8,192 samples for a duration of 81.92 seconds. That's a long measurement, but we are rewarded with a very good frequency resolution.
Table 1. Relationships of the number of samples in a signal to the sampling frequency, frequency resolution, and required duration of the signal.
More discussion of the FFT and tools available to calculate it is included on this page.
Vibrations can lead you to fascinating studies in a variety of fields, including electronics, telecommunications, optics, engines, and many more. I am most interested in structural vibrations and modal analysis. Some reference materials that are publicly available are here:
Jain, A.K. (2016) Dynamics of Structures with Matlab Applications