R is the co-variance matrix. It should typically be the square of the standard deviation of the Gyro.
I think it should be there in the datasheet, or you could just keep things stationary and log the data for about 5 mins.
Calculate the mean and std deviation.
R=std_deviation^2
This is a great post about IMU's. Lots of good information. I am also working with Gyro's and accelerometers in my Quadrotor project. I needed a simple tool to visualize data and ended up writing one. Although there are ways to plot data using Processing, I wanted a stand alone tool.
Here is link to relevant thread. Hope you guys find the tool useful.
Haha, yeh definitely getting all the data For some reason i get more accurate data from the non filtering. The calculated accelerometer angle doesn't go through 360degrees. Gets about a max of 50. Is this supposed to happen?
I modded the code into java, as i'm doing the postprocessing on the PC.
the only thing i think i modded is this...
xAngle += kalmanCalculateX(accXangle, gyroXrate, dtime);
I made the xAngle += so I just print total xAngle directly. Is that wrong?
Apart from that, using nano seconds and slightly different calibration position it is the same.
Hi Lauszus, I bought the same gyro(Gyro Breakout Board - LY530AL - 300°/s - SEN-09165 - SparkFun Electronics) used by IMU on your project. I just want to read angle from the gyro but having a little confuse about the HP, PD and ST pin. Should I just left them all unconnect or do you have any suggestion?
First off thanks for posting, this looks great and could be exactly what i need!
basically i am creating a ball full of different sensors which will then act as a synthasizer.this is my final year project and i am stuck here with only a few weeks to go. I have other sensors but what i really want is to be able to read if the ball is being tilted forward or back,left and right and by how much so i can modulate sound accordingly.( i am not trying to measure the acceleration,just the amount it is tilted)
i have been searching all the different possibilities with gyroscopes and accelerometers but can't seem to find clear cut examples of what i want. It looks like your code here is what i need? If i was to buy the 6dof is it as simple as using the code you linked? and then i would be able to get proper tilt values?
I am only a beginner with arduino and just know the basics of reading sensors but i'm finding the task of measuring tilt a bit deep for me.
your help or advice would be greatly appreciated!
(a final year college student freaking out lol) Billy.
First of all: it sounds like it is exactly what you need
You really don't need a 6DOF for your project. You only need 3 accelerometers and 2 gyros. But if you don't want to get your hands dirty, you can just buy the same IMU as me and just copy the code.
The only thing you need is some way of picking up the serial commands from the Arduino, exactly as I did with Processing.
Hope that gave you some answers
Yeah i already have Pd reading the serial and picking up values from my other sensor (pressure) and modulating sound. It's just sensing tilt i couldn't figure out.
you have saved me!
I'm going to order one of those. i'm in ireland,hope it arrives in time!