Spinning in circles
ggreen
Posts: 4
Hello!
I searched the forum for this question, but didn't get a match, so I apologize if this has been asked before.
So I have twelve robots that have the same problem. One wheel works only part of the time and so the robots spin in a circle.
I've tried 1,000 things on the robot I'm working on right now, but it's still spinning in a circle and it's maddening. It is the left wheel that's not right.
Here's a list of things I've done:
1. Fresh batteries.
2. Traced the servo and encoder wires to their source and made sure they're well seated and plugged into the correct place ( P12, P13, etc.).
3. Made sure the VIN and 5V jumpers are in the correct configuration.
4. Ran the Test Encoder Connections program. It works perfectly.
5. Ran the Calibration program. The left wheel is wonky but works part of the time.
6. Made sure the gap is on the top of the servo.
7. Ran Test for Trim. It spins in a wide circle.
I ran the display calibration program. It's clear there's something wrong with the left servo, but I don't know what to do about it. I attached my results.
Thank you for any advice you have to offer.
I searched the forum for this question, but didn't get a match, so I apologize if this has been asked before.
So I have twelve robots that have the same problem. One wheel works only part of the time and so the robots spin in a circle.
I've tried 1,000 things on the robot I'm working on right now, but it's still spinning in a circle and it's maddening. It is the left wheel that's not right.
Here's a list of things I've done:
1. Fresh batteries.
2. Traced the servo and encoder wires to their source and made sure they're well seated and plugged into the correct place ( P12, P13, etc.).
3. Made sure the VIN and 5V jumpers are in the correct configuration.
4. Ran the Test Encoder Connections program. It works perfectly.
5. Ran the Calibration program. The left wheel is wonky but works part of the time.
6. Made sure the gap is on the top of the servo.
7. Ran Test for Trim. It spins in a wide circle.
I ran the display calibration program. It's clear there's something wrong with the left servo, but I don't know what to do about it. I attached my results.
Thank you for any advice you have to offer.
Comments
You might also want to swap the encoder cables when you swap the motors cables so you don't confuse the motor driver. Try swapping just the motor cables, both sets of cables, and just the encoder cables to see what happens.
Better yet, try some code that doesn't use the encoders, both before and after swapping any cables, to find out if the problem is with the motors or the encoders. Hopefully someone who knows more than I do about the encoders can say what kinds of problems bad or swapped encoders will cause.
If swapping the motor cables moves the problem to the right wheel, you have a wiring problem. Otherwise, if the problem stays with the left wheel, you have a motor (or maybe encoder) problem - check the motor's trim pots again. If both motors work but are both backwards (because you swapped the cables), then put all the cables back how they're supposed to be and check your wiring again.
Edit:Never mind. I misread.
Can you post the code you're using to make them move when the problem exists?
/*
Test for Trim.c
Test and adjust trim for servos and encoders
http://learn.parallax.com/activitybot/test-and-tune-your-activitybot
*/
#include "simpletools.h"
#include "abdrive.h"
int main()
{
drive_trimSet(0, 0, 0);
drive_speed(32, 32);
pause(8000);
drive_speed(0, 0);
}
I don't really have any spare parts, or I would switch the servos out. The main thing is that all of my robots have the same problem, and so I don't think that many servos could possibly be bad. I'm at a loss as to what to do from this point.
Since you have 12 bots with the same problem, look for a problem that could be consistent for all. Mounting of either the servo or encoder on the left side could be a consistent problem. (possibly rubbing of the wheel or servo, or the positioning problem noted above.)
I think you can run the servos without using the encoders by using the servo_speed function to see if it is a problem with the servo or the servo/encoder combination.
The function is described in the documentation for the servo.h library.
The function is
Speed ranges from -100 to +100 and is approximate since there is no encoder feedback. You have to issue the command for each servo (to go straight one has to be + the other -).
You need to include servo.h in your code.
I would test the bot by putting it on a platform or box so the wheels are off the ground so you don't lose control of it.
Hope this helps
Tom
Since I have 12 robots with the same problem, I don't think it can be a hardware problem.
Thanks everyone for trying to help. I don't know what to do now short of sending them all back to Parallax.
Please contact us at support@parallax.com and link this forum thread. If you can provide a contact number and time (include time zone) one of us will get back to you to try and determine what exactly is happening with your ActivityBots.
http://learn.parallax.com/tutorials/robot/activitybot/activitybot/extras/troubleshooting
Then run the calibration program again. If it still doesn't calibrate, please contact us at support@parallax.com.
/*
ActivityBot Servo Centering.c
*/
#include "simpletools.h" // Include simpletools
#include "servo.h"
int main() // Main function
{
servo_set(12, 1500);
servo_set(13, 1500);
}