ADXRS450 Gyro Drift

On my robot we I use a ADXRS450 Gyroscope. It connects fine and displays the angle fine through SmartDashboard. The issue is that there is significant drift that messes up our autonomous code. We reset and calibrate it on RobotInit and have gyro.Calibrate() set to a controller button, but it still has drift after calibration. My code is available here, and the gyro is mentioned in robot.cpp, drive.h, drive.cpp, and robotcontainer.cpp

Any help on how to stop the drift is appreciated.

All gyros drift; some just have more drift than others. This is a hardware thing, software doesn’t really affect it. How is the gyro mounted and oriented? How much drift are you seeing (e.g. when it just sits unmoving how quickly does it drift by say 10 degrees)?

Hello, thanks for the response. I have attached a video of my gyro rate when it is just sitting still, then I raise it from the front and then raise it from the back. I can not give you a number of rate because the rate is changing a lot
video

Thanks for the video. Here’s how I interpret it:

At the start of the video, the Gyro Angle is -0.2. By the end, it’s changed to -0.9. That happens over the course of 30 seconds.

Assuming the units are degrees, this is a drift rate of 1.4 degrees per minute. Over the course of a match, I expect your gyro to drift by 3.5 degrees total.

This is very normal - as Peter mentioned, all gyros will drift. We’ve historically used the ADSRX453, which is very similar to the 450, just more expensive. With that, we can get the drift down to just a degree or two, but the cost is almost 5x that of the 450.

Another way to think about it - does your robot design require a reading more accurate than +/- 3 degrees?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.