FreeIMU: an Open Hardware Framework for Orientation and Motion Sensing

FreeIMU is an ongoing research project which aims to design Open Hardware 9/10 DOM/DOF Inertial Measurement Units as well as easy to use Orientation and Motion Sensing libraries, built on top of the Arduino platform.
The goal of the FreeIMU Framework is to simplify the development of projects based upon the most powerful and new consumer grade inertial, magnetic and pressure sensors.

FreeIMU version 0.2 (left) and version 0.1 (right)

The main application of FreeIMU is orientation sensing: by reading the data from the various sensors is possible to compute precisely the orientation of FreeIMU in the space. Recent boards also feature an high resolution barometer allowing to precisely track the device altitude. This can be useful in many applications: human-computer interaction device prototyping, flying machines, robots, human movement tracking and everywhere orientation sensing is a key aspect.

As FreeIMU breakout the sensors interrupt pins, it's also possible to detect per axis single and double taps, free fall as well as activity or inactivity. This makes FreeIMU a very good choice for Human-Computer devices prototyping. Interrupts pins are also very useful if you are into interrupt based reading of the sensors, useful to develop high frequency interrupt based sensor reading.

Video presentation of FreeIMU

Older video presentations: FreeIMU v0.3, FreeIMU v0.1 and 0.2.

A true Open Hardware project

Open Hardware Logo

FreeIMU is a true Open hardware, released under the CC-BY-SA. You are free, actually encouraged, to use it for any purpose, to study and modify its designs, to make your own copies of FreeIMU and even sell your own FreeIMU based hardware. But, you will have to share your designs based on FreeIMU keeping attribution and sharing them using the same libre license.

On FreeIMU repository (see development section below) and from the downloads on this page, you have access to everything you need to build your own FreeIMU board. You have access to the schematics, the PCB designs and even the bill of material so that you can build your own FreeIMU.

Moreover, FreeIMU has been designed using KiCAD, an excellent libre PCB design software, so you don't have to rely on proprietary software to study or modify FreeIMU.

Getting FreeIMU

An assembled, tested and ready to use FreeIMU board can be bought from:

The FreeIMUs boards bought from the above shops financially support the project. The boards have been produced and assembled in Italy by reasonably paid workers in a safe environment in respect with European and Italian laws.

Build your own FreeIMU

If you have SMD soldering experience (or if you are up for experimentation) you can build your own FreeIMU. From the downloads below you have access to all the designs needed to have your FreeIMU PCB manufactured.

You can get cheap PCB with awesome quality from Dorkbot PDX and order the various components needed from you favorite electronic distributor: the Bill of Materials (BOM) files will tell you exactly which components you'll need for your FreeIMU.

The are various ways of soldering the board. If you only need a couple of boards done, tack flux, solder wire and hot air reflow station are enough to build your boards (Remember not to use hot air over the pressure sensor). See this video for good instructions. In case you are building more units, an SMD stencil with solder paste is the suggested method.

In case you need help, just post a comment below.

FreeIMU versions

FreeIMU version 0.1

FreeIMU v0.1

WARNING: Discontinued due to the phasing out of the HMC5843.

FreeIMU v0.1 is the simplest FreeIMU available. It contains the ADXL345 accelerometer, the ITG3200 gyroscope and the HMC5843 magnetometer, their respective capacitors and an additional 10uF capacitor to help keeping the power to the sensors stable. It doesn't have any voltage regulator nor any level translator so it needs to be connected to a 3.3V power source and the I2C level signals have to be 3.3V. When used on a 5V microcontroller, an I2C level converter and a voltage regulator are needed.

FreeIMU version 0.2

FreeIMU v0.2

WARNING: Discontinued due to the phasing out of the HMC5843.

FreeIMU v0.2 has the same sensors (ADXL345, ITG3200 and HMC5843) and size of v0.1 but I added an integrated voltage regulator (MIC5205) and a logic level converter (PCA9306). With these components it's extremely simple to use FreeIMU v0.2 on 5V boards like 16MHz Arduinos, just connect FreeIMU to the 5V, GND, SDA and SCL on Arduino and you are ready to go!

IMPORTANT: in version 0.2 sent to production there is a bug in the drill size of the connectors. The drill hole should have been 0.04" while it is actually 0.032". Consequence of this is that only rounded pins will fit inside the drill and standard squared pins won't fit. This is not really a problem as the big oval pad makes actually possible to use 90 deg squared pin arrays using the pad as a smd connector. The Kicad sources above and the gerbers marked with "Fixed" have this issue fixed. However they haven't been tested on production so double check them before send them to fabrication.

