An Arduino-based system with a triple axis magnetometer chip may be used to plot both the strength and direction of the magnetic field of a magnet directly on a sheet of paper. Before taking measurements, it is necessary either to correct for or to eliminate soft and hard iron effects. The same sensor may be used to determine the presence of soft iron effects.

1.
Martin
Connors
, “
Measurement and analysis of the field of disk magnets
,”
Phys. Teach.
40
,
308
315
(
May
2002
).
2.
Brandon
Lunk
and
Robert
Beichner
, “
Exploring magnetic fields with a compass
,”
Phys. Teach.
49
,
45
48
(
Jan.
2011
).
3.
Nicolas
Silva
, “
Magnetic field sensor
,”
Phys. Teach.
50
,
372
(
Sept.
2012
).
4.
Azeem
Iqbal
 et al. “
Comment on ‘Measurement of the magnetic field of small magnets with a smartphone: A very economical laboratory practice for introductory physics courses,’
Eur. J. Phys.
37
,
028001
(
2016
).
5.
Calin
Galeriu
,
Cheryl
Letson
, and
Geoffery
Esper
, “
An Arduino investigation of the RC circuit
,”
Phys. Teach.
53
,
285
288
(
May
2015
).
6.
L. H. M.
da Castro
,
B. L.
Lago
, and
Filipe
Mondaini
, “
Damped harmonic oscillator with Arduino
,”
J. Appl. Math. Phys.
3
(
6
),
631
636
(
2015
).
7.
There are two folders to be viewed at [supplementary material] available under the “References” tab at TPTOnline, http://dx.doi.org/10.1119/1.4981032 . Insert the Magnetometer folder into your Arduino folder. This folder contains the program. The program contains details of construction and operation of the experiment ini a series of comments. Insert the HMC5883L folder into your Arduino\libraries folder. This second folder contains the files necessary to establish communication between the Arduino and the sensor.
8.
M. J.
Caruso
, “
Application of magnetic sensors for low cost compass systems
,” in
Proceedings of IEEE Position Location and Navigation Symposium
,
San Diego, CA
,
March 13–16
,
2000
, pp.
177
184
.
9.
Richard Blum
,
Sams Teach Yourself Arduino Programming in 24 Hours
(
Sams
,
2015
).

Supplementary Material

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.