Shop OBEX P1 Docs P2 Docs Learn Events
Serious problem about AcitivityBot . — Parallax Forums

Serious problem about AcitivityBot .

JarvanJarvan Posts: 31
edited 2013-11-20 10:18 in Learn with BlocklyProp
After we assembled more than 50 ActivityBot , we find more than one third have problem , one third have same but intermittent problem, We Checked the hardware assemblely as the turtorial carefully, But we can not find the reason and a effectly solution. Is there something wrong with the turtorial on the web? It really make me crazy!!

Comments

  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2013-11-17 23:05
    Hi Jarvan,

    Are you still having issues with the encoders? Will they not calibrate? What behaviors are you seeing?

    Jessica
  • Ken GraceyKen Gracey Posts: 7,389
    edited 2013-11-18 09:03
    Jarvan,

    We should probably check to see that your encoders are working properly. As designed, the two calibration programs don't make it very easy to debug an encoder problem.

    Load this code:
    #include "simpletools.h"
    
    
    int main()
    {
      low(26);
      low(27);
     
      while(1)
      {
        set_output(26, input(14));
        set_output(27, input(15));
      }  
    }
    

    Download to EEPROM, turn the wheels gently on your ActivityBot. Do you see the LEDs on P26 and P27 illuminate? If so, then you should be able to run the calibration programs. If not, then there's no encoder signal - check for misalignment of the encoders to the wheels.

    Report back and we'll continue to debug this problem. We may not hear from you until late today because it's about 1 am in China, so we'll check back this evening.

    Ken Gracey
  • Ken GraceyKen Gracey Posts: 7,389
    edited 2013-11-18 10:15
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2013-11-18 16:09
    Hello Jarvan,

    I have updated the Electrical Connections page with a picture to help identify left and right sides of the robot, for cable connections. I also added a Connection Checklist to the bottom of the page.
    http://learn.parallax.com/activitybot/electrical-connections

    The code that Ken Gracey put in the third post is very helpful! There are other tips on the ActivityBot Troubleshooting page:
    http://learn.parallax.com/activitybot/troubleshooting

    I hope this helps!

    -Stephanie
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2013-11-18 18:25
    And, I have just added a page to the tutorial: Test the Encoder Connections:

    http://learn.parallax.com/activitybot/test-encoder-connections
  • JarvanJarvan Posts: 31
    edited 2013-11-18 21:13
    After we adjust the positon of the encoder, I think the encoder work well now, but we meet the problem again. I use the following code to test the pairs of encoders:
    #include "simpletools.h"
    #include "abdrive.h"
     
    int main()                    
    {
      int valueR,lastseenR;
      int valueL,lastseenL;
      int mL;int mR;
      lastseenR=1;
      valueR=0;
      lastseenL=1;
      valueL=0;
    while(1)
    {
      mL=input(14);
      mR=input(15);
       
    if(mL==1)
      {
        if(lastseenL==1)
        {
          valueL++;
          lastseenL=0;
          print("valueL=%d  ",valueL);
        }
      }
        else
        {
          lastseenL=1;
        } 
    
    
      if(mR==1)
      {
        if(lastseenR==1)
          {  
          valueR++;
          lastseenR=0;
          print("valueR=%d\n",valueR);
          }
      }
      else
      {
        lastseenR=1;
      }
     
     }
    }
    

    then I push the robot on the ground to make it go straight for a distance, the terminal shows as following:
    QQ截图20131119124105.jpg


    the encoders seem work well. but after I calibration them, It's hard for them to run a program accuratly.

    such as I code a program to make the robot have a 90 degrees turn, it always turn too much and then slowly turn back to 90 degrees.
  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2013-11-19 15:56
    Hi Jarvan,

    By how much does the robot overshoot the target? 10 degrees, 20, 45? If it is a small twitch that's normal behavior. The way the encoder program works is that is counts the total number of ticks from the robot and compares it to the number of ticks the robot should take based on code. If it finds it went too far, it will reverse to the proper count. If you can upload a video of the operation, that might help us visualize the problem.

    We should also check your calibration values, which could help diagnose the issue. Could you run the Activity Bot Display Calibration program (found in the Navigation folder on your computer, or attached to this thread)? Be sure to run with terminal, and copy the values displayed in this window to this thread. Once we see those values we should be able to get a better idea of what's going on.

    Jessica
  • JarvanJarvan Posts: 31
    edited 2013-11-20 01:37
    I adjusted the servo position, I think some problem may as follow pictures:
    ok.jpg
    not OK.jpg


    After I mounted the ActivityBot as the turtotial on the web , I am sure the process is all right, but i am not sure whether the ActivityBot can work well, I have to upload some codes to test the encoders.

    And , before you help us find the encoder problem, my colleague and I try to use screwdriver to adjust the servo, make it stop running. It must be stupid behaviour and I don't know what effect it will cause.

    When I am ready to take a video about it, make it have a 90 degrees turn, it suddenly be a lamb and do everything accurately once and again. I give up and turn off camera , show it to my colleague , It suddenly and suddenly have a almost 360 degrees turn and slowly turn back to 90 degrees.


    At last, the display of calibration data as following:

    === LEFT SERVO ===

    Table Entries = 89
    Zero Speed Index = 25


    Index Servo Drive Encoder Ticks/Second


    0 -194 1000
    1 -189 146
    2 -184 142
    3 -179 144
    4 -174 138
    5 -169 138
    6 -164 129
    7 -159 128
    8 -154 120
    9 -149 113
    10 -144 111
    11 -139 101
    12 -134 94
    13 -129 86
    14 -124 75
    15 -119 67
    16 -114 59
    17 -109 52
    18 -104 43
    19 -99 33
    20 -94 25
    21 -89 19
    22 -87 16
    23 -85 11
    24 -83 7
    25 -76 0
    26 -69 6
    27 -67 10
    28 -65 14
    29 -63 16
    30 -61 20
    31 -59 25
    32 -54 35
    33 -49 42
    34 -44 52
    35 -39 60
    36 -34 67
    37 -29 74
    38 -24 82
    39 -19 90
    40 -14 94
    41 -9 105
    42 -4 108
    43 1 114
    44 6 119
    45 11 123
    46 16 128
    47 21 132
    48 26 134
    49 31 140
    50 36 140
    51 41 144
    52 46 140
    53 51 145
    54 56 144
    55 61 151
    56 66 145
    57 71 151
    58 76 148
    59 81 154
    60 86 152
    61 91 154
    62 96 152
    63 101 154
    64 106 151
    65 111 155
    66 116 152
    67 121 154
    68 126 152
    69 131 154
    70 136 149
    71 141 157
    72 146 151
    73 151 157
    74 156 149
    75 161 154
    76 166 148
    77 171 157
    78 176 152
    79 181 157
    80 186 150
    81 191 155
    82 196 150
    83 201 155
    84 181 157
    85 186 150
    86 191 155
    87 196 150
    88 201 1000




    === RIGHT SERVO ===


    Table Entries = 89
    Zero Speed Index = 42


    Index Servo Drive Encoder Ticks/Second


    0 -195 1000
    1 -190 145
    2 -185 150
    3 -180 138
    4 -175 152
    5 -170 147
    6 -165 153
    7 -160 143
    8 -155 150
    9 -150 143
    10 -145 149
    11 -140 146
    12 -135 144
    13 -130 142
    14 -125 139
    15 -120 143
    16 -115 141
    17 -110 139
    18 -105 135
    19 -100 137
    20 -95 125
    21 -90 129
    22 -85 118
    23 -80 121
    24 -75 114
    25 -70 106
    26 -65 106
    27 -60 100
    28 -55 95
    29 -50 86
    30 -45 83
    31 -40 69
    32 -35 68
    33 -30 68
    34 -25 57
    35 -20 44
    36 -15 37
    37 -10 31
    38 -5 21
    39 0 14
    40 2 10
    41 4 6
    42 12 0
    43 20 6
    44 22 13
    45 24 17
    46 26 20
    47 28 25
    48 33 38
    49 38 47
    50 43 57
    51 48 68
    52 53 73
    53 58 82
    54 63 92
    55 68 98
    56 73 107
    57 78 113
    58 83 116
    59 88 119
    60 93 125
    61 98 125
    62 103 133
    63 108 132
    64 113 137
    65 118 136
    66 123 139
    67 128 139
    68 133 140
    69 138 142
    70 143 143
    71 148 143
    72 153 142
    73 158 151
    74 163 92
    75 168 98
    76 173 114
    77 178 111
    78 183 119
    79 188 108
    80 193 117
    81 198 116
    82 203 113
    83 178 111
    84 183 119
    85 188 108
    86 193 117
    87 198 116
    88 203 1000
    746 x 334 - 19K
    746 x 334 - 20K
  • Jessica UelmenJessica Uelmen Posts: 490
    edited 2013-11-20 10:18
    What is the battery voltage for the robot? Based on the calibration values, it looks like the batteries may be worn out. I'm not seeing a speed value higher than 150, and with fresh batteries you should reach 190-200. Low battery voltage might explain some of the strange behaviour, too (working, then not working).

    Depending on how much you adjusted the potentiometer, that may have had an effect. Especially if you centered them after calibration. The calibration depends on a center pulse around 1.52 ms, and if you've deviated too far from that point, there will be issues. Looking at the calibration data, it seems the left may be the only one with an problem. I'd re-center the left servo with the following program.
    [FONT=courier new]/* Center Signal Left Servo.c[/FONT][FONT=arial][FONT=Courier New][/FONT] [/FONT]
    [FONT=arial][FONT=Courier New]   Center signal to ActivityBot's left servo (closer[/FONT][/FONT]
    [FONT=arial][FONT=Courier New]   to servo ports).  [/FONT][FONT=Courier New]This code can be adjusted for[/FONT][/FONT]
    [FONT=arial][FONT=Courier New]   the right servo (closer to PWR switch) by [/FONT][/FONT]
    [FONT=arial][FONT=Courier New]   changing servo_set(12, 1500) to [/FONT][FONT=Courier New]servo_set(13, 1500).[/FONT][/FONT]
    [FONT=arial][FONT=Courier New]*/[/FONT][/FONT]
    [FONT=arial][FONT=courier new,monospace][/FONT] [/FONT]
    [FONT=arial][FONT=courier new,monospace]#include "simpletools.h"    // Include simple tools
    #include "servo.h"          // Include servo[/FONT][/FONT]
    [FONT=arial][FONT=courier new,monospace]int main()                  // main function
    {
      servo_set(12, 1500);      // Left servo center signal
    [/FONT][/FONT]
    [FONT=courier new]}[/FONT]
    

    Then, with fresh batteries, re-run the calibration. It's important that any time you make any mechanical modifications to the robot that the calibration is rerun.
Sign In or Register to comment.