1.Statement of the problem

The use of smartphones and similar devices has spread pervasively worldwide over the
past years. The scope of the smartphone utility has exceeded that initially
envisioned. The smartphone revolution has impacted even teaching practices, as
various experiments can be readily carried out using sensors customarily available
in smartphones. Several recent works have proposed the use of smartphones in the
conduction of laboratory experiments on mechanics [^{1}–^{4}], electromagnetism [^{5}, ^{6}],
optics [^{7}], oscillations [^{8}, ^{9}]
and waves [^{10}, ^{11}].

Some such experiments dealt with mechanics problems; specifically, the measurement of
gravitation [^{12}], the determination of
elastic energy and the study of simple [^{13}],
physical, or spring [^{14}] pendulums have been
addressed. The acceleration sensor of a smartphone was used to study the uniform and
uniformly accelerated circular motions [^{4}].
Another recent study [^{15}] focused on the
conservation of the angular momentum using a smartphone equipped with an angular
rate sensor, or gyroscope, mounted on a rotating table. The gyroscope sensor has
also been used for the calculation of rotational kinetic energy in a physical
pendulum [^{16}].

Acceleration and rotational sensors can be used simultaneously. In one study [^{17}], a smartphone was placed at different
distances from the rotation shaft of measurements of centripetal acceleration and
angular velocity of a smartphone placed at different distances from the rotation
shaft of a merry-go-round were correlated with the angular radius by means of linear
regressions. Likewise, in a recent study of a physical pendulum, a smartphone
affixed to a bicycle wheel was subject to both rotational as well as low- and
high-amplitude oscillating motion (*i.e.*, spinning in complete
circles in one direction, or around a point of stable equilibrium, respectively)
[^{18}]. In this study, the sensors provided
acceleration and angular velocity measurements with respect to different axes fixed
to the smartphone. For this, a relatively simple system with one degree of freedom,
a generalized coordinate and the conjugate momentum were determined, enabling the
representation of trajectories in the phase space. This latter, somewhat abstract
concept was thus rendered more tangible.

Little attention has been paid to the fact that acceleration sensors, when placed in
an accelerated system, actually measure an apparent acceleration. The absolute or
real acceleration (*i.e.*, relative to the reference frame defined by
the laboratory) cannot be readily determined, as it is not possible to discern
experimentally between a system subject to a gravitational field and a non-inertial
one by virtue of the equivalence principle. In this work, the real acceleration and
the angle of rotation of the smartphone were determined based on measurements made
by the in-built acceleration and gyroscope sensors. In the experiment, motion in the
system occurred in only one plane, with only one degree of freedom. The results
obtained from the smartphone were compared with independent determinations made by
the analysis of video recordings. As the use of smartphones in the laboratory
becomes increasingly widespread, the concepts discussed in this paper can prove
useful to both students and instructors.

2.Experimental set-up: physical pendulum and sensors

A physical pendulum is defined as a rigid body rotating in a plane around a
horizontal axis as a result of the effect of gravity. In this experiment, the
physical pendulum is composed of a bicycle wheel with its axis fixed in a horizontal
position around which the wheel rotates in a vertical plane, and a smartphone
affixed to the outer edge of the tire, as shown in Fig. 1. An Android operated smartphone (LG G2 D805) furnished with a
3-axis LGE accelerometer sensor (STMicroelectronics, 0.001 m/s^{2}
precision) and a 3-axis LGE gyroscope (STMicroelectronics, 0.001 rad/s precision)
was used. Technical information regarding the exact location of the sensors within
the smartphone was obtained from the manufacturer and verified by physical methods
[^{18}]. The Androsensor application was
used to record sensor readings [^{19}].

To make full use of the in-built sensors it is necessary to analyze their basic
operation principles. The construction characteristics of acceleration sensors are
such that they are, actually, force sensors [^{1},^{20}]. These sensors measure the
normal force exerted on a test particle (or seismic particle) by a piezoelectric
ceramic or micromechanical capacitor, as shown in Fig. 2. Thus, to obtain a measurement of the real acceleration of the
smartphone it is necessary to subtract the gravitational component
(m**g**), as shown in Figure 2. This
transformation can be readily made if the smartphone is at rest or in uniform
rectilinear motion. In contrast, if the device is subject to acceleration in an
arbitrary direction, supplementary measurements are needed by virtue of the
equivalence principle.

In addition to an accelerometer, a gyroscope sensor was used in this experiment. Initially, gyroscopes were based on rotational gimbal-mounted mechanical devices. Today, smartphones are equipped with Micro-machined Electro-Mechanical Systems (MEMS) which measure the Coriolis force on a vibrating body. These sensors provide direct readings of the angular velocity of the smartphone relative to predefined axes fixed in the reference frame of the device.

Also linear acceleration and orientation pseudosensors are available in many smartphone models. Linear acceleration pseudosensors are supposed to provide readings of the acceleration that the device is subject to after subtracting the gravitational component. The orientation pseudosensor integrates the data acquired by several sensors, including a geomagnetic field sensor, to yield a measurement of the orientation of the device. In this paper, the results from the accelerometer and the gyroscope are compared with measurements obtained using these pseudosensors, and the accuracy of the latter discussed.

