Friday, June 29, 2012

Modifying servo for continuous rotation and adding digital encoder - part 1

I need servo motors with position feedback for a project. I chose to go with servos and later decided to integrate encoder right into servo - I've seen something like this before (e.g. here:  http://www.openservo.com/ )

As I need quite powerful servos, I chose all-metal Power HD High-Torque Servo 1501MG from Pololu. In part 1 I'll just document how I modified it for continuous rotation - it seems everyone did that at least once these days (well, not particularly everyone - my mom still hasn't done that).
Power HD 1501 Analog Servo
Power HD 1501 Analog Servo

What we'll need:

  • Phillips screw driver
  • Pliers
  • Soldering iron
  • 2 SMD resistors 2,4-3,3kOhm
  • A few napkins
Ok, let's go.

Unscrew the four screws on the bottom of the servo. Remove first the bottom and than the top of the servo so you can get access to both electronics and mechanical insides of the servo. Now take the top thin gear off and remove the thick yellow gear with shaft and small metal pin that mechanically prevents servo from full 360 degree rotation.
Top and bottom housings taken off. Note the topmost thick gear with small pin in it.
Now take pilers and gently remove the limiting pin from the gear. Carefully pull PCB out of the servo and look inside. There's a pot you neet to remove. Unscrew a small holding screw inside the servo and press on the pot's shaft so it goes out.
Note the thick gear now doesn't have the limiting pin. Also note the potentiometer taken out of the housing.
Note where the wire from the middle pin of the pot goes to! In 1501MG it is the central of the three PCB pads, but that may be not true for other servos. Take your soldering iron and desolder the pot from PCB. The pot is 5kOhm, so we'll use two 2,7kOhm SMD resistors to replace the pot in it's middle position. Solder the two resistors so the middle pad has connections with the both resistors and the other two pads with only any one of them.

If you are not going to play with encoder, you're almost done. You may now assemble and test your servo. It will stand still with control pulse of around 1,5ms (mine likes 1515us; I guess you know how servo is controlled, right? Otherwise don't hesitate to google for that useful knowledge). When the impulse shorter or longer it will start rotating. The bigger the difference between that "Zero Position" pulse length (1515us) and actual pulse length, the bigger will be the speed, but relation is highly unlinear.

In the next part we'll use the pot and some hand-made PCB to stick a digital AS5040 encoder into the servo.
Cheers

No comments: