Shop OBEX P1 Docs P2 Docs Learn Events
Activity Bot — Parallax Forums

Activity Bot

Currently I am testing my Activity Bot. I had adjust my servos, which by set_servo(1500) to make servos still, after that I run the sample code " Test Encoder connection " which is also correct, then I run the code to do the calibrate, it looks good, one wheel turn around and then another wheel turns around, once it finished, than I try the sample code to display calibrate, it turns out the result is weird, especially the left servo, the servo drives and encoder ticks are all zeros, and the right servo which has some parameters value are huge, I actually totally lost, Can you help me out of that? Actually I had also check it out the description about the troubleshoot. I tried many times but failed.

Comments

  • edited 2017-03-13 13:22
    Hello Isabel,

    If the encoder cannot see the spokes, it's typically all 1s. If it's always reporting that it detects a spoke... The large values on the right side typically indicate that there is no 20 k pullup resistor, between P14 and 3.3V.

    Re-run "Test Encoder Connections", and verify that the P26 light blinks when the left wheel (closer to the servo headers) is rotated, and that P27 blinks when the wheel closer to the P26/P27 lights is rotated. If it's vice-versa, swap the P14/P15 cable plugs at the servo header.

    Double-check your 20 k (brown-black-orange) pullup resistor connections, especially the one between P15 and 3.3 V.

    Try re-running the "ActivityBot Display Calibration" program, and copy/paste the output into a post. Make sure to put [ code ] above and [ /code ] below to maintain the indentation, but without any spaces between the square brackets and the characters. Here is the output of my ActivityBot to give you an idea of some healthy servo/encoder interpolation tables (below). The most important features is that the Encoder ticks/second value starts at 1000, stays at some top speed value between 160 and 200 for a while, then drops to zero, then increases up to the top speed value. There should only be one zero for each servo.
    === LEFT SERVO ===
    
    Table Entries = 90
    Zero Speed Index = 45
    
    Index   Servo Drive     Encoder Ticks/Second
    -----   -----------     --------------------
    0       -194            1000
    1       -189            177
    2       -184            177
    3       -179            180
    4       -174            178
    5       -169            176
    6       -164            178
    7       -159            176
    8       -154            178
    9       -149            178
    10      -144            182
    11      -139            176
    12      -134            178
    13      -129            176
    14      -124            174
    15      -119            174
    16      -114            170
    17      -109            172
    18      -104            169
    19      -99             163
    20      -94             163
    21      -89             163
    22      -84             157
    23      -79             150
    24      -74             141
    25      -69             141
    26      -64             137
    27      -59             133
    28      -54             125
    29      -49             117
    30      -44             109
    31      -39             104
    32      -34             97
    33      -29             88
    34      -24             80
    35      -19             71
    36      -14             63
    37      -9              53
    38      -4              46
    39      1               38
    40      6               28
    41      11              18
    42      13              14
    43      15              11
    44      17              7
    45      25              0
    46      33              6
    47      35              11
    48      37              14
    49      39              17
    50      41              20
    51      43              23
    52      48              33
    53      53              42
    54      58              51
    55      63              60
    56      68              68
    57      73              77
    58      78              84
    59      83              94
    60      88              97
    61      93              107
    62      98              111
    63      103             121
    64      108             124
    65      113             132
    66      118             138
    67      123             140
    68      128             147
    69      133             145
    70      138             158
    71      143             158
    72      148             155
    73      153             163
    74      158             166
    75      163             168
    76      168             168
    77      173             166
    78      178             171
    79      183             173
    80      188             173
    81      193             171
    82      198             171
    83      203             171
    84      178             171
    85      183             173
    86      188             173
    87      193             171
    88      198             171
    89      203             1000
    
    
    === RIGHT SERVO ===
    
    Table Entries = 88
    Zero Speed Index = 40
    
    Index   Servo Drive     Encoder Ticks/Second
    -----   -----------     --------------------
    0       -195            1000
    1       -190            178
    2       -185            176
    3       -180            176
    4       -175            176
    5       -170            174
    6       -165            174
    7       -160            174
    8       -155            172
    9       -150            172
    10      -145            169
    11      -140            168
    12      -135            167
    13      -130            165
    14      -125            162
    15      -120            157
    16      -115            154
    17      -110            152
    18      -105            150
    19      -100            146
    20      -95             139
    21      -90             133
    22      -85             129
    23      -80             125
    24      -75             119
    25      -70             114
    26      -65             106
    27      -60             102
    28      -55             90
    29      -50             83
    30      -45             73
    31      -40             66
    32      -35             54
    33      -30             47
    34      -25             40
    35      -20             33
    36      -15             21
    37      -10             12
    38      -8              10
    39      -6              7
    40      1               0
    41      8               8
    42      10              12
    43      12              15
    44      14              18
    45      16              22
    46      21              32
    47      26              40
    48      31              50
    49      36              60
    50      41              66
    51      46              73
    52      51              84
    53      56              93
    54      61              99
    55      66              107
    56      71              116
    57      76              117
    58      81              126
    59      86              129
    60      91              135
    61      96              139
    62      101             141
    63      106             147
    64      111             151
    65      116             150
    66      121             156
    67      126             154
    68      131             162
    69      136             159
    70      141             162
    71      146             159
    72      151             165
    73      156             167
    74      161             170
    75      166             167
    76      171             167
    77      176             169
    78      181             170
    79      186             172
    80      191             170
    81      196             167
    82      201             172
    83      181             170
    84      186             172
    85      191             170
    86      196             167
    87      201             1000
    

  • Thanks Andy, I will check it as you mentioned.
  • Hello Andy:
    I had double check the resistors which are in the same packet comes with the encoder , red black orange,
    I had also tried re-run the "Test Encoder Connections" which is correct.
    Then I run the code to do the calibrate, the output list as following, I don't understand.

    Actually, I used to got results which are better than this time, but I didn't do the servo_set(1500) to make the servo stop at the beginning. Then I realize that I probably need to run this before I run the calibrate, then I use the screw drive to make it stop of both servo when I run the code to servo_set(1500), does this affect my servos? Does this make the calibration output are weird?
    Thanks for your read. Looking forward to your reply.

    === LEFT SERVO ===

    Table Entries = 67
    Zero Speed Index = 1

    Index Servo Drive Encoder Ticks/Second


    0 0 1000
    1 0 0
    2 0 0
    3 0 0
    4 0 0
    5 0 0
    6 0 0
    7 0 0
    8 0 0
    9 0 0
    10 0 0
    11 0 0
    12 963577028 0
    13 1586080 0
    14 524290 0
    15 111415495 0
    16 661627068 0
    17 637819988 0
    18 661612796 0
    19 571497596 0
    20 1081596 0
    21 -1341095684 0
    22 1671420 0
    23 772669440 0
    24 126091264 0
    25 65535 0
    26 0 0
    27 0 0
    28 705757184 0
    29 739606780 0
    30 739191036 0
    31 1409276 0
    32 10443900 0
    33 12278908 0
    34 8543356 0
    35 15228028 0
    36 16211068 0
    37 9723004 0
    38 11689084 0
    39 16604284 0
    40 1474812 0
    41 1662076 0
    42 6904956 0
    43 7167100 0
    44 6511740 0
    45 6773884 0
    46 7953532 0
    47 1662076 0
    48 5790844 0
    49 570491068 0
    50 570491068 0
    51 705768700 0
    52 705724668 0
    53 570491068 0
    54 806628604 0
    55 806709436 0
    56 806444156 0
    57 772899068 0
    58 772309244 0
    59 26812 0
    60 1596668 0
    61 570491068 0
    62 805830844 0
    63 570517692 0
    64 571432060 0
    65 -580494212 0
    66 -1387963268 1000


    === RIGHT SERVO ===

    Table Entries = 199
    Zero Speed Index = 49

    Index Servo Drive Encoder Ticks/Second


    0 -195 1000
    1 -193 59
    2 -191 61
    3 -189 63
    4 -187 65
    5 -185 67
    6 -183 -1275068347
    7 -181 865599504
    8 -179 537508
    9 -177 -1992327168
    10 -175 569389612
    11 -173 461500
    12 -171 654315004
    13 -169 1640508
    14 -167 537135292
    15 -165 537135292
    16 -163 537135295
    17 -161 23676
    18 -159 0
    19 -157 -65536
    20 -155 0
    21 -153 0
    22 -151 0
    23 -149 570491068
    24 -147 704946364
    25 -145 706765052
    26 -143 3169340
    27 -141 11885692
    28 -139 14507132
    29 -137 8805500
    30 -135 15817852
    31 -133 9395324
    32 -131 9985148
    33 -129 11820156
    34 -127 741497980
    35 -125 1662012
    36 -123 6380668
    37 -121 7429244
    38 -119 7691388
    39 -117 6642812
    40 -115 8019068
    41 -113 8150140
    42 -111 5921916
    43 -109 806444156
    44 -107 772899068
    45 -105 772309244
    46 -103 570491068
    47 -101 672214268
    48 -99 672694524
    49 4 806840508
    50 107 26812
    51 109 570491068
    52 111 570491068
    53 113 806825212
    54 115 -1606263684
    55 117 638671996
    56 119 806453500
    57 121 639118588
    58 123 24936700
    59 125 1679548
    60 127 1662206
    61 129 1662206
    62 131 1662206
    63 133 570491068
    64 135 1662206
    65 137 570491068
    66 139 1662206
    67 141 570491068
    68 143 1662206
    69 145 504454396
    70 147 1679548
    71 149 1655266557
    72 151 806444156
    73 153 0
    74 155 0
    75 157 0
    76 159 0
    77 161 0
    78 163 0
    79 165 0
    80 167 0
    81 169 0
    82 171 0
    83 173 0
    84 175 0
    85 177 0
    86 179 0
    87 181 0
    88 183 0
    89 185 0
    90 187 0
    91 189 0
    92 191 0
    93 193 0
    94 195 0
    95 197 0
    96 199 0
    97 99 0
    98 1 0
    99 3 0
    100 5 0
    101 7 0
    102 9 0
    103 11 0
    104 13 0
    105 15 0
    106 17 0
    107 19 0
    108 21 0
    109 23 0
    110 25 0
    111 27 0
    112 29 0
    113 31 0
    114 33 0
    115 35 0
    116 37 0
    117 39 0
    118 41 0
    119 43 0
    120 0 0
    121 0 0
    122 0 0
    123 199 0
    124 0 0
    125 67 0
    126 1000 0
    127 59 0
    128 61 0
    129 63 0
    130 65 0
    131 67 0
    132 -1275068347 963577028
    133 865599504 1586080
    134 537508 524290
    135 -1992327168 111415495
    136 569389612 661627068
    137 461500 637819988
    138 654315004 661612796
    139 1640508 571497596
    140 537135292 1081596
    141 537135292 -1341095684
    142 537135295 1671420
    143 23676 772669440
    144 0 126091264
    145 -65536 65535
    146 0 0
    147 0 0
    148 0 705757184
    149 570491068 739606780
    150 704946364 739191036
    151 706765052 1409276
    152 3169340 10443900
    153 11885692 12278908
    154 14507132 8543356
    155 8805500 15228028
    156 15817852 16211068
    157 9395324 9723004
    158 9985148 11689084
    159 11820156 16604284
    160 741497980 1474812
    161 1662012 1662076
    162 6380668 6904956
    163 7429244 7167100
    164 7691388 6511740
    165 6642812 6773884
    166 8019068 7953532
    167 8150140 1662076
    168 5921916 5790844
    169 806444156 570491068
    170 772899068 570491068
    171 772309244 705768700
    172 570491068 705724668
    173 672214268 570491068
    174 672694524 806628604
    175 806840508 806709436
    176 26812 806444156
    177 570491068 772899068
    178 570491068 772309244
    179 806825212 26812
    180 -1606263684 1596668
    181 638671996 570491068
    182 806453500 805830844
    183 639118588 570517692
    184 24936700 571432060
    185 1679548 -580494212
    186 1662206 -1387963268
    187 1662206 -984064900
    188 1662206 638671996
    189 570491068 1092124924
    190 1662206 638671996
    191 570491068 1226998012
    192 1662206 638671996
    193 570491068 1529184508
    194 1662206 -1370399620
    195 504454396 572039356
    196 1679548 1655266428
    197 1655266557 1662205
    198 806444156 1000
  • edited 2017-03-15 01:29
    The numbers make it look like the encoder cables are not connected properly. I do not think the encoders can pass this test when the numbers look like they do. Start by going back to this page:

    http://learn.parallax.com/tutorials/robot/activitybot/activitybot/navigation-basics/test-encoder-connections

    The instructions tell you to use your hand to turn the wheel, and watch for a blinking light. If the P26 light does not blink while you turn the wheel with your hand, there is a problem with the encoder connection. (When you stop turning the wheel, it does not matter whether the light stays on or off. But, while you are turning the wheel with your hand, the light has to blink to prove the connection is right.)

    If that test fails (no blinking), recheck your cables. Did you plug the cables into the encoders as shown here?

    http://learn.parallax.com/tutorials/robot/activitybot/activitybot/mechanical-assembly/step-8-mount-left-encoder

    ...and here?

    http://learn.parallax.com/tutorials/robot/activitybot/activitybot/mechanical-assembly/step-1-prepare-your-encoders

    Did you plug the cables into the board as shown in the Plug in the Cables section on this page?

    http://learn.parallax.com/tutorials/robot/activitybot/activitybot/electrical-connections


    Also check the other wheel, the one that IS NOT in the picture on this page:

    http://learn.parallax.com/tutorials/robot/activitybot/activitybot/navigation-basics/test-encoder-connections

    When you turn that other wheel with your hand, the P27 light should blink. When you let go, it should either stay on or off.

    Do not continue until the encoders pass these tests.

    If you can post close-up photos of all the electrical and mechanical connections, that might also help.

    Andy
  • I had solved this problem by re-assembled the robot again. Thanks for your help.
Sign In or Register to comment.