Robomotive Laboratories

Servo as a Gearmotor

Hack a Servo into a Gearmotor

Need a small gearmotor? Need position feedback? Need it CHEAP? Servos are a great option. Behind the electronics servos are simply gearmotors with a potentiometer driven by the output shaft. If you need to know the position of a motor rather than commanding a position and hoping for the best servos can be hacked to just what you need.

IMG_6662

Step 1: Select a Servo

Not all servos are well suited to this hack. We like the HS-311 for it’s reasonable torque and very low price. For best results stick with analog servos with brush motors, which will also keep your cost down. This tutorial is specific to the HS-311, and while all servos are generally similar it is highly unlikely that these steps will work exactly as written on another servo (HS-422 servos have a different circuit board, for example). IMG_6236Step 2: Open the Case

Open the case by removing the three long screws. No special precautions are required to keep the guts inside, but try not to drop it.

IMG_6257

IMG_6275

Step 3: Remove the Circuit Board

The circuit board is attached directly to the motor tabs. As the board ends up in the trash after all this you can walk your way up by melting the solder on one side, bending the board up slightly, then repeating on the other side. Repeat the process until the board comes free. Be careful, it’s still attached by three wires on the servo potentiometer.

IMG_6288

Step 4: Cut the potentiometer wires

Remove the circuit board. The three wires on the back are attached to the servo potentiometer. They’re small, so don’t pull to hard, and cut as close to the board as possible.

IMG_6321

You should end up with a servo with plenty of wire remaining.

 

Step 5: Cut the Servo Leads

The servo leads are very handy, so cut them as close to the board as possible. Set them aside for later.

IMG_6335

Step 6: Strip the Wires

If you’re converting to continuous rotation now is a great time to do it. Otherwise carefully strip the potentiometer wires so thy can be spliced to the servo wires.

IMG_6359

After striping the potentiometer wires do the same to the servo leads.

IMG_6393

Step 7: Solder the Potentiometer

Now a decision must be made. You can either match the colors (more or less) or match the position. We prefer to match position. Potentiometers have a positive, ground, and signal connection, with signal in the middle. The resistance between positive and ground is constant (about 5k Ohm in servos), but the resistance between signal and the other two changes. By making sure signal is in the center there is much less risk of shorting out your project. If the potentiometer is installed backwards the worst that happens is the reading will be opposite what you expect. With that decision made, apply heatshrink to the servo wires.

IMG_6402

Solder the wires to the servo lead.

IMG_6571

 

And use a heat gun to shrink the heatshrink.

IMG_6584

Step 8: Solder Motor Leads

The motor in a servo is just like any other DC brush motor and can be controlled by PWM signal. Note that you’ll need a motor driver or speed controller, as the servo circuit board normally does this task. Cut 8 inches or so of 22 or 24 gauge wire and solder directly to the motor posts, with wires facing toward the potentiometer.

IMG_6625

Step 9: Reassemble the Servo

Gather all the wires together over the area that the servo leads pass through the case. Push the spliced area into the servo case so the solder isn’t clamped between the case parts.

IMG_6640

Reinstall the case bottom using the screws removed earlier.

IMG_6649

And you’ve got an instrumented gearmotor you can control directly!

IMG_6662