Shop OBEX P1 Docs P2 Docs Learn Events
Issues with Activity Bot - Forward Stop Face Right.side — Parallax Forums

Issues with Activity Bot - Forward Stop Face Right.side

phantomphantom Posts: 4
edited 2014-05-23 19:34 in Robotics
Hello,

A few basics about my setup. I started with a BOE Bot chassis and added a Propeller Board of Education as well as the Activity Bot encoders and wheels. I am still using the original servos...not the high-speed servos of the Activity Bot.

Attachments:

photo 1.JPG
photo 2.JPG


My wiring is shown in the attached photos. In summary, I use:
  • Pin 14 for the left encoder (same as Activity Bot)
  • Pin 15 for the right encoder (same as Activity Bot)
  • Pin 16 for the left servo
  • Pin 17 for the right servo
This lead me to alter the Calibrate.c program for the change in servo pins:

/* ActivityBot Calibrate.c */

#include "simpletools.h"
#include "abcalibrate.h"

int main()
{
servo_pins(16, 17);
encoder_pins(14, 15);

high(26);
high(27);
cal_activityBot();
low(26);
low(27);
}}

My issue is the strange behavior my bot has when executing the "Forward Stop Face Right.side" (see YouTube video). Any assistance is greatly appreciated :smile:

[video=youtube_share;ognus1hULXs]

The code is very simple and is untouched from the Activity Bot code examples.
Here is again for convenience:

#include "simpletools.h"
#include "abdrive.h"

int main()
{
drive_goto(256, 256);
pause(200);
drive_goto(26, -25);
}

