Learning about Hall effect switches & sensors led to curiosity about more detailed detection of magnetic fields. It's always neat to visualize something we could not see with our eyes. Hall sensors detect magnetic field along a single axis at a single point in space. What if we can expand beyond those limits to see more? Enter magnetometers.

I thank our cell phones for high volume magnetometer production, as a desire for better on-device mapping led to magnetometer integration: sensitive magnetometers can detect our planet's magnetic field to act as a digital compass to better show a map on our phones. Since a phone is not always laid flat, these are usually three-axis magnetometers that give us a direction as well as magnitude for the detected magnetic field.

But that's still limited to a single point in space. What if we want to see the field across an area, or a volume? I started dreaming of a project where I build a large array of magnetometers and plot their readings, but I quickly bogged down in details that made it clear I would lose interest and abandon such a project before I could bring it to completion.

Fortunately, other people have played with this idea as well. My friend Emily pointed me to Ted Yapo's "3D Magnetic Field Scanner" project which mounted a magnetometer to a 3D printer's print head carriage. Issuing G-code motion commands to the 3D printer control board, this allowed precise positioning of the sensor within accessible print volume of the 3D printer. The results can then be plotted out for a magnetic field visualization. This is a great idea, and it only needs a single sensor! The downside is that such a scheme only works for magnetic fields that stay still while the magnetometer is moved all around it. I wouldn't be able to measure, say, the fields generated by an electric motor's coils as it is running. But it is still a fun and more easily accessible way to see the magnetic world.

I started window shopping magnetometer breakout boards from Adafruit, who has an entire section in their store dedicated to such devices. Product #5579 is built around the MMC5603 chip, whose sensitivity is designed for reading the Earth's magnetic field. For non-compass scenarios, such sensitivity would quickly become saturated near a magnet. Adafruit recommended product #4366 built around the TLV493D chip for use with strong magnets.

I thought it would be interesting to connect one of these sensors to an ESP8266 and display its results on a phone web interface, the way I did for the AS7341 spectral color sensor. I was almost an hour into this line of thought before I realized I was being silly: why buy a magnetometer to connect to an ESP8266 to serve its readings over HTTP to display in a phone browser interface? My Android phone has a magnetometer in it already.