Go to Post "Recycle Rush? What's that, some sort of charity marathon?" - Chak [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
  #1   Spotlight this post!  
Unread 05-02-2015, 17:13
baumgartensam's Avatar
baumgartensam baumgartensam is offline
Registered User
AKA: Sam Baumgarten
FRC #0751 (Barn2Robotics)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: United States
Posts: 42
baumgartensam will become famous soon enough
Re: Temperature for Gyroscope

Are you using just a gyro or also an accelerometer and then filtering the data? Drift is common if you are only using a gyro.

Last edited by baumgartensam : 05-02-2015 at 17:16.
  #2   Spotlight this post!  
Unread 05-02-2015, 17:16
JODawgma JODawgma is offline
Registered User
FRC #1712
 
Join Date: Feb 2015
Location: Pennsylvania
Posts: 3
JODawgma is an unknown quantity at this point
Re: Temperature for Gyroscope

Quote:
Originally Posted by baumgartensam View Post
Are you using just a gyro or also an accelerometer and then filtering the data? Drift is common if you are only using a gyro.
We only use a gyro.
  #3   Spotlight this post!  
Unread 05-02-2015, 17:17
baumgartensam's Avatar
baumgartensam baumgartensam is offline
Registered User
AKA: Sam Baumgarten
FRC #0751 (Barn2Robotics)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: United States
Posts: 42
baumgartensam will become famous soon enough
Re: Temperature for Gyroscope

If you only use a gyro, you can get quite a bit of drift. Gyros work well with low rates of change and accelerometers work well with high rates to change. If you use both, you can get a good number. To do this filtering and combination, there are a number of algorithms. A Kalman filter may be overkill but it will get the job done. Something a bit simpler would be a complimentary filter.


Here are some references to help you out:
Kalman Filter:
http://www.instructables.com/id/Guid...Arduino-inclu/
http://math.stackexchange.com/questi...-accelerometer
http://blog.tkjelectronics.dk/2011/0...h-the-arduino/

Complimentary Filter:
http://www.hobbytronics.co.uk/accelerometer-gyro
http://www.academia.edu/6261055/Comp..._and_Gyroscope
http://www.pieter-jan.com/node/11

Last edited by baumgartensam : 05-02-2015 at 17:20.
  #4   Spotlight this post!  
Unread 05-02-2015, 17:19
baumgartensam's Avatar
baumgartensam baumgartensam is offline
Registered User
AKA: Sam Baumgarten
FRC #0751 (Barn2Robotics)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: United States
Posts: 42
baumgartensam will become famous soon enough
Re: Temperature for Gyroscope

Also look at IMUs such as the nav6 and navX. They handle all the filtering for you which may be better if you don't have much experience with filtering. There's also lots of sample code for the RoboRIO.

Nav6: http://www.kauailabs.com/store/index...&product_id=50
NavX: http://www.kauailabs.com/store/index...&product_id=56
  #5   Spotlight this post!  
Unread 05-02-2015, 17:39
bijan311 bijan311 is offline
Registered User
FRC #1714
Team Role: Alumni
 
Join Date: May 2013
Rookie Year: 2013
Location: Wisconsin
Posts: 11
bijan311 is an unknown quantity at this point
Re: Temperature for Gyroscope

Do the other analog inputs on the roboRio have something plugged into them?

Earlier this season my team had a similar issue where the gyro would drift steadily when the robot was stationary and would jump 10-20 degrees whenever we drove the robot quickly. At first, we set a deadband on the gyro in the code, which helped, but did not fully resolve the issue. We then printed the values of the other analog inputs on SmartDashboard and found that when we drove the robot, those values would oscillate wildly, which we assumed made noise one the gyro's signal. To stop this, we plugged in jumper wires going from the ground to the signal of each unused analog input port to keep them at a constant value, and that fixed the drift for us.

Last edited by bijan311 : 05-02-2015 at 19:19.
  #6   Spotlight this post!  
Unread 05-02-2015, 21:57
dawonn's Avatar
dawonn dawonn is offline
Mentor
AKA: Dereck
FRC #2586 (Calumet Copperbots)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Auburn Hills, Mi
Posts: 53
dawonn is an unknown quantity at this point
Re: Temperature for Gyroscope

If you google the data sheet for your gyro, it will tell you how much drift can be caused by temperature. They usually have a graph that let's you see the bias vs temperature which is usually a linear relationship.

An accelerometer will only help fix the drift in the roll and pitch angles, which are probably not helpful for you in FRC.

There are some filters which continuously estimate the bias though. One way you could do this is to apply a high pass filter that would filter out the bias. This will not solve all of your problems but may help some.

Your best bet is to try and think of a way to avoid relying on the heading for long periods of time.
  #7   Spotlight this post!  
Unread 05-02-2015, 22:21
Owen Busler's Avatar
Owen Busler Owen Busler is offline
Build Captain
FRC #0303 (Test Team)
Team Role: Leadership
 
Join Date: Aug 2014
Rookie Year: 2014
Location: Bridgewater, NJ
Posts: 137
Owen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant futureOwen Busler has a brilliant future
Re: Temperature for Gyroscope

On my arduino i accidentally wired 5v to ground and ground to 5v on an ultrasonic sensor and it got really hot X_X oops. I hope that isnt your problem.
  #8   Spotlight this post!  
Unread 06-02-2015, 00:14
nighterfighter nighterfighter is offline
1771 Alum, 1771 Mentor
AKA: Matt B
FRC #1771 (1771)
Team Role: Mentor
 
Join Date: Sep 2009
Rookie Year: 2007
Location: Suwanee/Kennesaw, GA
Posts: 835
nighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant futurenighterfighter has a brilliant future
Re: Temperature for Gyroscope

Quote:
Originally Posted by Owen Busler View Post
On my arduino i accidentally wired 5v to ground and ground to 5v on an ultrasonic sensor and it got really hot X_X oops. I hope that isnt your problem.
I doubt that's their problem, because if they did wire it backwards, I don't think you would be able to read the gyro data for very long, if at all.

Sorry to hear about your ultrasonic sensor though. Did it survive or is it toasted?
__________________
1771- Programmer, Captain, Drive Team (2009-2012)
4509- Mentor (2013-2015)
1771- Mentor (2015)
  #9   Spotlight this post!  
Unread 06-02-2015, 00:26
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 323
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Temperature for Gyroscope

Quote:
Originally Posted by nighterfighter View Post
I doubt that's their problem, because if they did wire it backwards, I don't think you would be able to read the gyro data for very long, if at all.

Sorry to hear about your ultrasonic sensor though. Did it survive or is it toasted?
I would say it is possible that if the gyro was damaged, all you get is noise (assuming the sensor is analog) since the roboRIO will read something. And since the roboRIO just integrates this value it would take off and may even look like 'drift' if you assume the gyro is working. This possibility does match the original description, especially since it gets hot 'seconds after turning it on'.

When you say the gyro gets hot, how hot are you talking about?
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
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 01:49.

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