In the last years, it has been demonstrated that smartphones can be used to perform physics experiments: [1] [2] [3] [4] they contain many sensors [5] whose data can be accessed with easy-to-use applications. Smartphones can be used for various reasons: to reduce the cost of an experiment, for distance learning, to engage students, and even, more recently, to allow experimental teaching during lockdown. [6] But smartphones have their disadvantages as well: their ready-to-use "black box" interfaces could prevent students from learning good experimental practices, including the notions of precision, uncertainty, and how to build an experimental setup. We developed a specific teaching to get undergraduate students face three basic questions:
• What physics experiment should be carried out to test a model?
• What is the precision of the measure, and why it is a key issue?
• How is it possible that an experimental result does sometimes not follow the model's predictions?
We based our teaching on the famous urban legend of Niels Bohr and the barometer. [7] When asked how to measure the height of a building with a barometer, a student -young Niels Bohr -invents a dozen or so experiments that do respond to the question but avoid the solution expected by the teacher.
We revisited the barometer question as: "How many different ways are there to measure the height of a building with a smartphone?" Unlike Bohr's legend, we further asked our students to carry out the experiments they thought of and to evaluate how the results compare with one another. It turns out that smartphones allow to perform many more experiments; some give surprisingly good results, others very bad ones. The physics span involved in these methods covers many fields: mechanics, magnetism, optics, ... The aim of this article is to show how, using only low-cost equipment, this challenge lets students face directly the questions of good experimental practices. We first present and compare the 61 methods and discuss how to carry them from a practical point of view. We then discuss ways to use these experiments in various teaching contexts and how this could renew the usual approach to labs in undergraduate curricula.
We translated the Bohr's legend into simple constraints: measuring the height of a building several meters high using only every-day objects and a smartphone (with its internal sensors: accelerometer, gyroscope, light sensor, magnetometer, GPS, barometer, microphone and camera). We mainly use the "phyphox" app [4] to access the sensors measurements because it is easy to use and is available in many languages, but other apps would also work well.
We found 61 different methods. Our sample of investigation was the 15-m high Laboratoire de Physique des Solides (see Figure 1 ). Each method is labelled by an arbitrary number. [8] We carried out 46 of the 61 methods. Some we did not carried out (labelled with a star) because of lack of material or technical limitations, see Table I .
In order to accurately compare the different methods, a reference altitude was taken at the top of the building. We chose to quote uncertainties by just deriving them from the device sensitivity. No statistical analysis of data nor the study of systematic errors have been done, but some other error sources are discussed. Table I . Free fall of an object, using video analysis 17.7 ± 0. 6 4 Free fall of an object, using audio analysis 18.1 ± 0. 3 5 End velocity of the free fall of an object, video analysis 13.9 ± 0.7 6* End velocity of the free fall of a speaker, Doppler analysis * 7* Distance of landing for an object thrown horizontally * 8
Multiple rebounds of a ball, video analysis 6.5 ± 1.5 9
Multiple rebounds of a ball, audio analysis 6.5 ± 1. Decrease of magnetic field intensity with distance * 53
Decrease of radioactive intensity with distance * 54
Decrease of the surface on a picture with distance 14.7 ± 1 55
Projection of a hair diffraction pattern from the top to the ground 16.5 ± 1.7 56
Projection of a smartphone screen diffraction pattern from the top to the ground 15.5 ± 0.2 57
Variation of gravity between the top and the ground, determined using small pendulums 0 ± 3200 58
Variation of gravity between the top and the ground, determined by the accelerometer 0 ± 3000 59
Variation of the Earth magnetic field between the top and the ground 8E5 ± 1E5 60
Variation of gravity between the top and the ground, determined by general relativity time dilatation 0 ± 3E9 61* Phone call to the building's architect *
The results are all presented in Table I ; the precision of the methods varies greatly. Some methods give the correct height with a reasonable precision given the tools at hands, for example, methods using picture analysis (#28-30) or a giant pendulum (#10-17). On average, the simpler the method, the more precise the results. On the other spectrum, some errors bars are very large indicating the sensors are not precise enough (e.g. #38, or #60). It is also clear that some methods have a small error bar but that does not cover the real height of the building (e.g. #3, #4, #8, . . . ) which indicates that the underneath model does not apply. We will now detail these methods; some have already been described elsewhere, albeit not always on the scale of a building.
In Bohr's legend, the teacher expects a specific solution: the barometer is used to measure the variation of atmospheric pressure ∆P between the top and bottom of the building. The altitude H of the building follows by H = ρg∆P , with ρ, the density of air, close to 1.2 kg/m 3 . This method can be performed with smartphones that are equipped with a barometer sensor. [9] For a better measurement, a calibration of both the barometer and ρ can be performed by measuring the difference of pressure between two points of known altitude, such as the distance between one's head and feet. As seen on Table I , this method can be quite precise.
When the air friction is neglected, the fall time t of an object with zero initial velocity gives the height [1, 10] through H = 1 2 gt 2 . Caveat: throwing objects from the top of a building is potentially hazardous; we used a tennis ball to attenuate the risks. The fall time of the tennis ball can be measured by different means: timed with a stopwatch app (#2, not a precise method), video-analyzed (#3), or using an audio recording (#4). For the latter, a neat method to produce a sound at the beginning of the fall is to tie the ball to a balloon and pop it. The audio analysis can be performed after the measurement on a PC using software like Audacity or on the fly with some smartphone apps such as phyphox' acoustic stopwatch. The audio analysis leads to a slightly better resolution than the video because of its higher sampling rate.
A close variant consists of measuring the velocity v f of the falling object at impact, using H = v 2 f /(2g). The easiest way to measure v f is to film the end of the fall and analyze the video frame by frame (#5). A more sophisticated way to measure this velocity would be to audio record the fall and perform a Doppler analysis of the sound, assuming the falling object emits a continuous sound (a Bluetooth speaker for example, #6*). [11, 12] Even though these methods are based on the same mechanical model (free fall without air friction), they give different results: timing the fall gives larger than expected results (for #4, H = 18.1 ± 0.3 m, see Table I) effect of air friction, which reduces the impact velocity, making the building appear smaller in the latter method, or increases the fall time, making it appear larger in the former. Letting the smartphone free fall itself is a way to take air friction into account (#1): the accelerometer records the deceleration due to friction. Integrating twice the signal [13, 14] gives H. One can use a bedsheet hold by two people to catch the smartphone safely, like fireman life net. However, one should worry especially of unexpected winds. When we threw our smartphone from the 15-m roof of the building, it rolled and looped during the fall, which explains the not-monotonous acceleration curve we obtained (see Figure 2 ). Bracketing the value of acceleration by linear curves gives H = 14.0 ± 1.1 m. Since the effect of air friction is taken in account by this method, providing a smoother fall (with a parachute for example) could lead to smaller uncertainties.
Other methods using free fall can be used. A horizontal initial velocity v i can be added to the ball when throwing it from the top of the building, and measuring v i using video analysis and the horizontal distance d the ball reached at impact leads to H (#7*). One can also let the ball fall and time the rebounds, [10, 15] either through audio (#9) or video (#10) analysis. The time between two rebound leads to the coefficient of restitution, and -assuming this coefficient is constant -to the height of the first fall. All these methods assume that air friction is negligible, which we know was not the case in our experiments with a tennis ball. Using a smaller and heavier ball, such as a golf ball, might have yield to different results.
Since Galileo, pendulum of known length have been used to measure time. Building a giant pendulum the size of the building and timing its period T leads to H = g(T /2π) 2 . Some care should be given to the construction of the pendulum, so that it swings nicely and does not rotate in every directions. The swing construction, with two wires separated by a gap helps a lot. [2] To measure the period, the simplest way is to use the smartphone stopwatch (#10). Any sensors can be used: video analysis [16] (#11), accelerometer [2, 16] (#12), gyroscope [16] (#13), magnetometer [17] (#14, either using a permanent magnet as the weight, or hanging the smartphone itself to the pendulum and measuring the Earth magnetic field), light sensor [18] (#15), proximity sensor (#16), audio record (#17*) using a Bluetooth speaker and looking for the audio modulation due to the distance to the source varying.
Using the movement sensors (accelerometer and gyroscope) to measure the period of a pendulum has been well reported in the literature. [2, 19] It has the advantages of measuring the oscillation amplitudes (allowing for an amplitude decay study), whereas other sensors detect only the period through the passage of the pendulum. On a giant pendulum the oscillation angle gets smaller and the period increases, making the signal smaller and more difficult to detect: on our 15-m pendulum, the signal/noise ratio is only about 5 for the gyroscope data and the signal for the accelerometer is too small to be observed.
The giant pendulum setup can also be used to measure the height of the building using laws of a body in rotation: the centripetal acceleration a c (#19*) and the velocity v of the pendulum (#20*) are related to the angular velocity ω through simple equations. [20] The accelerometer and gyroscope of a well oriented smartphone can measure a c and ω, [16] and the velocity could be measured by either Doppler effect [11, 12] or beats between two speakers, [21] one swinging with the pendulum, one motionless on the ground. In practice however these methods are difficult to implement on a setup the size of a building.
A variant (#18) is to measure the period of a giant torsion pendulum. This experiment is more akin a spring experiment than a pendulum one, and the torsion coefficient needs to be calibrated by measuring the period of the pendulum for a known length of wire. This method supposes that the torsion torque is equally spread along the wire and that the connections to the wire are perfect, both approximations that require care to achieve. The discrepancy of our measurement H = 10.8 ± 0.5 m to the expected 15 m height is likely due to these issues.
In surveying, triangulation is a well-known technique to measure distances. [22] Since the smartphone can measure angles with the vertical using its accelerometer, different setups can be imagined using this principle.
Facing the building, it is either possible to determine the angle to the top of the building knowing the distance to the building (#25, H = 15.5 ± 0.4 m), [23] or the angles to the top and to the bottom (#24, H = 40 ± 20 m). To improve precision, it is best to attach the smartphone to a tube, and use the latter as homemade theodolite sight. The former method yields better results if one is standing not too close and not too far from the building (a distance corresponding roughly to the height of the building is good). The latter method, if performed from one's height, standing on the ground, leads to a large uncertainty on H because the result will be highly sensitive to the measure of the angle to the bottom.
A variant is to measure the apparent angle of an object of known size lying on the ground below from the top of the building (#26). The precision of this method will be better if the size of the chosen object is approximatively the size of the building.
Using shadows is also a well-known technique to measure the height of a building using trigonometry since Thales' times. Measuring the shadow size of the building and that of your smartphone gives the ratio of building height / smartphone dimension (#21). A more direct way using the building's shadow is to know the sun elevation in the sky. A digital method uses the phone's GPS to get longitude, latitude and time, and then visit an astronomical website that provides elevation from these data [24] (#22). A more hands-on approach is to use a time-lapse to determine the minimum size of the shadow on either an equinox or a solstice day (#23). On these particular days, at noon, the elevation of the sun is directly related to the latitude. Getting a minimum size from a time lapse is not easy, and needs a proper scale and a good setup for the camera, but the process involves a better understanding of the relative positions of the Sun, the experimenter and the planet.
The most straightforward method is to take a picture of the building with an object of known size on the image, playing the role of a scale (#28). Care must be taken to perspective deformations. The phone should be kept parallel to the building, and additional software corrections can help improve parallelism even more.
Using laws of geometrical optics, a picture of the building taken at a known distance on a smartphone of known focal length and sensor size (#29) also leads to the height. [25] Variants of the previous methods can be envisaged by standing at the top of the building and taking a picture of an object of known size on the ground below, either knowing the focal length and sensor size of your phone camera (#30), or measuring the camera angle of view (#27). An estimate of the latter can be determined experimentally with a protractor.
A direct method is to record the burst of a balloon at the top of the building, and waiting for the ground echo (#42). However, this requires some ideal building configuration for having a chance to work, and we couldn't catch the echo in our case.
In method #39, a balloon is burst at the top of the building, triggering an acoustic stopwatch of both smartphones, albeit with a delay for the bottom one. A second balloon is then burst at the bottom, triggering the stopwatches off, albeit with a delay for the top one. The differences in the stopwatches record is twice this delay, which corresponds to the time the sound traveled the building height. Acoustic stopwatch is available in phyphox app, it is triggered on and off by a sound threshold. [26] If phyphox is not available, or if the noise conditions are difficult, audio-record analysis from both smartphones will yield the same information (#40).
In method #43, filming in slow motion from the top of the building the burst of a balloon at the bottom can clearly differentiate the time of arrival of the light (the image of the burst) and sound (the slow motion capture must also record sound, which unfortunately is not the case on all smartphones, especially at higher framerates). Using a 340 fps record we estimated the difference of 15 frames between image and sound (see Figure 3 ), which yields to H = 15.2 ± 1.0 m. Using a phone call to time the travel of sound is tempting, since the electromagnetic waves that carry phone conversations are alike light. A person at the top of the building phones to someone at the bottom, and bursts a balloon. The person at the bottom records two bursts, one having travelled through air and one having being carried out by the communication cell tower (#41). However, additional delays due to the electronic handling of the phone call management need to be calibrated: by popping a balloon when the two phones are close, we found between 260 and 270 ms of electronic delay, much larger that the time needed by an airwave to propagate on 15 m! Assuming this electronic delay constant and performing the experiment gave H = 10.9 ± 1.4 m, which shows that this hypothesis needs to be revised.
In all these methods, the speed of sound can be assumed constant since temperature and humidity variations are neglectible with respect to other sources of error (the temperature dependence is typically less than 0.2%/K). A more general problem is that the saturation of the audio records deforms the audio wave differently with the distance between the balloon and the phone, which introduces some uncertainty. Also, ambient noise and noise reflections will obviously perturb measurements.
Using the phase of sound provides additional methods. The measure of a phase difference is easily converted in distance using the speed of sound (the difference between phase velocity and group velocity is not relevant here). Two audio records are needed to determine a phase difference, and such measurements require more time, care, and analysis skills than previous methods. We performed all sound-phase analysis using Audacity software. [27] A direct setup is to use two smartphones and a speaker emitting a pure continuous tone. At the beginning, they all are at the bottom of the building, at the foot of an external stair. Both smartphones are audio recording, one is left on the ground, the other is slowly brought up to the top using the external stairs, still recording the continuous tone. Audio analysis of both audio records will show an increase of the phase difference between the two smartphones, [28] related to the distance from the top smartphone to the ground (#44). A higher frequency leads to a lower wavelength which renders the measure more difficult: from a practical point of view, we found best to avoid working above 350 Hz (≈ 1 m wavelength). Working at 200 Hz, we obtained H = 14.9 ± 0.3 m.
If no external stairs exist, a speaker can be used to emit a continuous tone at the bottom of the building, and two smartphones record the audio signal, one at top, one at bottom (#45). The variation of the phase difference δΦ between the two recordings when the frequency f of the tone is changed is related to H and the speed of sound v s through the relation:
Plotting δΦ as a function of f and determining the slope leads to H, though with larger errors than the previous method (we obtained H = 13.5 ± 1.3 m).
A variant of this setup is to keep the speaker at bottom, and have both smartphones at top, one at the vertical of the speaker, the other at a lateral distance d from it (#46*). The relevant relation becomes:
Another type of classical experiments is the standing wave experiments. [29] If one has a long tube running along the building façade, the determination of resonance frequencies should give H (#48*). We did not have such a setup, but presumably a garbage chute for construction could be adequate.
Interferences are another way to determine the height of the building. A double-slit like experiment is possible with two speakers emitting a single continuous tone at a given frequency [30] at bottom, separated laterally by a distance l. To ensure the phase coherence, both speakers should be driven by the same sound generator (a smartphone with a split jack connection for example). The sound intensity is measured at the top of the building. The distance d between the first minimums can then be found when moving laterally (#47*). For (l, d) H, the equation simplifies into H = ldf /v s .
Light wave can also be used instead of sound waves: diffraction pattern of hair lighted by a laser is well known, [31] and the resulting pattern depends on the size between the screen (the ground at the bottom of the building) and the hair (at the top of the building). It will also depend on the diameter of the hair which can be determined using a drop of water on the smartphone lens to increase the magnification of the camera [32] (#55). The screen of the smartphone can also be a good diffracting object, depending on its technology (#56). The pixels of the screen act as a reflexive diffraction grating; [33, 34] the distance between two pixels can either be obtained similarly than the hair diameter, or just by knowing the number of pixels and the dimension of your screen. Note that great care should be observed with laser. These experiments should be realized during the night, since only unreasonably unsafe lasers would give enough light for the diffraction pattern to be visible otherwise. Using lower power lasers leads to safer but poorer pictures, but we found that software enhancement of pictures can be enough to perform the measurement over 15 m, specially if it is taken with a tripod and a long exposure.
The inverse-square law happens when a quantity is freely propagating from a punctual source without any other effect (diffusion, absorption, reflection, interferences ...). After proper calibration, a measure of this quantity can be used to determine the distance to the source. Having the source at one point of the building and the measure at the other allows to determine H. Several quantities can be used, with varying degree of precision.
Light is a prime quantity for this method, and it works well (#50): the light sensors in the smartphones are generally good enough to provide accurate quantitative measurements. [35] Care should be taken to the ambient light (night work is necessary). Also important is the orientation of the smartphone and of the light source, since they affect the measurement. We obtained H = 15.8 ± 0.5 m.
Sound also follows the inverse-square law (#49*), but sound intensity measurement made by a smartphone are generally not precise enough, presumably due to the quality of the smartphone microphones or multiple echoes.
Smartphones can also detect the intensity of a wifi hotspot. In an idealized world the Wifi intensity should follow the inverse-square law (#51) but in practice, when trying to calibrate the signal we found that this is not the case. Many reasons could explain this, from reflections of the signal to artefacts from the signal processing, and the low precision of the measure. This method gave the height of our lab somewhere between 12 and 35 m. . .
When working with a fixed camera setting, the number of pixels occupied by an object on a picture also follow the inverse-squared law (#54). This experiment is easy to perform with a smartphone and gives good results (in our case, H = 14.7 ± 0.6 m using a roughly 1 meter square panel as a target.
The magnetic field generated by a magnet does not follow the inverse-squared law (since this is not a propagation effect); nevertheless, the dependence of magnetic field variation with distance is known (B ∝ 1/r 3 ), and since some smartphone can measure a magnetic field the same process of calibration/measurement could be done (#52*). However, for the magnetic field to be detectable over such a distance, large unsafe magnets should be used, and since our lab façade is covered with metal rods we deemed preferable not to test it.
Going down the unsafe road, it was reported that smartphones could be used as poor-man Geiger counters. [36] Since nuclear radiation follows the inverse-squared law having a source of nuclear material should theoretically allow to measure the height of a building (#53*). We did not pursue this avenue any further (for a safer approach see Ref. 37 ).
Some methods rely on more direct approach rather than specific physics laws, generally in a simpler (but not always precise) way.
Going up the stairs and counting how many smartphones should be piled up to reach the top is an easy and relatively precise way of determining H, if done with care on a convenient stairway (#34, using two identical smartphones to alternate them one above the other helps). Using the accelerometer to count the number of stairs and multiplying by the size of a stair also works relatively well (#35). Using a rope weighed by a smartphone and letting it slide down the façade of the building from the top will give a rope of length H, which can then be measured with a meter (#31). The latter solution can be made a bit more technical if a pulley is installed at the top of the building to let the rope slide: attaching a smartphone to the pulley with the gyroscope on will record the number of turns the pulley does, [38] which can easily be converted into a distance (#32). Also, if the smartphone attached to the rope has its accelerometer on, the data after two integrations will also give a distance (#33*), in a very similar way of the free fall experiment, or the elevator experiment [13] (#37). These three experiments use the same physics principle, but the smoothness of the elevator generally yields to better results.
Perhaps the most straightforward approach is to use the altitude measure from the smartphone GPS (#38). However this method is very inaccurate since altitude is not what is measured best by a GPS, where a typical 6-8-meter uncertainty is common. [39] Finally, the most efficient method is to phone the architect and ask him or her how tall is the building.
Keeping par with the Bohr's legend, it is interesting to explore methods that would only work in an ideal world of "spherical cows". These methods only work in an idealized world where no perturbations are present, and require very precise measurements. Smartphones are obviously not the right tool, but some error bars can be calculated by estimating how tall the building would need to be for a signal to be measurable.
For example, assuming Earth is a perfect magnetic dipole, using the magnetomer to measure the magnetic field at the top and bottom of the building should lead to H. A 15-m change of altitude would correspond to a 0.0008% change of magnetic field, below the standard smartphone sensor resolution. But Earth magnetic field is not exactly that of a dipole, and more importantly the magnetic field created in a building in activity is not neglectible (especially in a physics lab hosting NMR experiments). When we did the experiment, we measured 25 µT at the bottom of the building and 38 at the top, a 40% difference which an ideal model would translate in a height of several hundreds of kilometers.
The variation with the altitude of the value of g is mentioned in Bohr's legend as a possible way to determine the height of the building (in reality, the variation of g also depends on the density of the building and its foundation [40] ).
Using a smartphone, one could then build two pendulums, and measure g through the period value (#57) or simply read the value of Earth gravity given by the smartphone's accelerometer (#58). Both solutions are equally nonrealistic. Not taking into account that we are assuming a perfect round Earth and neglecting the effect of neighboring masses on the value of local g, assuming a 1-meter pendulum and a 0.1-second resolution in the period measurement gives an uncertainty of 3.2 km in the height value if using the former method. Using the latter method, our smartphone accelerometer had a slow drift of roughly 0.01 ms −2 , which corresponds to 3 km of uncertainty. We can safely conclude that for our building H = 0 ± 3000 m.
Still playing with the idea of a slight change in local g with altitude, general relativity tells us that time is not the same at the top and at the bottom of the building: [41] if two smartphone stopwatches are started at the same time at the bottom of the building and one of them is brought up to the top for a given time t, say 1 hour, then brought down, a delay δt should exist between the two stopwatches:
with g the averaged value of g, and c the speed of light. Assuming that we are able to detect a 1 ms difference between the two stopwatches on a 1-hour experiment, this would result in an uncertainty of 3000000 km on H! This method seems farfetched, but atomic clocks do have the resolution to measure this effect on Earth (with an altitude difference much higher than a building height). Special relativity tells us that when the clock is brought up and down, the speed of displacement v will also change the local time: the correction is given by v 2 /2c compared to the effect of general relativity gH/c 2 . Back to the envelope calculations shows that the effect of velocity is neglectible.
Undergraduate or high-school labs are usually devoted to measure a specific law with a given setup. Here, the variety of available methods allows a new approach by comparing different experiments and models. Table I clearly shows that some methods are better than others in terms of precision. Letting students compare different measurements they carried out themselves forces them to address the issue of uncertainty and the question of the underlying hypothesis in a more meaningful way for them than during a more traditional students' lab or theoretical course. It also forces them to question the quality of their experiment design, not just taking it for granted.
We tested this approach in various teachings over the past two years. In a first course, we left it as a complete open question where students had to invent and build their own way to measure the building's height. They clearly enjoyed the opportunity of getting out of the lab and doing measurements that had a direct and concrete meaning to their daily life. However, the proposed solutions were always the same (the barometer, a variation using the shadow of the building, a picture of the building, and sometimes the elevator method). To force variety, we developed another type of course where we proposed a subset of the 61 methods in "DIY" sheets [8] depending on our pedagogical objectives and the available time and material. We found out that students were still engaged by the challenge and by the creativity required to design the measurement (such as how to build a giant pendulum) even though it was no longer "their" idea.
For example, in a 1.5-hour session, we asked 20 students to compare 10 different methods that cover different fields of physics and could be performed rapidly (#2, #3, #4, #9, #10, #12, #14, #15, #36, #38, #39). Students then had to decide which of their methods was the most accurate and why. Such pedagogical scenario was also applied in half-day sessions for high-school teachers successfully.
Other subsets could be used: methods covering wide range of physics effects (#1, #10, #14, #36, #43 ), basic methods (#3, #21, #28, #35, #39 ), variations of the giant pendulum (#10, #12, #14, #15, #17 ), or mathematics methods (#21, #24, #27, #28, #54 ).
Letting students test methods that do not work also presents an opportunity for interesting discussions. Why the method based on general relativity does not work, and does that mean that the model is wrong?
Open-ended activities in students' laboratory activities have been shown to be more efficient than guided activities to develop a more expert-like behavior toward experimental physics. [42] We propose here the building's height question as an effective way to challenge students to invent their own ways to measure a quantity and confront their results. New activities could be developed and adapted from this question, challenging students to invent their own ways to measure a quantity and then to confront their results. This classroom activity can easily be adapted to other publics.
For example, we used it with high school physics teachers in the context of yearlong formation or in science museum outreach activities. Last but not least, this "smartphone physics challenge" can be implemented for teaching at a distance, everyone carrying out experiments at home. This could serve for homework activities or as distant labs sessions during lock-down periods such as the brutal ones experienced by many of us recently.