View Single Post
  #4   Spotlight this post!  
Unread 29-01-2004, 09:51
Larry Barello Larry Barello is offline
http://www.barello.net
#0492 (Titan Robotics Club)
Team Role: Mentor
 
Join Date: Jan 2002
Location: Bellevue, WA
Posts: 85
Larry Barello has a spectacular aura aboutLarry Barello has a spectacular aura about
Re: Yaw Rate Sensor.. Questions

You can get the Analog Devices ADXRS150 or 300 from one of the approved suppliers. I actually got the evaluation board from Analog ($50) and it is super easy to use: Apply +5v and you get rate, voltage reference and temperature outputs (I just use the rate). http://www.analog.com Click on "mems" and then "gyro" and then look for the samples order form.

the 150 is good to 150-200 deg/sec max and the 300 is double that. With some additional external components, you can quadruple the range. Contrast that with the FIRST supplied yaw sensor with only 75 deg/sec range. The low range was our limiting factor, last year, in how fast we could spin around and still accurately hit the center of the ramp.

Anyway, all I use the yaw sensor for is to keep track of heading. I integrate (i.e. figure out the rate offset, and add the results to an accumulator each cycle) Then the output of the accumulator is multiplied by some factor to get heading in degrees. When the robot enters autonomous mode I reset the accumulator and use that heading to control angles, etc. until I get to my target. Offsets from the desired heading are fed into the motor control to straighten the robot out.

In normal user mode, I just use the raw yaw output, again scaled by some suitable factor, to dampen robot motion. I.e. add to the left drive, subtract from the right drive. This "fights" turning when you don't want it.

Cheers!

Just for your enjoyment I attached the sensor code for our robot (as of today...) It includes a nifty quadrature decoder routine and my own ADC stuff (I tossed all the IFI code...) as well as the Gyro routine. Note: I run the gyro routine at 100hz.
Attached Files
File Type: zip Sensor.zip (3.1 KB, 81 views)

Last edited by Larry Barello : 29-01-2004 at 09:57.