Go to Post All I know is I have fun building a robot, and I have fun competing with it. If I get an award, I'm happy. If I don't, then too bad. Either way, I'm coming back next year. - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2016, 12:35
DamenStar DamenStar is offline
Registered User
FRC #1410
 
Join Date: Jan 2014
Location: Denver, CO
Posts: 4
DamenStar is an unknown quantity at this point
KOP Gyro Values Constantly

We were testing autonomous over the weekend and noticed that the KOP gyro was generating constantly larger and larger values.
We tried the other KOP gyro with the same result. We had been using the same code the past two years and other than class is now AnalogGyro
instead of Gyro. The code is basically calibrate, reset and get angle:

drive_gyro->Calibrate();
drvie_gyro->Reset()
drive_gyro->GetAngle();

We checked gyros and everything seemed fine electrically. We wondering if anyone else has seen this.

Release the Kraken
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2016, 12:49
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: KOP Gyro Values Constantly

All electronic gyros drift over time. The question is how much is acceptable. When you say it is constantly generating larger and larger numbers, how much larger and over what time period?
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2016, 12:56
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: KOP Gyro Values Constantly

Is this just a drift, or does it indicate that the robot is whirling like a dervish? We've had several old KoP gyros fail in a mode where they constantly had an output of either 0V or 5V (I don't recall which). While the gyro is powered but not spinning, check the voltage between the 0V and signal output of the gyro. It should be approximately 2.5V. If it is in this range, you may just need to recalibrate. If it is closer to 0V or 5V, you probably have a short or a component failure.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2016, 15:10
DamenStar DamenStar is offline
Registered User
FRC #1410
 
Join Date: Jan 2014
Location: Denver, CO
Posts: 4
DamenStar is an unknown quantity at this point
Re: KOP Gyro Values Constantly

Thanks for the response. We were seeing weirdness in the C++ WPILib so we trying to see if anyone else saw this.

Release the Kracken
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2016, 15:22
Richard100 Richard100 is offline
Registered User
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Southern Maryland
Posts: 79
Richard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to behold
Re: KOP Gyro Values Constantly

Also ensure the gyro/robot is perfectly still while the code is going through the calibration routine. An analog gyro cal routine typically samples the output voltage for a short time and assigns the average value to zero rotation, during an initialization process. If the sensor is actually rotating (any movement at all could have a rotational component), the routine will map the zero-rate value incorrectly ... then, when you ARE actually still (no rotation), the gyro will report a non-zero rotation rate, and you will accumulate rotational displacement (constant larger and larger values).

As Chris said, all analog rate gyros have some residual drift. One reason for this is the cal process can never be perfect, and any error in rate will be amplified as the rate is integrated over time to accumulate rotational displacement.

Small growth in displacement can be considered 'drift', maybe something much less than 1 degree per second, depending on the quality of the gyro. Growth much larger than this likely represents a failed or mis-wired sensor, or a bad calibration.

Understand that these MEMS KoP gyros are Rate Gyros, in that what they fundamentally sense is a rate of rotation (in units like degrees/second or radians/second). The signal is then integrated to get to displacement (in units like degrees or radians). This distinction is important as there is often confusion about 'zeroing' the gyro. Zeroing the rate, accomplished during the cal process, is different than zeroing the displacement, which you might do under some code condition. You can't zero the displacement to fix error in the zero of the rate.
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2016, 02:32
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: KOP Gyro Values Constantly

Be sure you're using the correct gyro. There was no gyro in the KOP at kickoff. Every team got an ADXRS_450 gyro from FIRST Choice. If you are using that gyro, but calling AnalogGyro, all you'll be integrating is noise. If you're using the gyro from previous years KOP, then AnalogGyro is the correct class.

I also agree that you need to quantify the rate of the drift.
Reply With Quote
Reply


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 12:10.

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