Go to Post If Will uses the word "dope", doesn't wear a larger FIRST logo, takes up half of the St. Louis arena, if there was not enough seating in the pits, if the music was killed during finals, it was all justified tonight. - Barry Bonzack [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-01-2014, 20:34
PANTHERPROJECT's Avatar
PANTHERPROJECT PANTHERPROJECT is offline
Registered User
FRC #2064 (The Panther Project)
Team Role: Webmaster
 
Join Date: Dec 2013
Rookie Year: 2007
Location: Southbury, Middlebury
Posts: 14
PANTHERPROJECT will become famous soon enoughPANTHERPROJECT will become famous soon enough
Programming Gyro

Hello everyone! I was wondering if it is possible to use a gyro to set the angle at which a pneumatic catapult launches the ball. If it is possible, how should I approach this? Thanks!

- Team 2064
Programmer/Captain
Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2014, 20:44
Team3266Spencer's Avatar
Team3266Spencer Team3266Spencer is offline
Team Captain and Lead Programmer
AKA: Spencer Lanman
FRC #3266 (Robots-R-US)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Richmond, Indiana
Posts: 280
Team3266Spencer is an unknown quantity at this point
Re: Programming Gyro

Its technically possible but you would be better off using a mechanical stop, an encoder, or something more reliable. A gyro tends to need a lot of recalibration (the ones I've ever used with a FRC robot that is). Its not something you want to rely on exact measurements for. Even it it was easier to work with I think there are simpler options.
__________________
2012: Buckeye Regional, Queen City Regional, Human Player
2013: Queen City Regional, Buckeye Regional, Crossroads Regional
Shooter Operator
2014: Crossroads Regional, Queen City Regional
Catapult Operator
2015: Georgia Southern Classic Regional (Winner), Queen City Regional
Chainsaw Operator
Want to talk? TeamSpeak: team3266.noip.me
Reply With Quote
  #3   Spotlight this post!  
Unread 10-01-2014, 20:12
nyaculak nyaculak is offline
Registered User
FRC #0053 (Area 53)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Maryland
Posts: 28
nyaculak will become famous soon enough
Re: Programming Gyro

In my experience, gyros are best used for relative angle measurements (i.e. turning 90 degrees relative to your current position). They tend to have a lot of "drift", meaning the angle will change from the true value over time. This doesn't matter if you only need a relative angle, but I wouldn't trust a gyro for an accurate absolute angle.

If you want to measure the angle of an apparatus on your robot, I recommend using some kind of angular potentiometer. The angle potentiometer will output a current between 0V and 5V. After you have the potentiometer set up, it's a matter of taking empirical measurements and creating a function to map the voltage returned to an actual angle. This is the method my team used last year to measure the angle of our disc launcher.
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org
Reply With Quote
  #4   Spotlight this post!  
Unread 11-01-2014, 07:03
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
You can also look at using an accelerometer that measures acceleration due to gravity. So it measures 1G when straight up in the axis it's measuring and changes by the cosine of the angle as it rotates. Since it's an absolute measurement, there's no drift.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #5   Spotlight this post!  
Unread 11-01-2014, 07:24
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
But if there is a simple rotary joint where the shooter pivots and you can do the mounting, a potentiometer is probably the easiest way to measure the shooter angle. It will give you a voltage output that is directly proportional to the joint angle.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #6   Spotlight this post!  
Unread 11-01-2014, 08:50
nyaculak nyaculak is offline
Registered User
FRC #0053 (Area 53)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Maryland
Posts: 28
nyaculak will become famous soon enough
Re: Programming Gyro

Quote:
Originally Posted by BradAMiller View Post
You can also look at using an accelerometer that measures acceleration due to gravity. So it measures 1G when straight up in the axis it's measuring and changes by the cosine of the angle as it rotates. Since it's an absolute measurement, there's no drift.
We actually tried to use this method last year before we settled on the use of the potentiometer. Unfortunately, the oscillations of our shooter greatly lowered the precision of our measurements by introducing new sources of acceleration.
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org
Reply With Quote
  #7   Spotlight this post!  
Unread 14-01-2014, 10:21
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Programming Gyro

Quote:
Originally Posted by BradAMiller View Post
You can also look at using an accelerometer that measures acceleration due to gravity. So it measures 1G when straight up in the axis it's measuring and changes by the cosine of the angle as it rotates. Since it's an absolute measurement, there's no drift.
Noise made this almost useless for my team last year. I'll be testing whether running it through a cRIO-side low-pass filter will help, though.
__________________
I code stuff.
Reply With Quote
  #8   Spotlight this post!  
Unread 14-01-2014, 12:12
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
no team (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: New England -> Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Re: Programming Gyro

Another option is to use a string potentiometer e.g. AndyMark sells a kit
They have the advantage that the pot can be mounted at some distance from your axle, simplifying mounting and field maintenance. It won't measure angle directly but you can calculate angle by simple trig or just use a predetermined value for specific setpoints.
Reply With Quote
Reply


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 12: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