Gyro Sensor Drift

I’ve been experimenting with the gyro sensor, and have noticed that it tends to “drift” (not immediately upon startup, but until about 2 minutes after startup). Are there ways to compensate/reduce this drift that others know about?

I’m using ROBOTC for programming.

Thanks,
Andrew

I suggest that you take a look at this article: http://www.robotc.net/blog/2011/10/13/programming-the-vex-gyro-in-robotc/

Thanks. :slight_smile: Actually, I was using the ROBOTC sample code (the same file in the article you linked). I let the robot sit for a few minutes (while the robot was stationary), and the gyro had drifted from reading 900 (+/- 5) to ~960 (+/- 5). (readings from the ROBOTC debugger window)

//Andrew

Typically rate gyros need a small dead zone to prevent drift while just sitting. The dead zone must be set just outside the noise level on the gyro signal otherwise the noise gets integrated and causes an angle drift. I am not sure if the RobotC gyro routine provides this. I spoke a little on this in an earlier post here.

That cleared things up a lot. Thanks.

//Andrew