I successfully ran calibration (here is the calibration dump) (Please remember that I'm using the slower BOE Bot servos):

******************************

=== LEFT SERVO ===


Table Entries = 99
Zero Speed Index = 41


Index Servo Drive Encoder Ticks/Second


0 -194 1000
1 -189 52
2 -184 50
3 -179 50
4 -174 52
5 -169 51
6 -164 52
7 -159 51
8 -154 51
9 -149 51
10 -144 51
11 -139 51
12 -134 50
13 -129 49
14 -124 50
15 -119 49
16 -114 49
17 -109 49
18 -104 48
19 -99 47
20 -94 47
21 -89 46
22 -84 45
23 -79 43
24 -74 42
25 -69 41
26 -64 38
27 -59 36
28 -54 34
29 -49 30
30 -44 27
31 -39 24
32 -34 21
33 -29 17
34 -27 16
35 -25 14
36 -23 13
37 -21 11
38 -19 10
39 -17 9
40 -15 7
41 -2 0
42 11 5
43 13 7
44 15 8
45 17 10
46 19 11
47 21 13
48 23 14
49 25 16
50 27 17
51 29 19
52 31 19
53 33 22
54 38 25
55 43 28
56 48 30
57 53 33
58 58 35
59 63 38
60 68 40
61 73 41
62 78 43
63 83 43
64 88 45
65 93 46
66 98 46
67 103 46
68 108 47
69 113 48
70 118 48
71 123 49
72 128 48
73 133 49
74 138 50
75 143 50
76 148 50
77 153 50
78 158 50
79 163 50
80 168 50
81 173 50
82 178 50
83 183 50
84 188 50
85 193 50
86 198 50
87 203 51
88 153 50
89 158 50
90 163 50
91 168 50
92 173 50
93 178 50
94 183 50
95 188 50
96 193 50
97 198 50
98 203 1000




=== RIGHT SERVO ===


Table Entries = 100
Zero Speed Index = 44


Index Servo Drive Encoder Ticks/Second


0 -195 1000
1 -190 52
2 -185 52
3 -180 51
4 -175 51
5 -170 52
6 -165 53
7 -160 52
8 -155 51
9 -150 51
10 -145 52
11 -140 51
12 -135 50
13 -130 50
14 -125 49
15 -120 50
16 -115 50
17 -110 49
18 -105 47
19 -100 47
20 -95 46
21 -90 47
22 -85 46
23 -80 45
24 -75 42
25 -70 41
26 -65 39
27 -60 37
28 -55 34
29 -50 32
30 -45 29
31 -40 25
32 -35 22
33 -30 18
34 -28 17
35 -26 16
36 -24 14
37 -22 13
38 -20 11
39 -18 10
40 -16 9
41 -14 7
42 -12 5
43 -10 4
44 1 0
45 12 5
46 14 6
47 16 8
48 18 9
49 20 11
50 22 12
51 24 14
52 26 15
53 28 17
54 30 18
55 32 19
56 34 21
57 39 24
58 44 27
59 49 31
60 54 33
61 59 36
62 64 38
63 69 41
64 74 42
65 79 44
66 84 46
67 89 46
68 94 47
69 99 47
70 104 48
71 109 48
72 114 50
73 119 50
74 124 49
75 129 51
76 134 51
77 139 51
78 144 52
79 149 51
80 154 51
81 159 51
82 164 52
83 169 52
84 174 52
85 179 52
86 184 52
87 189 52
88 194 52
89 199 52
90 204 52
91 164 52
92 169 52
93 174 52
94 179 52
95 184 52
96 189 52
97 194 52
98 199 52
99 204 1000

******************************
480 x 640 - 66K
480 x 640 - 63K

Comments

  • NikosGNikosG Posts: 705
    edited 2014-05-13 05:36
    Hi Phantom,

    Welcome to the Forum!

    Changing the Activity Board with the Propeller Board of education in your ActivityBot, you can keep the pins P14, P15 for the encoders.(this makes things easier)
    You only need to change the pins for the servos.
    I recommend choosing for servo pins P18, P19. (See this post). So you’II give fewer commands for this change.
    It is very important to do first the calibration using the servo_pins(18, 19) command and then use the drive_servo_pins(18, 19) command in your application
    Here is the answer that gave me Andy Lindsay (Parrallax) for the same problem:
    Try adding servo_pins(18, 19) as the very first command in your Calibrate program's main function and run the calibration. In your application programs, keep drive_servo_pins(18, 19) as the first command in its main function
  • phantomphantom Posts: 4
    edited 2014-05-13 08:12
    Hello NikosG and thank you for responding!

    Just to clarify, I believe you meant "drive_servoPins(18, 19)" and not "drive_servo_pins(18, 19)".

    I did exactly as you recommended and end up with the same strange behavior that I detailed in my first message above. I really believe this has something to do with the drive_goto(256, 256) function call. I reduced this to drive_goto(64, 64) and it worked properly. I have a belief that the use of the 50RPM servos coupled with the calibration table is what results in this strange behavior. Many of the entries in the table are in the 48-51 RPM range. When the drive_goto() function uses ramping, so many of these values in the calibration table are the same, that it gets thrown-off somehow.

    I'm thinking of biting the bullet and just getting a set of the high-speed servos.
  • NikosGNikosG Posts: 705
    edited 2014-05-13 12:21
    Phantom,

    Your first image on post #1 gives me the sense that the encoder bracket doesn't attach properly the chassis (I think there is a gap between them).
    Check also again the cables connection on your encoders. (especially the plug that goes out from the encoder)
    In every case the high-speed servos is the best choice for the ActivityBot....
  • phantomphantom Posts: 4
    edited 2014-05-13 17:03
    NikosG,

    Good catch. I had the servos on the outside instead of the inside of the chassis. I have re-installed them and things sit better, however there is no change in the behavior. The calibration was success, but gave me very similar values to all of my previous runs.

    Perhaps the Activity Bot code is not made for the old 50RPM servos. I really would have thought it would be, however.
  • phantomphantom Posts: 4
    edited 2014-05-23 19:34
    Confirmed. The Activity Bot tutorials do not work with the older 50 RPM full-rotation servos from the BOE Bot.

    I dropped in the high-speed servos in my bot and the Activity Bot tutorial code works perfectly.
Sign In or Register to comment.