umouse

umouse.git
git clone git://git.lenczewski.org/umouse.git
Log | Files | Refs | Submodules | README

motorspeeds.md (1248B)


      1 # LMOTOR_RAW_VALUES
      2 0 15251
      3 50 12141
      4 100 10345
      5 150 8402
      6 200 6487
      7 250 4623
      8 300 2794
      9 350 976
     10 400 0
     11 450 1547
     12 500 2983
     13 550 4364
     14 600 5900
     15 650 7318
     16 700 8688
     17 750 10028
     18 800 11344
     19 850 12744
     20 900 13972
     21 950 15152
     22 
     23 # RMOTOR_RAW_VALUES
     24 0 16704
     25 50 14724
     26 100 13035
     27 150 11291
     28 200 9481
     29 250 7583
     30 300 5692
     31 350 3805
     32 400 1950
     33 450 0
     34 500 1114
     35 550 2925
     36 600 4734
     37 650 6527
     38 700 8329
     39 750 10131
     40 800 11808
     41 850 13536
     42 900 15094
     43 950 16595
     44 
     45 ## Finding Null-point
     46 
     47 From the above raw data, we can plot 2 lines (one for each motor).
     48 These will form a line reflected around the null-point for each motor, and by
     49 negating the values before the null-point we can get 2 straight lines. The 2
     50 line segments form similar triangles, from which we can interpolate the true
     51 value of the null point.
     52 
     53 ## LNULL
     54 
     55 350, 976
     56 450, 1547
     57 
     58 x / 976 = ((450 - 350) - x) / 1547
     59 1547x = 97600 - 976x
     60 2523x = 97600
     61 x = 38.68
     62 x ~= 39
     63 
     64 LNULL = 350 + 39
     65 LNULL = 389
     66 
     67 ## RNULL
     68 
     69 400, 1950
     70 500, 1114
     71 
     72 x / 1950 = ((500 - 400) - x) / 1114
     73 1114x = 195000 - 1950x
     74 3064x = 195000
     75 x = 63.64
     76 x = 63
     77 
     78 RNULL = 400 + 63
     79 RNULL = 463
     80 
     81 ## Matching Motor PWM Gains
     82 
     83 The two motors will have different responses, since they run in two different
     84 directions (and the motors may have a preferred direction in which they run
     85 faster).