Serial 8-servo controller

Cool, glad you’re in business.

The only real way to determine the safe range of a servo is to try it and see, as the exact values will vary from servo to servo. There is a mechanical stop built into one of the gears in the gear train to protect the potentiometer, which is what you hit when you turn a servo by hand as far as it will go. If you command your servo to or past this point, it will press against the mechanical stop, stall the motor, draw lots of current, heat things up, etc… None of this is immediately fatal for your servo, but it can be very bad for it over time. If you send a position command way out of range you’ll probably hear the servo shuddering, but even a slightly out of range command will stall the motor.

The best way to determine the safe range of a servo is to command it incrementally to one side, lets say towards the maximum position, until it is clearly not moving with successive commands. Start decrementing the position command until you see the servo twitch slightly back towards center. That position is your safe maximum, as far as you can go towards max without physically hitting the mechanical stop. Do the same for other side to find the safe minimum and you’re in business!

Now, unfortunately, modifying a servo for continuous rotation doesn’t mean you still have direct position control (i.e. you can’t exactly command the servo to turn 500 degrees clockwise). Inside your servo (and I highly recommend taking one apart to see) there is a rotary potentiometer, which is basically a variable resistor, turned by the last gear in the gear-train (same as the output shaft). This is the same kind of component behind most simple volume control knobs, and you can’t turn it all the way around. In fact, the mechanical stop is there to keep the motor from driving the potentiometer past it’s limits and damaging it.

When you modify a servo for continuous rotation, you really have three options:

  1. Remove the potentiometer, cut/file off the mechanical gearstop, remove the electronics and power the motor directly. This gives you a small, high torque continuous rotation motor and gear train enclosed in a neat little box, which you can drive with your own DC motor controller.

  2. Cut/file off the mechanical gearstop, and replace the potentiometer with two constant resistors. This gives you a continuous rotation motor which will go forward/stop/reverse (but with poor speed control in between) in response to a normal servo control signal.

  3. Cut/file off the mechanical gearstop, and move the potentiometer out of the servo (extend its three wires) to some other rotary linkage driven by the servo. This gives you rotary position control over something rotated by the servo, even if there is more gearing in between them. You can also use this for linear control by replacing the rotary potentiometer with a linear slide potentiometer. I did both for this project. Those are modified servos on the base, and the long wires lead to potentiometers I took out of the servos and hacked onto the joints of the robot arm driven by each servo.

If you want to do continuous rotation with position control and rotate more than 180 degrees, you’ll need a motor with an encoder, or a stepper motor, which are quite different, but also fun!

-Adam