Arduino Nano
MPU6050
With an accelerometer and gyroscope, we obtain 6 degrees of freedom. We can only find roll and pitch with them. For yaw, we use a magnetometer. But in this project we only cover for roll and pitch. We use NED coordinate as reference frame. To find roll and pitch we use accelerometer.
When the accelerometer detects acceleration due to movement or vibration, the stability of roll and pitch can be compromised. We utilize an Extended Kalman Filter to fuse angular velocity data from the gyroscope, enabling us to detect if there is actual angular displacement. Relying solely on angular velocity can lead to drift in roll and pitch, even though it reacts faster than roll and pitch data from the accelerometer.
where
where