FreeIMU version 0.3

FreeIMU v0.3

FreeIMU version 0.3 replaces the accelerometer and magnetometers used in v0.1 and v0.2 with the ADXL346 as accelerometer and the HMC5883L as magnetometer. The gyroscope is still the ITG3200. FreeIMU v0.3 integrates a voltage regulator (MIC5205) and a logic level translator (PCA9306) as well as all the pullups resistors needed.

FreeIMU version 0.3.1

FreeIMU v0.3.1 is a minor revision of FreeIMU v0.3. There have been some corrections in the silkscreen and the footprint of the HMC5883L have been made slightly bigger to make assembly easy. Everything else is just as in FreeIMU v0.3.

FreeIMU version 0.3.5

FreeIMU 0.3.5 top view

FreeIMU 0.3.5 is a small (22x20 mm) 9 degrees of measurement IMU MARG sensor featuring the BMA180 accelerometer, the ITG3200 gyroscope and the HMC5883L magnetometer.

FreeIMU 0.3.5 also has two additional subversions, FreeIMU 0.3.5_MS which features the MS5611-01BA high resolution pressure sensor and the FreeIMU 0.3.5_BMP which features the BMP085 pressure sensor.

FreeIMU v0.3.5 has an integrated voltage regulator (MIC5203) allowing you to plug it from 3V3 to 16V providing you 80mA of current which you can use to chain it to other 3V3 sensors or devices. By using the MIC5203, no tantalum caps are used in the whole design. Tantalum is not a good idea socially and environmentally.

The board has integrated 2K2 pullups resistors (which can be enabled or disabled by means of a solder switch) but doesn't have an integrated logic level converter. We decided to not include the LLC (which is present in my FreeIMU v0.2 and v0.3) as it adds considerable complexity in the design and schematics without being strictly necessary. In fact, given a properly configured software, it's a redundant part. Moreover the upcoming development of many 3V3 based control boards (eg: Multipilot 32) makes adding an LLC not a very far-seeing choice.

The IMU board is however compatible with my LLC board which can be stacked above the IMU, so that you can easily add the LLC protection keeping the amount of additional wires at the minimum.

The board, a part from the usual power and I2C connectors, breaks out the interrupt pins for all the three sensors. This should empower software developers to design interrupt based sensor reading and sensor fusion algorithms (opposed to the currently common polling based approach) which should provide possibility to shorten the cycle path of our algorithms.

FreeIMU version 0.3.5_MS

FreeIMU v0.3.5_MS

FreeIMU v0.3.5_MS is a variation of FreeIMU v0.3.5 which features the BMA180 accelerometer, the ITG3200 gyroscope, the HMC5883L magnetometer and the MS5611-01BA high resolution pressure sensor.

The board comes with a voltage regulator (MIC5203) and 2K2 pullups optionally disabled by using of a solder switch.

FreeIMU version 0.3.5_BMP

FreeIMU v0.3.5_BMP top view

FreeIMU v0.3.5_BMP is a variation of FreeIMU v0.3.5 which features the BMA180 accelerometer, the ITG3200 gyroscope, the HMC5883L magnetometer and the BMP085 pressure sensor.

The board comes with a voltage regulator (MIC5203) and 2K2 pullups optionally disabled by using of a solder switch.

FreeIMU version 0.4

FreeIMU v0.4.1

FreeIMU v0.4 features the MPU6050 gyroscope+accelerometer, the HMC5883L magnetometer and the MS5611-01BA high resolution altimeter.

The magnetometer is attached to the AUX I2C bus of the MPU6050 thus allowing it to be read directly by the MPU6050.

FreeIMU library

FreeIMU can be easily used on Arduino compatible boards using the Arduino FreeIMU library which implements sensor fusion MARG orientation filter enabling you to do easy and straightforward orientation sensing.

FreeIMU library - 2012/11/22
Use Arduino 1.0.1 IDE or later version.

Install the libraries as explained in the Arduino Libraries Reference section Contributed Libraries.
The FreeIMU library now supports all the versions up to v0.4. By default it's configured to be used on v0.4. In order to use on different boards, open the file FreeIMU.h and uncomment the correct version of your board.

