Go to Post Then use Newton's handy-dandy 2nd law (Force = mass*acceleration) to solve... - Chris Hibner [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 27-01-2006, 20:25
RetroKamikaze RetroKamikaze is offline
Registered User
#0250
 
Join Date: Jan 2005
Location: Colonie
Posts: 4
RetroKamikaze is an unknown quantity at this point
Yaw Rate Gyro Problems

We're trying to use the Yaw Rate Gyro which came in our Kit of Parts this year. Myself and the programmers have searched for about two hours trying to figure out where or how to implement code for it. Can we use the default gyro code that Kevin has given us or is there something else we can do? Also, we've tried just to printf the value from the default code. (It's an analog sensor) We're getting a base value of about 536 and when we rotate the gyro, the values will go up about 100 and then drop back to 536. What is this a measure of and how can we use these values to help figure out what direction the robot is facing?
  #2   Spotlight this post!  
Unread 27-01-2006, 20:40
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Yaw Rate Gyro Problems

Yes, Kevin's gyro code works fine with this year's YRG. Have a look at http://www.chiefdelphi.com/forums/sh...0&postcount=10 and follow the link.
  #3   Spotlight this post!  
Unread 27-01-2006, 20:41
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Yaw Rate Gyro Problems

sounds like you want to use the gyro as a compass?

a solid state gyro sensor tells you how fast the robot is turning, in one direction or the other. the reading you get when not turning is the 'zero' point.

To figure out compass heading, create a 16 bit variable "heading" and initialize it to 32,000. On each loop of the main SW read the output of the gyro chip, add it to HEADING, and subtract the zero offset (you have been getting 536 for the zero reading)

then if the bot turns one way, this running summation will go up. Turn the other way and it will go down. You will have to do some testing to see what the scaleing is for the sensor you use (what change in reading = 1 degree).
  #4   Spotlight this post!  
Unread 27-01-2006, 20:55
RetroKamikaze RetroKamikaze is offline
Registered User
#0250
 
Join Date: Jan 2005
Location: Colonie
Posts: 4
RetroKamikaze is an unknown quantity at this point
Re: Yaw Rate Gyro Problems

We have tried to figure what the "zero" is and we have determined that 536 is to high, (says the robot is generally moving in the negative direction) and 535 is too low (says the robot is generally moving in the positive direction). but we could still beding something wrong.
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
Gyroscope Code Kevin Watson Programming 65 01-03-2008 23:46
Updated: Example Gyro Interface Code Kevin Watson Programming 2 28-03-2005 04:36
Example gyro code released. Kevin Watson Programming 60 17-03-2005 18:32
ADXRS150 gyro yaw rate sensor Brian M. Electrical 13 17-10-2004 02:28
Yaw rate sensor (gyro for the layperson) Kris Verdeyen Rules/Strategy 4 14-01-2002 00:41


All times are GMT -5. The time now is 01:05.

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