I'm thinking openIMU in honor of freeIMU. Both are based on algorithms found at

http://www.x-io.co.uk/node/8#open_source_ahrs_and_imu_algorithms

The Madgwick algorithm is the IMU that I am using on my quad copter right now. I'm getting excellent results. This program is a work in progress to say the least. The code posted works great with the Pololu MinIMU9. For best results use a MEGA or Due. I am going to turn this into a library that will accept any sensor readings so long as the data is presented to the filter in the aircraft convention (NED). If you want to try this algorithm with a different IMU the code should be quite easy to modify. Just rememeber to put the sensor data into north, east, down convention. And please post here the results you had.

I am testing a simple two state Kalman filter that I will use to fuse data from the accelerometer and a barometer into an altimeter. I am almost finished with that part of the project. Once I am I am going to include that code into the IMU. This means the IMU will give pitch, roll, and yaw to within ~.25 degree or less accuracy as well as an altitude with a ~.5 meter accuracy.

https://github.com/mikeshub/Pololu_Open_IMU

Thanks for checking out my project and I'd love to hear your feedback.

That is correct. The code just tracks your pitch, roll, and yaw angles. If you want to do controls based off it you can with no problems.

I never use the serial monitor in arduino. I think real term http://realterm.sourceforge.net/ is a much better option. If you capture the data as a .csv file you can open it in excel and make graphs etc.

I have updated the code in github. If you get unsatisfactory results or the system is taking up too much time the frequency of the updates can easily be changed by adjusting the loopCount comparisons. Thanks for your interest in the openIMU. I am working on porting the code to the razor 9dof board from sparkfun. Sorry for the slow reply. I now am being notified when a reply to this thread is made and I will be better at staying on to of my responses.

I have fixed the bugs in the pololu openIMU software. Be warned version two of the board works much better than version one. I have fixed some bugs in the razor version. Included is the calibration of the magnetometer.

The biggest part of this post is to announce that the general library has been finished. It will work with either a 6 or 9 degree of freedom (DOF) system. To use make sure that your coordinate is in the North East Down convention. The accelerometer must be measuring gravity as positive along the positive direction of the axes. As far as I know all MEMs accelerometers will need to have the sign negated for each axis to meet this criteria. The gyroscope measurements must be in radians per second. Included in the software is a calibration sketch for the compass. Skipping this calibration will almost certainly make the yaw measurement incorrect. Further than that if the complete soft and hard iron compensation procedure is used the results will be optimal. As they say in the text books that will be left as an exercise for the reader since it is not absolutely necessary for the filter to work properly. Coming soon will be an altimeter that runs off of a simple two state Kalman filter fusing the accelerometer and a barometer as well as more complete documentation. I attempted to make the example for the openIMU clear and easy to understand.

https://github.com/mikeshub/openIMU

https://github.com/mikeshub/Razor_10736_Open_IMU

https://github.com/mikeshub/Pololu_Open_IMU

If anyone uses this on a different IMU board please post the code and I will include it in the examples. Also, thank you to the early adopters of this IMU port.

atestani

The essential question is if a port to ArduIMU hardware is planned or available? http://store.diydrones.com/ArduIMU_V3_p/kt-arduimu-30.htm

The drivers for the sensors are available at DIYDrones and FreeIMU.

I have had both the DIYDrones and FreeIMU firmware running on this platform and the former is problematic, in general, and FreeIMU works but has a lot of Yaw drift even after calibration. Some movies of these problems can be found here:http://www.diydrones.com/forum/topics/freeimu-firmware-on-arduimu?commentId=705844%3AComment%3A1024298

I am hoping openIMU firmware works better than the other firmware I have been testing.

I am planning a port of that board. But that is on my back burner. Currently I am doing board design. I am going to sell a break out board for the IMU, a MEGA shield for the openCopter flight controller, and an all in one unit for the flight controller. It will also be porting multiWii and arduPilot to work with my hardware. My software auto-detects whether you are using SBUS, DSM2 or DSMx serial, or standard RC signals. But I digress. Here is why freeIMU, arduIMU, sparkfun razor IMU etc have so much trouble with yaw. Look at the datasheet for that compass:

They specifically say to not put any pour under that IC. All those people do that. I doubt that even full soft and hard iron calibration would take care of those problems. I also consider it to be lazy design to not have all of the axes point in the same direction for the chips. Please don't get me wrong I think very highly of everything 3DR ardupilot and freeIMU. They have done awesome work. That was just the one nitpicky thing I noticed.

Not to mention that there are tons of fields around which really mess with compasses. My boards will not have that defect. Also, my boards employ 2 3.3v regulators. One for the 3.3v IO and another for the 3.3v analog inputs to the ICs. This hopefully will mean that my boards will significantly outperform the other guys boards.

If you want to do a sketch using the openIMU on that board I will be happy to offer you any guidance needed and include your code in the code examples. Good luck. Keep me posted.

atestani

Thanks... I suspected a hardware issue with both of the boards and even have large number of FreeIMU boards which I added to some panels of PCBs I originally did for another project. My plan was to build them up and see how it differed from the ArduIMU. I just checked the FreeIMU layout and you are correct that there is copper on the back side of the board under the compass. I don't think I will pursue either of these boards right now.

Are you doing anything in your software that isn't being done in either the ArduIMU or FreeIMU software that would improve on the performance, namely yaw drift/accuracy. BTW, I don't really care about roll or pitch in my application and, in fact, hope to fuse GPS heading data into the calculations at some point. My application is described here: http://freeimu.varesano.net/node/47.

When will your IMU board be ready? I do a significant amount of embedded design including layout, build, and test. I am happy to help out/collaborate in that regard with your new designs if you wish.

The breakout board is on its way back from China right now. I'll have to solder the components on etc. This first one is just a very limited run. Hopefully there will be much better performance from the compass. The algorithm I'm using works quite well for yaw. The problem is if north is skewed by a field it points to where the compass then thinks north is. I have tested it along side a regular compass and the results matched. You might compare the output of the freeIMU to that of an actual compass and see how the results match / vary.

Hopefully my board will fix the yaw problems people have. Of course only so much can be done in the presence of a strong magnetic field. Those deflect north. On my tests I have very little yaw drift. Hopefully my boards will fix the problem entirely. I'm anxiously awaiting them.

Have you checked out openCopter in my github?

https://github.com/mikeshub/openCopter

As it stands right now I will have three boards. All of the boards will have the gyro and acc on the SPI bus. The first will be a basic break out for the sensors. The next two will be most of what is required for openCopter. The GPS and telemetry radios will have to connect to the uarts. No built in bluetooth. The mega shield will have the sensors as well as all of the required pins for esc / servo control. It will also have SBUS, dsmx and dsm2 ports, as well as standard RC. The final one will be an all in one flight controller. The sensors will be the L3GD20 gyro, ADXL345 accelerometer, HMC5883L compass, and BMP085 barometer. Hope that answers your questions about the board. I am typing this from cell phone so I am sorry if this is not clear. I have had excellent results so far with you. Let's hope that the new boards provide even better results. Keep an eye on this thread. I will post as soon as I have the boards assembled.