The FreeIMU library also supports the following 3rd parties boards:

  • Sparkfun IMU Digital Combo Board - 6 Degrees of Freedom ITG3200/ADXL345 SEN-10121
  • Sparkfun 9 Degrees of Freedom - Razor IMU SEN-10736
  • Sparkfun 9 Degrees of Freedom - Sensor Stick SEN-10724
  • Sparkfun 9 Degrees of Freedom - Sensor Stick SEN-10183
  • DIYDrones ArduIMU+ V3
  • Generic MPU6050 Breakout boards (eg: GY-521, SEN-11028 and other MPU6050 wich have the MPU6050 AD0 pin connected to GND.)

Note for FreeIMU v0.1 and 0.2 users: from April 2011 the default magnetometer configuration is for HMC5883L. In order to use the library with HMC5843 (v0.1 and v0.2) edit the file HMC58X3.h and uncomment the line #define ISHMC5843.

FreeIMU Processing Programs
The FreeIMU library comes with Processing visualization demos. In order to use them, Download and install Processing. Copy the folders within the processing folder of the FreeIMU library archive into your Processing sketchbook.
Remember to change the Serial port address in the Processing code to match the address used by arduino on your system.

Ports to Other platforms

FreeIMU library on PIC 24 microcontroller by Hari Nair hair [dot] nair [at] gmail [dot] com. Author notes: 1. assumes a 6MHz crystal is attached and x4PLL internally, so Fosc = (6x4)/2 = 12 Mhz 2. trivial to use the internal FRC oscillator, instead of FNOSC_PRIPLL in the configuration words, use FNOSC_FRCPLL. This will give you Fosc = (8x4)/2 = 16MHz, but of course with less precision. 3. transmits ascii quaternion data at 38400baud. This does slow down the sampling rate. Without the quaternion print, the code completes in less than 10mS, so the sampling rate is exactly 100Hz as set by the timer.

FreeIMU library on NXP LPC1343 Cortex m3 processor by Hari Nair hair [dot] nair [at] gmail [dot] com. More details and possibility to contact the author on the FreeIMU community development forum.

Have you ported the FreeIMU library to other platforms? Please let me know and I'll list your work here!

Calibration

A calibration GUI application is available. The software is currently in alpha state, however many people are already using it.

The calibration, when properly executed, drastically improve the orientation sensing performance of the FreeIMU framework. If you are experiencing drifting or inconsistent results, your sensors may need to be calibrated using the Calibration GUI.

Community

There is now a FreeIMU Community website, which has been set up to become the central point of interaction between users of the FreeIMU framework. This is the place where you can get help, join others in developing new features, discuss IMUs applications and much more.

Previously we used FreeIMU answers on Launchpad as well as comments on Fabio's website for supporting users, however we decided to create an ad-hoc website to facilitate information gathering and collaboration between people.

Development, Bug Reports and Suggestions

Development of FreeIMU boards and libraries can be followed on FreeIMU project page on Launchpad which also hosts our software and hardware repository.

Suggestions or bug reports can be made on the FreeIMU Community, in the development forum.Previously bug reports were posted on the Launchpad bug reporting interface but that's not used anymore.

FreeIMU repository holds all the various library sources as well as design files and schematics. Everything is revisioned meaning that all the changes are logged and annotated.

The contents of the repository are available using Bazaar (bzr) with the command:
bzr co lp:freeimu

Never used bzr before? Not a big deal, it's very similar to git, svn or others. You may wanna have a look at the cheatsheet to have an overview of the commands available or read more documentation on bzr.

Alternatively, in case you have problems setting up bzr on your system, you can simply get the latest repository contents from here. The resulting file is a .tar.gz archive which can be opened with the excellent 7zip under Windows. Mac and Linux users shouldn't have problems opening such files.

The files on the repository can also browsed from a browser here. A list of recent changes is available here.

FreeIMU users videos

Here some videos made by FreeIMU users on their projects using FreeIMU.

rtsdrums flies like crazy with FreeIMU on his quadcopter.. check out the triple flip!

Warthox testing indoor FreeIMU v0.4r3 on one of his quadcopters.

Warthox stress test FreeIMU v0.3.5_MS on one of his quadcopters.

Chris uses FreeIMU on his VTOL EDF Tricopter powered by the MultiWii software.

Danilo Del Console uses FreeIMU in a 2 wheels self balancing robot.

Francesco Ferrara uses FreeIMU for a camera stabilization system.

Francesco Ferrara with his super fast implementation of the AHRS algorithm capable of displaying the rotating cube at 333Hz with FreeIMU! Great work!

Marchino65 with his first test with FreeIMU and the FreeIMU library on Arduino. The cube is spinning pretty good!

