eCompass: Short Magnetometer Review

Thread Starter

jpanhalt

Joined Jan 18, 2008
11,087
As Winter approaches, I figured it would be nice to know which way is South -- actually, I wanted a digital compass for my lightning detector project.

I tested three devices: 1) Bosch BMC156; 2) InvenSense MPU-9250; and 3) AsahiKasei AK8963C. Each was controlled with an SPI interface and used the same development board (below).
upload_2016-12-3_8-6-29.png

A 4X16 LCD in 8-bit mode was attached to the long header. The pot shown next to the MCU was not needed for that display and was removed. The open socket accepts a backpack switch module.

The board was initially designed for the Bosch device (pictured) and adapter boards to give the same pinout were used for the other devices. The chips are QFN packaged, so I purchased break-out boards for each. Each chip will allow either SPI or I2C communication (see exception for the MPU-9250).

The InvenSense MPU-9250 device is actually two dies in a single package. One chip provides 6-axis inertial data; the other is an AK8963C, 3-axis magnetometer. The SPI interface with the MPU-9250 is a little more complex than for the other devices, as register numbers for the two included chips overlap. One must enter a pass-through mode to get to the AK8963, which is then operated as an I2C accessory device. As best I can tell, it only allows 14-bit operation of the AK8963. Since I was only interested in the magnetometer function at this point, I did not play with the InvenSense chip further.

The Bosch BMC156 also includes 6-axis inertial data and 3-axis magnetometer data plus a Hall resistance value that can be used for temperature correction. X and Y axis's are limited to 13-bit data and have a stated maximum sensitivity of 0.3 uT/LSB . One nice aspect of the chip is the ability to do multiple readings from 1 to 511 with automatic averaging. I settled on 47 reads for each axis. One can also adjust output data rate from 0 Hz to 30 Hz. A rate of 20 Hz is common and worked well. Compared to the AK8963C, the data from the BMC156 seemed less stable. That stability did not improve noticeably by going to 511 reads. The chip tends to go to a power-down mode. With every read cycle, one must wake it up. That is not a problem once you are aware of the need. Overall, it is an easy to use chip, particularly if you need both inertial and magnetic data.

I ended up selecting the AK8963C for my current project. The interface is just as easy as for the BMC156. It offers two sensitivities: 16-bit (0.15 uT/LSB) and 14-bit (0.6 uT/LSB). One can put it in a permanently on mode. It only offers two read frequencies: 8 Hz and 100 Hz. I used 100 Hz and averaged 16 readings at 16-bit resolution. The difference between 8 and 16 readings was imperceptible. I wish I had a standard magnetic source with which to calibrate it, but the observed values seem reasonable based on my location ( http://geomag.usgs.gov/plots/ location key: http://geomag.usgs.gov/monitoring/observatories/ ).

Attached is a video of the AK8963C oriented approximately North. Had to upload it as a zip (sorry).

John
 

Attachments

ScottWang

Joined Aug 23, 2012
7,498
Hi John:
The project post in our The Completed Projects forum and it should be could reduplicated, it could be including hardware and software, if the hardware was bought it from the shopping site then you could make a link for the product, if you just built it and please upload the schematic and the software also should be upload to out forum or point out where to download it, after you completed the contents then this thread will move to The Completed Projects forum, thank you.
 

Thread Starter

jpanhalt

Joined Jan 18, 2008
11,087
It is simply a discussion of some of the pros and cons of those three chips. I could not find such a comparison on the Internet and thought the information might be of interest to other hobbyists who might be looking to make an eletronic compass. That is why I bought all three BOB's and tested them. That's all. Schematic is trivial -- connect the four SPI signal lines from the chip to the corresponding SPI signal lines of the MCU. Altenatively, the potential builder can choose to use I2C.

I didn't post it in "projects" as the project is finished from my perspective. AAC doesn't have any sub-forum for product reviews. My other choice of forum was Off Topic, but I didn't feel this type of compass would give Mr. Trump the guidance he will need to succeed.

John
 

ScottWang

Joined Aug 23, 2012
7,498
This thread was moved it from The Completed Projects forum, but it was in a awaiting status to waiting for mods team to decide what to do, I checked it but I can't find it is belongs to the The Completed Projects forum, so I moved it to the projects forum, normally the uncompleted projects will post at there, if you just providing an idea then you could adding some more info into the thread and then I can move it to the
Electronics Resources, if move it to the off-topic and it seems too far for it.
 

Thread Starter

jpanhalt

Joined Jan 18, 2008
11,087
It is hardly embedded, as I haven't posted or mentioned the code in any detail. I would prefer Resources, as a good hiding place.

While we are at it, do posts in completed projects have to have a purpose or is just giving a schematic sufficient?

John
 

ScottWang

Joined Aug 23, 2012
7,498
Any kind of project post in the The Completed Projects forum, it must could be reduplicated by our members, that's the purpose of that forum, when you post the project on that forum then our members could copy it to work for them.
 

DNA Robotics

Joined Jun 13, 2014
670
Thanks John. I have been playing with a Honeywell HMC5883L Compass. So far it seems pretty erratic so I ordered a LSM303 Accelerometer + Magnetometer Compass from Adafruit.
If that doesn't do what I want, I will try the AK8963C
 
Top