I need help for a Kalman filter

Hi,

I want to do a balancing robot, but I have some problem with the programmation.

I have an Arduino Uno v3, and a MPU 6050 buy from sparfun.

With a code found here, http://playground.arduino.cc/Main/MPU-6050, i can get the raw values of all the 6 axes of my IMU.

I modified it a little for the offset of the gyro.

get the raw values (+- 32767) of my IMU for all the 6 axes ans I remove the offsets of the gyro's raw value.

Now, the problem his the Kalman filter. I dont know what look like a kalman filter or how to creat one.

Do you know some exemple code that I can copy?

Or if it's simple, can you write one for me? (if yes, I will love you forever!)

Thank for any help, this project is for school so I can give up.

Have a good day

Bernard.

http://lmgtfy.com/?q=arduino+kalman+filter

You do not need a Kalman filter. You do not need a complementary filter. Both are myths.

GyroMyths.pdf (529 KB)

You do not need a Kalman filter.

Perhaps the OP's school assignment was "Find someone on the Arduino forum to write a Kalman filter to turn in as your final project".