Francesco Ferrara in his first flight with FreeIMU on his very young quadcopter project called Simplo.

Small Batches? How? Also Q about

Submitted by Frank Zhao (not verified) on Sun, 2011-12-04 23:05.

Hello

When you say you make small batches in 10-20 boards at a time, are you doing that in-house and by hand? Or is there a particular company that specifically assembles small batches in an economic way?

Thanks
Frank

Until now I always assembled

Submitted by fabio on Mon, 2011-12-05 00:38.

Until now I always assembled them by hand and yep very in house. Unfortunately factory assembling costs quite a lot if not done for many units.

FreeIMU on a wireless JeeNode

Submitted by Thomas Hirt (not verified) on Sat, 2011-12-03 21:57.

Hi!
I've got it working pretty well now with some help from Fabio.
Thank for developing this stuff.

A small video about the combination of FreeIMU and a wireless JeeNode:

http://www.pulse-project.net/pulse-project/videos/jeenode.html

Ciao,
Thomas

PS: Please put me on the list for the FreeIMU 0.4.1

Yaw, Pitch and Roll calculation

Submitted by Thomas Hirt (not verified) on Thu, 2011-12-01 14:41.

Hi Fabio,
I try to find a better way to calculate yaw pitch and roll from the quaternion output.

The function getYawPitchRoll works only if the device is not turned upside down.

I think also the function getEuler outputs not the expected data or I am misunderstanding euler angles? It should output 3 angles and if I understand it right, they are the same then yaw, pitch and roll...

So I found this site:
http://www.euclideanspace.com/maths/geometry/rotations/conversions/quate...

I try to rewrite this function for arduino but I have a problem with the quaternion. A quaternion has 4 values, in the calculation mentioned above: w,x,y,z But which values received from FreeIMU corresponds to x, x, y and z? Is the first value x or w?

I would so love to have values for the full rotation no mather how I hold the device...

Thomas

It drives me nuts

Submitted by Thomas Hirt (not verified) on Thu, 2011-12-01 21:59.

I tried now every possible arrangement of the quaternions in the following code but I just can't get it to work on more then two axis. Z (Yaw) behaves right and so does X (pitch). But if I turn the device around Y the thing messes up. I didn't taught that it would be so difficult du get just 3 angles out of an IMU. I am not a programmer and do not know much about trigonometry. Maybe someone more skilled will find a solution...

double q1x;
double q1y;
double q1z;
double q1w;

q1x = q[0];
q1y = q[1];
q1z = q[2];
q1w = q[3];

double sqx = q1x*q1x;
double sqy = q1y*q1y;
double sqz = q1z*q1z;
double sqw = q1w*q1w;

double unit = sqx + sqy + sqz + sqw; // if normalised is one, otherwise is correction factor
double test = q1x*q1y + q1z*q1w;

if (test > 0.499*unit) { // singularity at north pole
eulerArray[0] = 2 * atan2(q1x,q1w);
eulerArray[1] = M_PI/2;
eulerArray[2] = 0;

calcDone = true;
}

if (test < -0.499*unit) { // singularity at south pole
eulerArray[0] = -2 * atan2(q1x,q1w);
eulerArray[1] = -M_PI/2;
eulerArray[2] = 0;

calcDone = true;
}

if (!calcDone) {
eulerArray[0] = atan2(2*q1y*q1w-2*q1x*q1z , sqx-sqy-sqz+sqw);
eulerArray[1] = asin(2*test/unit);
eulerArray[2] = atan2(2*q1x*q1w-2*q1y*q1z , -sqx+sqy-sqz+sqw);
}

// Convert to degrees
eulerArray[0] = eulerArray[0] * (180 / M_PI);
eulerArray[1] = eulerArray[1] * (180 / M_PI);
eulerArray[2] = eulerArray[2] * (180 / M_PI);

It seems to be more complicated

Submitted by Thomas Hirt (not verified) on Sat, 2011-12-03 22:14.

Hi!
After some research I had to find out that this calculation is not as easy as I initially thought. For more information read here:

https://sourceforge.net/projects/mjbworld/forums/forum/122133/topic/4855...

Ciao,
Thomas

3,6 V from Lithium button cell

Submitted by Thomas Hirt (not verified) on Wed, 2011-11-30 18:39.

Hi Fabio!
I run your FreeIMU on a JeeNode and I am powering it with a button cell with 3,6 V and 180 mah like this one: http://www.conrad.at/ce/de/product/252237/KNOPFZELLENAKKU-LITHIUM-LIR245...

