Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Prop Shield Angular Velocity

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Location
    San Francisco, California
    Posts
    10

    Prop Shield Angular Velocity

    I'm working on a project using a Teensy 3.2 + Prop Shield. It will be mounted on a wheel and I'd like to read angular velocity. I see some references in the code: https://github.com/PaulStoffregen/NX...C%93&q=angular but it's not clear how to get the angular velocity. Any help/examples are appreciated.
    Thanks

  2. #2
    Senior Member onehorse's Avatar
    Join Date
    Apr 2014
    Location
    Danville, California
    Posts
    921
    Gyros output rotation as degrees per second. 360 degrees per circumference, 360 x 2 x radius of wheel = length traveled in one revolution. So easy to translate between degrees per second to length per second.

    Was this your question?

  3. #3
    Junior Member
    Join Date
    Dec 2013
    Location
    San Francisco, California
    Posts
    10
    Yes! Thanks for the quick reply.

  4. #4
    Junior Member
    Join Date
    Jun 2016
    Posts
    7
    Dont you need to covert to radians per second first?

    X deg/sec * pi rad/180 deg * radius = length/sec

    Also op your angular velocity is deg/sec (it is the rate of rotation). Your linear velocity is from the above eqn and corresponds to how fast the center of a wheel of radius r translates when it rolls on the ground with angular velocity x

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,015
    The raw gryoscope data already is degrees per second.

    Usually the raw data from the gyro, accelerometer, and magnetometer are fed into a filter algorithm. The filter's output is improved orientation data, which can be in radians/sec or degrees/sec, or quaternions.

  6. #6
    Junior Member
    Join Date
    Jun 2016
    Posts
    7
    Quote Originally Posted by PaulStoffregen View Post
    The raw gryoscope data already is degrees per second.
    Paul - Not sure if that was directed at me or OP, but just wanted to clarify I meant if you have deg per sec and you want length per second of a wheel, you have to convert the deg per sec to rad per sec before you multiply by the radius. I was just correcting the post above me which I think incorrectly stated deg per sec * radius = length per sec. It think it should be deg per sec * (pi/180.0) * radius = length per second

    I agree with the filter comment though, I think kalman filters are popular for this kind of application? Or an iir for frequency content isn't too hard to implement

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •