Activity Bot Calibration issue
stcnz
Posts: 3
Hello there!
i'm having problems going through the calibration process for my activity bot.
Here is the specific information:
- my robot will begin the calibration by turning anti-clockwise, by turning the left wheel in reverse.It slows down to a stop and repeats...
- if i change the following code 'servo_pins(12, 13); and encoder_pins(14, 15);' by swapping numbers i.e. swap 12 with 13 and 14 with 15, the robot turns anti-clockwise by turning the right wheel forward, it also repeats after stopping
- my display calibration gives widely varying numbers as results, from successive 0's on left servo encoder ticks, to crazy high values on right servo.
- both servo drive values are all over the place also
I tried one posts suggestion by fixing the servo positioning, giving the adequate gap between the encoder and the servo. Not saying that its even related to this issue, I just dont know what is so I tried it. No luck there
So initially I thought perhaps there was something wrong with one of the pins of 12 and 13. But since I swapped the numbers in the calibration code I got the right wheel to move, so I potentially ruled that out.
So what is the real issue then? Can faulty encoders prevent the robot from doing the calibration properly, turning the appropriate ways?
If the encoders shouldn't effect the typical movement of the calibration, what could be potential factors?
Last note, all of the connections are correct, the correct resistors in the right place are used. The servo and encoders are correctly plugged in. I have switched the P12 and P13 to VIN. The rest are 5V.
The pre encoder light test worked correctly, when turning either wheel the corresponding P26/27 light flashed.
Thankyou in advance.
i'm having problems going through the calibration process for my activity bot.
Here is the specific information:
- my robot will begin the calibration by turning anti-clockwise, by turning the left wheel in reverse.It slows down to a stop and repeats...
- if i change the following code 'servo_pins(12, 13); and encoder_pins(14, 15);' by swapping numbers i.e. swap 12 with 13 and 14 with 15, the robot turns anti-clockwise by turning the right wheel forward, it also repeats after stopping
- my display calibration gives widely varying numbers as results, from successive 0's on left servo encoder ticks, to crazy high values on right servo.
- both servo drive values are all over the place also
I tried one posts suggestion by fixing the servo positioning, giving the adequate gap between the encoder and the servo. Not saying that its even related to this issue, I just dont know what is so I tried it. No luck there
So initially I thought perhaps there was something wrong with one of the pins of 12 and 13. But since I swapped the numbers in the calibration code I got the right wheel to move, so I potentially ruled that out.
So what is the real issue then? Can faulty encoders prevent the robot from doing the calibration properly, turning the appropriate ways?
If the encoders shouldn't effect the typical movement of the calibration, what could be potential factors?
Last note, all of the connections are correct, the correct resistors in the right place are used. The servo and encoders are correctly plugged in. I have switched the P12 and P13 to VIN. The rest are 5V.
The pre encoder light test worked correctly, when turning either wheel the corresponding P26/27 light flashed.
Thankyou in advance.
Comments
You should also run a simple "servo exerciser" that turns the servo full CW, full CCW, and stops. Test each servo separately to make sure they are working properly.
Once function is verified you can add the encoders back into the mix. I'm not familiar with the calibration program you're using, but if it's doing automatic zero-point calculation to measure the motion of the servo, then yes: if an encoder is not working properly (or isn't connected right), the calibration will fail.
For clarification, you do NOT need to mechanically center the ActivityBot's High Speed Continuous Rotation Servos if you are following the ActivityBot tutorial. The tutorial's calibration routine and abdrive library are designed to use the servos just as they come from the manufacturer.
If you purchased your ActivityBot directly from Parallax recently, the servo encoder brackets will not be a problem, those were redesigned last October. (The encoder issue is still included on the ActivityBot Troubleshooting Page for those who might have the earlier brackets http://learn.parallax.com/activitybot/troubleshooting)
You mentioned that the calibration routine makes your robot start by turning its left wheel backward, this is what it is supposed to do. The sequence is:
Left wheel backward at full speed, gradually slowing to a stop
Left wheel forward slowly, gradually increasing to full speed, then stopping.
Right wheel backward at full speed, gradually slowing to a stop
Right wheel forward slowly, gradually increasing to full speed, then stopping.
Resting a long moment, then the P26 and P27 LEDs turn off
So, what is the sequence of movement you get with the calibration program, when you are using the pin assignments from the tutorial? (P12: Left Servo, P13: Right Servo, P14: Left Encoder, P15: Right Encoder)
Welcome to the forums!
Your post in the Robotics forum has been removed because cross posting is not allowed.:
http://forums.parallax.com/showthread.php/134682-Forum-Guidelines
I have left it here since it had responses.
To Steph, the issue with my calibration is that it only does for the first movement of the calibration. I noticed from the video that the first movement was left wheel in reverse. But it continues with the first movement over and over again and does not do the rest.
This is why I tried changing the code to see if the other wheel would move, I thought perhaps the right servo was not working, so it was unable to follow to the next movement in the sequence. But from switching the pin numbers, the right wheel moved forward.
I did buy my activity bot recently so the servo lining up should not be an issue. I tried it anyway just in case, since I had nothing else to try anyway.
I'm not really sure what steps to take now, my issue is not on the troubleshooting page from what I can see. I was hoping you might be able to isolate the problem, or perhaps a suggestion on code that could isolate it. I'm keen to test whatever you suggest.
Thankyou in advance.
The behavior you mention can occur if the servos are manually adjusted way out of band; that is, the potentiometer on the side has been adjusted by someone so that the servo no longer has a center point within the normal pulse range provided by the Activity Board. If you (or a previous owner of your kit, if used) tweaked the servo pots, you need to put it right before you can continue. The encoders might not be able to compensate for the new setting.
If you didn't change the servos, and the kit is new, that leaves defective servos. But I find it highly unlikely both would be bad. So I'd look for a power problem instead. What you describe can also occur if the batteries are weak, or if separate power isn't reaching the servos (the servos are deriving what little power they're getting from the signal lines).
Be sure to run the servos with *fresh* batteries (don't assume; change them with new), and be sure the operating switch on the board is set to position "2". Switch the jumpers around for the servo headers, being sure the jumper for P12/P13 is set to VIN. Actually do physically switch the jumpers; the process can help to identify a bad power connection.
I don't know if there is example ActivityBot C code for setting the servo zero point and then demonstrating forward and back motion, but I would encourage you to locate one, so you can definitively test the servos, separate from the encoders.
I'm sure Steph will have other and probably better suggestions for you to try.
Seems strange to me that the batteries have enough power to move the robot so quickly in succession, but cannot change to the next movement in the sequence.
But it was a brand new activity bot and since the encoders worked correctly and the servo's seemed fine mechanically, it didn't leave much else.
So now i'm definitely going to invest in a rechargeable battery charger.
Now I can keep the ball rolling with my new interest. Also I look forward to reading builder's bonanza which I have beside me, once I finish the programmer's version.
Thanks again!
We carry a Li-Ion battery pack-charger designed to fit inside our small robot chassis. A less expensive option is to add a 6th battery with the BOE-Boost module - it slips right between the ends of the batteries and the terminals of the 5-cell battery holder that you already have.
If you use only 5. 1.2 V AA rechargeables, you will have only 6 V, which is at the very low end of the High Speed CR Servo input voltage specs --- they want 6 to 8 VDC.
Swap sevo conections, as to rule out servo malfunction.
This code: Should set your servos to their approximate center, but if either one continues to spin you should gently use a small screwdriver to adjust the pot (the small hole in the back of the servo) until it stops spinning.
Don't forget to re-run the calibration program from the ActivityBot instructions once you have done any manual centering.
@Jack,
Matt G is a Parallax employee and does not have a forum page, but he does pop in the forum ever once and a while.
Everyone including erco gets unlimited visits because erco reimburses me for all travel and entertainment expenses incurred when helping all other Forumistas FYI erco, Latest travels include 13 mid-western states, and Norway. I'll expect a PayPal from you by morning...
Glad you got it up and running there Jack!
-MattG