hmc5843

Breakout boards for sale

Last updated on Mon, 2011-06-20 11:09. Originally submitted by fabio on 2011-06-05 11:11.

I'm cleaning my workshop and I do have some breakout boards which I'm not going to use so I'd like to sell them if someone is interested. All of them are new and tested.

Here is what I have:

  • 6 5 4 3 2 1 breakout boards for ITG3200 25 euro SOLD OUT! Thanks!
  • 6 5 4 3 2 breakout boards for ADXL345 20 euro
  • 2 1 breakout boards for HMC5843 25 euro SOLD OUT! Thanks!
  • 1 breakout board for HMC5843 by Sparkfun (used a couple of times with male headers soldered) 25 euro SOLD OUT! Thanks!

Prices includes shipping to EU. If interested please contact me.
Thanks!

p.s. I'll keep this post updated with availability.

Various breakout boards for sale

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.

FreeIMU is alive!

Submitted by fabio on Wed, 2011-01-26 19:18.

Yeah! I soldered everything and all went smooth.. only a little bug.. the connectors have a 0.032" drill hole while it should be 0.04".. so, regular squared pins array wont fit inside. You can use rounded pins, female thin pins (as the one shown in the video below) or wires directly.

But everything works great. Communication on I2C running at 400Khz directly from Arduino through the on board I2C level converter.. works great!

Next days more tests, I'm expecially interested in having a look at how the I2C signals looks on a scope with or without the I2C level converter.. I'll also try to simulate some noise and using long wires to check what happens..

Here is a short video on the progresses done these days.

FreeIMU: designing a free (as in speech) 9 DOM/DOF MARG IMU

Last updated on Wed, 2011-05-25 08:38. Originally submitted by fabio on 2010-12-09 10:53.

UPDATE 2011-02-10: Check out FreeIMU project page for all the informations about FreeIMU!

In the past months I worked a lot on accelerometers, gyroscopes and digital compasses. I'm now pretty intimate with the ADXL345, the ITG3200 and the HMC5843.

I've been able to design and construct homebrew DIY breakout board PCBs for all of them (ADXL345 and ITG3200) and to create a nice library to use them which also implement a great sensor fusion algorithm capable of running on the Arduino without problems.

I'm now making the next step. Let me introduce FreeIMU.

FreeIMU.png

FreeIMU is a 9 DOM/DOF MARG IMU based on the ADXL345, the ITG3200 and the HMC5843. As this is part of my Master of Science Project and that I completely share the openness of projects like Arduino, FreeIMU will be completely open: all the designs will be released under a Creative Commons Attribution-ShareAlike 3.0 Unported while all the software will be release under GNU GPL v3.

As my background is in computer science, I'm quite self-taught in PCB designs and in electronics in general. So, I'm now seeking review for FreeIMU's schematics and PCB designs. If you have experience working with IMUs, designing PCBs or circuits and you would like to contribute to a free project please have a look at the designs and feel free to comment it.

I'm using kicad as schematics and PCB editing software. It's free (as in speech) software and, once you get around its glitches, it works really well. Using non-libre software like EAGLE to design a free hardware like FreeIMU would have been simply senseless.
Note: I'm using a nightly updated version of Kicad, so if you have problems opening the files you might need to update your version of Kicad.

So, you'll find the current Kicad based sources of FreeIMU in the attachments to this page just below. You'll also need a library of components which I also attach here. For your convenience I attach also a pdf version of the schematics.

I plan to submit FreeIMU to DorkbotPDX PCB Order of the 13th December to have it constructed. I currently don't see this as a commercial project but if someone is interested in FreeIMU I could sell a couple of boards.

Ok, so.. looking forward to hear your comments. Thanks!

UPDATE 2010-12-13:

FreeIMU designs have been sent for fabrications. Looking forward to receive the PCBs soon! I have received some interesting advices on the board design so the design sent to production has been slightly modified: there's now space for an optional 10uF tantalum capacitor in package A and there's more clearance for the mounting holes. The original design would have been making almost impossible screw FreeIMU as there were some capacitor just near the mounting holes.

You find the final PCB design in the attachments below. I also attach below the Gerber and drill files sent for production.

