Home‎ > ‎G) Personal Projects‎ > ‎

G.7) Magnetometry

The plan was / is to use two simple 3-axis magnetometers to find metal 'things'.

In the absence of any influence from magnetic material, the X, Y and Z components of the local magnetic field measured by two separated but similarly oriented magnetometers will be the same: the difference between each component will be zero.


When the local magnetic field is disturbed there will be a difference between the measured values in one, two or all of the X, Y and Z components. Recording these differences is a potential means of detecting magnetic variations (that could be due to buried treasure, etc.)



In fact, the variation should be detected twice: once when it affects the first magnetometer and once when it affects the second (but in the opposite direction. The actualité is that the magnetometers face in different directions.

Using a Parallax Propeller to read the raw data from each magnetometer simultaneously and then:
  • Calculate the difference between the two in the x, y and z axes
  • Subtract a rolling average of the difference from the instantaneous values - this is to try and get values about zero.
The output from the Prop is a serial stream of x, y and z values about zero. It relies heavily on object CompassBasicDemo140512b by Duane Degn.

The plots below show the effect of a small pair of pliers being waved approximately 6" from the magnetometers. The final output is the vector product of the differences between the two sets of reading (i.e., x, y, and z axis), biased towards zero by the subtraction of a 40-sample rolling average.



Raw Data From the Two Magnetometers



The Difference Between the Two Magnetometers


Intermediate Output



Final Output


Comments