Wierd Servo Control Problem

Hey guys,
I’m using two hitec servos in 5:1 gearboxes to control a large pan/tilt camera with some code I wrote in Java.

I’m using the pololu 8 servo controller and im using pololu mode 4 to control them (the 500-5500 range one).

There are a few wierd problems with controlling the servos though.

At a few places there are spots where an entire range of about 25-30 ‘units’ of movement point to exactly the same spot. (for example, 3050 to about 3080 are all at the same position. I can tell it to go anywhere in that range and it won’t move, just stick at the same spot.) What’s wierd is that the number ranges aren’t always the same. Yesterday, one of the ranges was around 3100, but today it’s somewhere else.

Also, sometimes, when I tell it to move 100 units to the left or right multiple times, the distance it moves is drastically different. For example, yesterday the distance traveled between 2700-2800 was a little more than half of the distance between 2800-2900.

Finally, sometimes the points are at different spots depending on whether the servos came from the left or the right.

I tested all of these by mounting a laser sight I got at the local gun store to the servos and marking the laser’s movement on my wall from 10 feet away. My application requires an error margin of no more than an inch from 10 feet away, but sometimes I was getting 5 -8 inches of difference between movements of 100 units (ie: 4100-4200 and 4200-4300)

I’ve checked my software, gotten a professional who’s delt with your controller for years to check my software, and tried the demo program at gpsbots.com, all with similar results. So i’m relitively sure it’s a servo issue.

You guys have any ideas what the problem could be?

P.S. hehe sorry for the long post.


Could you provide more information about the gearboxes? If there is any slop there, that could explain some of what you’re seeing. Can you try the servos without the gearbox?

- Jan

The gearboxes are robotzone 5:1 gearboxes for the HS-805BB

Now that you mention it, I did have to assemble the gearboxes myself and replace the small potentiometer of the servo with a bigger one for the gearbox. Could that be the problem? Perhaps I didn’t install the potentiometer correctly or bumped a gear while removing the old potentiometer?

P.S. Thanks for trying to help us over the phone ^_^.[/url]

I’m not familiar with the details of your servo modification, but I suspect that it is the cause of your problem. In general, the PID constants for a servo system are calibrated based on the whole system, and you probably didn’t do any recalibration after changing the mechanical parts, right?

Did you ask anyone at Servo City about your problem?

- Jan