After a few more tests, I now have the final version of the ArduIMU. The main problem was the calibration of the gyros: converting the raw data to degrees/s. I had to change the source code, compile it, upload, and repeat it over and over again. Totally waste of time.

So i configured Arduino to externally adjust the gyros and the accelerometer jitter filter, using the nunchuck potentiometers (joystick axis). Now it’s working pretty well. =)

Please, in the source code, ignore all the lines marked with "//(kalman)", this lines are related to the kalman filter code, those marked by "//(nunchuck) are related to nunchuck accelerometer and axis control, and all marked by "//(gyro)" are code related to the control of the gyroscope.

Another tip, all the data is processed in radians, then is converted to degrees (radian*180/PI = radians*57.295779= degrees). If somebody needs any help, please feel free of asking me.

Video:

-Yellow color = Just Accelerometer read
-Red color= Accelerometer+Gyro+KalmanFIiter

Arduino Source Code:
http://sites.google.com/site/jordiuavs/Home/kalman_filter_by_Jordi.txt



Labview (ground station) source code:
http://sites.google.com/site/jordiuavs/Home/kalman_filter_by_Jordi.txt

To do: -Integrate another Gyro (to make it dual axis) . -Program the SPI altimeter.
-And put all the hardware together and make it work (GPS, Altimeter, IMU, Modem).

Done: -Servo control -Gps Waypoint navigation (I’ll post later about it).

The next article I'm going to post all the links to get started with Arduino environment. All you would need to learn: tutorials, examples, references, tips and tricks. If you already know C++ it’s going to be 99% easier. If not, you are going to discover why C/C++ is the most compressive and famous language ever ;-) Then jumping to any AVR, ARM, PIC microcontroller C/C++ language environment, is going to be a lot easier, because they’re all based on the same principles.

Views: 18657

Tags: kalman

Comment by dincer hepguler on August 2, 2008 at 1:53pm
jordi,
what can i say... kudos to you... thx for the wonderful job...
Comment by Paul Mace on September 3, 2008 at 4:50pm
Jordi,

Your Kalman implementation looks to be identical to tilt.c…so…

How do you solve lateral acceleration? In an aircraft z may remain constant (coordinated turn) and y or x may change proportionally when skidding (lateral acceleration) or forward acceleration or decleration. 5DOF+K-filter interprets lateral acceleration as pitch up/down (climbing, diving) or skidding )(roll in opposite direction of skid).

Paul Mace
Comment by Yves on September 27, 2008 at 10:19am
Jordi,

Thanks for the great job
Please let us have a link to the Labview code

greetings from Grenoble, France
yves
Comment by Erick Netto on October 9, 2008 at 5:47pm
Jordi,
Congratulations for this project!
But the link (http://jordii07.googlepages.com/ArduIMUFinal.txt) is not work... Could you send me?
Thank you.
Erick Netto.
Comment by Ion on October 17, 2008 at 1:28am
Hola Jordi,
Felicidades por tu trabajo!!I hope you can help me. I'm trying to use a 3 axis accelerometer and a 3 axis gyroscop to track the movement of my arm. But I have doubts when setting the values of Q_gyro and Q_angle. The problem is that if I use a frecuency of 150 Hz to get the values of the devices, 6'6mseg, the minimum value of Q_angle I can use it's around 0'02. If I use values below I can't follow the movements of my arm because the angle value goes to infinity. However, when I use a frecuency of 50 Hz, 20mseg, doesn't matter what value I use for Q_angle, I don't have this problems. The question is, why this happens, and how I know what values I have to use for Q_angle and Q_gyro?
Thankx for your time.
Ion.
Comment by Senthilkumaran M S on November 5, 2008 at 8:54am
Can you provide the LabVIEW Code with kalman filtering?
Comment by XU JIANG on November 11, 2008 at 9:56am
can you provide the labview code with kalman filtering? thanks.
Comment by Jonathan on November 20, 2008 at 3:51pm
Great job!!

Could you send me the labview code??

Thanks!!!
Comment by Jan Lukas on May 9, 2009 at 6:08am
Hello Jordi,

are you still working on your ArduIMU project, everything I see seems quite dated now?
Comment by MONCHO on August 31, 2009 at 5:18am
Bueno jordi lo primero, felicitarte por tu proyecto la verdad es que es asombroso. Estoy trabajando en un proyecto donde quiero impletar un filtro kalman utilizando tambien un giroscopio y un acelerometro para conseguir equilibrar un robot de dos ruedas. El problema es que trabajo con los programas Proton compiler y Pic basic. Por lo tanto me gustaria poder pasar tu cógigo kalman a alguno de estos ya que el tuyo esta c. Si es posible me gustaria que me lo enviaras en español para ver si puedo entender el filtro kalman ya que lo veo complicado. Si es posible me gustaria que me puedieras explicar como funcionan esas matrices de coviranza y como poder pasarlo a proton compiler y pic basic.

Muchas gracias

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service