-
Notifications
You must be signed in to change notification settings - Fork 1
Tricot Malin features a inertial measurement unit (IMU) in each arm in order to detect the wearer's gestures and movements. The chosen component for the project is a breakout board sold by Sparkfun featuring the LSM9DS0 integrated circuit made by ST, which is a 9 degrees of freedom (DoF) IMU in a single chip.
While the IMUs which would be integrated in the final product hadn't arrived, a breakout board made by OpenJumper containing the MPU-6050 IMU was used to study how an IMU works and to think about how is it possible to detect a person's movements from the data it provides.
- MPU-6050 on Arduino Playground
- I2C DevLib Code for MPU-6050
- MPU-6050 board by OpenJumper
- MPU-6050 at I2C DevLib
- Sketch to calculate MPU-6050 offsets
- MPU-6050 forums at I2C Dev Lib Forums
- MPU-6050 breakout board sold by SparkFun
- MPU-6050: DMP Data from i2cdevlib
- Gyroscope at SparkFun
- Gyroscope at Wikipedia
- Gyro sensor checkpoints - Epson
- Gyroscope at Sensor Wiki
- Video: MEMS Gyroscopes - ST
The objective is using the data provided by an IMU to measure the angular position of an object. Theoretically, we could use either the gyroscopes or the accelerometers of the IMU individually to determinate it, but we will see that different problems introduced by each type of sensor will make it necessary to combine them to obtain a proper result.
A gyroscope (gyro) measures angular velocity, that is, the rate of change of the angular position over time.
Assuming that the initial position is known (in this case, zero), we could find the angular position through integration (the third part of the equation is the digital approximation of the integral, with Ts being the sampling period):
This method works well in the short-term, but brings a problem over a long duration. Ideally, when measuring the gyro's output when it is still, we would read zero; however, we will always have a slight non-zero error, called bias drift. Due to the integration of this error, the estimate of the angle will drift away from its true value (the small rate will keep adding to the angle until it is far away from the actual angle).
An accelerometer measures linear acceleration, including the acceleration of gravity. Since we know the magnitude of gravity, we could theoretically use trigonometry to calculate the object's angle when it is still, since the only acceleration measured by the accelerometer would be the one caused by gravity. Nonetheless, every small force working on the object (noise) would disturb our measurement completely. The accelerometer cannot distinguish a real acceleration from gravity, which makes it bad for short-term angle estimate; however, it is reliable in the long-term, as its average will be very close the gravity vector.
- IMU Data Fusing: Complementary, Kalman, and Mahony Filter
- Kalman filter vs Complementary filter
- The Balance Filter
- IMU and Complementary Filter
- A Comparison of Complementary and Kalman Filtering
- Gyroscopes, Accelerometers and the Complementary Filter
- Reading a IMU Without Kalman: The Complementary Filter
- Open source IMU and AHRS algorithms
- Open source AHRS with x-IMU