Can I connect this button cell directly to your device or will the voltage be too much (it's in the beginning higher then 4V and drops slowly)? If not, what precautions should I take...

Thanks,
Thomas

Sure! Just connect it to the

Submitted by fabio on Wed, 2011-11-30 19:45.

Sure! Just connect it to the VIN and GND. FreeIMU does has a low drop-out voltage regulator on board which will regulate the 4V of the battery just fine.

Note that if you connect it to 3V3 and GND the voltage won't pass through the regulator and you are damaging your sensors.

Yaw Axis drift

Submitted by Thomas Hirt (not verified) on Mon, 2011-11-28 21:16.

Hi!
I experience sometimes a strange yaw axis drift. I cannot tell until now when this occurs. I have to work more with the unit. Do you know what the this issue could probably be?
Thanks,
Thomas

To close to USB Keyboard

Submitted by Thomas Hirt (not verified) on Mon, 2011-11-28 21:19.

OK, I held the device to close to my apple USB Keyboard...
Now I only need to get this yaw, pitch and roll problem to work.

Yeah, any kind of electro

Submitted by fabio on Tue, 2011-11-29 00:36.

Yeah, any kind of electro magnetic interferences will affect the magnetometer.

Works exactly as expected! Just awsome... + 1 Question

Submitted by Thomas Hirt (not verified) on Mon, 2011-11-28 16:23.

Hi Fabio!

Your FreeIMU works just wonderful! Thank you!
I could reproduce the "Yaw, Pitch, Roll" and the "cube" example.
Works really smooth and as expected.

My question:
Yaw gives values between -179 and +179 so this makes more or less 360 degrees.
Pitch and roll give just values from -90 to 90, so just 180 degrees.
Is this enough to know the exact rotation? If the device is turned upside down I would get the same values...

Obviously it works, because the cube example is awesome. So it must be me not understand how to... Could you explain and help me?

What would be the best method to find out the exact rotation in space. What would I need to calculate it (I use MAX MSP to receive the data)?
Do I need kind of a calibration like in the cube example?

Thanks a lot,
Thomas

Yep, I just tried the YPR

Submitted by fabio on Mon, 2011-11-28 17:16.

Yep, I just tried the YPR output.. it's not quite working as expected when reverting the board. I should study again the formula used.. don't remember much at the moment.

Anyway, in order to get complete informations on orientation you can just use the quaternion representation. It does contain all the informations you need and you can convert that to euler or matrix as you wish.

Can you give me a hint how?

Submitted by Thomas Hirt (not verified) on Mon, 2011-11-28 17:26.

Anyway, in order to get complete informations on orientation you can just use the quaternion representation. It does contain all the informations you need and you can convert that to euler or matrix as you wish.

Could you estimate what would be simpler and better for me? Never heard about matrix and euler. I just what the angles of the head... Could you also give me a hint where to find this calculations? Pleeeeease ;)

Well, if you have to mount an

Submitted by fabio on Tue, 2011-11-29 00:37.

Well, if you have to mount an IMU on an head I think you can use the current Yaw Pitch Roll code.. It will only fail when the actor is upside down.. Meanwhile, I'll be trying to fix my code.

Device mounted on back of head

Submitted by Thomas Hirt (not verified) on Tue, 2011-11-29 16:11.

Fabio, that's right; but I would like to mount the IMU on the back of the head, so that I can reduce the cables.
Do you think thos is theoretically posdible? Anyways, thanks for adjusting the code.
Thomas

Yep.. that's possible. Just

Submitted by fabio on Tue, 2011-11-29 16:26.

Yep.. that's possible. Just exchange the way sensor readings are pushed into AHRupdate function in the FreeIMU library. Basically, you would swap X,Y and Z so that they would be placed correctly to the mounting orientation.

Got it to work!

Submitted by Thomas Hirt (not verified) on Sat, 2011-12-03 21:03.

Hi!
I had to work on FreeIMU.ccp and changed the line:

AHRSupdate(val[3] * M_PI/180, val[4] * M_PI/180, val[5] * M_PI/180, val[0], val[1], val[2], val[6], val[7], val[8]);

into

AHRSupdate(val[4] * M_PI/180, val[5] * M_PI/180, val[3] * M_PI/180, val[1], val[2], val[0], val[7], val[8], val[6]);

I had to try around a while but now it works perfectly when the device is mounted on the back of the head. Maybe it helps someone...

Was it necessary to change FreeIMU.cpp~ too? I don't know what this file is for. It has the same content then FreeIMU.cpp

