ADIS16470 Drift

Hello Chief Delphi,

My team is currently having a problem with our new ADIS16470 IMU. As far as I know, we have it set up in code correctly:

`imu = new ADIS16470_IMU(Config.imuAxis, 
SPI.Port.kOnboardCS0, Config.imuCalibrationTime);
imu.calibrate();`

As far as I know, kOnboardCS0 corresponds to the SPI port on the top face of the RoboRIO, and imuCalibrationTime has been set to _4s. When we turn the robot on, connect to it, deploy our code and pull up the SmartDashboard values, the IMU always returns a steadily decreasing angular position and an angular velocity that hangs around -0.2.

The IMU is currently on a RoboRIO that is not zip tied or otherwise mounted to anything, but simply lies on the belly pan of our robot. Some of the electrical setup is also rather sketchy, with an unmounted radio and a RoboRIO power connector that sparks when its power wires are moved slightly.

I’m not 100% sure how that library works, however ensure your robot is completly stationary when that object is constructed (usually on/shortly after boot).

There also may be a calibrate, or reset or similar method you can call on that object after the fact to re-account for any drift.

I really do suggest rewiring the RoboRio, it isn’t difficult and shouldn’t take much time to get a good connection.

You’re not alone here:

We really want to use this IMU, but we’ve seen similar drift rates to you and others.

We tested 3 different 16470 carrier boards rigidly mounted to a roboRIO, tested on a concrete floor with me and my laptop being > 10 feet from the RIO. It wasn’t touched or moved in any way before and after power was applied. We’ve tried the longest possible calibration interval, and we’ve tried leaving it for over 20 minutes between calls to “calibrate()”. No dice.

I have to believe there’s an error in the implementation of the library somehow. If we’re getting this much drift in perfect conditions, there’s no way this is gonna work on the field.

1 Like

Update: We fixed it via a wrapper class that accounted for drift over time. Now it the angular position values barely vary by 0.005 at a time. Thanks for all your concern!

2 Likes

Can you share a link to that code? we were seeing similar issues

1 Like

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