Go to Post I'm not sure why, but I'm getting this picture in my head of a bunch of engineers, huddled in deer blinds with 22's, waiting for the right power wheels toy to drive by. - Tom Line [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 24-02-2016, 19:08
viggy96 viggy96 is offline
Registered User
FRC #3331
Team Role: College Student
 
Join Date: Jan 2015
Rookie Year: 2010
Location: Charlotte
Posts: 49
viggy96 is infamous around these partsviggy96 is infamous around these partsviggy96 is infamous around these parts
ADXRS450 Gyro

Hello our team is trying to use the ADXRS450 gyro, but not for driving. We are trying to use it to detect the angle of an arm. I have been trying to use PWM cables to wire the gyro to the SPI port on the roboRIO. Do you guys think that this would work?
  #2   Spotlight this post!  
Unread 24-02-2016, 22:44
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 240
BitTwiddler is on a distinguished road
Re: ADXRS450 Gyro

I think you would be happier using an encoder or a potentiometer to measure the arm angle. The gyro reported angle measurements have quite a bit of drift to them.
I don't recall offhand but I believe the SPI port of the RoboRio uses something like eight or ten pins to connect. A single PWM cable will only connect three of them.
  #3   Spotlight this post!  
Unread 24-02-2016, 22:45
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,112
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: ADXRS450 Gyro

There are much better methods for measuring the angle of an arm. A gyro is probably going to drift too much during a match for it to be very useful. A two-axis accelerometer would work better to tell you the "down" direction. If you can mount a potentiometer or other absolute position sensor to the joint, that would be ideal.
  #4   Spotlight this post!  
Unread 24-02-2016, 23:16
juchong's Avatar
juchong juchong is offline
Electrical Engineer
AKA: Juan Chong
FRC #2655 (Flying Platypi)
Team Role: Engineer
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Greensboro, NC
Posts: 104
juchong is a jewel in the roughjuchong is a jewel in the roughjuchong is a jewel in the rough
Re: ADXRS450 Gyro

Quote:
Originally Posted by Alan Anderson View Post
There are much better methods for measuring the angle of an arm. A gyro is probably going to drift too much during a match for it to be very useful. A two-axis accelerometer would work better to tell you the "down" direction. If you can mount a potentiometer or other absolute position sensor to the joint, that would be ideal.
Agreed, there are a few simple algorithms out there to measure tilt using 2 accelerometer axes. The ADXRS450 will allow you to measure rotation in one axis, but it will drift over time. I highly recommend using an encoder and limit switch!
__________________
Teams I've worked with:My Website: http://www.juanjchong.com/
What I do: Analog Devices iSensor Product Engineer
  #5   Spotlight this post!  
Unread 25-02-2016, 08:19
Alex L.'s Avatar
Alex L. Alex L. is offline
Registered User
FRC #5145 (WolfBotics)
Team Role: College Student
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Florida
Posts: 4
Alex L. is an unknown quantity at this point
Re: ADXRS450 Gyro

Just as a follow up, does anyone know if the PWM method would work with the 450? My team is using this gyro for our driving in autonomous, however, due to size constrains, we had to mount the roboRio vertically. This messed up the readout from the gyro, and know we need to mount it horizontally somewhere else.
  #6   Spotlight this post!  
Unread 25-02-2016, 12:26
viggy96 viggy96 is offline
Registered User
FRC #3331
Team Role: College Student
 
Join Date: Jan 2015
Rookie Year: 2010
Location: Charlotte
Posts: 49
viggy96 is infamous around these partsviggy96 is infamous around these partsviggy96 is infamous around these parts
Unfortunately, we don't have any potentiometers or encoders. We're trying to work with what we have.
  #7   Spotlight this post!  
Unread 25-02-2016, 12:39
slibert slibert is online now
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 341
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: ADXRS450 Gyro