Thanks,
Thomas

FreeIMU version 0.3.5_BMP

Submitted by Richard (not verified) on Sun, 2011-11-27 12:24.

Hi Fabio,

Many thanks to your freeIMU design.
I have found all parts in local shop except BMP180, they only have BMP085.
Can it be replaced by BMP085?
Thanks!

Richard

Sorry! I made a mistake, it

Submitted by Richard (not verified) on Sun, 2011-11-27 12:31.

Sorry! I made a mistake, it is BMP085 on your design. :-)

exactly, no need to replace

Submitted by fabio on Sun, 2011-11-27 22:18.

exactly, no need to replace it!

Hi Fabio!

Submitted by deepv (not verified) on Thu, 2011-11-24 06:26.

Hi Fabio!
First, thanks for the great resource.
I'm Japanese student.I'm using 9DOF IMU sticks(sen-10724) and arduinoMEGA.I modified the line.
AHRSupdate(val[3] * M_PI/180, val[4] * M_PI/180, val[5] * M_PI/180, val[0], val[1], val[2], val[7], -val[6], val[8]);
Cube seems to be great.
But yaw_pich_roll is strange.I think that calibration doesn't work.
I want to get exact yaw and pich.
This is the video.
Can somebody help me?

This is probably a problem

Submitted by fabio on Sun, 2011-11-27 22:27.

This is probably a problem with the magnetometer which would need a more complex calibration approach than what it's currently available in the library. Check for older comments and on https://answers.launchpad.net/freeimu for better approaches on the problem.

Where can your purchase your FreeIMU version 0.4 from?

Submitted by Dedt (not verified) on Tue, 2011-11-22 18:00.

Where can your purchase your FreeIMU version 0.4 from?
Amazing product!
Good job!
Thank you.

We are currently organizing a

Submitted by fabio on Tue, 2011-11-22 18:29.

We are currently organizing a production run of FreeIMU v0.4. Expected time to market is January 2012. Meanwhile, if you are experienced in SMD assembling, you can get some PCBs and solder one by yourself.

FreeIMU PCB

Submitted by Bogdanov Ferenc (not verified) on Wed, 2011-11-23 07:49.

Hi Varesano,

could you send me a pair of FreeIMU v0.4 pcbs for self assembly?
I pay with Paypal

Cheers
Ferenc
Str. 22 Decembrie 11/3
540113 Tirgu Mures
Romania

I'm sorry but I only have a

Submitted by fabio on Wed, 2011-11-23 12:23.

I'm sorry but I only have a very limited number of PCBs and they are all reserved for the testing. You may wanna get some PCB from http://dorkbotpdx.org/wiki/pcb_order or a similar supplier.

Which websites sell the chips for cheap?

Submitted by Dedt (not verified) on Wed, 2011-11-23 02:20.

Which websites sells the chips for a cheap price?

That depends on where you

Submitted by fabio on Wed, 2011-11-23 13:39.

That depends on where you live. If you are in the US, digikey, servoflow.com and cdiweb together will provide you with all the sensors you need.

Different baud rate possible?

Submitted by Thomas Hirt (not verified) on Sun, 2011-11-20 11:04.

Hi Fabio!
One more thing: the heartrate module I use communicates also via I2C (http://bildr.org/2011/08/heartrate-arduino/) and needs 9600 baud and the FreeIMU 115200 baud in the example I found on your page.

So this makes it impossible to use both devices simultaneously on one single arduino 2009 board! Am I right or is there a trick I can run them both?

Greetings from Vienna,
Thomas

I think you can use the

Submitted by fabio on Sun, 2011-11-20 11:09.

I think you can use the Heartrate code at 115200 without any problem. You can also change the FreeIMU code to use 9600 but this will result in lower orientation sampling rate which will cause worst application performance.

Use 2 or more FreeIMUs with arduino possible

Submitted by Thomas Hirt (not verified) on Sat, 2011-11-19 22:19.

Hi!
I would like to know if it is possible to hook up more then one FreeIMU to the I2Cports of an arduino board. As I understand I2C is not limited to only one device, as long as the addresses of the devices are different.
Thanks in advance,
Thomas

Found the answer

Submitted by Thomas Hirt (not verified) on Sat, 2011-11-19 22:27.

Tis seems to be the answer:
https://answers.launchpad.net/freeimu/+question/170553

Maybe I am posting to fast ;)

Yaw, pitch and Roll Arduino Example: Error when compiling

Submitted by Thomas Hirt (not verified) on Sat, 2011-11-19 19:13.

Hi!
I am just preparing everything for the FreeIMU version 0.3.5 MS and I am playing around witch the Arduino Sketch for yaw, pitch and roll. When I compile it I get the following error message:

In file included from FreeIMU_yaw_pitch_roll.cpp:8:
/Users/tom/Documents/Arduino/libraries/FreeIMU/FreeIMU.h:37:22: error: bma180.h: No such file or directory
In file included from FreeIMU_yaw_pitch_roll.cpp:8:
/Users/tom/Documents/Arduino/libraries/FreeIMU/FreeIMU.h:83: error: 'BMA180' does not name a type

But I have all the libraries included... Also the one for bma180 is in the folder where all my arduino libraries are at home.

What could the problem be?
Thanks for any hints...

Ciao,
Thomas

Had to include the line #include <bma180.h>

Submitted by Thomas Hirt (not verified) on Sat, 2011-11-19 19:17.

Sorry, I solved it myself.

I had to include the line:
#include
in the example file.

Ciao,
Thomas

Yaw error due to magnetometer

Submitted by Aze (not verified) on Fri, 2011-11-18 01:35.

Hi Fabio,

I've been working with the FreeIMU code for a few months, and haven't been able to get the yaw to work consistently. I am using the sparkfun 9DOF IMU sticks (SEN-10724, SEN-10321). In order to adapt the code to the sparkfun board, I made the following changes:

AHRSupdate(-val[3] * M_PI/180, val[4] * M_PI/180, -val[5] * M_PI/180, -val[0], val[1], -val[2], val[7], val[6], -val[8]);

Also, I found the maximum raw magnetometer values in all axes, and scaled the values to be between -100 and 100.

This worked on one board several months ago, but has not been successful for two others. The yaw gravitates towards certain numbers, and is clearly being swayed by incorrect information from the magnetometer.

Do you have any suggestions?

Thanks very much,

Adam

A video of the effect you are

Submitted by fabio on Fri, 2011-11-18 12:36.

A video of the effect you are seeing may help.

Currently the calibration

Submitted by fabio on Fri, 2011-11-18 12:33.

Currently the calibration routine in the FreeIMU library is very simple. Thus my guess is that the problem you are having may be a consequence that those 2 magnetometers are quite more offsetted and may need a better calibration approach.

Currently I don't have much to help you on this but people have been doing progresses on this.. check the older comments and https://answers.launchpad.net/freeimu

Hi Fabio, I've uploaded a

Submitted by Aze (not verified) on Fri, 2011-11-18 22:22.

Hi Fabio,

I've uploaded a video of the problem here. http://www.youtube.com/watch?v=SHAOk1t-uQM

It is also very easy to see when running FreeIMU_yaw_pitch_roll. Here the yaw value will drift toward certain numbers.

One of the boards uses a HMC5883L, and the other a HMC5843 (same as FreeIMU?) but both have problems.

I will look through the older comments for suggestions and help.

Thanks again for your time,

Adam

Your sensor axis usage looks

Submitted by fabio on Fri, 2011-11-18 22:56.

Your sensor axis usage looks wrong in:
AHRSupdate(-val[3] * M_PI/180, val[4] * M_PI/180, -val[5] * M_PI/180, -val[0], val[1], -val[2], val[7], val[6], -val[8]);

Try using:
AHRSupdate(val[3] * M_PI/180, val[4] * M_PI/180, val[5] * M_PI/180, val[0], val[1], val[2], val[7], -val[6], val[8]);

This should align the magnetometer axis to those of the gyroscope and accelerometer.

Please let me have one of this units

Submitted by Thomas Hirt (not verified) on Thu, 2011-11-17 23:30.

Hi!
I've send you the same inquiry via email. Sorry, but I am so excited about this stuff, it's really great and exactly what we need for our project.

I am an austrian artist working on a project where we try to convert the movements of a dancer to music (www.pulse-project.net). We work with the kinect station from microsoft in combination with different sensors to get the movements of the dancer in space (like bend sensors or simple switches for the fingers) and we transform them into MIDI messages. For long time I was trying to find a way to track pitch, yaw and roll for the head. It seems to me very complex. We would like to transmit the data with an arduino board and XBee shield. But as I am an artist and not a technician I stumbled across many problems.

I was very excited finding your site. What I need is a simple way to get pitch, yaw and roll (in simple degrees) of the head. It would be great if you could help me find a good solution for this problem. Probably if you would tell me what to buy and how to mount the parts toghether I could do this. I could even provide a small budget for this task if needed. I am really hope you could help us on this one...

