A Pocket-Sized Magnetometer Inside of a Tic Tac Box

A low-cost way to measure magnetic forces using a linear Hall effect sensor, an Arduino, an OLED screen, and a push button.

Jeremy Cook
5 years agoSensors

Magnets are amazing devices, sticking to certain surfaces like magic, and allowing for a wide range electromagnetic effects — such as the construction of a DC motor. If you want to measure a particular magnet’s performance, you’ll need a magnetometer, and with this Arduino-powered portable unit, you can have this instrument ready to go at a moment’s notice!

The project uses a SS49E probe to measure magnetism, held in position away from other electronics inside of the shell of a (former) ballpoint pen. This connects to an Arduino circuit as the base of the device, which is housed in a large Tic Tac box, along with a 0.96” OLED screen and a 9V battery. User interface is provided via an on/off switch and a single push button that triggers a measurement offset calculation.

When in use, the magnetic field is measured 2,000 times in a row in 0.2 to 0.3 seconds. This enables it to calculate and display both the mean and standard deviation, which are helpful for fluctuating magnetic fields. The rig is calibrated using the field strength of a solenoid, which can be calculated based on the density of the windings and the current supplied.

The assembly was prototyped on an Arduino Uno, before being stuffed into the container with a Nano. Always a good idea when space will be restricted later!

Jeremy Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Latest articles
Sponsored articles
Related articles
Get our weekly newsletter when you join Hackster.
Latest articles
Read more
Related articles