Servo Surgery Teaches Us DIY Encoder Implants [Hackaday]

View Article on Hackaday

The modified servo being calibrated on the left half of the screen, with some graphs of its operation being shown on the right half.

Today, we shall talk about how [Adam Bäckström] took a DS3225 servo and rebuilt it to improve its accuracy, then built a high-precision robot arm with those modified servos to show just how much of an improvement he’s got – up to 36 times better positional accuracy. If this brings a déjà vu feeling, that’s because we’ve covered his servo modifications before, but now, there’s more. In a year’s time since the last video came out, [Adam] has taken it to the next level, showing us how the modification is made, and how we ourselves can do it, in a newly released video embedded below.

After ordering replacement controller PCBs designed by [Adam] (assembled by your PCBA service of choice), you disassemble the servo, carefully setting the gearbox aside for now. Gutting the stock control board is the obvious next step, but from there, you don’t just drop the new PCB in – there’s more to getting a perfect servo than this, you have to add extra sensing, too. First, you have to print a spacer and a cover for the control board, as well as a new base for the motor. You also have to print (or perhaps, laser-cut) two flat encoder disks, one black and one white, the white one being eccentric. It only escalates from here!

Both of these disks go inside the motor. That is, you have to pry the servo’s DC motor apart, take its base with brushes out, then insert the encoder disks. Then, you snip and file away at the base’s plastic parts to free up as much space inside the motor’s base as possible, and add the optical encoders in the space you freed. Once that’s done, you solder the motor, the optocoupler and the potentiometer connections to the new controller PCB, and assemble the motor back together.

After you’re finished with the surgery, you have to calibrate your servo, for which [Adam] shows how to properly set it up mechanically, provides the code you need to run, and even nice GUI tools with controls to tweak servo parameters – his firmware gives us way more power than we could ever expect from a servo like this. All the knobs and sliders available to control coefficients, limits and curves, show us that [Adam] really does understand what makes for proper servo movement. Enough care is put into the documentation, the explanations and the tools for this modification process, that we don’t have to be anxious about being left behind if we are to follow these steps ourselves!

In a robot arm, small accuracy errors at the base scale into large errors at the arm’s end. If what you crave is high accuracy on a budget, and you have a bit of time to devote to modifying stock servos, this approach might be just what you need, and [Adam] has basically laid all the groundwork for you. Last time we talked about these servo modifications, one of our commenters suggested that this could be a viable successor to the goals of the OpenServo project, and we definitely see where they’re coming from. What if you wanted to go even less expensive than this? You could build a servo out of junk DC motors with a “3 cent” microcontroller, then.

We thank [sarinkhan], [Diede] and [BaldPower] for sharing this with us!