It seems that this unit is sold out. Could there be a way to get some of your FreeIMU's? Pleeeeaaase!

Hoping to hear from you and greetings from Vienna,
Thomas Hirt

Answered by email.

Submitted by fabio on Fri, 2011-11-18 12:29.

Answered by email.

News on 4.0?

Submitted by Tim (not verified) on Mon, 2011-11-14 13:44.

Hi,

I am not sure where this great project is at in terms of the 4.0 release?

imu6000 is available, what help do you need to make the final version of 4.0 available? Please can we have update or know where to buy or how we can help :)

Thanks

Well.. MPU6050 is available

Submitted by fabio on Mon, 2011-11-14 14:56.

Well.. MPU6050 is available doesn't strictly equals to is available in hundreds and at a reasonable price. We are currently in the process of sourcing 400 of them at a reasonable price. Also, we have a 2/3 weeks time for the delivery of the barometeers. I hope to be able to start assembling in a couple of weeks but delays may happen.

Initialising IMU in different orientation

Submitted by Mike (not verified) on Mon, 2011-11-14 05:25.

Hi,

I've got the FreeIMU firmware working great with my Sparkfun IMU which the recommended firmware seems to no longer support.

At the moment the firmware works great when I've got the IMU laying flat on the test bench, however I'm planning on installing the IMU into a small aircraft and in order to fit it in I need to have the board lying on its side (ie roll = 90 degrees). Therefore I need to find a way to output roll pitch and yaw with the board in its new orientation.

I have a basic understanding about how the euler angles work, and I'm aware that while the yaw goes from -180 degrees to 180 degrees, the yaw and pitch go from -90 to 90 degrees. Thus it will not work to simply change the pitch to yaw angle (for example).

Also, as a test I tried to initialise the board lying on its side, and it produces quite strange results!

There is a 3-axis gyro, accel and magnetometer - so I'm assuming it should be possible to reconfigure the firmware to allow me to initialise the IMU in a different orientation. Could you please point me in the direction of the best way to do this? I'm thinking the best way to do this would be to change the way the data from the sensors are read in and then to leave everything else the same?

Thanks again - it's a great project you've got going here!

Mike

Probably, as you suggest,

Submitted by fabio on Mon, 2011-11-14 15:34.

Probably, as you suggest, changing the read axis from the sensors is the best way to do so. Keep in mind that Sparkfun 9DOF doesn't have the three sensors axis aligned.

Working with Sparkfun 9 DOF IMU

Submitted by Blake (not verified) on Sun, 2011-11-06 01:59.

I want to say your site is awesome, and reading your post are extremely insightful. I bought a sensor awhile back from Sparkfun, this one to be exact, http://www.sparkfun.com/products/10724. I rearranged some of the axis and have a working unit. Only thing is I have the pitch and roll reversed. I know it is as simple as just flipping the variable names, but I was hoping you could point me in the direction to really find out what is going on. I know you reference some papers, can you point me in the direction to get them. Thank you.

If the pitch and roll are

Submitted by fabio on Sun, 2011-11-06 11:27.

If the pitch and roll are reversed, you just have to swap the X and Y axis of your sensors. Old user comments on this website explain how to fix the axis orientation for using the FreeIMU library with Sparkfun's 9DOF stick (use the search on the website).

Thanks for your appreciation.

HELP...AIUTO

Submitted by Anonymous (not verified) on Tue, 2011-10-11 23:29.

Please, can somebody help me?? Yesterday evening i flew my y6 multiwii with FImu 0.3.5.BMP ar home without stability problems, and with great satisfation for the performances of my new FIMU just installed. Today, i tried to do the same outside, in the countryside, but at the 1st attempt my y6 went upsidedown and it was impossible to find stability. this evening, once connected to the mutlwii conf software i discovered tha all the signals of the sensors were to 0. I connect the FIMU following the schemas on my arduino mega, I disabled the I2C internal pullups, and I'm not able to understand this fault. Can somebody help me?

Cross posted at

Submitted by fabio on Wed, 2011-10-12 08:33.

Cross posted at https://answers.launchpad.net/freeimu/+question/173980 .. Answering there.

Post new comment

The content of this field is kept private and will not be shown publicly.
If you have a personal or company website insert its address in the form http://www.example.com/ .
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <small> <del> <img> <h2> <h3> <h4> <b> <video> <sub> <sup>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You may insert videos with [video:URL]
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options