Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Large amounts of gyro drift (http://www.chiefdelphi.com/forums/showthread.php?t=135907)

fovea1959 19-03-2015 08:18

Re: Large amounts of gyro drift
 
@lark95: where do you get *shielded* PWMs? or do you make your own?

BradFerg 19-03-2015 12:25

Re: Large amounts of gyro drift
 
We improved out gyro performance doing two things:
1. We re-run the calibration code from the gyro constructor at the beginning of autonomous:
Code:

m_analog->InitAccumulator();
Wait(kCalibrationSampleTime);

INT64 value;
UINT32 count;
m_analog->GetAccumulatorOutput(&value, &count);

UINT32 center = (UINT32)((float)value / (float)count + .5);

m_offset = ((float)value / (float)count) - (float)center;

m_analog->SetAccumulatorCenter(center);
m_analog->SetAccumulatorDeadband(0); ///< TODO: compute / parameterize this
m_analog->ResetAccumulator();

2. We allow the driver to re-run this during play if the drift has gotten too bad. Even a 500ms calibration seems to give good results.

I think the culprit is lack of temperature compensation. The gyro specifically has a temperature output to allow compensation and that has not been implemented.

By delaying the calibration until the start of autonomous, we are allowing the gyro temperature to stabilize in the operating environment.

Note: we are actually programming in LabVIEW but the calibration code is basically the same and it's easier to post the C++ version.

Brad

Pault 19-03-2015 20:36

Re: Large amounts of gyro drift
 
Quote:

Originally Posted by ScourgeDragon (Post 1459594)
I honestly wish this had been our experience. We bought two and have been experiencing problems with them across both competition and practice robots all season (it appears that the something gets hosed and the gyro only sends 0's instead of actual values). We've gone back to the KOP gyro while we investigate the problem. :(

We were experiencing similar problems whenever the robot experienced a brownout. Try hooking your NavX up to the USB port on the roboRIO in addition to the MXP port. USB is immune to brownouts.*

*Well, unless you get down to crazy low voltages, which you never should be able to.

Quote:

Originally Posted by Joe Johnson (Post 1459570)
How dead do our batteries get? I'm sure to be honest. The Coding Team has figured out a way to have our laptop play a sound "Low Power" sound when our battery voltage gets too low and then we change our battery. It seems to be working so I haven't looked into the voltage that they've picked.

We picked 6.8V, the same voltage as a Stage 1 brownout.

lark95 22-03-2015 09:18

Re: Large amounts of gyro drift
 
Quote:

Originally Posted by fovea1959 (Post 1459730)
@lark95: where do you get *shielded* PWMs? or do you make your own?

Sorry it took awhile to respond. We were at a regional. I don't know were you can get in from. But it will be 3 wires inside of a metal mesh which is then all in insulation. To make it shielded solder the wire mesh to any other grount cable, preferably not the ground in in the actual shielded cable. (We did it antway and it turned out just fine


All times are GMT -5. The time now is 21:18.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi