Go to Post Remember that starting a team is ALOT of work, but it’s a lot of fun once it gets going. Its all about the students, so don’t get too carried away ;) - Travis Covington [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 04-02-2006, 15:20
Conan Conan is offline
Registered User
FRC #1137
 
Join Date: Feb 2006
Location: virginia
Posts: 7
Conan is an unknown quantity at this point
Problems with the gyro

Our team is having problems with our gyro. We are using the KOP gyro with Kevin Watson's gyro code. I'm pretty sure everything's been implemented properly. We tried to just compile the code that Kevin provided, and the output results don't make sense.

The gyro_angle output starts are zero. What happens from there varies. I haven't been able to find a definate pattern. Sometimes when we turn it the output displays exactly what we feel it should. However, other times, the results don't make any sense. We might turn the gyro (slowly), and the gyro_angle does not change at all, while sometimes we can set the gyro down on a table and the gyro_angle goes wild and gives random values.

We can't really pinpoint the cause of the problem, but if any of you have encountered anything close, please share. Thanks for all of your help.
  #2   Spotlight this post!  
Unread 04-02-2006, 15:29
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: Problems with the gyro

erratic behaviour sounds like a bad connection between the gyro and either the power, or the analog signals to the RC.

The signals are analog, and you have to make sure you dont corrupt them, like tie-wrapping them to the power leads for the motors or other wires carrying heavy current.

Also make sure the gyro is getting the correct voltage on its power pins.

also, are you sure you are turning the gyro on the right axis? it only senses rotation on one axis.
  #3   Spotlight this post!  
Unread 04-02-2006, 16:38
Conan Conan is offline
Registered User
FRC #1137
 
Join Date: Feb 2006
Location: virginia
Posts: 7
Conan is an unknown quantity at this point
Re: Problems with the gyro

Quote:
Originally Posted by KenWittlief
erratic behaviour sounds like a bad connection between the gyro and either the power, or the analog signals to the RC.

The signals are analog, and you have to make sure you dont corrupt them, like tie-wrapping them to the power leads for the motors or other wires carrying heavy current.

Also make sure the gyro is getting the correct voltage on its power pins.

also, are you sure you are turning the gyro on the right axis? it only senses rotation on one axis.
When the terminal output indicates that the gyro is in fact turning, then yes, the voltage changes appropriately. However, the voltage doesn't always change when the gyro is turned, and the output on the terminal supports this. Also, there is no interference with other high-current wires becase the gyro and controller are temporarily disconnected from the robot.

Also, we looked at the documentation about the gyro, and when we rotate it about the axis normal to the specifications, the gyro angle did not change. However, when we rotated it along a different axis, the gyro angle would change. But once more, this change is not always the correct angle.

Would you recommend trying out a new gyro? If so, are there any good recommendations?
  #4   Spotlight this post!  
Unread 04-02-2006, 17:23
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: Problems with the gyro

do you have a way to look at the voltage coming out of the gyro board?

that would isolate the problem: is the sensor output working correctly?

is the ADC input channel on the RC working correctly (have you tried a different input channel on the RC?)

is your code reading the input all the time, or maybe some other function in the code is interfering with the gyro input routine?
  #5   Spotlight this post!  
Unread 04-02-2006, 18:24
Conan Conan is offline
Registered User
FRC #1137
 
Join Date: Feb 2006
Location: virginia
Posts: 7
Conan is an unknown quantity at this point
Re: Problems with the gyro

Well, yes, we did measure the voltage at the gyro board. This gives us the right voltage values, but not neccessarily at the right times. The voltage values at the gyro board matches up with the terminal output, but neither match up with the motion of the gyro.

I tried attaching the gyro to other analog inputs. I must be doing this wrong (or the gyro is broken). In Kevin's code, the only part I should change to switch the analog input port is the #define in gyro.h, right? I tried switching this from "1" to "2", and now there is NO output. The same thing happened on input port 3.

Lastly, there should not be a section of code that is conflicting. Once again, we are using Kevin's code. These problems occur when there are no modifications whatsoever to Kevin's code.

EDIT: While researching all we could, we finally came across the documentation that said the YRG is silkscreened incorrectly. So, our white wire and red wire were swapped on the gyro. We're done working for the day, but tomorrow we'll swap these two, and see if the gyro works (hopefully we haven't blown it). We'll post back tomorrow with an update. Thanks for all of your help.

Last edited by Conan : 04-02-2006 at 18:55.
  #6   Spotlight this post!  
Unread 04-02-2006, 19:48
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Problems with the gyro

Quote:
Originally Posted by Conan
I tried attaching the gyro to other analog inputs. I must be doing this wrong (or the gyro is broken). In Kevin's code, the only part I should change to switch the analog input port is the #define in gyro.h, right? I tried switching this from "1" to "2", and now there is NO output. The same thing happened on input port 3.
It didn't work because the ADC software, by default, only samples one channel. If you move the gyro to ADC channel 2, you'll need to edit adc.h to sample at least two channels.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 06-02-2006, 01:17
Conan Conan is offline
Registered User
FRC #1137
 
Join Date: Feb 2006
Location: virginia
Posts: 7
Conan is an unknown quantity at this point
Re: Problems with the gyro

Well, earlier today, we switched around the red and white wires, and now the gyro works wonderfully. Thanks for all of your help, and Kevin, we'll take that into consideration if we add any more analog input devices.
  #8   Spotlight this post!  
Unread 06-02-2006, 01:45
Chriszuma's Avatar
Chriszuma Chriszuma is offline
Jack of all trades
AKA: Chris Hammond
FRC #0068 (Truck Town Thunder)
Team Role: Alumni
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Clarkston, MI
Posts: 290
Chriszuma is just really niceChriszuma is just really niceChriszuma is just really niceChriszuma is just really nice
Send a message via AIM to Chriszuma
Re: Problems with the gyro

Quote:
Originally Posted by Conan
Well, earlier today, we switched around the red and white wires, and now the gyro works wonderfully. Thanks for all of your help, and Kevin, we'll take that into consideration if we add any more analog input devices.
this is why reading the documentation is vital.
__________________
2006 T3 World Tour: Great Lakes - Waterloo - Palmetto - IRI
2006 Awards: Motorola Quality - RadioShack Innovation in Control

My website: http://zuma.phire.org/
Truck Town Thunder's website: http://trucktownthunder.com/
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
Yaw Rate Gyro Problems RetroKamikaze Programming 3 27-01-2006 20:55
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
Wierd gyro code problems...pls help Salik Syed Programming 4 14-03-2004 01:29


All times are GMT -5. The time now is 20:58.

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