[Dprglist] A source of error when using magnetometer

Doug Paradis paradug at gmail.com
Wed May 2 11:57:18 PDT 2018


-All,
     I was perusing instructables.com and came across a recent instructable
about a "smart car" type robot using a GPS and a magnetometer. In the
article, the author mentioned that the headers that he used on the
magnetometer module, contained iron and were a source of error when using
his magnetometer.

Quote from the instructable:
" I cannot stress enough how important it is to get this part of the
project Exactly Right. There are so many things that could go wrong in this
part of the build. The first step in adding the compass to our robot is to
solder header pins to the compass. We must make sure that our pins are not
made of ferrous material, in other words no iron or anything magnetic
should be anywhere near our magnetometer; otherwise, our compass readings
will be inaccurate. When we tell our robot to turn right, it needs to turn
exactly 90 degrees to the right, or at least very close to it.

I made a Youtube Video demonstrating this problem a while back. My
magnetometers came with it's own pin connectors that I would need to solder
to the HMC5883L. After noticing that my compass readings were consistently
wrong I started looking for the source of the problem. Well after a lot of
aggravation I finally discovered that the pins were ferrous and throwing
off my compass. Here is the Youtube video demonstrating this. "

The YouTube video is at:  <goog_680161816>
https://www.youtube.com/watch?time_continue=2&v=UysOlmQC73o

I always use Nylon fasteners when working with magnetometer modules, but
had not thought to check the header material. Going through my bin of 100
mil male headers, I checked several, and some were magnetic (bought bulk
from China) and some were not (source unknown - most likely Tanners or
Fry's).

I will take this into account next time I use a magnetometer module.

Regards,
Doug P.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dprg.org/pipermail/dprglist-dprg.org/attachments/20180502/57e15b2d/attachment.html>


More information about the DPRGlist mailing list