HMC5883L

How to connect and test FreeIMU v0.4 with Arduino and the FreeIMU library

Submitted by fabio on Tue, 2012-04-17 10:31.

One of the FreeIMU users, who bought one of our production run FreeIMU boards, shipped me his board as a faulty one. We promptly shipped him a replacement board but when I tested his board I found out that it was working perfectly.

This motivated me enough to record this video (actually using exactly his board) showing you how to correctly connect a FreeIMU board and testing it with the FreeIMU library.

MultiWii support for FreeIMU v0.4 and MPU6050

Submitted by fabio on Sun, 2012-01-08 14:33.

Thanks to myself, timecop and Alexinparis, FreeIMU v0.4 and its MPU6050 are now supported in MultiWii. At the moment, the code doesn't use the DMP due to the lack of documentation for it. The MPU6050 I2C master features are instead used, so the magnetometer is now read directly from the MPU6050.

Code available on MultiWii SVN: http://code.google.com/p/multiwii/source/checkout
Development discussion: http://www.multiwii.com/forum/viewtopic.php?f=8&t=1080
FreeIMU project: http://www.varesano.net/projects/hardware/FreeIMU

Updating to Arduino 1.0 APIs and improvements

Last updated on Mon, 2011-12-19 12:33. Originally submitted by fabio on 2011-12-05 18:01.

As you may have heard, the Arduino team just released the version 1.0 of their IDE which comes with quite some changes in the programming APIs. So, I spent some time updating all my Arduino libraries to be used with Arduino 1.0.

From now on, I consider previous versions of the IDE/API no more supported. So, if you are using my libraries, you are strongly suggested to update to Arduino 1.0 and the most recent version of my libraries.

Here are the new versions with the changes made:

  • HMC58X3 library: updated to Arduino 1.0 with a better calibration.
  • MS5611-01BA: better reading functions which cache the results when the sensor can't provide a newer reading, update to Arduino 1.0.
  • FreeIMU library: updated to Arduino 1.0 and to the new algorithm by Sebastian.

Enjoy it!

UPDATE 2011-12-07: The Arduino 1.0 API has a bug in the Wire implementation which throws an error on compiling: call of overloaded 'write(int)' is ambiguous. In order to fix it, search Wire.h within your Arduino install and add the following lines:

inline size_t write(unsigned long n) { return write((uint8_t)n); }
inline size_t write(long n) { return write((uint8_t)n); }
inline size_t write(unsigned int n) { return write((uint8_t)n); }
inline size_t write(int n) { return write((uint8_t)n); }

Your Wire.h will look like this. See the bug report for all the details.

FreeIMU v0.4.1: first prototype built

Submitted by fabio on Mon, 2011-10-31 10:58.

I'm back to developing stuff.. And I can already show you something cool.. here is the very first FreeIMU v0.4.1 prototype, featuring MPU6050, HMC5883L, MS5611. Testing it next days.

FreeIMU v0.4.1 First prototype

A picture of FreeIMU v0.3.5_MS

Submitted by fabio on Mon, 2011-07-11 09:24.

This is one of the very first FreeIMU v0.3.5_MS I assembled during the past weekend. This is probably one of my best soldering work and PCB design.

FreeIMU v0.3.5_MS

My HMC58X3 library is now fully compatible with the HMC5883L

Submitted by fabio on Wed, 2011-04-27 12:59.

I'm happy to announce that my libre Arduino Library for the HMC5843 and HMC5883L Honeywell magnetometers is now fully compatible with the HMC5883L. From version 0.2 on both the HMC5843 and HMC5883L will be supported.

By default the library assumes you are using the HMC5883L. In order to use the library with the HMC5883L you have to edit the file HMC58X3.h and uncomment the line "#define ISHMC5843".

The FreeIMU library has been updated to include support for the new HMC58X3 library.

Preview of FreeIMU v0.3

Submitted by fabio on Fri, 2011-04-01 18:01.

Ok, I'm back hacking after a couple of months of hard work on the thesis which has been completed and submitted to the committee. 7 or 8 April degree! I still have to realize all of this..

Well, after a couple of days of relax I'm back to my regular hacking and I've been able to assemble the very first FreeIMU v0.3.

FreeIMU is my libre inertial measurement unit which I developed during my thesis. For all the informations please visit FreeIMU project page.

FreeIMU v0.3 is the latest version of FreeIMU which includes the ADXL346, the HMC5883L and the ITG3200. Initial test have been successful but I'm testing it.

So, here you have a couple of pictures:

FreeIMU v0.3 top view

FreeIMU v0.3 bottom view

I also made a quick video of FreeIMU v0.3

In this revision, I made some changes in the components used for the voltage level translation. It seems that the results are great. This is the signal quality of the SCL line running at 400KHz through the integrated logic level converter of FreeIMU v0.3.

FreeIMU v0.3 scope

A libre breakout board for the HMC5883L

Last updated on Tue, 2011-03-29 19:10. Originally submitted by fabio on 2011-01-31 11:38.

I just finished designing a breakout board for the HMC5883L. Just a very simple breakout board, just for me to get started with this new chip. Actually it's just a smaller and more fast and accurate version of the HMC5843, schematics are really similar to that chip.

Btw, here you have it. Designed with the wonderful libre software KiCAD and released under CC-BY-SA 3.0 Unported so you are free to do whatever you like with it, just remember to share alike your modified version so that we can keep the libre hardware ball rolling.

For best results you will need also to get my personal kicad library, where you find the footprint and schematic module for the HMC5883L.

Kicad sources for this breakout board can be obtained from my personal repository using bzr using the following command:

bzr co http://repository.varesano.net/LibreBB_HMC5883/

I'm no more adding zip files to this kind of posts as it is too time consuming to keep the attached archives updated with the current designs. You'll have to stick with bzr. The schematics are attached at the bottom of this page.

Here some picture of the design:
HMC5883 LibreBB Kicad view

HMC5883 LibreBB 3D top view

HMC5883 LibreBB 3D bottom view

UPDATE 2011/03/29:

Assembled first batch of breakout boards. They are working great! See picture below.

Picture of the breakout board for the HMC5883L assembled