I'd like to thanks everyone who helped in reviewing and advising on FreeIMU. I'd like to thank especially Greg Peek from dorkbotpdf-bladder mailing list who convinced me on adding the 10uF cap and adding more clearance on the mounting holes. I'd like also to thank James Neal for suggesting the addition of the mounting holes in the first place and for taking care of organizing the PCB group order.

UPDATE 2010-12-22:

The FreeIMU project is progressing nicely.

Yesterday Laen received FreeIMU's PCBs and they shuold have been
shipped to me today.

I've also been able to find cheap stencils from
http://www.smtstencil.co.uk/ .. They should have shipped the stencils
yesterday.

Meanwhile I ordered all the components to produce 10 copies of FreeIMU.

The code is now quite stable and I'm using it on my tangible user
interface prototype (basically it's a sphere capable of detecting
taps, double taps and its orientation - more on this on my blog soon).

I should be able to produce the first boards around the first week of
January.. I'm really looking forward to it!

UPDATE 2011-01-02:

The interest this project is getting is huge! Thanks to everybody who contacted me about FreeIMU and to the people who already reserved FreeIMU units.

For those who are interested in buying one or more FreeIMU units here are the prices:

  • Fully assembled FreeIMU v0.1: 80 euro 70 euro with international shipping and pre-soldered female or male headers (at your choice) included. For multiple orders I can offer a discount, just get in touch with me.
  • FreeIMU v0.1 raw PCB: 15 euro with international shipping included and non-soldered female or male headers. Note: You will have to buy the ICs sensors by yourself and be able to reflow solder them.

If you want to buy one or more units please get in touch with me and I'll reserve your units for you. The number of available units is limited and a strict first came first served policy will be followed so reserve your units as soon as you can to be sure to get one.

UPDATE 2011-01-14:

Still no signs of FreeIMU's PCBs. It looks like Lean will need a better shipping option for us in Europe. More than 3 weeks already passed from the shipping of the PCBs from the USA to Italy and still no signs of them. Of course, we had the holidays in the middle, but that's way too much!

UPDATE 2011-01-18:

Just created a FreeIMU project page on Launchpad. Using launchpad for FreeIMU development will give us some great advantages like: an high quality repository with bazaar, code and designs browsing, questions and answers, bug and features suggestions.. Moving the project to a public place was a step to be made.

So, from now on, you can download FreeIMU designs from it's repository using:

bzr co lp:freeimu

UPDATE 2011-01-20:

Still no signs of FreeIMU v0.1 .. fuc**in Italian customs. Anyway, FreeIMU version 0.2 has been sent for fabrication and today it has been shipped to me. This time of course using FedEX which shouldn't be so slow as regular mail. Let's hope so..

Following some picture of FreeIMU v0.2:
FreeIMU v0.2 top view

FreeIMU v0.2 bottom view

UPDATE 2011-01-26:

FreeIMU is alive! First units of FreeIMU have been produced and I'm currently testing everything. Stay tuned!

Initial implementation of a 9 DOM/DOF MARG IMU orientation filter with ADXL345, ITG3200 and HMC5843 on Arduino

Last updated on Tue, 2011-05-10 13:49. Originally submitted by fabio on 2010-12-04 16:15.

UPDATE 2011-05-10: The 9 DOM sensor fusion library presented in this article is now part of the FreeIMU library. Please consider the code in this page as outdated and just use the FreeIMU library.

I spent the last days creating an initial implementation of a 9 Degrees of Measurement (DOM) / Degrees of Freedom (DOF) AHRS sensor fusion orientation filter. I've created a library, called FreeIMU, which polls data from the ADXL345 accelerometer, the ITG3200 gyroscope and the HMC5843. Have a look at the attachments for my circuit schematics.

To access the ADXL345 accelerometer I used this nice Arduino library (based on this other one), while for the ITG3200 I used Filipe Vieira's ITG3200 Arduino library. To access the HMC5843 I used my library.

The sensor values are then pushed into Sebastian Madgwick's implementation of Mayhony's DCM filter incorporating Sebastian's magnetic distortion compensation (Algorithm available here - project here).

