Go to Post Don't you know anything about programming? It's a black box; you don't need to know how it works. - Chriszuma [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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 08-02-2012, 05:37
NeatTeam NeatTeam is offline
Registered User
FRC #1943
 
Join Date: Jan 2012
Location: Israel
Posts: 56
NeatTeam is an unknown quantity at this point
Gyro "set gain"

We have been using the gyro sensor for a few years now, and we always use "set gain" 0.0125 in the BEGIN VI as shown in the example code, but we have no idea what it means and what it is good for. We are really curious about it, so if anyone knows what the "set gain" means, what it does or what it is good for, can you please tell us?
  #2   Spotlight this post!  
Unread 08-02-2012, 07:44
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Gyro "set gain"

A gyro outputs a specific change in voltage proportional to the rotational speed, the FPGA then integrates this change to get a heading.

The gain just tells the software how to scale volts to engineering units.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #3   Spotlight this post!  
Unread 08-02-2012, 09:20
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: Gyro "set gain"

As Palardy said, the Gain converts voltage of the sensor to engineering units (in this case, degrees per second). There are two reasons there is a SetGain vi: 1) so you can use a different gyro than the one in the kit; and 2) every sensor has it's own true gain. The reason every sensor has its own gain is due to differences in the manufacturing process. The manufacturers try their best to make every gyro exactly alike, but it's not completely possible. You can find the true gain of your gyro using something like the procedure below.

Here is what you should do:

1) Set your robot so that one side of the frame is flat against a wall.

2) Turn your robot on and wait for your code to start.

3) Read the gyro heading and write it down (it should be close to 0). Let's call it HeadingStart

4) Using your hands, gently turn your robot around so the opposite side of the frame is flat against the wall (you robot should have turned 180 degrees - it should now be facing the opposite direction).

5) Read the gyro heading and write it down. It should be close to 180 degrees. Let's call it HeadingEnd.

6) Subtract your gyro heading from step 3 from the heading in step 5: The result should be close to 180 degrees. Let's call it HeadingChange: HeadingChange = HeadingEnd - HeadingStart

7) If HeadingChange wasn't close enough to 180, you can calculate a new and improved Gain with the following formula: NewGain = OldGain * (HeadingChange / 180)

8) Put the new gain in your software and repeat this process to see if it improved your heading calculation.
__________________
-
An ounce of perception is worth a pound of obscure.

Last edited by Chris Hibner : 08-02-2012 at 09:36.
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 19: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