Go to Post You can never go wrong by gaining height by way of a Segway. - Elgin Clock [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 14-08-2007, 09:40
SgtMillhouse648's Avatar
SgtMillhouse648 SgtMillhouse648 is offline
Registered User
AKA: Malhon Godwin
FRC #0648 (QC Elite)
Team Role: Engineer
 
Join Date: Apr 2006
Rookie Year: 2005
Location: Davenport, IA
Posts: 153
SgtMillhouse648 has a spectacular aura aboutSgtMillhouse648 has a spectacular aura about
Send a message via MSN to SgtMillhouse648
Drifting Gyro with EasyC

Okay, so the programming team was fiddling around with the KOP gyro last night for the first time using EasyC. We hooked up the gyro, and using the test code, were able to get a fairly accurate reading off of it, however, once we turned the gyro back to center, the reading started to drift. We were not turning it faster than the 80 degrees per second, and it still drifted pretty significantly (20 degrees or so) What do I need to do to calibrate the gyro with EasyC to prevent it for drifting like this?
Thanks
Malhon
__________________
2007-
Midwest Regional-
Regional Finalists with 1000 and 447
Rockwell Automation Inspiration in Control Award
Regional Woodie Flowers - Ed Wegscheid



  #2   Spotlight this post!  
Unread 14-08-2007, 10:17
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Drifting Gyro with EasyC

If you are running the newest version you can adjust the deadband on the gyro by calling SetGyroDeadband() in the gyro function. Vibration will also cause drift. Default deadband is 3.

You can get the newest version at http://www.intelitekdownloads.com/easyCPRO
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #3   Spotlight this post!  
Unread 14-08-2007, 12:36
SgtMillhouse648's Avatar
SgtMillhouse648 SgtMillhouse648 is offline
Registered User
AKA: Malhon Godwin
FRC #0648 (QC Elite)
Team Role: Engineer
 
Join Date: Apr 2006
Rookie Year: 2005
Location: Davenport, IA
Posts: 153
SgtMillhouse648 has a spectacular aura aboutSgtMillhouse648 has a spectacular aura about
Send a message via MSN to SgtMillhouse648
Re: Drifting Gyro with EasyC

I guess I said what wasn't working right. The gyro isn't in a way drifting. When you bring it back to zero, it increasingly is off each time as it passes its starting point ex. we started up the controller, and let the gyro initialize. slowly we moved the gyro about 90 degrees, and it was dead on. next, we brought it back to 0, and it was within a degree or so. Next, we rotated it 180 degrees, and it was within a bout 5-10 degrees. we then brought it back to 0, and it was off by about 20 degrees. Will the deadband take care of this? It is almost like it is not scaled correctly, but im not sure. Is there a way to change this in easyC?
__________________
2007-
Midwest Regional-
Regional Finalists with 1000 and 447
Rockwell Automation Inspiration in Control Award
Regional Woodie Flowers - Ed Wegscheid



  #4   Spotlight this post!  
Unread 15-08-2007, 10:56
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Drifting Gyro with EasyC

I'd still recommend playing with gyro deadband. You can write your own gyro function if you want to play with it. Just get the analog value GetAnalogInput() and average the samples and set that as your bias.
Subtract the Current Rate from the bias and the difference should be the rate of rotation.

Then it should be 12.5mv/deg sec.

I heard we got a 150deg/sec gyro this year is that true or was it an 80deg/sec again?

I think I might have a snippet of the gyro code around I'll see if I can find it.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 15-08-2007 at 11:11.
  #5   Spotlight this post!  
Unread 15-08-2007, 12:02
Alex.Norton's Avatar
Alex.Norton Alex.Norton is offline
Fidgetting
no team
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Ft. Collins, Colorado
Posts: 190
Alex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud ofAlex.Norton has much to be proud of
Send a message via AIM to Alex.Norton Send a message via MSN to Alex.Norton
Re: Drifting Gyro with EasyC

I know that the gyro was a different one this year than last cause we couldn't simply change between the two without some very major changes to the code.

I will tell you that the gryo will slowly drift even when just sitting. We did some experiments in 2005 to see if we could get absolute positioning working with our swerve and found that it would get almost 45 degrees off with like 720 degrees of motion. Of course this was a drastically different gyro but we have found the same things to be true of both this years and last years gyro.

While I don't know if this is significant for a small bot I will tell you that it is meaningless noise for the operator of a FIRST bot. I barely notice when the gyro drifts because there are so many other factors that influence that bot.
  #6   Spotlight this post!  
Unread 15-08-2007, 12:15
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: Drifting Gyro with EasyC

Did you consider using a MicroGyro? (datasheet) These are the same type of gyros as used in the Wiimote, and in the Gyration line of human interface devices for computers (wireless 'flying' mice).

They proveide a ton of accuracy, however I dont know how well they'll do in the harsh environment of a FIRST field... think the vibration might kill it, but who knows. I havent found a source for these yet but I'll look....

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
  #7   Spotlight this post!  
Unread 15-08-2007, 12:17
SgtMillhouse648's Avatar
SgtMillhouse648 SgtMillhouse648 is offline
Registered User
AKA: Malhon Godwin
FRC #0648 (QC Elite)
Team Role: Engineer
 
Join Date: Apr 2006
Rookie Year: 2005
Location: Davenport, IA
Posts: 153
SgtMillhouse648 has a spectacular aura aboutSgtMillhouse648 has a spectacular aura about
Send a message via MSN to SgtMillhouse648
Re: Drifting Gyro with EasyC

Thanks for the help, I'll try tinkering with the deadband when I can get ahold of the gyro again.
Thanks
Malhon
__________________
2007-
Midwest Regional-
Regional Finalists with 1000 and 447
Rockwell Automation Inspiration in Control Award
Regional Woodie Flowers - Ed Wegscheid



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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drifting MattD1Drift Chit-Chat 30 22-03-2007 22:29
Problem with gyro... capenga Programming 21 16-02-2006 19:25
EasyC Timer and Gyro questions TubaMorg Programming 11 09-02-2006 21:19
Robot Drifting AsimC Programming 19 15-02-2004 21:49


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

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