I characterized the SparkFun MPU-9250. It is an IMU (inertial measurement unit) that was to use on the exoskeleton elbow for position data. It would be used for tracking the upper arm for a reaching control when rotating a shoulder, lifting an arm, or flattening an elbow. An example would be when you are reaching for something on a shelf around the same level as your head. My professor wanted to characterize this sensor because it is an inexpensive IMU. My job was to see how good that data was when using all 9-axes of data to get the absolute position and angle data.
I designed and 3D printed a simple pendulum that had an encoder attached to the axel that the pendulum rotated around. This gave very accurate angle data. This could then be compared against the data given by the IMU algorithm so see if it was working properly.
I first looked at the AHRS (Attitude, Heading, and Reference System) that was included in the library for the IMU. This only used 6-axes, gave relative position data, and ran all the data through a FIFO buffer. This would make the data output delayed if a calculation ended up taking longer than expected. I looked at using Mahony and Madgwick filters, but both provided erratic data. I looked into using a Kalman filter but there weren't any implementations in the Arduino frameworks because of the filters complexity. I tried a system using the accelerometer data for angle tracking by using the X Y components and trigonometry to find the angle and using the gyroscope to compensate for acceleration jerks but the simplest solution was to use the built in AHRS system.
This project taught me how to parse data in real-time on an Arduino. The parsed bytes were used for serial communication, where they were recovered in Matlab/Simulink on a desktop to be used in dSPACE.
Currently, the aforementioned built-in AHRS algorithm is being used with a relative angle tracking since we can set it up in a controlled way in the lab environment.