Professional Documents
Culture Documents
Measuring The Speed of Sound in Air Using A Smartp PDF
Measuring The Speed of Sound in Air Using A Smartp PDF
Measuring The Speed of Sound in Air Using A Smartp PDF
E-mail: simen.hellesund@fys.uio.no
Abstract
This paper demonstrates a variation on the classic Kundt’s tube experiment
for measuring the speed of sound. The speed of sound in air is measured using
a smartphone and a cardboard tube, making the experiment very economical
in terms of equipment. The speed of sound in air is measured to within 3% of
the theoretical prediction.
Introduction Theory
In recent years, smartphones have become packed For a sinusoidal wave with constant frequency f
with sensors; microphones, cameras, accelerom- and wavelength λ, propagating in a medium, the
eters, magnetometers, gyroscopes, thermometers, speed of sound in said medium is given by:
proximity sensors etc. Having become ubiquitous
c = λf .
(1)
in society, smartphones can provide economical
alternatives to expensive laboratory equipment in This means that if we can determine both the
physics education. frequency and wavelength of the wave, we can
Several papers have examined the use of measure the speed of sound in the medium. For
smartphones in acoustic experiments for edu- this experiment, the medium in question is air at
cational purposes [1–5]. A common experiment room temperature and atmospheric pressure.
in physics education is to measure the speed When an acoustic wave enters through the
of sound c in air, or other gasses, by observing open end of a half-closed tube and hits the closed
standing acoustic waves in a tube. August Kundt end, part of the wave is reflected back down the
first described this experiment in 1866 [6]. Such tube towards the open end. At specific wave-
an experiment is therefore often referred to as lengths, the incident and the reflected wave form
Kundt’s tube. a standing wave. In the antinodes of the stand-
Parolin and Pezzi have shown how the ing wave, the points on the standing wave where
experiment can be performed using two smart- the amplitude is maximal, the amplitude of the
phones [7]. Yavuz has shown how it can be standing wave is greater than the amplitude of
done using a single smartphone by partially the incident wave alone. The opening of the tube
submerging the tube in water [8]. The aim of will always be a displacement antinode of the
this paper is to attempt to perform the experi- standing waves. The wavelengths at which the
ment using only a smartphone and a cardboard standing waves occur are called the resonance
tube, offering an alternative method to the one wavelengths of the tube. For the half-closed tube,
outlined in [8]. the resonances occur when the length of the tube
d = 7.5 cm
waveform of the recording crosses from negative
Tube Smartphone
to positive values (or vice versa). These points are
approximated by identifying the points on either
side of such a crossing and drawing a straight Speaker
line between them. The zero crossing point of the
signal is approximated as the point at which this
Figure 2. Schematic illustrating the placement of the
straight line becomes zero. The distance from one tube and smartphone during the experiment.
such zero crossing point to the next is an approx
imation of the period of oscillation of the signal. Data analysis
The inverse of this period is the frequency of The start of the audio recording proves too noisy
the signal. The ZCM procedure is illustrated in to be of use. The low frequencies emitted by the
figure 3. function generator are perhaps causing the smart-
The samples of the audio recording are split phone to vibrate. This region of the recording is
into one-second intervals. In each of these inter- therefore cut before the analysis.
vals, the ZCM is used to find all the zero cross- The data analysis is performed in Python.
ings. The measured frequency in each interval is The SciPy python library contains the packages
taken to be the mean of all the frequencies meas- needed for reading the .wav file, as well as for
ured from these zero crossings. These frequencies signal processing and curve fitting [15].
are plotted as a function of time in figure 4. We need to identify the points where the
Looking at figure 4, we notice that there are sound intensity of the recording is maximal, as
a few points where the ZCM clearly fails to iden- these maxima will occur at the resonance fre-
tify the frequency emitted by the function genera- quencies of the tube. First, the recording is split
tor. In our case, these points can be ignored, as into the same one-second increments used to
they are far away from the points where the sound measure the frequency. The absolute value of the
intensity of the recording peaks. digital samples is taken in each of these intervals.
The results obtained using the ZCM are The peaks in the resulting signal are identified
cross-checked by measuring the frequency in the using the find_peaks function of the SciPy sig-
recording using a fast fourier transfer (FFT) in nal processing package. The mean height of the
each second interval. The most prominent fre- peaks found in each second increment is taken to
quency in the FFT spectrogram of each interval be the sound amplitude. The resulting distribution
is taken to be the frequency of the signal. This is shown in figure 5.
method yields identical results to those obtained Next, the find_peaks function is used once
by the ZCM. However, the FFT method is signifi- more to identify the peaks in the sound ampl
cantly slower and is therefore not used in the final itude distribution. These peaks are also shown in
analysis. figure 5. The frequencies measured at the times of
7 Unknown
Time 9 1865
11 2247
∆t
13 2594
15 2906
3000
Line of best fit
Figure 3. The ZCM illustrated. The black line is the
pure sine wave signal. The red points are the points 2500
sampled by the smartphone. The yellow points are the
Frequency (Hz)
zero crossing points used to approximate the frequency 2000
of the signal.
1500
500
1 5 9 13
Frequency (Hz)
2500
n