Modern mobile phones (smartphones) are versatile data collection devices for experimental physics. 1,2 Mobile devices such as smartphones and tablets can measure accelerations, rotations, magnetic fields, pressure, and sound and light levels, and are also able to record and analyze video. 3-6 They are increasingly used in undergraduate physics laboratories, and they can easily facilitate "at-home" labs because, in many countries, most students will own a mobile phone. The use of smartphones for this purpose increased in 2020 with the need to rapidly develop online undergraduate physics labs during the COVID-19 crisis. 7, 8 Modern smartphones measure acceleration and angular velocity along three axes that are fixed with respect to the phone using microelectromechanical system (MEMS) inertial sensors. The three-axis MEMS gyroscope is a relatively recent addition to phones: for example it first appeared in the iPhone in 2010. 9 In applications designed to use the sensor, the gyroscope sampling rate is typically 100 Hz or 200 Hz, 10 which allows data collection during fairly rapid movements of the phone. The accelerometer and gyroscope can be used for physics experiments, including measuring the acceleration due to gravity, [11] [12] [13] measuring moments of inertia, 14, 15 demonstrating the parallel axis theorem, 16 exploring pendulum dynamics, 17 and measuring the radial acceleration and Coriolis force in circular motion. [18] [19] [20] If a mobile phone is tossed in the air, then, neglecting air resistance, its centre of mass is in simple projectile motion, and the phone is in free rotation (rotation in the absence of a torque) about the centre of mass. Free rotation provides a beautifully simple demonstration of rotational dynamics. It also exhibits counter-intuitive results, including the intermediate axis theorem: for an object with three different moments of inertia about its principal axes, like a mobile phone, the axis with the intermediate moment of inertia is unstable to rotation. 21, 22 As a consequence, if the object is initially set rotating only about the intermediate axis, it will start to rotate about the other two axes. Moreover, with the right initial conditions the object can execute a 180 • turn about the axis with the smallest moment of inertia, while performing a 360 • turn about the intermediate axis. This is called the "tennis racquet effect," or the Dzhanibekov effect. [23] [24] [25] It can be demonstrated by tossing a tennis racquet upwards from an initially horizontal position: after the racquet rotates about the unstable axis by 360 • the opposite face is upwards, showing that it has also made a half-turn about its long axis. A more extreme example is provided by spinning wingnuts and t-handles in zero gravity. 26 Their orientation in space repeatedly reverses when spinning rapidly about the unstable axis. This striking consequence of the instability was identified by Dzhanibekov. 27 It is easy to demonstrate the tennis racquet effect with a mobile phone, with the MEMS gyroscope collecting data on the rotational dynamics. The instability in rotation about the intermediate axis was previously demonstrated using phone sensors, but the investigation was qualitative, and presented only linear acceleration data. 28 In this paper, we analyse gyroscopic data from a mobile phone tossed in the air and show how it enables a variety of basic physics experiments, including demonstration of the approximate conservation of rotational kinetic energy and the magnitude of angular momentum, as well as a quantitative study of the tennis racquet effect. To collect data we use the app phyphox 29 (RWTH Aachen University), which is available for iOS and Android phones. The data presented here are from an iPhone 8 Plus, but the results have been reproduced on a variety of other phones.
We consider the motion of the phone using the principal-axis coordinate system Gxyz shown in Fig. 1 . The origin G is the centre of mass of the phone. The y-axis is chosen such that the positive direction is from the bottom of the phone towards the top, and the z-axis is directed outwards from the front face of the phone.
FIG. 1: The three principal axes (x, y, and z) of the phone. The centre of mass is G.
where L is the angular momentum, dL dt Gxyz is the rate of change of the angular momentum in the rotating frame Gxyz, ω is the angular velocity of the phone (which is the rate of rotation of Gxyz in the Newtonian reference frame), and τ is the net external torque about the centre of mass. The left-hand side of Eq. (1) separates the rate of change of the angular momentum into the rate of change with respect to Gxyz, and the change due to the rotation of the frame. This approach can be used to calculate the rate of change of any vector in the rotating frame. 21, 22 The angular velocity is
where x, y and z are the unit vectors in the body-fixed reference frame Gxyz. Because x, y and z are the principal axes, the angular momentum is
where I x , I y , and I z are the principal moments of inertia.
When the phone is tossed in the air the torque about the centre of mass due to gravity is zero. Air resistance can produce a net torque, but it is usually negligible, so that Eq. (1) reduces to Euler's equations:
where the dot denotes the time derivative.
The rotational kinetic energy and angular momentum are constants of the motion, given by
and
respectively. The components of L in the Gxyz frame are not constant, because the frame is rotating. However, it is easy to construct the magnitude of the angular momentum vector from the components:
Mobile phones are approximately rectangular cuboids, so the moments of inertia may be approximated by
and
where m, h, w and d are the mass, height, width, and depth of the phone, respectively.
For the standard phone shape h > w > d, and hence I y < I x < I z . The x-axis is the "intermediate axis," i.e. has the intermediate moment of inertia.
It is interesting to consider the steady states of Eqs. (4)- (6) . Setting the derivatives to zero gives (assuming distinct moments of inertia):
This implies that, for a steady state, two of the angular velocity components must be zero,
i.e. a steady state rotation can involve only one principal axis. The possible steady states therefore are
However, only ω 2 and ω 3 are stable steady states -the intermediate axis is unstable to steady rotation. To see this, consider the state 30
where ε x , ε y and ε z are time-dependent, with |ε i | ≪ L/I x for i = x, y, z. Substituting
Eqs. (15) into Eqs. (4)-(6) and ignoring the quadratic terms in ε i gives
where ω 1 = L/I x . Equation (16) gives ε x = const, and Eqs. (17) and (18) implÿ
where
is positive. Equations (19) have the solutions ε y = ε y0 e |λ|t and ε z = ε z0 e |λ|t . If the spin is initially predominantly about the x-axis, any small perturbations in spin about the other two axes grow exponentially, which is the definition of instability. It is straightforward to show using the same approach that the y-and z-axes are stable for rotation, i.e. in these cases perturbations from the steady states lead to oscillations rather than exponential growth. predominantly about these axes.
We start with the z-axis, which has the largest moment of inertia. An example of data collected using phyphox on the iPhone 8 Plus for a spin about the z-axis is shown in Fig. 3 .
Panel (a) shows the three angular velocity components in the principal axis frame (ω x , ω y , and ω z ) versus time. It is easy to identify the time interval when the phone is in the air (between the dashed vertical lines) by the smooth variation in the angular velocities.
The sampling frequency of the gyroscope data (100 Hz) is more than sufficient to resolve the variations in the angular velocities. The angular velocity about the z-axis is large and approximately constant (ω z ≈ −17 rad/s), and the spins about the other two axes are substantially smaller and oscillatory. This is consistent with the z-axis being stable to rotation.
It is straightforward to calculate the rotational kinetic energy and the magnitude of the angular momentum of the phone, from the angular velocity data, using Eq. (7) and Eqs. (9)- (12) . Table I 
Although gravity cannot produce a torque about the centre of mass, air resistance can. Fig. 6 illustrates this point. We assume that at a certain time the centre of mass of the phone is moving upwards through the air with speed v 0 , and the phone is rotating about the
x-axis which is perpendicular to the direction of motion. The right side of the phone has a speed v 0 + v with respect to the air, and the left side has speed v 0 − v. Since the drag force is proportional to the square of the relative velocity, the right side experiences a greater drag force, leading to a torque opposing the rotation. Our argument assumes the particular configuration shown, but the result is general: if the centre of mass is moving perpendicular to the rotation axis, air resistance will generate a torque opposing rotation.
FIG. 6: Air resistance can produce a torque with respect to the centre of mass. The side of the phone that has an instantaneous velocity in the same direction as the centre of mass motion has a greater relative velocity with respect to the air, and hence experiences a larger drag force.
We can estimate the effect of air resistance on the results of our experiments as follows.
If we consider the configuration shown in Fig. 6 , then the magnitude of the torque is
where ρ ≈ 1.2 kg/m 3 is the density of air, C D is the dimensionless drag coefficient, A ≈ 1 2 hw is the area one side of the phone presents to the air, and ℓ ≈ h/4 is the distance at which the force is applied. For our purposes it is sufficient to assume a constant value v 0 ≈ 1 2 gT from the time of flight (T ≈ 0.5 s), with g = 9.8 m/s 2 , and we can assume v = ωℓ, where ω ≈ 10 rad/s is a typical angular velocity. We will assume C D ≈ 1 since measured drag coefficients for non-streamlined objects in air are typically of order unity. 33 Assuming ∆L/T ≈ τ leads to ∆L = 1 32 ρh 3 wωgT 2 (23)
If we compare this with the total angular momentum L ≈ 7.5 × 10 −3 J s in the third experiment, then ∆L/L ≈ 4%. This is comparable to the observed decrease in the angular momentum magnitude in this case.
We can also consider the first experiment, where the rotation was predominantly about the z-axis. In this case the area presented to the air was about ten times less, since d/w ≈ 0.1.
The observed change in angular momentum was also about ten times smaller.
These estimates are imprecise but they suggest that air resistance may account for some Table I and propagate them through to the values of L and K calculated from the data for the third experiment, the implied errors are about 0.5% in each case. Hence the error in modeling the moments of inertia is likely to be less important than the other effects.
The 3-axis MEMS gyroscope in a mobile phone enables a variety of experiments in rotational dynamics. In this paper, we use a phone to investigate free rotation, by tossing and catching the phone while it is collecting data. The stability of rotation about two principal axes, and the instability about the third, intermediate axis, is easy to demonstrate. It is also straightforward to calculate the rotational kinetic energy and angular momentum magnitude from the data, and to show that these quantities are nearly conserved during the time that the phone is in the air.
Various extensions of the experiments described here are possible. The accelerometer and the gyroscope on the phone could be used to collect data simultaneously, and this could be used to determine the centre of mass motion as well as the rotational motion of the phone.
Objects could be attached to the phone, to change the moments of inertia or the principal axes of the combined object. If a calculator is attached to the phone with rubber bands, such that the long axis of the calculator is perpendicular to the long axis of the phone, it is possible to stabilize the rotation about the x-axis of the phone. The phone could also be strapped to a half-filled plastic water bottle, which, when tossed, changes its moments of inertia in mid-air, and hence exhibits interesting rotational dynamics. 35 The instability in rotation about the intermediate axis of a three-dimensional rigid body was identified by Poinsot in the 1800s and is discussed in classical mechanics texts, 21 again with the wheels down. One version, called the "impossible," is achieved by guiding the rotation of the board about the unstable axis with the foot. 37 However, a version with the board in free rotation (the "monster flip") can also be executed, 38 as illustrated in Fig. 7 .
The difficulty of performing this trick whilst avoiding the board exhibiting the tennis racquet effect (so that the board lands wheels-up) has been assessed. 25 Experiments on free rotation with a mobile phone are likely to appeal to undergraduate students, and to encourage interest in dynamics. The material here is a suitable basis for an undergraduate physics lab, and is highly suited to an "at-home" or online lab. It requires only a mobile phone for the experiment and a computer for data analysis. Students can gain an authentic experience of experimental physics, and can see the relevance of the basic equations of rotational dynamics to the behaviour of a favourite object -the mobile phone. 