IMPORTANT: This code doesn't disable the ATMEGA internal pullups so a logic level converter/translator is needed if you don't want to fry your sensors. In the video I used a modified version of twi.c (inside of the Wire library) commenting out the pullup enabling in twi_init().

The result can be seen in the video below. Note that all the code published here is still very very young. You'll probably find lots of bugs and WTF but I think it can still be useful. Keep an eye on this website for the next developments. If you are working on this stuff get in touch with me if you want to share efforts.

An HMC5843 magnetometer library for Arduino based on Wire

Last updated on Fri, 2012-07-27 16:32. Originally submitted by fabio on 2010-12-01 13:22.

UPDATE 2012-07-27:

The HMC58X3 library is now part of the FreeIMU library. Please refer to the FreeIMU library page for newer code.

UPDATE 2011-01-22:

I moved the development of the HMC5843 Arduino library to Launchpad. This way we will have a proper repository, bug tracking, question/answer, etc.. You can find it here: A libre Arduino Library for the HMC5843 and HMC5883 Honeywell magnetometers

I just completed porting the HMC5843 Arduino library, originally created by Nirav Patel (his library) and then extended/improved by E.J.Muller (his library), to use only the Arduino Wire library to use the I2C bus.

First steps with the HMC5843 with Arduino: verify the accuracy of its results

Last updated on Mon, 2010-11-29 20:22. Originally submitted by fabio on 2010-11-24 14:04.

I finally got an HMC5843 magnetometer breakout board. I wasn't able to make a DIY breakout board for this chip (but I'm still willing to try that again) so I had to buy one. Of course I ended up with one made by Sparkfun sold by watterott.com.

HMC5843 breakout board from sparkfun

So now I'm moving my first steps with this chip. I'm now verifying the accuracy of its readings. I found a nice Arduino library on Arduino forum which contains a calibration routine (there is a copy in the attachments below). It looks like it simply uses an internal calibration feature. I'm still not sure on how this actually works.

However I ended up plotting some graphs from the readings from the chip while rotating it around the Z axis and while moving it in 3d rotations. Ideally, in a perfectly calibrated device these graphs should be respectively a circle and a sphere centered in the origin.

These are the resulting pictures:

X and Y readings rotating the HMC5843 around the Z axis:
X and Y readings rotating the HMC5843 around the Z axis

X, Z and Y readings rotating the HMC5843 in 3D:
X, Z and Y readings rotating the HMC5843 in 3D

As you can see the picture are not perfect circle and spheres so a more complex calibration routine its probably needed to get very precise readings.

I still don't know if the precision I'm currently getting would be enough or not for my needs. I asked for clarification on a Sparkfun forum thread on the topic but I still didn't got a reply.

Thanks to newbee on Arduino forum I found this nice paper by ST Microelectronics called Using LSM303DLH for a tilt compensated electronic compass which describe quite well a procedure to calibrate a magnetometer (it actually covers tilt compensating a magnetometer with an accelerometer, so it might came handy in further developments).

I attach here the gnuplot "programs" I implemented to create the above graphs. If you are working with the HMC5843 they may come useful.

makeplot3d.p reads data from a datafile. It expects data to be comma separated in the X,Y,Z form

makeplot.p instead expect a datafile with space as separator.

I created the dumps of the readings using the attached test_serial.py_.txt python script. You will need PySerial installed on your system to use it.

Save it, rename it to test_serial.py then simply run python test_serial.py > dump.txt so you will have all the values coming from the Arduino in the dump.txt file ready to be used by gnuplot.

EDIT: On Sparkfun forum user pvmellor asked what typical variance and standard deviations we get from the HMC5843. So, I created a simple octave (matlab) script to compute the std and variance from a csv file containing (not so) calibrated readings from the HMC5843 (see above).

My results, of a 3 minutes dump (HMC5843_steady.data) of the readings coming from the Arduino code _11_hmc5843_calibrazione.tar_.gz while keeping the device steady, computed with the Octave script HMC5843_statistics.m were (X Y Z):

STD =

    8.8842    5.5359   15.1949

VAR =

    78.929    30.646   230.885