Rotation! (And the beginnings of tilt estimation.)
So I spent a half hour last night playing about with some of the raw Accelerometer / Gyroscope data I’ve been getting from the new controller PCB, and I got Excel to make me a pretty graph to show a full 360 degree rotation of board.
Shown above are the raw traces for the data from the ADXL345, and the trace for the Z Axis of the ITG3200. If you look closely, you can make out 4 distinct orientations (shown by the straight lines in the ADXL data, and the lack of movement in the Gyro data). In between the stationary periods, you can see the actual rotation of the board, indicated by the increase in rate in Gyro data!
So we have the first signs of life towards calculating the angle of the board, relative to ground. Next up is Kallman filtering, which uses the gyro data to bias the “truth” of the accelerometer data, so that the board isn’t confused by vibration and non-rotational movement, and only responds to rotational acceleration.