The internal sensors in smartphones for their advanced add-in functions have also paved the way for these gadgets becoming multifunctional tools in elementary experimental physics. For instance, the acceleration sensor has been used to analyze free-falling motion and to study the oscillations of a spring-mass system. The ambient light sensor on the other hand has been proven to be a capable tool in studying an astronomical phenomenon as well as in measuring speed and acceleration. In this paper we present an accurate, convenient, and engaging use of the smartphone magnetic field sensor to measure the acceleration due to gravity via measurement of the period of oscillations (simply called “period” in what follows) of a simple pendulum. Measurement of the gravitational acceleration via the simple pendulum is a standard elementary physics laboratory activity, but the employment of the magnetic field sensor of a smartphone device in measuring the period is quite new and the use of it is seen as fascinating among students. The setup and procedure are rather simple and can easily be replicated as a classroom demonstration or as a regular laboratory activity.

1.
C.
Countryman
, “
Familiarizing students with the basics of a smartphone’s internal sensors
,”
Phys. Teach.
52
,
557
(
Dec.
2014
).
2.
P.
Vogt
and
J.
Kuhn
, “
Analyzing free fall with a smartphone acceleration sensor
,”
Phys. Teach.
50
,
182
(
March
2012
).
3.
J.
Kuhn
and
P.
Vogt
, “
Analyzing spring pendulum phenomena with a smartphone acceleration sensor
,”
Phys. Teach.
50
,
504
(
Nov.
2012
).
4.
A.
Barrera-Garrido
, “
Analyzing planetary transits with a smartphone
,”
Phys. Teach.
53
,
179
(
March
2015
).
5.
S.
Kapucu
, “
Finding the acceleration and speed of a light-emitting object on an inclined plane with a smartphone light sensor
,”
Phys. Educ.
52
,
055003
(
2017
).
6.
H. D.
Young
,
R.A.
Freedman
, and
A.L.
Ford
,
Sears and Zemansky’s University Physics
, 13th ed. (
Addison-Wesley
,
2012
), p.
454
.
7.
J.
Sinacore
and
H.
Takai
, “
Measuring g using a magnetic pendulum and telephone pick up
,”
Phys. Teach.
48
,
448
449
(
Oct.
2010
).
8.
We have downloaded the Android application Physics Toolbox Suites for free from Google Play.
9.
C.
Deacon
, “
Error analysis in the introductory physics laboratory
,”
Phys. Teach.
30
,
368
(
Sept.
1992
).
10.
We have obtained our local theoretical value of the acceleration due to gravity by inserting our altitude and longitude into a formula that appears at this website: http://www.npl.co.uk/reference/faqs/how-can-i-determine-my-local-values-of-gravitational-acceleration-and-altitude-(faq-pressure).
AAPT members receive access to The Physics Teacher and the American Journal of Physics as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.