Go to Post FIRST is not a party. It is the most important activity a high school age student can do. - JohnBoucher [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 19-03-2015, 08:18
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Large amounts of gyro drift

@lark95: where do you get *shielded* PWMs? or do you make your own?
  #17   Spotlight this post!  
Unread 19-03-2015, 12:25
BradFerg BradFerg is offline
Registered User
FRC #2705 (We Robot)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2009
Location: Minneapolis, MN
Posts: 7
BradFerg is an unknown quantity at this point
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
  #18   Spotlight this post!  
Unread 19-03-2015, 20:36
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Large amounts of gyro drift

Quote:
Originally Posted by ScourgeDragon View Post
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 View Post
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.
  #19   Spotlight this post!  
Unread 22-03-2015, 09:18
lark95's Avatar
lark95 lark95 is offline
Red Ranger
AKA: Joe L.
FRC #3418 (RoboRiot)
Team Role: Driver
 
Join Date: Sep 2014
Rookie Year: 2012
Location: Wisconson
Posts: 124
lark95 is a glorious beacon of lightlark95 is a glorious beacon of lightlark95 is a glorious beacon of lightlark95 is a glorious beacon of lightlark95 is a glorious beacon of light
Re: Large amounts of gyro drift

Quote:
Originally Posted by fovea1959 View Post
@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
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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