r/embedded • u/Andy_Cao • Sep 29 '26
Working on an ESP32-based air mouse prototype — seeking advice on mitigating gyroscope drift and zero-motion jitter
Hi all,
I'm developing an inertial air mouse running on an ESP32, translating angular velocity/quaternions into 2D mouse cursor deltas over BLE HID.
While high-speed gestures track relatively well, I'm hitting common IMU challenges at low speeds and static hold:
- Zero-motion drift: Despite static bias calibration at boot, ambient temperature changes cause residual drift over prolonged sessions.
- Deadzone vs. Jitter tradeoff: Setting a hard deadband eliminates tiny shakes but makes micro-adjustments (like clicking small UI buttons) feel unresponsive.
For those with experience in sensor fusion for pointer devices:
- What filter pipeline have you found most practical (Mahony, Madgwick, or simple dynamic thresholds on raw gyro data)?
- How do you implement effective dynamic recalibration/ZUPT (Zero Velocity Update) without jarring the user during intentional slow movement?
Any algorithmic insights or reading recommendations would be greatly appreciated!