Shop OBEX P1 Docs P2 Docs Learn Events
ActiveBot Test for Trim — Parallax Forums

ActiveBot Test for Trim

ziyad101ziyad101 Posts: 14
edited 2014-07-07 09:19 in Learn with BlocklyProp
When running the Active Bot with Test for Trim after the calibration. The system goes in circles one way and then starts a circle in another way.. Is there some calibration steps I need to follow with the potentiometer ?

Comments

  • edited 2014-06-20 10:19
    This usually means that there is still a mistake in your circuit or mechanical assembly.

    Check what you have done against these pages with careful attention to detail.

    http://learn.parallax.com/activitybot/electrical-connections
    http://learn.parallax.com/activitybot/mechanical-assembly

    After you have found the next problem, re-run the calibration. If it goes straight with Test for Trim after that, then good. If it still behaves erratically, it means there is still another mistake.
  • ziyad101ziyad101 Posts: 14
    edited 2014-06-30 06:21
    Andy, I had taken the whole module apart and reassembled it.. It seems that one wheel is moving at a faster rate than the other wheel. I will look through and see if there is data in the Interpolation table as well. Where I am going with this is maybe I have to tweak the potentiometer in the servo that is moving really really fast ? thoughts ?
  • edited 2014-06-30 08:02
    The next step is to post your calibration table results. You can copy and past it from SimpleIDE to a reply post here. Make sure to use the tag [noparse]
    before what you paste in and
    
    after.[/noparse] Here is a link to an example of what your interpolation table should resemble. http://forums.parallax.com/showthread.php/155275-ActivityBot-Robot-Issues?p=1261046&viewfull=1#post1261046

    The rightmost column should start at 1000, then jump down to something in the 170 to 205 range. After oscillating for a few entries, it should decline to zero, then increase back up to where it started. This pattern should be roughly the same for both left and right wheels. If it's not, it's likely that you still have a wiring or assembly error. When you post the interpolation table, we'll have a better idea of what that error might be.
  • ziyad101ziyad101 Posts: 14
    edited 2014-06-30 08:58
    My encoders are all the up by the edge of the wheels

    not like the good one shown in http://forums.parallax.com/showthrea...55#post1207655 .. Is there a way to push the encoders down so that they see the spokes like the one that is depicted in the Good picture
  • PublisonPublison Posts: 12,366
    edited 2014-06-30 09:44
    ziyad101 wrote: »
    My encoders are all the up by the edge of the wheels

    not like the good one shown in http://forums.parallax.com/showthrea...55#post1207655 .. Is there a way to push the encoders down so that they see the spokes like the one that is depicted in the Good picture

    You want the encoders up as far as possible to see the spokes.

    Try this to reset the servos:

    http://learn.parallax.com/activitybot/troubleshooting
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-30 11:10
    Based upon your last post, ziyad101, I wonder if you've mounted the servos or encoders backwards. That's the only way I can think of for the sensing area to be "too high" relative to the spokes. To clarify, the servo shaft should be directly below the encoder's sensing area, not off to one side.

    -Phil
  • ziyad101ziyad101 Posts: 14
    edited 2014-06-30 19:36
    I believe I set up the servos and encoders the right way. I am also attaching pictures as well..
    photo 1.jpg
    photo 2.jpg
    640 x 480 - 86K
    640 x 480 - 94K
  • ziyad101ziyad101 Posts: 14
    edited 2014-06-30 19:39
    I have included the pictures of the left side with the wheel mounted and without the wheel mounted. All the wiring seems to be correct. I have gone in as per Andy's instructions and have taken all the connections off first and then rewired again. It seems that the sensors are way above the spokes.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-30 19:44
    ziyad101 wrote:
    I believe I set up the servos and encoders the right way.
    Um, no. As I suspected, your servos are mounted backwards. The shaft should be towards the rear, not the front.

    That said, however, if you plan to mount a heavy load to the front of the bot, such as a gripper, you will want to reverse the encoder instead, so that the cable protrudes forward. But in most cases, having the servo shaft rearward is the better option.

    -Phil
  • ziyad101ziyad101 Posts: 14
    edited 2014-07-01 05:11
    thanks Phil, I never thought to go down that path.. Makes sense, I will reverse the servo shafts and check it out
  • ziyad101ziyad101 Posts: 14
    edited 2014-07-02 02:03
    ok , swapping the direction of the shaft of the motors did it. It now passes the encoder test and also did a successful calibration. However when I go to use the Test trim code, the Bot makes about 4-5 turns on the spoke. Any ideas on where to go from here ?
  • edited 2014-07-02 07:21
    Regarding "...the Bot makes about 4-5 turns on the spoke." It's difficult to tell what you mean here. Could you try explaining again?

    If the test program doesn't take the ActivityBot slowly forward for eight seconds, there may still be another assembly step that was not followed correctly. For example, maybe the resistors are the wrong values, something other than 20 k = red-black-orange. Or maybe the supply jumper for the P12/P13 headers was not set to Vin. Or maybe the cable that's supposed to be connected to P12 is connected to P13 and vice-versa. Or maybe it's the P14 and P15 cables that are swapped. Those are some examples of common assembly errors, but yours may be different.

    Some of the common errors and their symptoms are documented here: http://learn.parallax.com/activitybot/troubleshooting

    Sometimes we can get hints about what's wrong if you post your ActivityBot's calibration table. Please see post #4 http://forums.parallax.com/showthread.php/156153-ActiveBot-Test-for-Trim?p=1276281&viewfull=1#post1276281 in this thread.
  • ziyad101ziyad101 Posts: 14
    edited 2014-07-02 18:58
    === LEFT SERVO === 
    
     Table Entries = 89
     Zero Speed Index = 44
     
    
     Index   Servo Drive     Encoder Ticks/Second
     -----   -----------     --------------------
     0       -194            1000
     1       -189            178
     2       -184            180
     3       -179            182
     4       -174            178
     5       -169            184
     6       -164            178
     7       -159            178
     8       -154            182
     9       -149            178
     10      -144            180
     11      -139            178
     12      -134            175
     13      -129            175
     14      -124            173
     15      -119            177
     16      -114            173
     17      -109            169
     18      -104            171
     19      -99             167
     20      -94             167
     21      -89             162
     22      -84             159
     23      -79             154
     24      -74             148
     25      -69             148
     26      -64             138
     27      -59             135
     28      -54             123
     29      -49             117
     30      -44             113
     31      -39             100
     32      -34             94
     33      -29             89
     34      -24             78
     35      -19             67
     36      -14             57
     37      -9              48
     38      -4              39
     39      1               28
     40      6               19
     41      8               15
     42      10              10
     43      12              7
     44      19              0
     45      26              7
     46      28              11
     47      30              15
     48      32              19
     49      34              22
     50      39              31
     51      44              44
     52      49              49
     53      54              59
     54      59              67
     55      64              78
     56      69              85
     57      74              92
     58      79              103
     59      84              109
     60      89              116
     61      94              123
     62      99              131
     63      104             139
     64      109             144
     65      114             146
     66      119             150
     67      124             156
     68      129             161
     69      134             159
     70      139             163
     71      144             165
     72      149             166
     73      154             170
     74      159             170
     75      164             174
     76      169             172
     77      174             172
     78      179             174
     79      184             176
     80      189             178
     81      194             178
     82      199             179
     83      204             178
     84      184             176
     85      189             178
     86      194             178
     87      199             179
     88      204             1000
     
    
     
    
     === RIGHT SERVO ===
     
    
     Table Entries = 88
     Zero Speed Index = 34
     
    
     Index   Servo Drive     Encoder Ticks/Second
     -----   -----------     --------------------
     0       -195            1000
     1       -190            172
     2       -185            167
     3       -180            170
     4       -175            163
     5       -170            165
     6       -165            165
     7       -160            161
     8       -155            165
     9       -150            158
     10      -145            160
     11      -140            150
     12      -135            153
     13      -130            140
     14      -125            145
     15      -120            135
     16      -115            138
     17      -110            124
     18      -105            122
     19      -100            111
     20      -95             107
     21      -90             104
     22      -85             91
     23      -80             83
     24      -75             76
     25      -70             66
     26      -65             57
     27      -60             47
     28      -55             40
     29      -50             31
     30      -45             26
     31      -40             16
     32      -38             11
     33      -36             6
     34      -29             0
     35      -22             3
     36      -20             9
     37      -18             13
     38      -16             16
     39      -14             21
     40      -9              31
     41      -4              39
     42      1               47
     43      6               58
     44      11              66
     45      16              74
     46      21              82
     47      26              92
     48      31              98
     49      36              106
     50      41              116
     51      46              126
     52      51              127
     53      56              132
     54      61              137
     55      66              146
     56      71              147
     57      76              150
     58      81              153
     59      86              158
     60      91              158
     61      96              165
     62      101             163
     63      106             165
     64      111             166
     65      116             167
     66      121             168
     67      126             166
     68      131             174
     69      136             172
     70      141             176
     71      146             174
     72      151             172
     73      156             176
     74      161             172
     75      166             178
     76      171             174
     77      176             172
     78      181             176
     79      186             172
     80      191             174
     81      196             172
     82      201             172
     83      181             176
     84      186             172
     85      191             174
     86      196             172
     87      201             1000
    
  • ziyad101ziyad101 Posts: 14
    edited 2014-07-02 19:03
    The system after calibration during Test for trim only goes through 4-5 ticks
  • edited 2014-07-02 20:26
    Your calibration data looks good, so don't change any wiring or mechanical things.

    If you are going to load code to make the ActivityBot navigate, make sure to:

    (1) Plug the battery supply in
    (2) Set the PWR switch to 1
    (3) Use the Load EEPROM & Run button to load the code into the bot
    (4) Set the power switch to 0 while you take it to the place where it's going to navigate
    (5) Set the PWR switch to 2
    (6) Set the bot down and observe

    If it just twitches forward by a few spokes repeatedly, it may mean the batteries are dead. If the Activity Board was left on over night, the LED lights may have brought the batteries down. If one of the batteries is trying to fall out of the pack, it can also have those symptoms.

    One other thing to check would be to make sure the shunt jumpers next to the P12/13 and P14/15 servo ports are fitting tightly over their pins. The P12/13 shunt should be over VIN and the center pin, and the P14/15 jumper should be over the 5V and center pin. If either of them are not fitting tightly, pull the shunt jumper off and bend the pins very slightly apart so that when you put the shunt jumper back on, it'll fit snuggly.
  • edited 2014-07-03 10:23
    One other thing, if you put one of the batteries back in backwards, you'll also see the twitch forward a few spokes symptom.
  • Courtney JacobsCourtney Jacobs Posts: 903
    edited 2014-07-07 09:19
    Please be sure to make sure there is absolutely no power connected to the board if you see a need to adjust the shunt jumpers.

    Unplug the barrel jack and USB cable connection fully before moving any shunt jumper
    , or you will damage your board.
  • ziyad101ziyad101 Posts: 14
    edited 2014-07-07 09:19
    Hi Andy,
    wanted to provide feedback. I got it finally working with the trim code. Now I can go forward /backwards, right and left.. The issue I ran into and not sure why, the copy of the trim program that I downloaded was faulty. I downloaded the example code and copied and pasted from the learn zip folder that I downloaded again. and that seemed to do the trick
Sign In or Register to comment.