Go Down

Topic: Kalman Filtered Nunchuck & Wii Motion Plus (Read 32267 times) previous topic - next topic

ardvark

I have started a new thread and posted the code and example output of the complimentary filter there:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1253202298

Perhaps if we switch to posting there it will reduce the access problems people have been having due to sheer awesomeness of this thread :-)

guro

sorry to bring up that old thread again, but i can't compile the code from duckhead v0.3 because of the missing angle&degrees function.

i tried it myself and managed already to read nunchuck an wm+ data in passthrough mode. somehow my nunchcuk-Z-axis values needed to be divided by 2 to get to the same level of values, anyone else to do that?

so i have got everything for a kalman filtering: all 3 gyros value, already zerod and all 3 acceleration value (z, as mentioned divided by 2).

coud you help me providing code for a 6 DOF kalman filtering?

thank you!

duckhead

Post your the code that won't compile or send it privately.

I'll take a look.

Duck

edsonedge

This is a brilliant

Im am trying to figure out how I can use this with Max Msp

since the Firmata code  seems to be the easiest way to get arduino and Max Msp to talk together I am wondering if this code for the wm+ and nunchuck can somehow be ingrained into the firmata code?

Or is that just silly?

What would be the best way to use wm+, nunchuck, arduino mega and Max Msp together?

ardvark

If your arduino is writing to the serial port check out the max object 'serial.read'. No extra code on the arduino necessary.

This is essentially how the firmata set up for max works, but can do so more efficiently if you're thru-putting many separate variables.

grindylow

I'm new to kalman filter and the gyroscope sensor, but is it possible to implement the filter to a single wii motion plus and use it on a self-balancing robot?

ardvark

#171
Mar 14, 2010, 09:54 am Last Edit: Mar 14, 2010, 09:55 am by ardvark Reason: 1
Quote
is it possible to implement the filter to a single wii motion plus and use it on a self-balancing robot?


Yes.

For an alternative simpler approach see also:

http://www.ohscope.com/2009/02/b-b-b-balancing.html
http://www.ohscope.com/2009/06/getting-angle.html
http://www.mikroquad.com/bin/view/Research/ComplementaryFilter

ardvark

Actually the MAX object I refer to above is called "serial" not "serial.read"

inidkalman

a little help here guys. im having trouble understanding the method by which the bias is computed. i see that the estimated angle is found using:
Code: [Select]
kalman->x_angle += dt * (dotAngle - kalman->x_bias)
from my understanding, this would imply that the x_bias is in the units of (angle/second). however, from the update equation i see that the bias is computed via
Code: [Select]
kalman->x_bias  += K_1 * y; where y is
Code: [Select]
const float y = angle_m - kalman->x_angle;. forgive my weak skills in math but i seem to see that the bias is simply a constant (k_1) multiplied by a difference in angle (angle_m - kalman->x_angle). doesnt this mean the bias is already in the units of (angle) which will lead to
Code: [Select]
kalman->x_angle += dt * (dotAngle) - (kalman->x_bias). thank you for your inputs

Go Up