The components of vectorial magnitudes are usually read on three axes (*x, y,
z*) oriented as if drawn on the smartphone screen. The measurements used
in this study were read by the gyroscope sensor on the *x* axis and
by the acceleration sensor on the *y* and *z* axes,
for tangential and radial acceleration, respectively. The recorded data can be
downloaded to a computer and analyzed using suitable software. An independent
measurement of the system’s motion was available from video data acquired by a
digital camera positioned frontally. The center of the focal field was positioned at
the axle of rotation of the wheel in order to minimize parallax error. Based on the
distance between the axle and the inner edge of the tire as the length scale, the
system’s motion was analyzed with Tracker software [^{21}].

3.Absolute acceleration and rotation angle

The time evolution of the rotation angle *θ* measured from the point
of stable equilibrium, as shown in Fig. 1, is
derived from Newton’s Second Law. Neglecting the friction term, the system’s
equation of motion is given by

*m*is the smartphone mass,

*R*is the distance from the center of mass, and

*I*is the moment of inertia of the system composed by the wheel and the smartphone.

The acceleration of the smartphone in the laboratory reference frame is

*R*is the distance from the center of rotation to the center of mass of the smartphone, located in close proximity to the sensors. The selected radial and tangential versors,

*ê*and

_{r}*ê*, coincide with the

_{θ}*z*and

*y*axes, respectively, on the smartphone. The gyroscope sensor for the

*x*axis measures directly the angular velocity on that axis [

^{20}], so that

*x*axis is in the inward direction, while the sense of rotation is given by the value on the

*y*axis, which in this case is positive (anticlockwise).

The acceleration value measured by the acceleration sensor, however, is not a
measurement of the real acceleration observed in the laboratory but of an apparent
acceleration, **a′**, resulting from the vectorial sum of the real
acceleration and the acceleration associated with a gravitational field in the
opposite direction to that of the real gravitational acceleration, as follows

The components of the apparent acceleration measured by the sensor along axes
*y* and *z* of the smartphone are

It is worth noting that the denominator of Eq. (8) is always positive, since the moment of inertia of a system (the
wheel and smartphone) is always greater than the moment of inertia of one of its
parts, *I > mR*^{2}. The limit case where
*I* = *mR*^{2} corresponds to a simple
pendulum, and Eq. (8), which is only
valid for a physical pendulum, would be indeterminate.

4.Results

To analyze the system dynamics, the physical pendulum was set in motion with sufficient energy to rotate in complete cycles in one direction. The movement was recorded using the sensors fitted in the smartphone as well as the video recorder. Figure 3 shows the time evolution of both the rotation angle calculated by Eqs. (7) and (8) as well as that obtained by video analysis using Tracker. A third measurement read by the orientation pseudosensor is also shown. The procedure described in the above section yielded results in agreement with measurements resulting from the analysis of video data throughout the experiment. The measurements made by the orientation sensor were in agreement with these results only for angles below 90°, a fact ascribed to the definition of axes in the orientation pseudosensor.

Values of angular velocity and acceleration as a function of time read by the gyroscope sensor and those determined by video analysis are shown in Fig. 4. Using the gyroscope sensor, angular velocity is directly read by the sensor whereas the analysis of video required the numerical calculation of the derivative of the angle. Angular accelerations shown in the figure (bottom panel) corroborate the overall agreement between both procedures. However, the numerical calculation of the derivative, the loss of precision due to the acquisition time of the digital camera and the task of locating the object on each image introduce a noise component in the data of angular velocity and, especially, acceleration, compared with the measurements made directly by the gyroscope sensor.

The radial and tangential acceleration components derived from the above equations
were compared with the linear acceleration reading from the pseudosensor and the
apparent acceleration from the accelerometer, as shown in Figs. 5 and 6. Figure 5 shows the evolution of the tangential
acceleration throughout the experiment. The time interval around *t*
= 0, where the wheel first comes to a halt and begins to oscillate, and an interval
around a later point in time, when the wheel oscillates with intermediate amplitude,
are enlarged for illustration purposes. As expected, the apparent acceleration
differs clearly from the real acceleration calculated according to the procedure
described in the previous section. Likewise, readings from the linear acceleration
pseudosensor were found to be inaccurate, in particular when the smartphone moves in
proximity to the point of stable equilibrium.

Figure 6 shows the radial acceleration as a
function of time. As was the case with the tangential acceleration, the calculated
absolute acceleration was found to differ from that read by the sensors. Panel (a)
shows that the accelerometer reading tends to −10 m/s^{2} when the wheel is
motionless, whereas both the calculated acceleration value and that read by the
linear accelerometer correctly tend to zero. As shown in panels (b) and (c),
readings from the pseudosensor were inaccurate.

5.Conclusions and Prospects

This paper describes how measurements made using acceleration and gyroscope sensors fitted in smartphones can be used to obtain the rotation angle and real acceleration of a physical pendulum. Despite the constraints resulting from application of the equivalence principle, these measurements can be complemented with those from the gyroscope sensor to yield real acceleration values. This procedure can be corroborated by comparison with independent measurements determined by video analysis.

Diverse measurements can be made using sensors built into smartphones to elucidate a wide range of physical phenomena. An adequate understanding of the underlying operation principles can shed important light on the appropriate use of these applications, a fact which gains in significance as the use of smartphones becomes more widespread with the expected decrease in cost.