Quote:
Originally Posted by viggy96 View Post
Unfortunately, we don't have any potentiometers or encoders. We're trying to work with what we have.
If you don't have a potentiometer or an encoder, here are a couple of other approaches that could work, though they're not as straightforward (they're not the simplest thing that could possibly work, though the IR sensor approach below is pretty simple):

- Use an Infrared Proximity Sensor to measure the distance from the base (e.g., the robot chassis) where the sensor is mounted to a point at the end of the arm opposite from the fulcrum. Then, measure the distance from the fulcrum to the point where you are measuring the distance. Using the Pythagorean theorem, use the known distance of one side, the measured distance of another side to derive the angle the arm is at. We used this approach on our shooter in the Aerial Assist Game. We added some retroreflective tape onto the shooter underside and pointed the IR sensor up at it, so we got a good reading that was accurate to 1cm. It worked except for one match in which a Frisbee went into the robot and covered the sensor.

- Use an accelerometer to measure the tilt angle of the arm. Keep in mind that accelerometers measure acceleration due to gravity (which is good in this case, because it will tell you the angle away from horizontal of the accelerometer), as well as acceleration due to linear motion (as when your robot is moving). Accelerometers typically have an error of +/- 1 or 2 degrees. I think this will be a little more complicated than the IR sensor approach described above, but it should be doable if you calibrate the accelerometer and mount it firmly to the arm you are measuring the angle of.
  #8   Spotlight this post!  
Unread 25-02-2016, 12:44
Sperkowsky's Avatar
Sperkowsky Sperkowsky is offline
Professional Multitasker
AKA: Samuel Perkowsky
FRC #2869 (Regal Eagles)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Bethpage, NY
Posts: 1,885
Sperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond repute
Re: ADXRS450 Gyro

Hey to all of the people recommending potentiometors I have a question. How do you mount these things. We bought a vex edr one and got it mounted to a 1/2 hex shaft with a 3d printed part and it broke immediately.
  #9   Spotlight this post!  
Unread 25-02-2016, 12:47
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: ADXRS450 Gyro

Quote:
Originally Posted by Alex L. View Post
Just as a follow up, does anyone know if the PWM method would work with the 450? My team is using this gyro for our driving in autonomous, however, due to size constrains, we had to mount the roboRio vertically. This messed up the readout from the gyro, and know we need to mount it horizontally somewhere else.
Yes, you can use (multiple) PWM cables, but a more robust solution would be to use the proper ribbon cable. Copy and paste from http://www.chiefdelphi.com/forums/sh...00#post1533200 :

The connector is a 10 pin 0.1" pitch IDC ribbon connector, and you need 0.05" pitch 10 conductor ribbon cable. Look at DigiKey parts ED10500-ND (female connector), MPK10K-ND (male connector), and AE10G-5-ND (5' ribbon cable). Even easier, DigiKey also sells premade assemblies such as H3AWH-1018G-ND (1.5') and H3AWH-1036G-ND (3.0'). You may be able to find these connectors from your local electronics shop or Fry's store as well.

Also worth noting is the fact the sensor is a 3-axis one, so you can vertically mount it (if it's rigidly mounted and actually vertical) and just read different axes.

EDIT: The accelerometer is 3-axis. The gyro is only one axis, so you'll need to use an extension cable in your situation.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)

Last edited by Peter Johnson : 25-02-2016 at 15:22.
  #10   Spotlight this post!  
Unread 25-02-2016, 12:51
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: ADXRS450 Gyro

Quote:
Originally Posted by Sperkowsky View Post
Hey to all of the people recommending potentiometors I have a question. How do you mount these things. We bought a vex edr one and got it mounted to a 1/2 hex shaft with a 3d printed part and it broke immediately.
We turn down the end of the shaft to 1/4", then mount the pot to a plate, use two standoffs to offset it from the end of the shaft, and then use a 1/4"-1/4" flexible shaft coupler to connect the pot and the shaft. Note this requires good mechanical capture of the shaft and the ability to turn down the end. I've also seen teams use elastic tubing with zip ties as a cheaper flexible shaft coupler.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #11   Spotlight this post!  
Unread 25-02-2016, 13:22
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,112
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: ADXRS450 Gyro

Quote:
Originally Posted by viggy96 View Post
Unfortunately, we don't have any potentiometers or encoders. We're trying to work with what we have.
Some of the things you have are Product Donation Vouchers from DigiKey and Automation Direct. Have you used them yet?

Potentiometers are standard electronic components that any Radio Shack worth the name will have in stock. You might also find them at Advance Auto.

The 2011 Kit of Parts included an AS5030 magnetic encoder that would be perfect for your application.
  #12   Spotlight this post!  
Unread 25-02-2016, 13:52
Alex L.'s Avatar
Alex L. Alex L. is offline
Registered User
FRC #5145 (WolfBotics)
Team Role: College Student
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Florida
Posts: 4
Alex L. is an unknown quantity at this point
Re: ADXRS450 Gyro

Quote:
Originally Posted by Peter Johnson View Post
Also worth noting is the fact the sensor is a 3-axis one, so you can vertically mount it (if it's rigidly mounted and actually vertical) and just read different axes.
Thanks for the suggestions, those connectors are just what we need. Regarding the gyro however, according to FIRST choice, this model of the 450 only has 1 axes. Correct me if i'm wrong though, it'd be nice if a simple software change could solve the issue.

Last edited by Alex L. : 25-02-2016 at 14:06.
  #13   Spotlight this post!  
Unread 25-02-2016, 13:57
electroken's Avatar
electroken electroken is offline
Electron Tamer
AKA: Ken Pontbriant
FRC #0230 (Gaelhawks)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Shelton, CT
Posts: 167
electroken is a jewel in the roughelectroken is a jewel in the roughelectroken is a jewel in the rough
Re: ADXRS450 Gyro

Quote:
Originally Posted by Peter Johnson View Post
Also worth noting is the fact the sensor is a 3-axis one, so you can vertically mount it (if it's rigidly mounted and actually vertical) and just read different axes.
The ADXL362 accelerometer on the FIRST Choice PCB is a 3-axis device. The ADXRS450 gyro is Z-axis only.
  #14   Spotlight this post!  
Unread 25-02-2016, 15:18
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 247
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: ADXRS450 Gyro

Quote:
Originally Posted by electroken View Post
The ADXL362 accelerometer on the FIRST Choice PCB is a 3-axis device. The ADXRS450 gyro is Z-axis only.
Whoops! You're quite right. Sorry for the confusion.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
  #15   Spotlight this post!  
Unread 26-02-2016, 00:19
juchong's Avatar
juchong juchong is offline
Electrical Engineer
AKA: Juan Chong
FRC #2655 (Flying Platypi)
Team Role: Engineer
 
Join Date: Aug 2008
Rookie Year: 2008
Location: Greensboro, NC
Posts: 104
juchong is a jewel in the roughjuchong is a jewel in the roughjuchong is a jewel in the rough
Re: ADXRS450 Gyro

Quote:
Originally Posted by electroken View Post
The ADXL362 accelerometer on the FIRST Choice PCB is a 3-axis device. The ADXRS450 gyro is Z-axis only.
That's correct, the ADXRS450 is a single-axis device. If you have some spare FIRST Choice points, you could pick up an IMU
__________________
Teams I've worked with:My Website: http://www.juanjchong.com/
What I do: Analog Devices iSensor Product Engineer
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 03: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