In a recent project creating an interactive robot arm, I needed to have joints that I could electronically rotate as well as read the angle from. I had some some projects in the past with hobbyist servo motors and knew that they regulated themselves internally with a potentiometer. The only problem was that once they were sent an angle, they didn't give any feedback for their position.
I figured that I could read this value myself if I just wired directly into the servo's potentiometer. Here's how I did it, and how you can do it too:
What You'll Need: (in addition to the servo)
Tape, a small small screwdriver, needle-nose pliers, an exacto knife, a soldering iron + electronics solder, a hot glue gun + glue, and an extra wire that's a different color from your servo wires.
Step 1:
Tape over the seams of the servo's gearbox, as shown. The gearbox is held on with the same screws as the back panel, which we'll be removing in the next step. We don't want our gearbox to fall off, so the tape should hold it on while we're working on it.
Step 2:
Unscrew the four screws in the back of the servo.
Step 3:
Take off the back cover and look inside. You should see the main printed circuit board for the servo. Underneath this is the motor and potentiometer. In some servos, this board is easily lifted without damaging any electrical connections but in other, like this one, the board is soldered to the top of the motor. So here's the tricky part: how do we get to the potentiometer? If we wanted to spend a lot longer doing this, then we'd disassemble a the servo to get to the potentiometer and risk breaking everything. Instead, we can be crafty about it.
Step 4:
Carefully, bend the circuit board by tugging on the three connection wires. Don't pull to hard or you'll crack to board and have to re-solder the connections across it. Now peek inside and you'll see some colored wires. What fun! Take particular notice of the yellow one. In most hobby servos, this is the one that connects to the potentiometer reading.
Step 5:
Use your needle-nose pliers, along with you patience and dexterity, to fish out a loop of the yellow wire. One you get it, keep the plier nose tucked under to keep it from slipping back inside.
Step 6:
While keeping the pliers in place, use your exacto knife to carefully scrape off a small hole in the coating of the yellow potentiometer wire.
Step 7:
Solder your differently-colored piece of wire to the yellow potentiometer wire.
Step 8:
Slip the pliers out of the loop and put a dab of hot glue over your soldered connection to electronically insulate it.
Step 9:
While your glue is cooling, use your exacto knive to widen the opening in your servo cover, so your extra wire has room to exit.
Step 10:
Firmly close the cover with your four wires (the original three, plus your extra one) sticking out.
Step 11:
While keeping the cover closed, screw the four long screws back into the servo to hold it together.
Step 12:
Remove the tape and admire your handiwork. Your servo should now work as normal with the original three wires. Your fourth extra wire can be connected to an analog input and used to read the value from the potentiometer. You can calibrate your potentiometer reading in your software so to get the actual angle of the servo.