Shop OBEX P1 Docs P2 Docs Learn Events
Calculating Brads — Parallax Forums

Calculating Brads

Blake KochBlake Koch Posts: 39
edited 2010-05-04 05:37 in BASIC Stamp
Please forgive me my math is a littel rusty

I just bought the Boe Bot Digital Encoder kit. I am having trouble with the formula for calculating brads. On page two the formula for calculating brads reads {Brads = (md)/(nw)256}. I have tried to plug in all the constants as I believe I have read them to be but I never come up with brads·= 10.038m or 160.5 brads. I guess my question is what is the value for (m) and where did we get the value from? and what is the value of (n) and where did we get that·value from?

Thanks
Blake

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-03 15:37
    The definitions are all in the preceeding two pages:

    d = wheel diameter
    w = width of track (distance between the two wheels)
    n = number of encoder pulses per revolution
    m = number of encoder pulses detected

    Remember that this formula is for "center pivoting" where one wheel moves forward and the other in reverse so that the BoeBot pivots with an axis through the center of the BoeBot.
  • Blake KochBlake Koch Posts: 39
    edited 2010-05-03 15:56
    Thank you I now see what what I was doing wrong. The units where in inches not eps's

    Blake
  • Blake KochBlake Koch Posts: 39
    edited 2010-05-03 23:18
    Sorry I have one more question on page three.

    angle = (132-100)/8.125= 3.938 so
    Radians = 3.938 how does radians calculate into brads of 160.5

    thanks
    Blake
  • Beau SchwabeBeau Schwabe Posts: 6,560
    edited 2010-05-04 05:37
    Blake Koch,

    If there are 6.2832 Radians in a circle and if a brad (binary radian) ranges from 0 to 255 to represent the same circle, then....


    brad = ( Radian * 256 ) / 6.2832


    or


    brad = ( Degree * 256 ) / 360

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.