Speed of Sound with Multiple Mobile-Phone Microphones
Version 1.0.1 (29.2 MB) by
Duncan Carlsmith
Live Script illustrating a direct measurement of the speed of sound using multiple mobile phone and similar microphones.
Introduction
Many physics experiments can be conducted with little more than a mobile phone as instrumentation by leveraging computational data analysis. This educational Live Script shows how to use two audio recording devices (e.g. a laptop, mobile phone, or Airpod™[1] ) and a sound source to measure the speed of sound in air. The sound source and two microphones are first at a fixed location at the beginning of recording. One microphone is then moved a known distance whereupon the sound signal it records is delayed in time and the delay detected. A direct measurement is more intuitive than for example using the frequency of an oscillating air column or observations of the Doppler effect. The two microphone method offers some advantages over measuring echo times as it uses only direct sound.
This script illustrates MATLAB "simultaneous" recording from multiple microphones. The microphones can include any combination of laptop built-in microphones, wired microphones, Bluetooth connected microphones including AirPods™, or an iPhone connected via APPLE proprietary connection. We observe that any two "simultaneously initiated" channels are generally misaligned in time so use the data itself to achieve alignment. This same analysis could be applied to "simultaneous" recordings initiated by other means (voice control programmatically from a script or manually) with the microphone recording transferred via email or cloud automatic synchronization via iCloud for alignment and analysis.
This script may interest instructors and students of physics and related fields. Some "Try this" suggestions and "Challenges" are included for further exploration.
Cite As
Duncan Carlsmith (2024). Speed of Sound with Multiple Mobile-Phone Microphones (https://www.mathworks.com/matlabcentral/fileexchange/172448-speed-of-sound-with-multiple-mobile-phone-microphones), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2024a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.